Object prompts
You can try out this workflow at REST API Playground.
Learn more about MicroStrategy REST API Playground here.
An object prompt allows the caller to supply a list of objects, such as attributes, metrics, hierarchies, and so on from which a selection is made.
Workflow for object prompts
Here is a workflow sample for using REST APIs to execute object prompts:
-
The user authenticates into the environment using the following endpoint and standard authentication:
- POST
/api/auth/login
- POST
-
Use the following endpoints to create a report or dashboard/document instance:
- POST
/api/reports/{reportId}/instances
- POST
/api/documents/{id}/instances
-
Use the following endpoints to get the collection of prompts and their respective definitions from a report, document, or dashboard:
- GET
/api/reports/{reportId}/prompts
- GET
/api/reports/{reportId}/instances/{instanceId}/prompts
- GET
/api/documents/{id}/prompts
- GET
/api/documents/{id}/instances/{instanceId}/prompts
- GET
-
Use the following endpoints to get an available list of objects for answering the prompts for a report, document, or dashboard instance:
- GET
/api/reports/{reportId}/instances/{instanceId}/prompts/{promptIdentifier}/objects
- GET
/api/documents/{id}/instances/{instanceId}/prompts/{promptIdentifier}/objects
- GET
-
Use the following endpoints to answer a prompt applied to a dashboard, document, or report instance:
- PUT
/api/reports/{reportId}/instances/{instanceId}/prompts/answers
- POST
/api/documents/{id}/instances/{instanceId}/prompts/answers
- PUT
-
Use the following endpoints to answer specified prompts on the document, dashboard, or report instance:
- PUT
/api/reports/{reportId}/instances/{instanceId}/prompts/answers
- PUT
/api/documents/{id}/instances/{instanceId}/prompts/answers
- PUT
-
Get the result of a report instance. Use the following API endpoints to get report data after applying a prompt on top of the report instance:
- GET
/api/reports/{reportId}/instances/{instancesId}
- GET
/api/dossiers/{dossierId}/instances/{dossierInstanceId}
- GET