Skip to main content
POST
/
v2
/
approval-requests
/
search
Search Approval Requests
curl --request POST \
  --url https://public.api.serval.com/v2/approval-requests/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamId": "<string>",
  "resourceType": "APPROVAL_REQUEST_RESOURCE_TYPE_UNSPECIFIED",
  "results": [
    "APPROVAL_REQUEST_RESULT_UNSPECIFIED"
  ],
  "createdAfter": "<string>",
  "createdBefore": "<string>",
  "pageSize": 123,
  "pageToken": "<string>"
}
'
{
  "data": [
    {
      "accessRequestTimeAllocationId": "<string>",
      "workflowRunId": "<string>",
      "id": "<string>",
      "result": "APPROVAL_REQUEST_RESULT_UNSPECIFIED",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamId
string

The ID of the team. Required.

resourceType
enum<string> | null

Filter by resource type (allocation or workflow run).

Available options:
APPROVAL_REQUEST_RESOURCE_TYPE_UNSPECIFIED,
APPROVAL_REQUEST_RESOURCE_TYPE_ACCESS_ALLOCATION,
APPROVAL_REQUEST_RESOURCE_TYPE_WORKFLOW_RUN
results
enum<string>[]

Filter by result statuses (multiple allowed).

Available options:
APPROVAL_REQUEST_RESULT_UNSPECIFIED,
PENDING,
APPROVED,
DENIED,
TIMEDOUT,
CANCELED
createdAfter
string | null

Filter by requests created after this timestamp (RFC3339 format).

createdBefore
string | null

Filter by requests created before this timestamp (RFC3339 format).

pageSize
integer<int32> | null

Maximum number of results to return. Default is 1000, maximum is 5000.

pageToken
string | null

Token for pagination. Leave empty for the first request.

Response

Success

data
ApprovalRequest · object[]
nextPageToken
string | null

Token for retrieving the next page of results. Empty if no more results.