---
title: "Get prompts"
method: GET
path: "/api/security_ai_assistant/prompts/_find"
tags: ["Security AI Assistant API"]
---

# Get prompts

`GET /api/security_ai_assistant/prompts/_find`

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/security_ai_assistant/prompts/_find</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Get a list of all prompts based on optional filters, sorting, and pagination.

## Query parameters

- `fields` string[]
- `filter` string
- `sort_field` 'created_at' | 'is_default' | 'name' | 'updated_at' — Field by which to sort the prompts.
- `sort_order` 'asc' | 'desc' — The order in which results are sorted.
- `page` integer
- `per_page` integer

## Response `200`

Successful response containing a list of prompts.

- object
  - `data` SecurityAIAssistantAPIPromptResponse[], required — The list of prompts returned based on the search query, sorting, and pagination.
    - `categories` string[] — Categories associated with the prompt.
    - `color` string — The color associated with the prompt.
    - `consumer` string — The consumer that the prompt is associated with.
    - `content` string, required — The content of the prompt.
    - `createdAt` string — The timestamp of when the prompt was created.
    - `createdBy` string — The user who created the prompt.
    - `id` string, nonempty, required — A string that does not contain only whitespace characters.
    - `isDefault` boolean — Whether this prompt is the default.
    - `isNewConversationDefault` boolean — Whether this prompt is the default for new conversations.
    - `name` string, required — The name of the prompt.
    - `namespace` string — Kibana space where the prompt is located.
    - `promptType` 'system' | 'quick', required — Type of the prompt (either system or quick).
    - `timestamp` string, nonempty — A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
    - `updatedAt` string — The timestamp of when the prompt was last updated.
    - `updatedBy` string — The user who last updated the prompt.
    - `users` SecurityAIAssistantAPIUser[] — List of users associated with the prompt.
      - `id` string — User id.
      - `name` string — User name.
  - `page` integer, required — Current page number.
  - `perPage` integer, required — Number of prompts per page.
  - `total` integer, required — Total number of prompts matching the query.

## Other responses

- `400` — Bad request due to invalid parameters or malformed query.

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
