Skip to main content

Get System Prompts

This workflow sample demonstrates how to get user system prompts.

info

Obtain the authorization token needed to execute the request using POST /api/auth/login.

Obtain the user ID from GET /api/users.

Get System Prompts

Use this workflow to quickly get system prompts for a user.

Request URL

GET /api/users/{userId}/systemprompts
  • userId: The ID of the user to retrieve system prompts for

Note: You can obtain the user ID from the response of GET /api/users.

Request Headers

NameTypeDescription
X-MSTR-AuthTokenHeaderAuthorization token generated by POST /api/auth/login

Sample Curl Request

curl -X GET  'http://demo.microstrategy.com/MicroStrategyLibrary/api/users/E697E885F6426C1F0B794593D648AFC0/systemprompts' \
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \

Response Body Schema

If successful, this request returns a 200 status code and a list of system prompts.

{
"systemPrompts": [
{
"index": 0,
"prompt": "string"
}
]
}
  • index: System Prompt Index
  • prompt: System Prompt Value

Sample Response Body

{
"systemPrompts": [
{
"index": 59,
"prompt": "Alen"
},
{
"index": 74,
"prompt": "60"
}
]
}

HTTP Status Codes

Status CodeDescription
200OK
500Internal Server Error
401Unauthorized
400Bad Request