MicroStrategy / mstrio-py

Python integration for MicroStrategy
Apache License 2.0
90 stars 60 forks source link

IServerError: 'X-MSTR-ProjectID' header is required when searching in the given domain.; #100

Closed hustontrevor closed 2 years ago

hustontrevor commented 2 years ago

https://github.com/MicroStrategy/mstrio-py/blob/f63a1193b25a876b6621e919987f9a678e6a1fdb/mstrio/modeling/schema/table/logical_table.py#L199

I think the project param is assuming the project_id was defined in the connection and it is not using the value passed to list_logical_tables

My code:

conn_dev = Connection(base_url_dev, username_dev, password_dev, ssl_verify=False)
projs = env_dev.list_loaded_projects(True)
for p in projs:
    logical_tables = list_logical_tables(connection=conn_dev, project_id=p['id'], to_dictionary=True)
urszulajaczewska commented 2 years ago

Hi @hustontrevor, we've logged the defect. For now you can pass project_id in Connection for the code to work.

urszulajaczewska commented 2 years ago

@hustontrevor issue has been resolved and fix will be available with next release.