Agent key only: report progress or the content-free result of one command
POST
/
api
/
v1
/
agent
/
commands
/
{id}
Agent key only: report progress or the content-free result of one command
curl --request POST \
--url http://127.0.0.1:18000/api/v1/agent/commands/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"failure_code": "<string>",
"failure_detail": "<string>",
"phase": "<string>",
"result": {
"candidate": {},
"cleaned_up": true,
"control": {},
"control_after": {},
"image_digest": "<string>",
"noise": 123,
"quality": {},
"ready_seconds": 123
}
}
'import requests
url = "http://127.0.0.1:18000/api/v1/agent/commands/{id}"
payload = {
"failure_code": "<string>",
"failure_detail": "<string>",
"phase": "<string>",
"result": {
"candidate": {},
"cleaned_up": True,
"control": {},
"control_after": {},
"image_digest": "<string>",
"noise": 123,
"quality": {},
"ready_seconds": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
failure_code: '<string>',
failure_detail: '<string>',
phase: '<string>',
result: {
candidate: {},
cleaned_up: true,
control: {},
control_after: {},
image_digest: '<string>',
noise: 123,
quality: {},
ready_seconds: 123
}
})
};
fetch('http://127.0.0.1:18000/api/v1/agent/commands/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agent/commands/{id}"
payload := strings.NewReader("{\n \"failure_code\": \"<string>\",\n \"failure_detail\": \"<string>\",\n \"phase\": \"<string>\",\n \"result\": {\n \"candidate\": {},\n \"cleaned_up\": true,\n \"control\": {},\n \"control_after\": {},\n \"image_digest\": \"<string>\",\n \"noise\": 123,\n \"quality\": {},\n \"ready_seconds\": 123\n }\n}")
req, _ := http.NewRequest("POST", 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))
}{
"cancelled": true,
"state": "<string>",
"lease_expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Body
application/json
⌘I
Agent key only: report progress or the content-free result of one command
curl --request POST \
--url http://127.0.0.1:18000/api/v1/agent/commands/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"failure_code": "<string>",
"failure_detail": "<string>",
"phase": "<string>",
"result": {
"candidate": {},
"cleaned_up": true,
"control": {},
"control_after": {},
"image_digest": "<string>",
"noise": 123,
"quality": {},
"ready_seconds": 123
}
}
'import requests
url = "http://127.0.0.1:18000/api/v1/agent/commands/{id}"
payload = {
"failure_code": "<string>",
"failure_detail": "<string>",
"phase": "<string>",
"result": {
"candidate": {},
"cleaned_up": True,
"control": {},
"control_after": {},
"image_digest": "<string>",
"noise": 123,
"quality": {},
"ready_seconds": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
failure_code: '<string>',
failure_detail: '<string>',
phase: '<string>',
result: {
candidate: {},
cleaned_up: true,
control: {},
control_after: {},
image_digest: '<string>',
noise: 123,
quality: {},
ready_seconds: 123
}
})
};
fetch('http://127.0.0.1:18000/api/v1/agent/commands/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agent/commands/{id}"
payload := strings.NewReader("{\n \"failure_code\": \"<string>\",\n \"failure_detail\": \"<string>\",\n \"phase\": \"<string>\",\n \"result\": {\n \"candidate\": {},\n \"cleaned_up\": true,\n \"control\": {},\n \"control_after\": {},\n \"image_digest\": \"<string>\",\n \"noise\": 123,\n \"quality\": {},\n \"ready_seconds\": 123\n }\n}")
req, _ := http.NewRequest("POST", 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))
}{
"cancelled": true,
"state": "<string>",
"lease_expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}