Skip to main content
GET
/
api
/
ml
/
v1
/
prompt-versions
List prompt versions
curl --request GET \
  --url https://{controlPlaneURL}/api/ml/v1/prompt-versions \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "fqn": "<string>",
      "created_by_subject": {
        "subjectId": "<string>",
        "subjectType": "user",
        "subjectSlug": "<string>",
        "subjectDisplayName": "<string>"
      },
      "manifest": {
        "name": "<string>",
        "metadata": {},
        "ml_repo": "<string>",
        "messages": [
          {
            "role": "system",
            "content": "<string>",
            "name": "<string>"
          }
        ],
        "description": "<string>",
        "version_alias": "<string>",
        "version": 2,
        "type": "chat_prompt",
        "variables": {},
        "model_configuration": {
          "provider": "<string>",
          "model": "<string>",
          "parameters": {
            "max_tokens": 123,
            "temperature": 123,
            "top_k": 123,
            "top_p": 123,
            "stop": [
              "<string>"
            ]
          },
          "extra_parameters": {}
        },
        "tools": [
          {
            "type": "function",
            "function": {
              "name": "<string>",
              "description": "<string>",
              "parameters": {},
              "strict": false
            }
          }
        ],
        "mcp_servers": [
          {
            "type": "mcp-server-fqn",
            "integration_fqn": "<string>",
            "enable_all_tools": false,
            "tools": [
              {
                "name": "<string>"
              }
            ]
          }
        ],
        "guardrails": {
          "input_guardrails": [
            "<string>"
          ],
          "output_guardrails": [
            "<string>"
          ]
        },
        "response_format": {
          "type": "json_object"
        },
        "routing_config": {
          "type": "weight-based-routing",
          "load_balance_targets": [
            {
              "target": "<string>",
              "weight": 123,
              "retry_config": {
                "attempts": 1,
                "delay": 100,
                "on_status_codes": [
                  "429",
                  "500",
                  "502",
                  "503"
                ]
              },
              "fallback_status_codes": [
                "401",
                "403",
                "404",
                "429",
                "500",
                "502",
                "503"
              ],
              "fallback_candidate": true,
              "override_params": {},
              "headers_override": {
                "remove": [
                  "<string>"
                ],
                "set": {}
              },
              "metadata_match": {}
            }
          ],
          "sticky_routing": {
            "ttl_seconds": 44100,
            "session_identifiers": [
              {
                "source": "headers",
                "key": "<string>"
              }
            ]
          }
        },
        "cache_config": {
          "type": "semantic",
          "similarity_threshold": 0.5,
          "ttl": 3600,
          "namespace": "<string>"
        },
        "tool_call_to_mcp_mapping": {},
        "logging_config": {
          "enabled": true,
          "tracing_project_fqn": "<string>"
        },
        "sub_agents": [
          {
            "name": "<string>"
          }
        ]
      },
      "ml_repo_id": "<string>",
      "prompt_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "usage_code_snippet": "<string>",
      "tags": [
        "<string>"
      ],
      "usage_code_snippets": [
        {
          "display_name": "<string>",
          "language": "<string>",
          "code": "<string>",
          "libraries": [
            "<string>"
          ]
        }
      ]
    }
  ],
  "pagination": {
    "total": 100,
    "offset": 0,
    "limit": 10
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

tag
string

Tag to filter prompt versions by

fqn
string

Fully qualified name to filter prompt versions by (format: 'chat_prompt:{tenant_name}/{ml_repo_name}/{prompt_name}' or 'chat_prompt:{tenant_name}/{ml_repo_name}/{prompt_name}:{version}')

prompt_id
string

ID of the prompt to filter versions by

ml_repo_id
string

ID of the ML Repo to filter prompt versions by

name
string

Name of the prompt to filter versions by

version

Version number (positive integer) or 'latest' to filter by specific version

offset
integer
default:0

Number of prompt versions to skip for pagination

limit
integer

Maximum number of prompt versions to return

Response

List of prompt versions matching the query with pagination information

data
PromptVersion · object[]
required

List of prompt versions matching the query

pagination
Pagination · object
required

Pagination information including total count, offset, and limit