List Instructions API Definition
The List Instructions API enables you to retrieve a paginated list of all behavioral instructions available to the authenticated user. This is useful for managing and monitoring instruction sets across different agents and use cases.
List Instructions Request and Response
To list instructions, send a GET request to /v2/instructions
. You can include optional query parameters to filter and paginate results:
filter
(string, optional): A regex to match against instruction names or descriptions.enabled
(boolean, optional): Filter by whether instructions are currently enabled.limit
(integer, optional): Maximum number of instructions to return (default: 10).page_key
(string, optional): Used to paginate through results.
The response includes an array of instruction definitions and a metadata
object with pagination info.
Example Request
EXAMPLE REQUEST
1
Example Response
EXAMPLE RESPONSE
1
Error Responses
The API returns standard HTTP error codes with detailed error information:
HTTP Code | Error Code | Description |
---|---|---|
400 | invalid_request | Invalid query parameters or malformed request |
401 | unauthorized | Invalid or missing API key |
403 | forbidden | Insufficient permissions for listing instructions |
429 | rate_limit_exceeded | Request rate limit exceeded |