---
type: api
title: Get prompts
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-findprompts
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-findprompts
products:
  - Kibana
---

# Get prompts

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/security_ai_assistant/prompts/_find`
- `GET` `/s/{space_id}/api/security_ai_assistant/prompts/_find`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#basicauth)

## Description

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 String Parameters

- `fields` ([] string)
  List of specific fields to include in each returned prompt.
- `filter` (string)
  Search query string to filter prompts by matching fields.
- `sort_field` (enum)
  Field to sort prompts by.
  Values: `created_at`, `is_default`, `name`, `updated_at`
- `sort_order` (enum)
  Sort order, either asc or desc.
  Values: `asc`, `desc`
- `page` (integer · min: 1 · default: 1)
  Page number for pagination.
- `per_page` (integer · min: 0 · default: 20)
  Number of prompts per page.

## Responses

#### `200`

Successful response containing a list of prompts.

`application/json`

- `data` ([] object)
  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)
    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 · min: 1)
    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)
    The name of the prompt.
  - `namespace` (string)
    Kibana space where the prompt is located.
  - `promptType` (enum)
    Type of the prompt (either system or quick).
    Values: `system`, `quick`
  - `timestamp` (string · min: 1)
    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` ([] object)
    List of users associated with the prompt.
    - `id` (string)
      User id.
    - `name` (string)
      User name.
- `page` (integer)
  Current page number.
- `perPage` (integer)
  Number of prompts per page.
- `total` (integer)
  Total number of prompts matching the query.
#### `400`

Bad request due to invalid parameters or malformed query.

`application/json`

- `error` (string)
  Short error message.
- `message` (string)
  Detailed description of the error.
- `statusCode` (number)
  HTTP status code for the error.
## Code Examples

#### Console

```console
GET /api/security_ai_assistant/prompts/_find
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/security_ai_assistant/prompts/_find"
```

