VirtuousAI
Reference

Approvals

List Approval Requests

GET
/api/v1/approvals

Query Parameters

subject_kind?|
changesetId?|
status?|
thread_id?|
assignedToMe?boolean
Defaultfalse
limit?integer
Default50
Range1 <= value <= 100

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/approvals"
{
  "items": [
    {
      "actionKind": "apply",
      "assignedUserId": "35a1b60a-b60e-4d90-8491-523f2d437a8e",
      "createdAt": "2019-08-24T14:15:22Z",
      "expiresAt": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "idempotencyKey": "string",
      "rationale": "string",
      "requestPayload": {},
      "requestedEventId": "3d4d9682-310e-497b-b982-f015e17a465f",
      "requesterUserId": "9f4de474-a81a-4058-bdf9-c5e1d8c1a9af",
      "resolutionNote": "string",
      "resolvedAt": "2019-08-24T14:15:22Z",
      "resolvedBy": "14b2aa2a-efb0-4ef1-9ffc-3025efbd2222",
      "resolvedEventId": "812b5d17-6c80-4776-a21b-73c2932f1589",
      "status": "pending",
      "subjectChangesetId": "167a51a5-dda7-48a3-bd72-4d47b5eb3aea",
      "subjectKind": "changeset",
      "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
      "title": "string",
      "toolCallId": "string",
      "turnId": "7513f73d-27ec-455d-85b7-7bd021b4dccf",
      "updatedAt": "2019-08-24T14:15:22Z",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Approval Request

GET
/api/v1/approvals/{approval_id}

Path Parameters

approval_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "approval": {
    "actionKind": "apply",
    "assignedUserId": "35a1b60a-b60e-4d90-8491-523f2d437a8e",
    "createdAt": "2019-08-24T14:15:22Z",
    "expiresAt": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "idempotencyKey": "string",
    "rationale": "string",
    "requestPayload": {},
    "requestedEventId": "3d4d9682-310e-497b-b982-f015e17a465f",
    "requesterUserId": "9f4de474-a81a-4058-bdf9-c5e1d8c1a9af",
    "resolutionNote": "string",
    "resolvedAt": "2019-08-24T14:15:22Z",
    "resolvedBy": "14b2aa2a-efb0-4ef1-9ffc-3025efbd2222",
    "resolvedEventId": "812b5d17-6c80-4776-a21b-73c2932f1589",
    "status": "pending",
    "subjectChangesetId": "167a51a5-dda7-48a3-bd72-4d47b5eb3aea",
    "subjectKind": "changeset",
    "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
    "title": "string",
    "toolCallId": "string",
    "turnId": "7513f73d-27ec-455d-85b7-7bd021b4dccf",
    "updatedAt": "2019-08-24T14:15:22Z",
    "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Approve Request

POST
/api/v1/approvals/{approval_id}/approve

Path Parameters

approval_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

note?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve" \  -H "Content-Type: application/json" \  -d '{}'
{
  "approval": {
    "actionKind": "apply",
    "assignedUserId": "35a1b60a-b60e-4d90-8491-523f2d437a8e",
    "createdAt": "2019-08-24T14:15:22Z",
    "expiresAt": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "idempotencyKey": "string",
    "rationale": "string",
    "requestPayload": {},
    "requestedEventId": "3d4d9682-310e-497b-b982-f015e17a465f",
    "requesterUserId": "9f4de474-a81a-4058-bdf9-c5e1d8c1a9af",
    "resolutionNote": "string",
    "resolvedAt": "2019-08-24T14:15:22Z",
    "resolvedBy": "14b2aa2a-efb0-4ef1-9ffc-3025efbd2222",
    "resolvedEventId": "812b5d17-6c80-4776-a21b-73c2932f1589",
    "status": "pending",
    "subjectChangesetId": "167a51a5-dda7-48a3-bd72-4d47b5eb3aea",
    "subjectKind": "changeset",
    "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
    "title": "string",
    "toolCallId": "string",
    "turnId": "7513f73d-27ec-455d-85b7-7bd021b4dccf",
    "updatedAt": "2019-08-24T14:15:22Z",
    "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Reject Request

POST
/api/v1/approvals/{approval_id}/reject

Path Parameters

approval_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

note?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08/reject" \  -H "Content-Type: application/json" \  -d '{}'
{
  "approval": {
    "actionKind": "apply",
    "assignedUserId": "35a1b60a-b60e-4d90-8491-523f2d437a8e",
    "createdAt": "2019-08-24T14:15:22Z",
    "expiresAt": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "idempotencyKey": "string",
    "rationale": "string",
    "requestPayload": {},
    "requestedEventId": "3d4d9682-310e-497b-b982-f015e17a465f",
    "requesterUserId": "9f4de474-a81a-4058-bdf9-c5e1d8c1a9af",
    "resolutionNote": "string",
    "resolvedAt": "2019-08-24T14:15:22Z",
    "resolvedBy": "14b2aa2a-efb0-4ef1-9ffc-3025efbd2222",
    "resolvedEventId": "812b5d17-6c80-4776-a21b-73c2932f1589",
    "status": "pending",
    "subjectChangesetId": "167a51a5-dda7-48a3-bd72-4d47b5eb3aea",
    "subjectKind": "changeset",
    "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
    "title": "string",
    "toolCallId": "string",
    "turnId": "7513f73d-27ec-455d-85b7-7bd021b4dccf",
    "updatedAt": "2019-08-24T14:15:22Z",
    "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}