curl --request POST \
--url https://api.acornops.dev/api/v1/runs/{runId}/approvals/{approvalId}/decision \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"decision": "approved"
}
'const options = {
method: 'POST',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({decision: 'approved'})
};
fetch('https://api.acornops.dev/api/v1/runs/{runId}/approvals/{approvalId}/decision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"executionStatus": "not_started",
"toolName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approvalKind": "pre_step",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetType": "kubernetes",
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decision": "approved",
"summary": "<string>",
"decidedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Approve or reject a pending write-tool approval
A linked external integration may decide only a troubleshooting write approval or Workflow pre-step/runtime tool_write approval whose run execution was requested through that exact integration link and client. Approvals require effective create_read_write_runs. The exact origin may reject while retaining workspace read access if write permission was removed. Browser-created, other-link/client, delegated specialist, scheduled, and system-triggered approvals remain unavailable. Browser responses contain the full approval record; external-integration success and conflict responses contain only the same bounded control metadata returned by the external approval list.
curl --request POST \
--url https://api.acornops.dev/api/v1/runs/{runId}/approvals/{approvalId}/decision \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"decision": "approved"
}
'const options = {
method: 'POST',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({decision: 'approved'})
};
fetch('https://api.acornops.dev/api/v1/runs/{runId}/approvals/{approvalId}/decision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"executionStatus": "not_started",
"toolName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approvalKind": "pre_step",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetType": "kubernetes",
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decision": "approved",
"summary": "<string>",
"decidedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Authorizations
Headers
Required only for linked external integration requests. Must identify the linked external user.
1 - 128Path Parameters
"5e709a9c-2481-4baa-aec2-ca193c50167d"
"0f2e8f75-0d66-4f40-b3d0-f4c4661c43a1"
Body
approved, rejected Response
Decision recorded. Repeated identical decisions are idempotent.
pending, approved, rejected, expired not_started, executing, succeeded, failed, unknown pre_step, tool_write kubernetes, virtual_machine approved, rejected Human-readable, non-authoritative description of the pending write action.