Variables
List variables
GET
/
public
/
api
/
v1
/
agents
/
{agentPublicId}
/
prompt
/
variables
List variables
curl --request GET \
--url https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables', 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.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables",
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-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.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"booleanTextWhenFalse": "<string>",
"booleanTextWhenTrue": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultValue": {},
"description": "<string>",
"label": "<string>",
"multiChoiceSeparator": "<string>",
"name": "<string>",
"options": [
{
"injectedText": "<string>",
"label": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123
}
],
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"sortOrder": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"booleanTextWhenFalse": "<string>",
"booleanTextWhenTrue": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultValue": {},
"description": "<string>",
"label": "<string>",
"multiChoiceSeparator": "<string>",
"name": "<string>",
"options": [
{
"injectedText": "<string>",
"label": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123
}
],
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"sortOrder": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"booleanTextWhenFalse": "<string>",
"booleanTextWhenTrue": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultValue": {},
"description": "<string>",
"label": "<string>",
"multiChoiceSeparator": "<string>",
"name": "<string>",
"options": [
{
"injectedText": "<string>",
"label": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123
}
],
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"sortOrder": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
]Autorizações
Parâmetros de caminho
Parâmetros de consulta
Include variables defined but no longer referenced in the editable systemPrompt.
Resposta
OK
Prompt fragment when bool variable is false.
Prompt fragment when bool variable is true.
Default value (shape depends on type).
Display label shown in the Hub form.
Joiner for multi_choice rendered values (default , ).
Slug used in {{name}} references inside the systemPrompt.
Options for single_choice / multi_choice (null otherwise).
Show child attributes
Show child attributes
Whether the Hub form must submit this field.
Opções disponíveis:
text_short, text_long, number, date, time, datetime, single_choice, multi_choice, bool Esta página foi útil?
⌘I
List variables
curl --request GET \
--url https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables', 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.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables",
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-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.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/prompt/variables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"booleanTextWhenFalse": "<string>",
"booleanTextWhenTrue": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultValue": {},
"description": "<string>",
"label": "<string>",
"multiChoiceSeparator": "<string>",
"name": "<string>",
"options": [
{
"injectedText": "<string>",
"label": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123
}
],
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"sortOrder": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"booleanTextWhenFalse": "<string>",
"booleanTextWhenTrue": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultValue": {},
"description": "<string>",
"label": "<string>",
"multiChoiceSeparator": "<string>",
"name": "<string>",
"options": [
{
"injectedText": "<string>",
"label": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123
}
],
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"sortOrder": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"booleanTextWhenFalse": "<string>",
"booleanTextWhenTrue": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultValue": {},
"description": "<string>",
"label": "<string>",
"multiChoiceSeparator": "<string>",
"name": "<string>",
"options": [
{
"injectedText": "<string>",
"label": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortOrder": 123
}
],
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"sortOrder": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
]
