Get a list of prompt names
curl --request GET \
--url https://api.example.com/api/public/v2/promptsimport requests
url = "https://api.example.com/api/public/v2/prompts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/v2/prompts', 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.example.com/api/public/v2/prompts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/public/v2/prompts"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/public/v2/prompts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/v2/prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"name": "<string>",
"versions": [
{
"version": 123
}
],
"labels": [
{
"label": "<string>"
}
],
"tags": [
{
"tag": "<string>"
}
],
"lastUpdatedAt": {},
"lastConfig": null
}
],
"meta": {
"page": 123,
"limit": 123,
"totalItems": 123,
"totalPages": 123
}
}Prompt
Get a list of prompt names
Endpoint to Get a list of prompt names with versions and labels
GET
/
api
/
public
/
v2
/
prompts
Get a list of prompt names
curl --request GET \
--url https://api.example.com/api/public/v2/promptsimport requests
url = "https://api.example.com/api/public/v2/prompts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/v2/prompts', 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.example.com/api/public/v2/prompts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/public/v2/prompts"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/public/v2/prompts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/v2/prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"name": "<string>",
"versions": [
{
"version": 123
}
],
"labels": [
{
"label": "<string>"
}
],
"tags": [
{
"tag": "<string>"
}
],
"lastUpdatedAt": {},
"lastConfig": null
}
],
"meta": {
"page": 123,
"limit": 123,
"totalItems": 123,
"totalPages": 123
}
}Show Request
Show Request
string
Optional name filter (nullable).
string
Optional label filter (nullable).
string
Optional tag filter (nullable).
integer
Page number, starts at 1 (nullable).
integer
Limit of items per page (nullable).
date-time
Optional filter for updates on or after a certain datetime (ISO 8601).
date-time
Optional filter for updates before a certain datetime (ISO 8601).
Response Description
Below you will see the description of the create dataset responsearray
required
List of records.
Show properties
Show properties
string
required
Name of the record.
array
required
List of versions associated with the record.
Show items
Show items
integer
required
A specific version number.
date-time
required
Timestamp of the last update for the record.
null
Last configuration details (nullable).
object
required
Code Response
Exemples of Response CodeRequest Successful Response
Request Failure

