Get Interaction
curl --request GET \
--url https://api.neuralfactory.ai/interactions/{interaction_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuralfactory.ai/interactions/{interaction_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuralfactory.ai/interactions/{interaction_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://api.neuralfactory.ai/interactions/{interaction_id}",
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.neuralfactory.ai/interactions/{interaction_id}"
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.neuralfactory.ai/interactions/{interaction_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuralfactory.ai/interactions/{interaction_id}")
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{
"id": "<string>",
"source": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"trace": {
"status": "<string>",
"source": "<string>",
"schema_version": 123,
"step_count": 123,
"digest": "<string>",
"sealed_at": "2023-11-07T05:31:56Z",
"content": "<string>",
"gaps": [
{
"after_seq": 123,
"reason": "<string>"
}
],
"message_hash": "<string>",
"response_hash": "<string>",
"details_hash": "<string>",
"input_hash": "<string>",
"output_hash": "<string>",
"erased_at": "2023-11-07T05:31:56Z",
"erased_by": null,
"verified": true,
"first_mismatch": {
"reason": "<string>",
"seq": 123
},
"anchor": {}
},
"type": "interaction",
"status": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"active_ms": 123,
"waiting_ms": 123,
"client": "<string>",
"actor": {
"kind": "<string>",
"id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>",
"group_ids": [
"<string>"
],
"on_behalf_of": null
},
"people": {},
"agent": {
"id": "<string>",
"name": "<string>",
"version": 123,
"config_hash": "<string>"
},
"workflow": {
"id": "<string>",
"name": "<string>",
"revision": 123,
"config_hash": "<string>"
},
"subject": {
"kind": "<string>",
"id": "<string>",
"source": "<string>"
},
"counts": {
"steps": 0,
"model_calls": 0,
"tool_calls": 0,
"delegations": 0,
"human_inputs": 0,
"errors": 0,
"skipped": 0
},
"flags": {
"has_error": false,
"has_approval": false,
"has_skipped": false
},
"retention": {
"keep_until": "2023-11-07T05:31:56Z",
"legal_hold": {
"by": null,
"at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
},
"error": {
"type": "<string>",
"message": "<string>"
},
"ended_by": {
"kind": "<string>",
"id": "<string>",
"name": "<string>"
},
"cost": {},
"feedback_type": "<string>",
"feedback_comment": "<string>",
"tools_used": [
"<string>"
],
"subagents_used": [
"<string>"
],
"knowledge_bases_used": null,
"run_id": "<string>",
"chat_id": "<string>",
"execution_id": "<string>",
"message_id": "<string>",
"api_key_id": "<string>",
"api_key_name": "<string>",
"user_id": "<string>",
"agent_id": "<string>",
"workflow_id": "<string>",
"run_status": "<string>",
"triggered_via": "<string>",
"parent": {},
"message": "<string>",
"response": "<string>",
"input": null,
"output": null,
"context": [
{}
],
"files": [
{}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Interactions
Get Interaction
One interaction record; trace.verified is recomputed from the stored steps on every read.
API key permission: Admin.
GET
/
interactions
/
{interaction_id}
Get Interaction
curl --request GET \
--url https://api.neuralfactory.ai/interactions/{interaction_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuralfactory.ai/interactions/{interaction_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuralfactory.ai/interactions/{interaction_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://api.neuralfactory.ai/interactions/{interaction_id}",
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.neuralfactory.ai/interactions/{interaction_id}"
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.neuralfactory.ai/interactions/{interaction_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuralfactory.ai/interactions/{interaction_id}")
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{
"id": "<string>",
"source": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"trace": {
"status": "<string>",
"source": "<string>",
"schema_version": 123,
"step_count": 123,
"digest": "<string>",
"sealed_at": "2023-11-07T05:31:56Z",
"content": "<string>",
"gaps": [
{
"after_seq": 123,
"reason": "<string>"
}
],
"message_hash": "<string>",
"response_hash": "<string>",
"details_hash": "<string>",
"input_hash": "<string>",
"output_hash": "<string>",
"erased_at": "2023-11-07T05:31:56Z",
"erased_by": null,
"verified": true,
"first_mismatch": {
"reason": "<string>",
"seq": 123
},
"anchor": {}
},
"type": "interaction",
"status": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"active_ms": 123,
"waiting_ms": 123,
"client": "<string>",
"actor": {
"kind": "<string>",
"id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>",
"group_ids": [
"<string>"
],
"on_behalf_of": null
},
"people": {},
"agent": {
"id": "<string>",
"name": "<string>",
"version": 123,
"config_hash": "<string>"
},
"workflow": {
"id": "<string>",
"name": "<string>",
"revision": 123,
"config_hash": "<string>"
},
"subject": {
"kind": "<string>",
"id": "<string>",
"source": "<string>"
},
"counts": {
"steps": 0,
"model_calls": 0,
"tool_calls": 0,
"delegations": 0,
"human_inputs": 0,
"errors": 0,
"skipped": 0
},
"flags": {
"has_error": false,
"has_approval": false,
"has_skipped": false
},
"retention": {
"keep_until": "2023-11-07T05:31:56Z",
"legal_hold": {
"by": null,
"at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
},
"error": {
"type": "<string>",
"message": "<string>"
},
"ended_by": {
"kind": "<string>",
"id": "<string>",
"name": "<string>"
},
"cost": {},
"feedback_type": "<string>",
"feedback_comment": "<string>",
"tools_used": [
"<string>"
],
"subagents_used": [
"<string>"
],
"knowledge_bases_used": null,
"run_id": "<string>",
"chat_id": "<string>",
"execution_id": "<string>",
"message_id": "<string>",
"api_key_id": "<string>",
"api_key_name": "<string>",
"user_id": "<string>",
"agent_id": "<string>",
"workflow_id": "<string>",
"run_status": "<string>",
"triggered_via": "<string>",
"parent": {},
"message": "<string>",
"response": "<string>",
"input": null,
"output": null,
"context": [
{}
],
"files": [
{}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Response
Successful Response