Human-in-the-Loop
GET/api/v1/hitl/approvals
Authorization
bearer_token In: header
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Full-text search over this list's searchable fields.
1 <= length <= 200Comma-separated sort keys, - for descending, at most 1. Keys: expires_at, decision_deadline, created_at. Default: -created_at.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Response Body
application/json
curl -X GET "https://example.com/api/v1/hitl/approvals"{ "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }, "requests": [ { "acknowledged_at": "2019-08-24T14:15:22Z", "approvers": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "decision": null, "decision_deadline": "2019-08-24T14:15:22Z", "description": "string", "expires_at": "2019-08-24T14:15:22Z", "kind": "approve_reject", "metadata": null, "options": [ { "label": "string", "metadata": null, "option_id": "string" } ], "request_id": "string", "required_approvers": 0, "status": "pending", "tally": { "approvals_received": 0, "rejections_received": 0, "remaining_approvers": [ "string" ], "required_approvers": 0 }, "title": "string", "updated_at": "2019-08-24T14:15:22Z", "visibility": "private", "votes": [ { "approver_id": "string", "decided_at": "2019-08-24T14:15:22Z", "outcome": "approved", "reason": "string", "submitted_input": null } ], "workspace_id": "string" } ]}POST/api/v1/hitl/approvals/{request_id}/respond
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Route payload for recording a decision.
Response Body
application/json
curl -X POST "https://example.com/api/v1/hitl/approvals/string/respond" \ -H "Content-Type: application/json" \ -d '{ "decision": { "approve": {} } }'{ "acknowledged_at": "2019-08-24T14:15:22Z", "approvers": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "decision": null, "decision_deadline": "2019-08-24T14:15:22Z", "description": "string", "expires_at": "2019-08-24T14:15:22Z", "kind": "approve_reject", "metadata": null, "options": [ { "label": "string", "metadata": null, "option_id": "string" } ], "request_id": "string", "required_approvers": 0, "status": "pending", "tally": { "approvals_received": 0, "rejections_received": 0, "remaining_approvers": [ "string" ], "required_approvers": 0 }, "title": "string", "updated_at": "2019-08-24T14:15:22Z", "visibility": "private", "votes": [ { "approver_id": "string", "decided_at": "2019-08-24T14:15:22Z", "outcome": "approved", "reason": "string", "submitted_input": null } ], "workspace_id": "string"}GET/api/v1/hitl/requests
Authorization
bearer_token In: header
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Full-text search over this list's searchable fields.
1 <= length <= 200Comma-separated sort keys, - for descending, at most 1. Keys: expires_at, decision_deadline, created_at. Default: -created_at.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Response Body
application/json
curl -X GET "https://example.com/api/v1/hitl/requests"{ "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }, "requests": [ { "acknowledged_at": "2019-08-24T14:15:22Z", "approvers": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "decision": null, "decision_deadline": "2019-08-24T14:15:22Z", "description": "string", "expires_at": "2019-08-24T14:15:22Z", "kind": "approve_reject", "metadata": null, "options": [ { "label": "string", "metadata": null, "option_id": "string" } ], "request_id": "string", "required_approvers": 0, "status": "pending", "tally": { "approvals_received": 0, "rejections_received": 0, "remaining_approvers": [ "string" ], "required_approvers": 0 }, "title": "string", "updated_at": "2019-08-24T14:15:22Z", "visibility": "private", "votes": [ { "approver_id": "string", "decided_at": "2019-08-24T14:15:22Z", "outcome": "approved", "reason": "string", "submitted_input": null } ], "workspace_id": "string" } ]}POST/api/v1/hitl/requests
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request payload for creating a new Human-in-the-Loop request.
Response Body
application/json
curl -X POST "https://example.com/api/v1/hitl/requests" \ -H "Content-Type: application/json" \ -d '{ "approvers": [ "string" ], "kind": "approve_reject", "title": "string" }'{ "acknowledged_at": "2019-08-24T14:15:22Z", "approvers": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "decision": null, "decision_deadline": "2019-08-24T14:15:22Z", "description": "string", "expires_at": "2019-08-24T14:15:22Z", "kind": "approve_reject", "metadata": null, "options": [ { "label": "string", "metadata": null, "option_id": "string" } ], "request_id": "string", "required_approvers": 0, "status": "pending", "tally": { "approvals_received": 0, "rejections_received": 0, "remaining_approvers": [ "string" ], "required_approvers": 0 }, "title": "string", "updated_at": "2019-08-24T14:15:22Z", "visibility": "private", "votes": [ { "approver_id": "string", "decided_at": "2019-08-24T14:15:22Z", "outcome": "approved", "reason": "string", "submitted_input": null } ], "workspace_id": "string"}GET/api/v1/hitl/requests/{request_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/hitl/requests/string"{ "acknowledged_at": "2019-08-24T14:15:22Z", "approvers": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "decision": null, "decision_deadline": "2019-08-24T14:15:22Z", "description": "string", "expires_at": "2019-08-24T14:15:22Z", "kind": "approve_reject", "metadata": null, "options": [ { "label": "string", "metadata": null, "option_id": "string" } ], "request_id": "string", "required_approvers": 0, "status": "pending", "tally": { "approvals_received": 0, "rejections_received": 0, "remaining_approvers": [ "string" ], "required_approvers": 0 }, "title": "string", "updated_at": "2019-08-24T14:15:22Z", "visibility": "private", "votes": [ { "approver_id": "string", "decided_at": "2019-08-24T14:15:22Z", "outcome": "approved", "reason": "string", "submitted_input": null } ], "workspace_id": "string"}POST/api/v1/hitl/requests/{request_id}/acknowledge
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/hitl/requests/string/acknowledge"{ "acknowledged_at": "2019-08-24T14:15:22Z", "approvers": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "decision": null, "decision_deadline": "2019-08-24T14:15:22Z", "description": "string", "expires_at": "2019-08-24T14:15:22Z", "kind": "approve_reject", "metadata": null, "options": [ { "label": "string", "metadata": null, "option_id": "string" } ], "request_id": "string", "required_approvers": 0, "status": "pending", "tally": { "approvals_received": 0, "rejections_received": 0, "remaining_approvers": [ "string" ], "required_approvers": 0 }, "title": "string", "updated_at": "2019-08-24T14:15:22Z", "visibility": "private", "votes": [ { "approver_id": "string", "decided_at": "2019-08-24T14:15:22Z", "outcome": "approved", "reason": "string", "submitted_input": null } ], "workspace_id": "string"}POST/api/v1/hitl/requests/{request_id}/decision
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Route payload for recording a decision.
Response Body
application/json
curl -X POST "https://example.com/api/v1/hitl/requests/string/decision" \ -H "Content-Type: application/json" \ -d '{ "decision": { "approve": {} } }'{ "acknowledged_at": "2019-08-24T14:15:22Z", "approvers": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "decision": null, "decision_deadline": "2019-08-24T14:15:22Z", "description": "string", "expires_at": "2019-08-24T14:15:22Z", "kind": "approve_reject", "metadata": null, "options": [ { "label": "string", "metadata": null, "option_id": "string" } ], "request_id": "string", "required_approvers": 0, "status": "pending", "tally": { "approvals_received": 0, "rejections_received": 0, "remaining_approvers": [ "string" ], "required_approvers": 0 }, "title": "string", "updated_at": "2019-08-24T14:15:22Z", "visibility": "private", "votes": [ { "approver_id": "string", "decided_at": "2019-08-24T14:15:22Z", "outcome": "approved", "reason": "string", "submitted_input": null } ], "workspace_id": "string"}