Approve or reject a pending write-tool approval
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",
"requestedByUser": {
"id": "<string>",
"displayName": "<string>"
},
"decidedByUser": {
"id": "<string>",
"displayName": "<string>"
},
"workspaceName": "<string>",
"targetName": "<string>",
"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",
"requestedBy": "<string>",
"decidedBy": "<string>",
"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": {}
}
}Sessions and runs
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.
Approve or reject a pending write-tool approval
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",
"requestedByUser": {
"id": "<string>",
"displayName": "<string>"
},
"decidedByUser": {
"id": "<string>",
"displayName": "<string>"
},
"workspaceName": "<string>",
"targetName": "<string>",
"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",
"requestedBy": "<string>",
"decidedBy": "<string>",
"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": {}
}
}Headers
Path Parameters
Response
Decision recorded. Repeated identical decisions are idempotent.