Get prompts
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.
-
sort_field
string Field to sort prompts by.
Values are
created_at
,is_default
,name
, orupdated_at
. -
sort_order
string Sort order, either asc or desc.
Values are
asc
ordesc
. -
page
integer Page number for pagination.
Minimum value is
1
. Default value is1
. -
per_page
integer Number of prompts per page.
Minimum value is
0
. Default value is20
.
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
}