cURL
curl --request PATCH \
--url https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"output": {},
"metadata": {}
}
'import requests
url = "https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}"
payload = {
"output": {},
"metadata": {}
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({output: {}, metadata: {}})
};
fetch('https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}', 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.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}",
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([
'output' => [
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$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://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}"
payload := strings.NewReader("{\n \"output\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "<content-type>")
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.patch("https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"output\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"output\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"updatedTime": "<string>",
"metadata": {},
"updatedBy": "<string>",
"description": "<string>",
"createdBy": "<string>",
"hookId": "<string>",
"name": "<string>",
"createdTime": "<string>",
"runId": "<string>",
"warnings": [
"<string>"
],
"history": [
{}
],
"agentRunId": "<string>",
"output": {},
"input": {},
"actionId": "<string>",
"logId": "<string>",
"id": "<string>",
"errors": [
"<string>"
],
"status": "failed"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}API Reference
Update Hook Run
Update Hook Run
PATCH
/
hooks
/
{hookId}
/
runs
/
{runId}
cURL
curl --request PATCH \
--url https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"output": {},
"metadata": {}
}
'import requests
url = "https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}"
payload = {
"output": {},
"metadata": {}
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({output: {}, metadata: {}})
};
fetch('https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}', 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.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}",
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([
'output' => [
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$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://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}"
payload := strings.NewReader("{\n \"output\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "<content-type>")
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.patch("https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"output\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cradl.ai/{basePath}/hooks/{hookId}/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"output\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"updatedTime": "<string>",
"metadata": {},
"updatedBy": "<string>",
"description": "<string>",
"createdBy": "<string>",
"hookId": "<string>",
"name": "<string>",
"createdTime": "<string>",
"runId": "<string>",
"warnings": [
"<string>"
],
"history": [
{}
],
"agentRunId": "<string>",
"output": {},
"input": {},
"actionId": "<string>",
"logId": "<string>",
"id": "<string>",
"errors": [
"<string>"
],
"status": "failed"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Body
application/json
Response
200 response
Pattern:
^[0-9]{4}-?[0-9]{2}-?[0-9]{2}( |T)?[0-9]{2}:?[0-9]{2}:?[0-9]{2}(.[0-9]{1,6})?(Z|[+][0-9]{2}(:|)[0-9]{2})$Maximum string length:
4096Maximum string length:
4096Maximum string length:
4096Pattern:
^((cradl|las):organization:[a-z0-9-_]+/)?cradl:hook:[a-z0-9-_]+$Maximum string length:
4096Pattern:
^[0-9]{4}-?[0-9]{2}-?[0-9]{2}( |T)?[0-9]{2}:?[0-9]{2}:?[0-9]{2}(.[0-9]{1,6})?(Z|[+][0-9]{2}(:|)[0-9]{2})$Pattern:
^cradl:run:[a-f0-9]{32}$Pattern:
^((cradl|las):organization:[a-z0-9-_]+/)?cradl:agent:[a-z0-9-_]+/cradl:run:[a-z0-9-_]+$Pattern:
^((cradl|las):organization:[a-z0-9-_]+/)?cradl:action:[a-z0-9-_]+$Pattern:
^(cradl|las):log:[a-f0-9]{32}$Pattern:
^((cradl|las):organization:[a-z0-9-_]+/)?cradl:hook:[a-z0-9-_]+/cradl:run:[a-z0-9-_]+$Available options:
failed, ignored, running, succeeded