Get a prompt
curl --request GET \
--url https://api.example.com/api/public/v2/prompts/{promptName}import requests
url = "https://api.example.com/api/public/v2/prompts/{promptName}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/v2/prompts/{promptName}', 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/{promptName}",
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/{promptName}"
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/{promptName}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/v2/prompts/{promptName}")
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{
"type": "<string>",
"name": "<string>",
"version": 123,
"config": null,
"labels": [
{
"label": "<string>"
}
],
"tags": [
{
"tag": "<string>"
}
],
"prompt": [
{
"role": "<string>",
"content": "<string>"
}
]
}Prompt
Get a prompt
Endpoint to get a prompt on toolzz analytics
GET
/
api
/
public
/
v2
/
prompts
/
{promptName}
Get a prompt
curl --request GET \
--url https://api.example.com/api/public/v2/prompts/{promptName}import requests
url = "https://api.example.com/api/public/v2/prompts/{promptName}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/public/v2/prompts/{promptName}', 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/{promptName}",
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/{promptName}"
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/{promptName}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/public/v2/prompts/{promptName}")
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{
"type": "<string>",
"name": "<string>",
"version": 123,
"config": null,
"labels": [
{
"label": "<string>"
}
],
"tags": [
{
"tag": "<string>"
}
],
"prompt": [
{
"role": "<string>",
"content": "<string>"
}
]
}Show Request
Show Request
Response Description
Below you will see the description of the get prompt responsestring
required
Type of the interaction (e.g., “chat”).
string
required
Name of the interaction or entity.
integer
required
Version of the configuration.
null
Configuration details (nullable).
array
required
List of labels associated with the interaction.
Show items
Show items
string
required
A single label.
array
required
Code Response
Exemples of Response CodeRequest Successful Response
Request Failure

