Get Execution
curl --request GET \
--url https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}', 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://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}",
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://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}"
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://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}")
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{
"executionId": "<string>",
"engine": "declarative",
"status": "running",
"startedAt": "2023-11-07T05:31:56Z",
"settledAt": "2023-11-07T05:31:56Z",
"durationMs": 123,
"calls": [
{
"seq": 123,
"kind": "run",
"tool": "<string>",
"integration": "<string>",
"decision": "allowed",
"upstreamStatus": 123
}
],
"deadlineMs": 123,
"killed": true,
"cancelledBy": "operator",
"output": {
"inline": "<unknown>",
"resultId": "<string>",
"stored": {
"resultId": "<string>",
"executionId": "<string>",
"tool": "<string>",
"integration": "<string>",
"byteSize": 123,
"tokenEstimate": 123,
"shape": "records",
"expiresAt": "2023-11-07T05:31:56Z",
"tokenBudget": {
"fullOutputTokens": 123,
"returnedTokens": 123,
"savedTokens": 123
},
"recordCount": 123,
"recordsPointer": "<string>",
"totalChars": 123,
"schema": "<unknown>",
"sample": "<unknown>"
}
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}Tools
Get Execution
Read an execution, optionally waiting while it is still running.
GET
/
api
/
tools
/
projects
/
{projectId}
/
executions
/
{executionId}
Get Execution
curl --request GET \
--url https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}', 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://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}",
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://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}"
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://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentos.useparagon.com/api/tools/projects/{projectId}/executions/{executionId}")
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{
"executionId": "<string>",
"engine": "declarative",
"status": "running",
"startedAt": "2023-11-07T05:31:56Z",
"settledAt": "2023-11-07T05:31:56Z",
"durationMs": 123,
"calls": [
{
"seq": 123,
"kind": "run",
"tool": "<string>",
"integration": "<string>",
"decision": "allowed",
"upstreamStatus": 123
}
],
"deadlineMs": 123,
"killed": true,
"cancelledBy": "operator",
"output": {
"inline": "<unknown>",
"resultId": "<string>",
"stored": {
"resultId": "<string>",
"executionId": "<string>",
"tool": "<string>",
"integration": "<string>",
"byteSize": 123,
"tokenEstimate": 123,
"shape": "records",
"expiresAt": "2023-11-07T05:31:56Z",
"tokenBudget": {
"fullOutputTokens": 123,
"returnedTokens": 123,
"savedTokens": 123
},
"recordCount": 123,
"recordsPointer": "<string>",
"totalChars": 123,
"schema": "<unknown>",
"sample": "<unknown>"
}
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}GET /api/tools/projects/{projectId}/executions/{executionId} returns the execution resource. The response status is 200.
Prefer: wait=<seconds> polls while status is running, up to 25 seconds. With no Prefer header the handler does not wait. A response that is still running includes Retry-After: 1.
An id this user does not own is 404 EXECUTION_NOT_FOUND.Authorizations
Your Paragon User Token (JWT), which you can generate using your project's signing keys.
Response
Current execution resource.