Default
curl --location 'https://api.portkey.ai/v1/configs/pc-pii-re-7f1051/versions' \
--header 'x-portkey-api-key: PORTKEY_API_KEY'import requests
url = "https://api.portkey.ai/v1/configs/{slug}/versions"
headers = {"x-portkey-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-portkey-api-key': '<api-key>'}};
fetch('https://api.portkey.ai/v1/configs/{slug}/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://api.portkey.ai/v1/configs/{slug}/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 => [
"x-portkey-api-key: <api-key>"
],
]);
$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://api.portkey.ai/v1/configs/{slug}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-portkey-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.portkey.ai/v1/configs/{slug}/versions")
.header("x-portkey-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portkey.ai/v1/configs/{slug}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-portkey-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"total": 1,
"data": [
{
"id": "daab995b-8d3b-42c5-a490-47217fbf4e0e",
"name": "PII Redaction Guardrail",
"workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911",
"slug": "pc-pii-re-7f1051",
"organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e",
"is_default": 0,
"status": "active",
"owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86",
"updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86",
"created_at": "2025-10-17T19:11:47.000Z",
"last_updated_at": "2025-10-17T19:11:47.000Z",
"config": "{\"input_guardrails\":[\"pg-patron-1d0224\"]}",
"format": "json",
"type": "ORG_CONFIG",
"version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2",
"object": "config"
}
]
}List Config Versions
GET
/
configs
/
{slug}
/
versions
Default
curl --location 'https://api.portkey.ai/v1/configs/pc-pii-re-7f1051/versions' \
--header 'x-portkey-api-key: PORTKEY_API_KEY'import requests
url = "https://api.portkey.ai/v1/configs/{slug}/versions"
headers = {"x-portkey-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-portkey-api-key': '<api-key>'}};
fetch('https://api.portkey.ai/v1/configs/{slug}/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://api.portkey.ai/v1/configs/{slug}/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 => [
"x-portkey-api-key: <api-key>"
],
]);
$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://api.portkey.ai/v1/configs/{slug}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-portkey-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.portkey.ai/v1/configs/{slug}/versions")
.header("x-portkey-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portkey.ai/v1/configs/{slug}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-portkey-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"total": 1,
"data": [
{
"id": "daab995b-8d3b-42c5-a490-47217fbf4e0e",
"name": "PII Redaction Guardrail",
"workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911",
"slug": "pc-pii-re-7f1051",
"organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e",
"is_default": 0,
"status": "active",
"owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86",
"updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86",
"created_at": "2025-10-17T19:11:47.000Z",
"last_updated_at": "2025-10-17T19:11:47.000Z",
"config": "{\"input_guardrails\":[\"pg-patron-1d0224\"]}",
"format": "json",
"type": "ORG_CONFIG",
"version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2",
"object": "config"
}
]
}Last modified on May 13, 2026
Was this page helpful?
⌘I

