Skip to content

Commit 51be5f7

Browse files
author
zhe
committed
Update
1 parent b86a0ac commit 51be5f7

File tree

51 files changed

+9585
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+9585
-18
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: System Prompt Index
3+
Description: System Prompt Index
4+
---
5+
6+
This page displays the index of system prompts which can be used to manage system prompts.
7+
8+
| Index | Description |
9+
| ----- | ------------------------ |
10+
| 59 | SSO Text Attribute 1 |
11+
| 60 | SSO Text Attribute 2 |
12+
| 61 | SSO Text Attribute 3 |
13+
| 62 | SSO Text Attribute 4 |
14+
| 63 | SSO Text Attribute 5 |
15+
| 64 | SSO Text Attribute 6 |
16+
| 65 | SSO Text Attribute 7 |
17+
| 66 | SSO Text Attribute 8 |
18+
| 67 | SSO Text Attribute 9 |
19+
| 68 | SSO Text Attribute 10 |
20+
| 69 | SSO Text Attribute 11 |
21+
| 70 | SSO Text Attribute 12 |
22+
| 71 | SSO Text Attribute 13 |
23+
| 72 | SSO Text Attribute 14 |
24+
| 73 | SSO Text Attribute 15 |
25+
| 74 | SSO Numeric Attribute 1 |
26+
| 75 | SSO Numeric Attribute 2 |
27+
| 76 | SSO Numeric Attribute 3 |
28+
| 77 | SSO Numeric Attribute 4 |
29+
| 78 | SSO Numeric Attribute 5 |
30+
| 79 | SSO Numeric Attribute 6 |
31+
| 80 | SSO Numeric Attribute 7 |
32+
| 81 | SSO Numeric Attribute 8 |
33+
| 82 | SSO Numeric Attribute 9 |
34+
| 83 | SSO Numeric Attribute 10 |
35+
| 84 | SSO Numeric Attribute 11 |
36+
| 85 | SSO Numeric Attribute 12 |
37+
| 86 | SSO Numeric Attribute 13 |
38+
| 87 | SSO Numeric Attribute 14 |
39+
| 88 | SSO Numeric Attribute 15 |
40+
| 89 | SSO Date Attribute 1 |
41+
| 90 | SSO Date Attribute 2 |
42+
| 91 | SSO Date Attribute 3 |
43+
| 92 | SSO Date Attribute 4 |
44+
| 93 | SSO Date Attribute 5 |
45+
| 94 | SSO Date Attribute 6 |
46+
| 95 | SSO Date Attribute 7 |
47+
| 96 | SSO Date Attribute 8 |
48+
| 97 | SSO Date Attribute 9 |
49+
| 98 | SSO Date Attribute 10 |
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Get System Prompts
3+
Description: Get System Prompts of a user.
4+
---
5+
6+
This workflow sample demonstrates how to get user system prompts.
7+
8+
:::info
9+
10+
Obtain the authorization token needed to execute the request using
11+
[POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).
12+
13+
Obtain the user ID from
14+
[GET /api/users](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).
15+
16+
:::
17+
18+
## Get System Prompts
19+
20+
Use this workflow to quickly get system prompts for a user.
21+
22+
### Request URL
23+
24+
```bash
25+
GET /api/users/{userId}/systemprompts
26+
```
27+
28+
- userId: The ID of the user to retrieve system prompts for
29+
30+
**Note:** You can obtain the user ID from the response of
31+
[GET /api/users](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).
32+
33+
### Request Headers
34+
35+
| Name | Type | Description |
36+
| ------------------ | ------ | ----------------------------------------------------- |
37+
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login |
38+
39+
### Sample Curl Request
40+
41+
```bash
42+
curl -X GET 'http://demo.microstrategy.com/MicroStrategyLibrary/api/users/E697E885F6426C1F0B794593D648AFC0/systemprompts' \
43+
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \
44+
```
45+
46+
### Response Body Schema
47+
48+
If successful, this request returns a `200` status code and a list of system prompts.
49+
50+
```json
51+
{
52+
"systemPrompts": [
53+
{
54+
"index": 0,
55+
"prompt": "string"
56+
}
57+
]
58+
}
59+
```
60+
61+
- index: System Prompt Index
62+
- prompt: System Prompt Value
63+
64+
### Sample Response Body
65+
66+
```json
67+
{
68+
"systemPrompts": [
69+
{
70+
"index": 59,
71+
"prompt": "Alen"
72+
},
73+
{
74+
"index": 74,
75+
"prompt": "60"
76+
}
77+
]
78+
}
79+
```
80+
81+
### HTTP Status Codes
82+
83+
| Status Code | Description |
84+
| ----------- | --------------------- |
85+
| 200 | OK |
86+
| 500 | Internal Server Error |
87+
| 401 | Unauthorized |
88+
| 400 | Bad Request |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Manage System Prompts
3+
Description: Manage system prompts using the Strategy REST API.
4+
---
5+
6+
You can use REST API requests to manage system prompts:
7+
8+
- [Get system prompts of a user](get-system-prompts/get-system-prompts.md)
9+
- [Update system prompts of a user](update-system-prompts/update-system-prompts.md)
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: Update System Prompts
3+
Description: Update System Prompts for a user.
4+
---
5+
6+
This workflow sample demonstrates how to update user system prompts.
7+
8+
:::info
9+
10+
Obtain the authorization token needed to execute the request using
11+
[POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).
12+
13+
Obtain the user ID from
14+
[GET /api/users](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).
15+
16+
:::
17+
18+
## Update System Prompts
19+
20+
Use this workflow to quickly update system prompts for a user.
21+
22+
### Request URL
23+
24+
```bash
25+
POST /api/users/{userId}/systemprompts
26+
```
27+
28+
- userId: The ID of the user to update system prompts for
29+
30+
**Note:** You can obtain the user ID from the response of
31+
[GET /api/users](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).
32+
33+
### Request Headers
34+
35+
| Name | Type | Description |
36+
| ------------------ | ------ | ----------------------------------------------------- |
37+
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login |
38+
39+
### Request Body Schema
40+
41+
```json
42+
{
43+
"systemPrompts": [
44+
{
45+
"index": 0,
46+
"prompt": "string"
47+
}
48+
]
49+
}
50+
```
51+
52+
- index: System Prompt Index
53+
- prompt: System Prompt Value
54+
55+
### Sample Request Body
56+
57+
```json
58+
{
59+
"systemPrompts": [
60+
{
61+
"index": 59,
62+
"prompt": "Alen"
63+
},
64+
{
65+
"index": 74,
66+
"prompt": "60"
67+
}
68+
]
69+
}
70+
```
71+
72+
You can use this endpoint to clear user system prompts by setting the prompts list to an
73+
empty array.
74+
75+
```json
76+
{
77+
"systemPrompts": []
78+
}
79+
```
80+
81+
### Sample Curl Request
82+
83+
```bash
84+
curl -X 'POST' 'http://demo.microstrategy.com/MicroStrategyLibrary/api/users/E697E885F6426C1F0B794593D648AFC0/systemprompts' \
85+
-H 'accept: application/json' \
86+
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \
87+
-H 'Content-Type: application/json' \
88+
-d '{
89+
"systemPrompts": [
90+
{
91+
"index": 59,
92+
"prompt": "Alen"
93+
},
94+
{
95+
"index": 74,
96+
"prompt": "60"
97+
}
98+
]
99+
}'
100+
```
101+
102+
### Response Body Schema
103+
104+
If successful, this API call returns a `200 OK` status code and a list of system prompts in the
105+
response body.
106+
107+
```json
108+
{
109+
"systemPrompts": [
110+
{
111+
"index": 0,
112+
"prompt": "string"
113+
}
114+
]
115+
}
116+
```
117+
118+
- index: System Prompt Index
119+
- prompt: System Prompt Value
120+
121+
#### Sample Response
122+
123+
```json
124+
{
125+
"systemPrompts": [
126+
{
127+
"index": 59,
128+
"prompt": "Alen"
129+
},
130+
{
131+
"index": 74,
132+
"prompt": "60"
133+
}
134+
]
135+
}
136+
```
137+
138+
### HTTP Status Codes
139+
140+
| Status Code | Description |
141+
| ----------- | --------------------- |
142+
| 200 | OK |
143+
| 500 | Internal Server Error |
144+
| 401 | Unauthorized |
145+
| 400 | Bad Request |

0 commit comments

Comments
 (0)