Our Python SDK got smarter. We developed a Typscript SDK too. We are updating our SDK code blocks. Python SDKhere.Typscript SDKhere.
Description

List Prompt Definitions

List prompt definitions with optional filtering.

Returns prompt definitions with their latest revision number.

If no filters are provided, returns all prompt definitions for the account (up to limit).

GET
/v1/prompt-definitions
/v1/prompt-definitions

The Authorization access token

Authorization

X-API-KEY<token>

In: header

Query Parameters

project_idProject Id

Filter by project ID

project_nameProject Name

Filter by project name

nameName

Filter by exact prompt definition name

name_startswithName Startswith

Filter by prompt definition name prefix

prompt_idPrompt Id

Filter by specific prompt definition ID

limitLimit

Maximum number of records to return

Default: 1000

offsetOffset

Number of records to skip

Default: 0
curl -X GET "https://api.patronus.ai/v1/prompt-definitions?project_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&project_name=string&name=string&name_startswith=string&prompt_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&limit=1000&offset=0" \
  -H "X-API-KEY: <token>"

Successful Response

{
  "prompt_definitions": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
      "project_name": "string",
      "name": "string",
      "description": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "latest_revision": 0
    }
  ]
}