Skip to main content

Create a bookmark

This workflow sample demonstrates how to create a new bookmark to the current shortcut object.

tip

You can try out this API with the REST API Playground

info

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

Get the project ID from GET /api/projects.

Create a new bookmark

By using this workflow, you can quickly create a new bookmark to the current shortcut object.

Request URL

POST /api/bookmarks

Request Headers

NameTypeDescription
X-MSTR-AuthTokenHeaderAuthorization token generated by POST /api/auth/login
X-MSTR-ProjectIDHeaderProject ID generated by GET /api/projects

Request body schema

{
"name": "string",
"instanceId": "string"
}
  • name: Bookmark name
  • instanceId: Document shortcut instance ID

Note: You can obtain the document shortcut instance ID from the URL. For example, if you open a dashboard and the URL is https://demo.microstrategy.com/MicroStrategyLibrary/app/EC70648611E7A2F962E90080EFD58751/316AAC7211EA8303102E0080EFA5E1BA then the instance ID is 316AAC7211EA8303102E0080EFA5E1BA.

Sample Request Body

{
"name": "bookmark sample",
"instanceId": "E697E885F6426C1F0B794593D648AFC0"
}

Sample Curl Request

curl -X 'POST' 'http://demo.microstrategy.com/MicroStrategyLibrary/api/bookmarks' \
-H 'accept: application/json' \
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \
-H 'Content-Type: application/json' \
-d '{
"name": "bookmark sample",
"instanceId": "E697E885F6426C1F0B794593D648AFC0"
}'

Response body schema

If successful, this API call returns a 201 Created status code and an ID of the bookmark in the response body.

{
"id": "string"
}
  • id: Bookmark ID

sample Response

{
"id": "00000000000000000000000000"
}

HTTP Status Codes

Status CodeDescription
201Created (See [Location])
500Internal Server Error
401Unauthorized
400Bad Request