MicroStrategy / mstrio-py

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

Getting an error message when using rest api call while answering prompts for report #175

Closed kkadu closed 8 months ago

kkadu commented 8 months ago

I am getting the below error while answering the prompts for a report. I don't get an error when I do the same via postman rest-api call. MicroStrategy Rest API Workflows > Analytics > Prompted Reports > Attribute Element Prompts

Error Message - {'code': 'ERR001', 'message': 'Cannot add an element to the collection which is not from the source attribute.', 'ticketId': 'e749eb092650458ea4c1a36ecd1615ba'}

Code - url_prompt_ans=f"/api/reports/{report_id}/instances/{instance_id}/prompts/answers" output = conn.put(url=conn.base_url+url_prompt_ans, json=json_data) print(output.json())

Here json_data is the json format of the prompt answer. I am not sure if this is an issue with the connection.put module for mstrio-py or something else.