ai.v1.AssistantService
DecideApproval
DecideApproval approves or rejects a pending approval request of one of the caller's runs. An approved action runs exactly as its summary says, at most once. Repeating the same decision returns the recorded state. Errors: - INVALID_ARGUMENT: malformed request. - NOT_FOUND: APPROVAL_NOT_FOUND. - FAILED_PRECONDITION: APPROVAL_ALREADY_DECIDED or APPROVAL_EXPIRED. - UNAVAILABLE, DEADLINE_EXCEEDED: SERVICE_UNAVAILABLE or an unknown outcome; retry the same request. - UNAUTHENTICATED: missing or invalid credentials.
Method
POST
Path
ai.v1.AssistantService/DecideApproval
Service
ai.v1.AssistantService
Visibility
Authentication
Session token
MFA Requirement
Not required
POST
ai.v1.AssistantService/DecideApproval Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/ai.v1.AssistantService/DecideApproval' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"approvalId": "1",
"decision": "APPROVE"
}'Responses
{
"status": "PENDING"
}Request
ai.v1.DecideApprovalRequestResponse
ai.v1.DecideApprovalResponse approvalId string (fixed64)
Approval to decide, from an ApprovalRequested event.
decision enum
The decision.
status enum
APPROVED or REJECTED.
PENDING APPROVED REJECTED EXPIRED
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |