Update Execution
curl --request PATCH \
--url https://control-plane.kubiya.ai/api/v1/executions/{execution_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"response": "<string>",
"error_message": "<string>",
"usage": {},
"execution_metadata": {}
}
'import requests
url = "https://control-plane.kubiya.ai/api/v1/executions/{execution_id}"
payload = {
"status": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"response": "<string>",
"error_message": "<string>",
"usage": {},
"execution_metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: '<string>',
started_at: '<string>',
completed_at: '<string>',
response: '<string>',
error_message: '<string>',
usage: {},
execution_metadata: {}
})
};
fetch('https://control-plane.kubiya.ai/api/v1/executions/{execution_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://control-plane.kubiya.ai/api/v1/executions/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => '<string>',
'started_at' => '<string>',
'completed_at' => '<string>',
'response' => '<string>',
'error_message' => '<string>',
'usage' => [
],
'execution_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control-plane.kubiya.ai/api/v1/executions/{execution_id}"
payload := strings.NewReader("{\n \"status\": \"<string>\",\n \"started_at\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"response\": \"<string>\",\n \"error_message\": \"<string>\",\n \"usage\": {},\n \"execution_metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://control-plane.kubiya.ai/api/v1/executions/{execution_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\",\n \"started_at\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"response\": \"<string>\",\n \"error_message\": \"<string>\",\n \"usage\": {},\n \"execution_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control-plane.kubiya.ai/api/v1/executions/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\",\n \"started_at\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"response\": \"<string>\",\n \"error_message\": \"<string>\",\n \"usage\": {},\n \"execution_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organization_id": "<string>",
"execution_type": "<string>",
"entity_id": "<string>",
"entity_name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"status": "<string>",
"response": "<string>",
"error_message": "<string>",
"usage": {},
"execution_metadata": {},
"runner_name": "<string>",
"user_id": "<string>",
"user_name": "<string>",
"user_email": "<string>",
"user_avatar": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"updated_at": "<string>",
"participants": [
{
"id": "<string>",
"user_id": "<string>",
"user_name": "<string>",
"user_email": "<string>",
"user_avatar": "<string>",
"role": "<string>",
"joined_at": "<string>",
"last_active_at": "<string>"
}
],
"last_message_at": "<string>",
"last_message_preview": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Update Execution
Update execution status and results.
This endpoint is primarily used by workers to update execution status, results, usage metrics, and metadata during execution.
PATCH
/
api
/
v1
/
executions
/
{execution_id}
Update Execution
curl --request PATCH \
--url https://control-plane.kubiya.ai/api/v1/executions/{execution_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"response": "<string>",
"error_message": "<string>",
"usage": {},
"execution_metadata": {}
}
'import requests
url = "https://control-plane.kubiya.ai/api/v1/executions/{execution_id}"
payload = {
"status": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"response": "<string>",
"error_message": "<string>",
"usage": {},
"execution_metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: '<string>',
started_at: '<string>',
completed_at: '<string>',
response: '<string>',
error_message: '<string>',
usage: {},
execution_metadata: {}
})
};
fetch('https://control-plane.kubiya.ai/api/v1/executions/{execution_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://control-plane.kubiya.ai/api/v1/executions/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => '<string>',
'started_at' => '<string>',
'completed_at' => '<string>',
'response' => '<string>',
'error_message' => '<string>',
'usage' => [
],
'execution_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control-plane.kubiya.ai/api/v1/executions/{execution_id}"
payload := strings.NewReader("{\n \"status\": \"<string>\",\n \"started_at\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"response\": \"<string>\",\n \"error_message\": \"<string>\",\n \"usage\": {},\n \"execution_metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://control-plane.kubiya.ai/api/v1/executions/{execution_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\",\n \"started_at\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"response\": \"<string>\",\n \"error_message\": \"<string>\",\n \"usage\": {},\n \"execution_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control-plane.kubiya.ai/api/v1/executions/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\",\n \"started_at\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"response\": \"<string>\",\n \"error_message\": \"<string>\",\n \"usage\": {},\n \"execution_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organization_id": "<string>",
"execution_type": "<string>",
"entity_id": "<string>",
"entity_name": "<string>",
"prompt": "<string>",
"system_prompt": "<string>",
"status": "<string>",
"response": "<string>",
"error_message": "<string>",
"usage": {},
"execution_metadata": {},
"runner_name": "<string>",
"user_id": "<string>",
"user_name": "<string>",
"user_email": "<string>",
"user_avatar": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"updated_at": "<string>",
"participants": [
{
"id": "<string>",
"user_id": "<string>",
"user_name": "<string>",
"user_email": "<string>",
"user_avatar": "<string>",
"role": "<string>",
"joined_at": "<string>",
"last_active_at": "<string>"
}
],
"last_message_at": "<string>",
"last_message_preview": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Enter your Kubiya API token (format: Bearer )
Path Parameters
Body
application/json
Response
Successful Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I