curl --request GET \
--url https://{controlPlaneURL}/api/ml/v1/prompt-versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/ml/v1/prompt-versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{controlPlaneURL}/api/ml/v1/prompt-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{controlPlaneURL}/api/ml/v1/prompt-versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{controlPlaneURL}/api/ml/v1/prompt-versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{controlPlaneURL}/api/ml/v1/prompt-versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/ml/v1/prompt-versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"version": 2,
"type": "chat_prompt",
"description": "<string>",
"version_alias": "<string>",
"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",
"408",
"429",
"500",
"502",
"503"
],
"fallback_candidate": true,
"override_params": {},
"headers_override": {
"remove": [
"<string>"
],
"set": {}
},
"metadata_match": {}
}
],
"sticky_routing": {
"ttl_seconds": 44100,
"session_identifiers": [
{
"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",
"tags": [
"<string>"
],
"version_alias": "<string>",
"usage_code_snippet": "<string>",
"usage_code_snippets": [
{
"display_name": "<string>",
"language": "<string>",
"code": "<string>",
"libraries": [
"<string>"
],
"icon": "<string>"
}
]
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List prompt versions
List prompt versions with optional filtering by tag, FQN, prompt ID, ML Repo, name, or version.
curl --request GET \
--url https://{controlPlaneURL}/api/ml/v1/prompt-versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/ml/v1/prompt-versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{controlPlaneURL}/api/ml/v1/prompt-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{controlPlaneURL}/api/ml/v1/prompt-versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{controlPlaneURL}/api/ml/v1/prompt-versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{controlPlaneURL}/api/ml/v1/prompt-versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/ml/v1/prompt-versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"version": 2,
"type": "chat_prompt",
"description": "<string>",
"version_alias": "<string>",
"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",
"408",
"429",
"500",
"502",
"503"
],
"fallback_candidate": true,
"override_params": {},
"headers_override": {
"remove": [
"<string>"
],
"set": {}
},
"metadata_match": {}
}
],
"sticky_routing": {
"ttl_seconds": 44100,
"session_identifiers": [
{
"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",
"tags": [
"<string>"
],
"version_alias": "<string>",
"usage_code_snippet": "<string>",
"usage_code_snippets": [
{
"display_name": "<string>",
"language": "<string>",
"code": "<string>",
"libraries": [
"<string>"
],
"icon": "<string>"
}
]
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Tag to filter prompt versions by
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}')
ID of the prompt to filter versions by
ID of the ML Repo to filter prompt versions by
Name of the prompt to filter versions by
Version number (positive integer) or 'latest' to filter by specific version
Number of prompt versions to skip for pagination
Maximum number of prompt versions to return
Response
List of prompt versions matching the query with pagination information
Was this page helpful?