Get prompts

GET /api/security_ai_assistant/prompts/_find

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

Query parameters

  • fields array[string]

    List of specific fields to include in each returned prompt.

  • filter string

    Search query string to filter prompts by matching fields.

  • Field to sort prompts by.

    Values are created_at, is_default, name, or updated_at.

  • Sort order, either asc or desc.

    Values are asc or desc.

  • page integer

    Page number for pagination.

    Minimum value is 1. Default value is 1.

  • per_page integer

    Number of prompts per page.

    Minimum value is 0. Default value is 20.

Responses

  • 200 application/json

    Successful response containing a list of prompts.

    Hide response attributes Show response attributes object
    • data array[object] Required

      The list of prompts returned based on the search query, sorting, and pagination.

      Hide data attributes Show data attributes object
      • categories array[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.

      • The timestamp of when the prompt was created.

      • The user who created the prompt.

      • id string(nonempty) Required

        The ID of the anonymization field.

        Minimum length is 1.

      • isDefault boolean

        Whether this prompt is the default.

      • Whether this prompt is the default for new conversations.

      • name string Required

        The name of the prompt.

      • Kibana space where the prompt is located.

      • promptType string Required

        The type of the prompt.

        Values are system or quick.

      • timestamp string(nonempty)

        Timestamp when the anonymization field was initially created.

        Minimum length is 1.

      • The timestamp of when the prompt was last updated.

      • The user who last updated the prompt.

      • users array[object]

        List of users associated with the prompt.

        Could be any string, not necessarily a UUID.

        Hide users attributes Show users attributes object
    • page integer Required

      Current page number.

    • perPage integer Required

      Number of prompts per page.

    • total integer Required

      Total number of prompts matching the query.

  • 400 application/json

    Bad request due to invalid parameters or malformed query.

    Hide response attributes Show response attributes object
GET /api/security_ai_assistant/prompts/_find
curl \
 --request GET 'https://localhost:5601/api/security_ai_assistant/prompts/_find' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "data": [
    {
      "id": "prompt-123",
      "name": "Error Troubleshooting Prompt",
      "color": "#FF5733",
      "users": [
        {
          "username": "jdoe",
          "full_name": "John Doe"
        }
      ],
      "content": "If you encounter an error, check the logs and retry.",
      "consumer": "security",
      "createdAt": "2025-04-20T21:00:00Z",
      "createdBy": "jdoe",
      "isDefault": true,
      "namespace": "default",
      "timestamp": "2025-04-30T22:30:00Z",
      "updatedAt": "2025-04-30T22:45:00Z",
      "updatedBy": "jdoe",
      "categories": [
        "troubleshooting",
        "logging"
      ],
      "promptType": "standard",
      "isNewConversationDefault": false
    }
  ],
  "page": 1,
  "total": 142,
  "perPage": 20
}