Get Workflow
curl --request GET \
--url https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}import requests
url = "https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}', 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://app.agentika.site/api/v1/workflow/fetch/{workflow_id}",
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://app.agentika.site/api/v1/workflow/fetch/{workflow_id}"
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://app.agentika.site/api/v1/workflow/fetch/{workflow_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}")
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{
"id": 123,
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"workflow_definition": {},
"current_definition_id": 123,
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"total_runs": 123,
"workflow_configurations": {},
"version_number": 123,
"version_status": "<string>",
"workflow_uuid": "<string>",
"model_is_realtime": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Агенты
Получить агента
Получить одного агента по ID, включая полное определение воркфлоу
GET
/
api
/
v1
/
workflow
/
fetch
/
{workflow_id}
Get Workflow
curl --request GET \
--url https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}import requests
url = "https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}', 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://app.agentika.site/api/v1/workflow/fetch/{workflow_id}",
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://app.agentika.site/api/v1/workflow/fetch/{workflow_id}"
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://app.agentika.site/api/v1/workflow/fetch/{workflow_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/workflow/fetch/{workflow_id}")
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{
"id": 123,
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"workflow_definition": {},
"current_definition_id": 123,
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"total_runs": 123,
"workflow_configurations": {},
"version_number": 123,
"version_status": "<string>",
"workflow_uuid": "<string>",
"model_is_realtime": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Возвращает полные данные агента, включая
workflow_definition (узлы и рёбра), template_context_variables, workflow_configurations и статистику по запускам.Response
Successful Response
Whether the effective model of the returned workflow_configurations (draft if any, else published) is realtime — the runtime's resolution: the workflow's model_configuration_v2_override, else the organization's configuration with legacy model_overrides. A realtime model does not support conversation_start_policy wait_client / wait_then_greeting (saving that combination is 422 start_policy_unsupported_for_realtime). null: not computed by this endpoint, or the model configuration does not resolve.