curl --request PUT \
--url https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
},
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {}
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}"
payload = {
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": ["<string>"]
},
"triggers": [
{
"enabled": True,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {}
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agentVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
displayName: '<string>',
environmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
initialPrompt: {text: '<string>', type: 'literal'},
runDefaults: {
credentialRefs: [{credentialId: '<string>', vaultId: '<string>'}],
metadata: {},
resources: [{fileId: '<string>', mountPath: '<string>'}],
vaultIds: ['<string>']
},
triggers: [
{
enabled: true,
schedule: {
cron: '<string>',
timezone: '<string>',
catchupWindowSeconds: 900,
endAt: '2023-11-07T05:31:56Z',
jitterSeconds: 10,
overlapPolicy: 'skip',
startAt: '2023-11-07T05:31:56Z'
},
triggerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'schedule'
}
],
metadata: {}
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}', 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.recursion.labelbox.com/managed-agents/v1/automations/{automationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agentVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'displayName' => '<string>',
'environmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'initialPrompt' => [
'text' => '<string>',
'type' => 'literal'
],
'runDefaults' => [
'credentialRefs' => [
[
'credentialId' => '<string>',
'vaultId' => '<string>'
]
],
'metadata' => [
],
'resources' => [
[
'fileId' => '<string>',
'mountPath' => '<string>'
]
],
'vaultIds' => [
'<string>'
]
],
'triggers' => [
[
'enabled' => true,
'schedule' => [
'cron' => '<string>',
'timezone' => '<string>',
'catchupWindowSeconds' => 900,
'endAt' => '2023-11-07T05:31:56Z',
'jitterSeconds' => 10,
'overlapPolicy' => 'skip',
'startAt' => '2023-11-07T05:31:56Z'
],
'triggerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'type' => 'schedule'
]
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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.recursion.labelbox.com/managed-agents/v1/automations/{automationId}"
payload := strings.NewReader("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
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.put("https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"revision": 4503599627370496,
"runDefaults": {
"metadata": {},
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
},
"status": "paused",
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {}
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_trigger_id_in_use",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_failed",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_event_source_invalid",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_required",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automations_unconfigured",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Replace a canonical automation aggregate
Replaces the complete writable aggregate and trigger set while preserving lifecycle state. Requires the latest strong ETag in If-Match.
curl --request PUT \
--url https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
},
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {}
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}"
payload = {
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": ["<string>"]
},
"triggers": [
{
"enabled": True,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {}
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agentVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
displayName: '<string>',
environmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
initialPrompt: {text: '<string>', type: 'literal'},
runDefaults: {
credentialRefs: [{credentialId: '<string>', vaultId: '<string>'}],
metadata: {},
resources: [{fileId: '<string>', mountPath: '<string>'}],
vaultIds: ['<string>']
},
triggers: [
{
enabled: true,
schedule: {
cron: '<string>',
timezone: '<string>',
catchupWindowSeconds: 900,
endAt: '2023-11-07T05:31:56Z',
jitterSeconds: 10,
overlapPolicy: 'skip',
startAt: '2023-11-07T05:31:56Z'
},
triggerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'schedule'
}
],
metadata: {}
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}', 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.recursion.labelbox.com/managed-agents/v1/automations/{automationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agentVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'displayName' => '<string>',
'environmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'initialPrompt' => [
'text' => '<string>',
'type' => 'literal'
],
'runDefaults' => [
'credentialRefs' => [
[
'credentialId' => '<string>',
'vaultId' => '<string>'
]
],
'metadata' => [
],
'resources' => [
[
'fileId' => '<string>',
'mountPath' => '<string>'
]
],
'vaultIds' => [
'<string>'
]
],
'triggers' => [
[
'enabled' => true,
'schedule' => [
'cron' => '<string>',
'timezone' => '<string>',
'catchupWindowSeconds' => 900,
'endAt' => '2023-11-07T05:31:56Z',
'jitterSeconds' => 10,
'overlapPolicy' => 'skip',
'startAt' => '2023-11-07T05:31:56Z'
],
'triggerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'type' => 'schedule'
]
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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.recursion.labelbox.com/managed-agents/v1/automations/{automationId}"
payload := strings.NewReader("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
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.put("https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/automations/{automationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"revision": 4503599627370496,
"runDefaults": {
"metadata": {},
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
},
"status": "paused",
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {}
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_trigger_id_in_use",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_failed",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_event_source_invalid",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_required",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automations_unconfigured",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Authorizations
A Recursion API key, created in the console under API keys.
Headers
Strong ETag returned by the latest canonical automation member read.
^"[\u0021\u0023-\u007E\u0080-\u00FF]*"$Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.
1Path Parameters
Stable canonical automation identifier.
Body
Complete writable shape for creating or replacing a canonical automation.
Managed agent selected by this automation.
Immutable agent version pinned for all admitted runs.
Human-readable automation name.
1 - 256Execution environment selected for admitted sessions.
Prompt definition frozen onto admitted runs.
Show child attributes
Show child attributes
Run defaults frozen onto admitted runs.
Show child attributes
Show child attributes
Complete trigger set for this automation aggregate.
20Closed schedule-trigger configuration.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Caller-owned string labels stored with the automation and returned on reads, such as a marker naming the system that manages it. Never copied to runs or sessions. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters without control characters. Omit to clear.
Show child attributes
Show child attributes
Response
Full round-trippable canonical automation aggregate.
Full round-trippable canonical automation aggregate.
Managed agent selected by this automation.
Immutable agent version pinned for all admitted runs.
Stable canonical automation identifier.
Time the automation was created.
Human-readable automation name.
Execution environment selected for admitted sessions.
Prompt definition frozen onto admitted runs.
Show child attributes
Show child attributes
Monotonic aggregate revision represented by the response ETag.
1 <= x <= 9007199254740991Run defaults frozen onto admitted runs.
Show child attributes
Show child attributes
Lifecycle state. New automations start paused.
paused, active Complete ordered trigger set.
Closed schedule-trigger configuration.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Time the aggregate was last changed.
Caller-owned string labels stored with the automation. Absent when none were set.
Show child attributes
Show child attributes