Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: System Prompt Index
Description: System Prompt Index
---

This page displays the index of system prompts which can be used to manage system prompts.

| Index | Description |
| ----- | ------------------------ |
| 59 | SSO Text Attribute 1 |
| 60 | SSO Text Attribute 2 |
| 61 | SSO Text Attribute 3 |
| 62 | SSO Text Attribute 4 |
| 63 | SSO Text Attribute 5 |
| 64 | SSO Text Attribute 6 |
| 65 | SSO Text Attribute 7 |
| 66 | SSO Text Attribute 8 |
| 67 | SSO Text Attribute 9 |
| 68 | SSO Text Attribute 10 |
| 69 | SSO Text Attribute 11 |
| 70 | SSO Text Attribute 12 |
| 71 | SSO Text Attribute 13 |
| 72 | SSO Text Attribute 14 |
| 73 | SSO Text Attribute 15 |
| 74 | SSO Numeric Attribute 1 |
| 75 | SSO Numeric Attribute 2 |
| 76 | SSO Numeric Attribute 3 |
| 77 | SSO Numeric Attribute 4 |
| 78 | SSO Numeric Attribute 5 |
| 79 | SSO Numeric Attribute 6 |
| 80 | SSO Numeric Attribute 7 |
| 81 | SSO Numeric Attribute 8 |
| 82 | SSO Numeric Attribute 9 |
| 83 | SSO Numeric Attribute 10 |
| 84 | SSO Numeric Attribute 11 |
| 85 | SSO Numeric Attribute 12 |
| 86 | SSO Numeric Attribute 13 |
| 87 | SSO Numeric Attribute 14 |
| 88 | SSO Numeric Attribute 15 |
| 89 | SSO Date Attribute 1 |
| 90 | SSO Date Attribute 2 |
| 91 | SSO Date Attribute 3 |
| 92 | SSO Date Attribute 4 |
| 93 | SSO Date Attribute 5 |
| 94 | SSO Date Attribute 6 |
| 95 | SSO Date Attribute 7 |
| 96 | SSO Date Attribute 8 |
| 97 | SSO Date Attribute 9 |
| 98 | SSO Date Attribute 10 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Get System Prompts
Description: Get System Prompts of a user.
---

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](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).

Obtain the user ID from
[GET /api/users](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).

:::

## Get System Prompts

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

### Request URL

```bash
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](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).

### Request Headers

| Name | Type | Description |
| ------------------ | ------ | ----------------------------------------------------- |
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login |

### Sample Curl Request

```bash
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.

```json
{
"systemPrompts": [
{
"index": 0,
"prompt": "string"
}
]
}
```

- index: System Prompt Index
- prompt: System Prompt Value

### Sample Response Body

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

### HTTP Status Codes

| Status Code | Description |
| ----------- | --------------------- |
| 200 | OK |
| 500 | Internal Server Error |
| 401 | Unauthorized |
| 400 | Bad Request |
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Manage System Prompts
Description: Manage system prompts using the Strategy REST API.
---

You can use REST API requests to manage system prompts:

- [Get system prompts of a user](get-system-prompts/get-system-prompts.md)
- [Update system prompts of a user](update-system-prompts/update-system-prompts.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: Update System Prompts
Description: Update System Prompts for a user.
---

This workflow sample demonstrates how to update user system prompts.

:::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).

Obtain the user ID from
[GET /api/users](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).

:::

## Update System Prompts

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

### Request URL

```bash
POST /api/users/{userId}/systemprompts
```

- userId: The ID of the user to update system prompts for

**Note:** You can obtain the user ID from the response of
[GET /api/users](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/User%20Management/getUsers).

### Request Headers

| Name | Type | Description |
| ------------------ | ------ | ----------------------------------------------------- |
| `X-MSTR-AuthToken` | Header | Authorization token generated by POST /api/auth/login |

### Request Body Schema

```json
{
"systemPrompts": [
{
"index": 0,
"prompt": "string"
}
]
}
```

- index: System Prompt Index
- prompt: System Prompt Value

### Sample Request Body

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

You can use this endpoint to clear user system prompts by setting the prompts list to an
empty array.

```json
{
"systemPrompts": []
}
```

### Sample Curl Request

```bash
curl -X 'POST' 'http://demo.microstrategy.com/MicroStrategyLibrary/api/users/E697E885F6426C1F0B794593D648AFC0/systemprompts' \
-H 'accept: application/json' \
-H 'X-MSTR-AuthToken: h979btnpbep63peg8ind69ot79' \
-H 'Content-Type: application/json' \
-d '{
"systemPrompts": [
{
"index": 59,
"prompt": "Alen"
},
{
"index": 74,
"prompt": "60"
}
]
}'
```

### Response Body Schema

If successful, this API call returns a `200 OK` status code and a list of system prompts in the
response body.

```json
{
"systemPrompts": [
{
"index": 0,
"prompt": "string"
}
]
}
```

- index: System Prompt Index
- prompt: System Prompt Value

#### Sample Response

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

### HTTP Status Codes

| Status Code | Description |
| ----------- | --------------------- |
| 200 | OK |
| 500 | Internal Server Error |
| 401 | Unauthorized |
| 400 | Bad Request |
Loading