ThoughtSpot AI API

The AI API from ThoughtSpot — 26 operation(s) for ai.

Documentation

Specifications

Other Resources

OpenAPI Specification

thoughtspot-ai-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: ThoughtSpot Public REST 10.1.0.cl AI API
  version: '2.0'
servers:
- url: '{base-url}'
  variables:
    base-url:
      default: https://localhost:443
security:
- bearerAuth: []
tags:
- name: AI
paths:
  /api/rest/2.0/ai/agent/conversation/create:
    post:
      operationId: createAgentConversation
      description: "\n <span class=\"since-beta-tag\">Version: 26.2.0.cl or later</span>\n\n<span class=\"since-beta-tag\">Version: 26.2.0.cl or later</span>\n\nCreates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe request must include the `metadata_context` parameter to define the conversation context. The context type can be one of:\n\n- `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility.\n- `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries.\n\n> **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"<worksheet-id>\" } }`.\n\nThe `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation:\n\n- `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history\n\nIf the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations.\n\n#### Example request\n\n```json\n{\n  \"metadata_context\": {\n    \"type\": \"DATA_SOURCE\",\n    \"data_source_context\": {\n      \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n    }\n  },\n  \"conversation_settings\": {}\n}\n```\n\n#### Error responses\n\n| Code | Description                                                                                                                             |\n| ---- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| 401  | Unauthorized — authentication token is missing, expired, or invalid.                                                                    |\n| 403  | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n>\n> - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n"
      tags:
      - AI
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentConversationRequest'
        required: true
      parameters: []
      responses:
        '200':
          description: Common successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConversation'
              examples:
                example_1:
                  summary: Create a conversation with a specific data source
                  value:
                    conversation_id: wwHQ5j8O8dQC
                    conversation_identifier: wwHQ5j8O8dQC
                example_2:
                  summary: Create a conversation using auto mode where the agent automatically discovers and selects the most relevant datasets for the user's queries
                  value:
                    conversation_id: aaHQ5j8O8dQC
                    conversation_identifier: aaHQ5j8O8dQC
        '201':
          description: Common error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConversation'
        '400':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/rest/2.0/ai/conversation/create:
    post:
      operationId: createConversation
      description: '

        <span class="since-beta-tag">Beta</span> <span class="since-beta-tag">Version: 10.4.0.cl or later</span>


        <span class="since-beta-tag">Version: 10.4.0.cl or later</span>


        Creates a new conversation session tied to a specific data model for AI-driven natural language querying.


        Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.


        #### Usage guidelines


        The request must include:

        - `metadata_identifier`: the unique ID of the data source that provides context for the conversation


        Optionally, you can provide:

        - `tokens`: a token string to set initial context for the conversation (e.g., `"[sales],[item type],[state]"`)


        If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation.


        #### Error responses


        | Code | Description |

        |------|-------------|

        | 401  | Unauthorized — authentication token is missing, expired, or invalid. |

        | 403  | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |


        > ###### Note:

        > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.

        > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.





        #### Endpoint URL

        '
      tags:
      - AI
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationRequest'
        required: true
      parameters: []
      responses:
        '200':
          description: Common successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
        '201':
          description: Common error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
        '400':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/delete:
    delete:
      operationId: deleteConversation
      description: '

        Deletes an existing agent conversation. <br/>  <span class="since-beta-tag">Version: 26.7.0.cl or later</span>


        Permanently deletes an existing saved agent conversation and all its associated messages. This operation is irreversible — deleted conversations cannot be recovered.


        Requires `CAN_USE_SPOTTER` privilege and ownership of the conversation being deleted.


        #### Usage guidelines


        The request must include:


        - `conversation_identifier` *(path parameter)*: the unique ID of the conversation to delete, as returned by `createAgentConversation` or `getConversationList`


        A successful request returns an empty `204 No Content` response. The deleted conversation no longer appears in `getConversationList`.


        #### Example request


        ```bash

        DELETE /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/delete

        ```


        #### Error responses


        | Code | Description |

        |------|-------------|

        | 401  | Unauthorized — authentication token is missing, expired, or invalid. |

        | 403  | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or does not own the specified conversation. |

        | 404  | Not Found — no conversation exists with the given `conversation_identifier` for the authenticated user. |


        > ###### Note:

        >

        > - Deletion is permanent and cannot be undone. Ensure the correct `conversation_identifier` is used before calling this endpoint.

        > - Only conversations created with `enable_save_chat: true` are persisted and can be deleted via this endpoint.

        > - Available from version 26.7.0.cl and later.

        > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.





        #### Endpoint URL

        '
      tags:
      - AI
      parameters:
      - in: path
        name: conversation_identifier
        required: true
        schema:
          type: string
        description: Unique identifier of the conversation to delete.
      responses:
        '204':
          description: Successfully deleted the agent conversation.
        '400':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/rest/2.0/ai/memory/export:
    post:
      operationId: exportMemory
      description: "\nExports memory entries (rules, recipes, and always-apply rules) for\nthe specified data-models as a single YAML payload. The payload can\nbe edited locally and re-submitted through `importMemory`.\nRequires Spotter access (use/manage) and either edit or memory\naccess on corresponding data model sources. <br/> <span class=\"since-beta-tag\">Beta</span> <span class=\"since-beta-tag\">Version: 26.8.0.cl or later</span>\n\nThis API allows users to export data-model memories for a given list of data-models. This exported yaml file can then be modified and used as input to the import API in target env.\n\nThis API enables customers to migrate memories from a source env to a target env. This improves memory adoption for Spotter by giving the users a chance to develop their memories in one env and replicate the same in another env.\n\n#### Usage guidelines\n\nTo export memory for one or more data-models, the request may include:\n- `sources`: A list of typed scope groups identifying which data-models to export memory for. Each group contains:\n  - `type`: The source object type for this group — `DATA_MODEL`.\n  - `identifiers`: An array of GUIDs or human-readable `obj_id`s of the data-models to export memory for. obj_ids are resolved server-side before forwarding.\n\nThe API returns a response object with:\n- `content`: The serialized memory payload (YAML) — exactly the shape that the `importMemory` API consumes. Edit it locally and pass it back through `importMemory` to apply changes.\n\n#### Source Type\n\n- **DATA_MODEL**: The `identifiers` are data-model GUIDs. This is the default source type for Spotter memory and covers the rules, recipes and always-apply rules attached directly to a data-model.\n\n#### File format\n\nThe exported `content` is a YAML document with a single top-level `memories` key holding a list of memory items — exactly the format the `importMemory` API consumes. The full format reference (an annotated example, memory item fields, per-type content, and `datamodel_sources` identification) is documented in the `importMemory` API's **File format** section. Exported files populate each source's `guid` and, if present, `obj_id` as well.\n\n#### Error responses\n\n| Code | Description                                                                                                                                                                                  |\n|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 401  | Unauthorized — authentication token is missing, expired, or invalid.                                                                                                                         |\n| 403  | Forbidden — the authenticated user does not have necessary permissions, or lacks read access on a referenced data-model, or the bearer token does not correspond to the data-model's org. |\n\n> ###### Note:\n> - To use this API, the user needs Spotter access (use/manage) and either edit or memory access on the data-model and they must use corresponding org related bearerToken where the data-model exists.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - Available from version 26.8.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n"
      tags:
      - AI
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportMemoryRequest'
        required: true
      parameters: []
      responses:
        '200':
          description: Common successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportMemoryResponse'
              examples:
                example_1:
                  summary: Serialized YAML memory payload returned
                  value:
                    content: "memories:\n- type: RULE\n  content:\n    rule_definition: \"Earnings: total sales filtered to West region only.\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RULE\n  content:\n    rule_definition: \"Geographic data is organized in a three-level hierarchy from broadest to most specific: Region (highest level) → State (middle level) → County (lowest level). This hierarchical structure enables progressive drill-down analysis, where each level provides increasingly granular geographic segmentation for sales and quantity metrics.\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RULE\n  content:\n    rule_definition: \"Hot products: top 5 products by total sales (no region filter applied).\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: Calculate earnings for East region current year\n    recipe: \"{\\\"task\\\": \\\"Compute earnings by extracting sales and filtering to East region for the current year\\\", \\\"steps\\\": [{\\\"instruction\\\": \\\"Extract sales, then apply a filter for current year and a filter for East region.\\\", \\\"analytical_mappings\\\": {\\\"tml_tokens\\\": [\\\"[sales] [date] = 'this year' [region] = 'east'\\\"], \\\"formulas\\\": []}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: Total sales for East region current year\n    recipe: \"{\\\"task\\\": \\\"Compute total sales filtered to East region for the current year\\\", \\\"steps\\\": [{\\\"instruction\\\": \\\"Calculate total sales where region is East and date is current year.\\\", \\\"analytical_mappings\\\": {\\\"tml_tokens\\\": [\\\"[sales] [date] = 'this year' [region] = 'east'\\\"], \\\"formulas\\\": []}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: What is the total quantity purchased by city and region?\n    recipe: \"{\\\"task\\\":\\\"Calculate total quantity purchased grouped by city and region\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Sum the quantity purchased metric and group the results by city and region to show purchasing volumes across different geographic locations\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[quantity purchased] [city] [region]\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: What were total jacket sales in 2024?\n    recipe: \"{\\\"task\\\":\\\"Compute the aggregate 2024 jacket sales revenue.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Shows the total sales revenue for jackets in 2024. This provides a high-level metric to understand overall jacket sales performance for the year.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [item type] = [item type].\\\\\\\"jackets\\\\\\\" [date] = \\\\\\\"2024\\\\\\\"\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: How are monthly sales and quantity tracking by state?\n    recipe: \"{\\\"task\\\":\\\"Aggregate monthly sales and quantity by state for a state-level performance view.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Shows monthly sales and quantity purchased metrics organized by state. Provides a state-wise view of sales performance with additional dimensional context.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [quantity purchased] [state] [date]\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: \"What's the quarterly sales and quantity by region and state for the last 3 years, with yearly rollups?\"\n    recipe: \"{\\\"task\\\":\\\"Build a 3-year quarterly view of sales and quantity grouped by region and state, with quarterly and yearly aggregation.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Displays quarterly performance metrics including sales and quantity purchased, broken down by region and state over the last 3 years. Enables analysis of regional and state-level trends with both quarterly and yearly views.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [quantity purchased] [region] [state] [date].\\\\\\\"quarterly\\\\\\\" [date].\\\\\\\"last 3 years\\\\\\\" [date].\\\\\\\"yearly\\\\\\\"\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: How are we doing against quarterly sales and quantity targets per region?\n    recipe: \"{\\\"task\\\":\\\"Render bullet charts contrasting quarterly actual vs target sales and quantity per region.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Compares actual quarterly sales and quantity metrics against targets by region using bullet charts. Provides a target vs actual performance view to track progress.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [quantity purchased] [region] [date].\\\\\\\"quarterly\\\\\\\" [Target sales] [Target quantity]\\\"],\\\"formulas\\\":[\\\"{\\\\\\\"name\\\\\\\": \\\\\\\"Target sales\\\\\\\", \\\\\\\"expression\\\\\\\": \\\\\\\"random ( ) * sum ( sales ) * 2\\\\\\\"}\\\",\\\"{\\\\\\\"name\\\\\\\": \\\\\\\"Target quantity\\\\\\\", \\\\\\\"expression\\\\\\\": \\\\\\\"random ( ) * sum ( quantity purchased  ) * 2\\\\\\\"}\\\"]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n"
                example_2:
                  summary: Serialized YAML memory payload returned
                  value:
                    content: "memories:\n- type: RULE\n  content:\n    rule_definition: \"Earnings: total sales filtered to West region only.\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RULE\n  content:\n    rule_definition: \"Hot products: top 5 products by total sales (no region filter applied).\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RULE\n  content:\n    rule_definition: \"Geographic data is organized in a three-level hierarchy from broadest to most specific: Region (highest level) → State (middle level) → County (lowest level). This hierarchical structure enables progressive drill-down analysis, where each level provides increasingly granular geographic segmentation for sales and quantity metrics.\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RULE\n  content:\n    rule_definition: \"When analyzing quantity purchased, apply a date filter for the last 3 years.\"\n  datamodel_sources:\n  - guid: 44444444-4444-4444-4444-444444444444\n    obj_id: sample-model\n  tags: []\n- type: RULE\n  content:\n    rule_definition:  User's total sales target is 1 million USD.\n  datamodel_sources:\n  - guid: 44444444-4444-4444-4444-444444444444\n    obj_id: sample-model\n  tags: []\n- type: RULE\n  content:\n    rule_definition:  Sales analyses must filter to east region only.\n  datamodel_sources:\n  - guid: 44444444-4444-4444-4444-444444444444\n    obj_id: sample-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: Calculate earnings for East region current year\n    recipe: \"{\\\"task\\\": \\\"Compute earnings by extracting sales and filtering to East region for the current year\\\", \\\"steps\\\": [{\\\"instruction\\\": \\\"Extract sales, then apply a filter for current year and a filter for East region.\\\", \\\"analytical_mappings\\\": {\\\"tml_tokens\\\": [\\\"[sales] [date] = 'this year' [region] = 'east'\\\"], \\\"formulas\\\": []}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: Total sales for East region current year\n    recipe: \"{\\\"task\\\": \\\"Compute total sales filtered to East region for the current year\\\", \\\"steps\\\": [{\\\"instruction\\\": \\\"Calculate total sales where region is East and date is current year.\\\", \\\"analytical_mappings\\\": {\\\"tml_tokens\\\": [\\\"[sales] [date] = 'this year' [region] = 'east'\\\"], \\\"formulas\\\": []}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: What is the total quantity purchased by city and region?\n    recipe: \"{\\\"task\\\":\\\"Calculate total quantity purchased grouped by city and region\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Sum the quantity purchased metric and group the results by city and region to show purchasing volumes across different geographic locations\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[quantity purchased] [city] [region]\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: \"What's the quarterly sales and quantity by region and state for the last 3 years, with yearly rollups?\"\n    recipe: \"{\\\"task\\\":\\\"Build a 3-year quarterly view of sales and quantity grouped by region and state, with quarterly and yearly aggregation.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Displays quarterly performance metrics including sales and quantity purchased, broken down by region and state over the last 3 years. Enables analysis of regional and state-level trends with both quarterly and yearly views.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [quantity purchased] [region] [state] [date].\\\\\\\"quarterly\\\\\\\" [date].\\\\\\\"last 3 years\\\\\\\" [date].\\\\\\\"yearly\\\\\\\"\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: How are we doing against quarterly sales and quantity targets per region?\n    recipe: \"{\\\"task\\\":\\\"Render bullet charts contrasting quarterly actual vs target sales and quantity per region.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Compares actual quarterly sales and quantity metrics against targets by region using bullet charts. Provides a target vs actual performance view to track progress.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [quantity purchased] [region] [date].\\\\\\\"quarterly\\\\\\\" [Target sales] [Target quantity]\\\"],\\\"formulas\\\":[\\\"{\\\\\\\"name\\\\\\\": \\\\\\\"Target sales\\\\\\\", \\\\\\\"expression\\\\\\\": \\\\\\\"random ( ) * sum ( sales ) * 2\\\\\\\"}\\\",\\\"{\\\\\\\"name\\\\\\\": \\\\\\\"Target quantity\\\\\\\", \\\\\\\"expression\\\\\\\": \\\\\\\"random ( ) * sum ( quantity purchased  ) * 2\\\\\\\"}\\\"]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: How are monthly sales and quantity tracking by state?\n    recipe: \"{\\\"task\\\":\\\"Aggregate monthly sales and quantity by state for a state-level performance view.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Shows monthly sales and quantity purchased metrics organized by state. Provides a state-wise view of sales performance with additional dimensional context.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [quantity purchased] [state] [date]\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: What were total jacket sales in 2024?\n    recipe: \"{\\\"task\\\":\\\"Compute the aggregate 2024 jacket sales revenue.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Shows the total sales revenue for jackets in 2024. This provides a high-level metric to understand overall jacket sales performance for the year.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [item type] = [item type].\\\\\\\"jackets\\\\\\\" [date] = \\\\\\\"2024\\\\\\\"\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 33333333-3333-3333-3333-333333333333\n    obj_id: sales-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: What were jacket sales by region in 2024?\n    recipe: \"{\\\"task\\\":\\\"Break out 2024 jacket sales revenue by region to compare regional performance.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Shows jacket sales revenue broken down by region for 2024. This helps identify which geographic regions are performing best in jacket sales and enables regional performance comparison.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] by [region] [item type] = [item type].\\\\\\\"jackets\\\\\\\" [date] = \\\\\\\"2024\\\\\\\"\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 44444444-4444-4444-4444-444444444444\n    obj_id: sample-model\n  tags: []\n- type: RECIPE\n  content:\n    user_query: \"Show me quarterly sales and quantity trends over the past 3 years, newest first.\"\n    recipe: \"{\\\"task\\\":\\\"Plot quarterly sales and quantity trends for the past 3 years in reverse chronological order.\\\",\\\"steps\\\":[{\\\"instruction\\\":\\\"Presents quarterly sales and quantity purchased trends over the last 3 years, sorted by most recent periods first. Enables time-based analysis of sales performance.\\\",\\\"analytical_mappings\\\":{\\\"tml_tokens\\\":[\\\"[sales] [quantity purchased] [date].\\\\\\\"quarterly\\\\\\\" [date].\\\\\\\"last 3 years\\\\\\\"\\\"],\\\"formulas\\\":[]}}]}\"\n  datamodel_sources:\n  - guid: 44444444-4444-4444-4444-444444444444\n    obj_id: sample-model\n  tags: []\n"
        '201':
          description: Common error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportMemoryResponse'
        '400':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/rest/2.0/ai/agent/instructions/get:
    get:
      operationId: getAgentInstructions
      description: '

        <span class="since-beta-tag">Beta</span> <span class="since-beta-tag">Version: 26.6.0.cl or later</span>


        Retrieves the admin instructions currently configured for the AI agent (Spotter). Admin instructions are tenant- and org-scoped text that guide agent behavior across all conversations.


        Requires admin privileges. Only users with org admin access can retrieve agent instructions.


        #### Usage guidelines


        No input parameters are required. The API returns the stored `AgentInstructions` record for the caller''s tenant and org.


        If no instructions have been configured yet, the API returns a record with an empty `instructions` field and `null` values for `id`, `created_at`, `updated_at`, and `last_updated_by`.


        If the request is successful, the response includes:


        - `id`: unique identifier of the instructions record

        - `instructions`: the configured instructions text

        - `created_at`: ISO timestamp when the instructions were first saved

        - `updated_at`: ISO timestamp when the instructions were last updated

        - `last_updated_by`: user ID of the admin who last updated the instructions (may be `null` for older 

# --- truncated at 32 KB (206 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/thoughtspot/refs/heads/main/openapi/thoughtspot-ai-api-openapi.yml