List closed-loop prompt-improvement deployments
curl --request GET \
--url https://api.trulayer.ai/v1/prompts/deployments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trulayer.ai/v1/prompts/deployments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trulayer.ai/v1/prompts/deployments', 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.trulayer.ai/v1/prompts/deployments",
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://api.trulayer.ai/v1/prompts/deployments"
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://api.trulayer.ai/v1/prompts/deployments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trulayer.ai/v1/prompts/deployments")
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{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_signature": "<string>",
"status": "proposed",
"current_prompt": "<string>",
"proposed_prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"rationale": "<string>",
"ab_report": {},
"regression_metric": 123,
"shipped_at": "2023-11-07T05:31:56Z",
"rolled_back_at": "2023-11-07T05:31:56Z",
"approved_by": "<string>",
"rejection_reason": "<string>"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>"
}{
"error": "<string>"
}prompts
List closed-loop prompt-improvement deployments
Returns the tenant’s prompt deployments — proposed, A/B-tested, shipped, monitoring, regressed, or rolled-back. Dashboard-only; Team+ plan. TRU-369.
GET
/
v1
/
prompts
/
deployments
List closed-loop prompt-improvement deployments
curl --request GET \
--url https://api.trulayer.ai/v1/prompts/deployments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trulayer.ai/v1/prompts/deployments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trulayer.ai/v1/prompts/deployments', 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.trulayer.ai/v1/prompts/deployments",
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://api.trulayer.ai/v1/prompts/deployments"
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://api.trulayer.ai/v1/prompts/deployments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trulayer.ai/v1/prompts/deployments")
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{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_signature": "<string>",
"status": "proposed",
"current_prompt": "<string>",
"proposed_prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"rationale": "<string>",
"ab_report": {},
"regression_metric": 123,
"shipped_at": "2023-11-07T05:31:56Z",
"rolled_back_at": "2023-11-07T05:31:56Z",
"approved_by": "<string>",
"rejection_reason": "<string>"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
SDK API key (tl_...) or Clerk session JWT
Query Parameters
Available options:
proposed, ab_running, ab_passed, ab_failed, shipped, monitoring, regressed, rolled_back, rejected Required range:
1 <= x <= 200Required range:
x >= 0