-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update * Update --------- Co-authored-by: zhe_mstr <[email protected]>
- Loading branch information
Showing
11 changed files
with
486 additions
and
25 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...common-workflows/administration/manage-bookmarks/bulk-deletion/bulk-deletion.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: Bulk deletion of bookmarks | ||
Description: Bulk deletion of bookmarks | ||
--- | ||
|
||
This workflow sample demostrates how to delete multiple bookmarks at once. | ||
|
||
:::info | ||
|
||
Obtain the authorization token needed to execute the request using [POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin). | ||
|
||
Get the project ID from [GET /api/projects](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Projects/getProjects_1). | ||
|
||
::: | ||
|
||
## Bulk deletion of bookmarks | ||
|
||
By using this workflow, you can quickly delete multiple bookmarks at once. | ||
|
||
### Request URL | ||
|
||
```bash | ||
DELETE /api/bookmarks | ||
``` | ||
|
||
### Request Headers | ||
|
||
| Name | Type | Description | | ||
| ------------------ | ------ | ----------------------------------------------------- | | ||
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login | | ||
| `X-MSTR-ProjectID` | Header | Project ID generated by GET /api/projects | | ||
|
||
### Sample Curl Request | ||
|
||
```bash | ||
curl -X DELETE 'http://demo.microstrategy.com/MicroStrategyLibrary/api/bookmarks' \ | ||
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \ | ||
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' | ||
``` | ||
|
||
### Response | ||
|
||
If successful, this request returns a `204` status code. | ||
|
||
### HTTP Status Codes | ||
|
||
| Status Code | Description | | ||
| ----------- | --------------------- | | ||
| 204 | No Content | | ||
| 500 | Internal Server Error | | ||
| 401 | Unauthorized | | ||
| 400 | Bad Request | |
103 changes: 103 additions & 0 deletions
103
...on-workflows/administration/manage-bookmarks/create-bookmark/create-bookmark.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
title: Create a bookmark | ||
Description: Create a new bookmark to the current shortcut object. | ||
--- | ||
|
||
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](https://www.postman.com/microstrategysdk/workspace/microstrategy-rest-api/request/16131298-c4ea6f55-358d-48b1-b13d-57557430c8ee) | ||
|
||
::: | ||
|
||
:::info | ||
|
||
Obtain the authorization token needed to execute the request using [POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin). | ||
|
||
Get the project ID from [GET /api/projects](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Projects/getProjects_1). | ||
|
||
::: | ||
|
||
## Create a new bookmark | ||
|
||
By using this workflow, you can quickly create a new bookmark to the current shortcut object. | ||
|
||
### Request URL | ||
|
||
```bash | ||
POST /api/bookmarks | ||
``` | ||
|
||
### Request Headers | ||
|
||
| Name | Type | Description | | ||
| ------------------ | ------ | ----------------------------------------------------- | | ||
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login | | ||
| `X-MSTR-ProjectID` | Header | Project ID generated by GET /api/projects | | ||
|
||
### Request body schema | ||
|
||
```json | ||
{ | ||
"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 | ||
|
||
```json | ||
{ | ||
"name": "bookmark sample", | ||
"instanceId": "E697E885F6426C1F0B794593D648AFC0" | ||
} | ||
``` | ||
|
||
### Sample Curl Request | ||
|
||
```bash | ||
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. | ||
|
||
```json | ||
{ | ||
"id": "string" | ||
} | ||
``` | ||
|
||
- id: Bookmark ID | ||
|
||
#### sample Response | ||
|
||
```json | ||
{ | ||
"id": "00000000000000000000000000" | ||
} | ||
``` | ||
|
||
### HTTP Status Codes | ||
|
||
| Status Code | Description | | ||
| ----------- | ------------------------ | | ||
| 201 | Created (See [Location]) | | ||
| 500 | Internal Server Error | | ||
| 401 | Unauthorized | | ||
| 400 | Bad Request | |
60 changes: 60 additions & 0 deletions
60
...on-workflows/administration/manage-bookmarks/delete-bookmark/delete-bookmark.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Delete a bookmark | ||
Description: Delete a bookmark | ||
--- | ||
|
||
This workflow sample demonstrates how to delete a bookmark. | ||
|
||
:::tip | ||
|
||
You can try out this API with the [REST API Playground](https://www.postman.com/microstrategysdk/workspace/microstrategy-rest-api/request/16131298-30c5966a-8fb3-4f5a-b4aa-4c0832e2cc9b) | ||
|
||
::: | ||
|
||
:::info | ||
|
||
Obtain the authorization token needed to execute the request using [POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin). | ||
|
||
Get the project ID from [GET /api/projects](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Projects/getProjects_1). | ||
|
||
::: | ||
|
||
## Delete a bookmark | ||
|
||
By using this workflow, you can quickly delete a bookmark. | ||
|
||
### Request URL | ||
|
||
```bash | ||
DELETE /api/bookmarks/{id} | ||
``` | ||
|
||
- id: Bookmark ID | ||
|
||
### Request Headers | ||
|
||
| Name | Type | Description | | ||
| ------------------ | ------ | ----------------------------------------------------- | | ||
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login | | ||
| `X-MSTR-ProjectID` | Header | Project ID generated by GET /api/projects | | ||
|
||
### Sample Curl Request | ||
|
||
```bash | ||
curl -X DELETE 'http://demo.microstrategy.com/MicroStrategyLibrary/api/bookmarks/1F0B794593D648AFC0' \ | ||
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \ | ||
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' | ||
``` | ||
|
||
### Response | ||
|
||
If successful, this request returns a `204` status code. | ||
|
||
### HTTP Status Codes | ||
|
||
| Status Code | Description | | ||
| ----------- | --------------------- | | ||
| 204 | No Content | | ||
| 500 | Internal Server Error | | ||
| 401 | Unauthorized | | ||
| 400 | Bad Request | |
120 changes: 120 additions & 0 deletions
120
...common-workflows/administration/manage-bookmarks/get-bookmarks/get-bookmarks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
title: Get bookmarks | ||
Description: Get a list of bookmarks from a shortcut object. | ||
--- | ||
|
||
This workflow sample demonstrates how to get a list of bookmarks from a shortcut object. | ||
|
||
:::tip | ||
|
||
You can try out this API with the [REST API Playground](https://www.postman.com/microstrategysdk/workspace/microstrategy-rest-api/request/16131298-d9b09847-5ef5-42f2-8ab3-3a384c45b8da) | ||
|
||
::: | ||
|
||
:::info | ||
|
||
Obtain the authorization token needed to execute the request using [POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin). | ||
|
||
Get the project ID from [GET /api/projects](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Projects/getProjects_1). | ||
|
||
::: | ||
|
||
## Get bookmarks | ||
|
||
By using this workflow, you can quickly get a list of bookmarks from a shortcut object. | ||
|
||
### Request URL | ||
|
||
```bash | ||
GET /api/shortcuts/{shortcutId}/bookmarks | ||
``` | ||
|
||
- shortcutId: The ID of the document shortcut to execute | ||
|
||
**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`. | ||
|
||
### Request Headers | ||
|
||
| Name | Type | Description | | ||
| ------------------ | ------ | ----------------------------------------------------- | | ||
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login | | ||
| `X-MSTR-ProjectID` | Header | Project ID generated by GET /api/projects | | ||
|
||
### Sample Curl Request | ||
|
||
```bash | ||
curl -X GET 'http://demo.microstrategy.com/MicroStrategyLibrary/api/shortcuts/E697E885F6426C1F0B794593D648AFC0/bookmarks' \ | ||
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \ | ||
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' | ||
``` | ||
|
||
### Response body schema | ||
|
||
If successful, this request returns a `200` status code and a list of bookmarks. | ||
|
||
```json | ||
[ | ||
{ | ||
"id": "string", | ||
"name": "string", | ||
"version": "string", | ||
"creationTime": "string", | ||
"lastUpdateTime": "string", | ||
"lastViewTime": "string", | ||
"href": "string", | ||
"shared": "boolean", | ||
"hidden": "boolean", | ||
"owner": { | ||
"id": "string", | ||
"name": "string", | ||
"expired": "boolean" | ||
} | ||
} | ||
] | ||
``` | ||
|
||
- id: Bookmark ID | ||
- name: Bookmark name | ||
- version: Bookmark version ID | ||
- creationTime: Bookmark creation time in UTC | ||
- lastUpdateTime: Bookmark last update time in UTC | ||
- lastViewTime: Bookmark last view time in UTC | ||
- href: Relative URL to get bookmark details | ||
- shared: Bookmark has been shared to others | ||
- hidden: Bookmark has been deleted by shared owner | ||
- owner: Bookmark owner details | ||
- id: Owner ID | ||
- name: Owner name | ||
- expired: Owner expired | ||
|
||
### Sample response body | ||
|
||
```json | ||
[ | ||
{ | ||
"name": "sample_name", | ||
"id": "sample_id", | ||
"version": "1", | ||
"creationTime": "2024-08-27T07:40:27.194Z", | ||
"lastUpdateTime": "2024-08-27T07:40:27.194Z", | ||
"lastViewTime": "2024-08-27T07:40:27.194Z", | ||
"href": "/relative/url", | ||
"shared": true, | ||
"hidden": true, | ||
"owner": { | ||
"name": "owner_name", | ||
"id": "owner_id", | ||
"expired": true | ||
} | ||
} | ||
] | ||
``` | ||
|
||
### HTTP Status Codes | ||
|
||
| Status Code | Description | | ||
| ----------- | --------------------- | | ||
| 200 | OK | | ||
| 500 | Internal Server Error | | ||
| 401 | Unauthorized | | ||
| 400 | Bad Request | |
12 changes: 12 additions & 0 deletions
12
docs/common-workflows/administration/manage-bookmarks/manage-bookmarks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Manage Bookmarks | ||
Description: Manage bookmarks using the MicroStrategy REST API. | ||
--- | ||
|
||
You can use REST API requests to manage bookmarks: | ||
|
||
- [Add a new bookmark to the current shortcut object](create-bookmark/create-bookmark.md) | ||
- [Bulk deletion of bookmarks](bulk-deletion/bulk-deletion.md) | ||
- [Update a bookmark](update-bookmark/update-bookmark.md) | ||
- [Delete a bookmark](delete-bookmark/delete-bookmark.md) | ||
- [Get a list of bookmarks from a shortcut object](get-bookmarks/get-bookmarks.md) |
Oops, something went wrong.