cURL
curl -X POST https://api.aiql.io/requests/req_7f3a/reviews/rev_4c5d/submit \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{"event": "approve"}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
review = client.requests.reviews.submit("req_7f3a", "rev_4c5d", event="approve")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const review = await client.requests.reviews.submit("req_7f3a", "rev_4c5d", {
event: "approve",
});{
"id": "<string>",
"status": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reviewer": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image": "<string>"
},
"comments": [
{
"id": "<string>",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"author": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image": "<string>"
}
}
],
"changes_requested_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"rejected_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Request Reviews
Submit Review
POST
/
requests
/
{id}
/
reviews
/
{review_id}
/
submit
cURL
curl -X POST https://api.aiql.io/requests/req_7f3a/reviews/rev_4c5d/submit \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "AiQL-Workspace: $AIQL_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{"event": "approve"}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
review = client.requests.reviews.submit("req_7f3a", "rev_4c5d", event="approve")import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const review = await client.requests.reviews.submit("req_7f3a", "rev_4c5d", {
event: "approve",
});{
"id": "<string>",
"status": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reviewer": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image": "<string>"
},
"comments": [
{
"id": "<string>",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"author": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image": "<string>"
}
}
],
"changes_requested_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"rejected_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key or UI session JWT passed as a Bearer token.
Headers
ID of the workspace the request operates on.
Body
application/json
Event that submits the review and advances the parent request.
Available options:
approve, request_changes, reject Response
Successful Response
Unique identifier of the review.
Current status of the review.
Description of the review.
Timestamp when the review was created.
Timestamp when the review was last updated.
Reviewer of the review.
Show child attributes
Show child attributes
Comments on the review.
Show child attributes
Show child attributes
Timestamp when the review entered CHANGES_REQUESTED.
Timestamp when the review was approved.
Timestamp when the review was rejected.