List prompt versions
curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/prompt-versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/svc/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/svc/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/svc/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/svc/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/svc/v1/prompt-versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/svc/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": [
{
"manifest": {
"metadata": {},
"type": "chat_prompt",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"name": "<string>",
"ml_repo": "<string>",
"version": 2,
"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>"
}
]
},
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<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>",
"usage_code_snippets": [],
"tags": []
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}Prompts
List prompt versions
List prompt versions with optional filtering by tag, FQN, prompt ID, ML Repo, name, or version.
GET
/
api
/
svc
/
v1
/
prompt-versions
List prompt versions
curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/prompt-versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/svc/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/svc/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/svc/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/svc/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/svc/v1/prompt-versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/svc/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": [
{
"manifest": {
"metadata": {},
"type": "chat_prompt",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"name": "<string>",
"ml_repo": "<string>",
"version": 2,
"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>"
}
]
},
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<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>",
"usage_code_snippets": [],
"tags": []
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of items per page
Required range:
1 <= x <= 1000Example:
10
Number of items to skip
Required range:
x >= 0Example:
0
Filter prompt versions by tag.
Filter prompt versions by Fully Qualified Name.
Filter prompt versions by the identifier of the prompt they belong to.
Filter prompt versions by the identifier of the ML Repo they belong to.
Filter prompt versions by name.
Version number (positive integer) to filter by.
Response
200 - application/json
List of prompt versions matching the query with pagination information
Was this page helpful?
⌘I