Skip to main content
The Access Requests API lets you drive access requests from your own tools. You can submit a request from a service desk or chat bot, track it to a decision, and cancel it before it’s decided. This page covers the request lifecycle and the errors to branch on.

Before you begin

1

Create an API key

Create an API key in Settings -> Manage API Keys and exchange its client credentials for an access token. See Generate an API Token.
2

Find your base URL

Send every call to the API URL shown on the key, for example https://devx.YOUR_TENANT.oleria.io. See API Overview for the conventions, errors, and rate limits shared by every Oleria API.
3

Set up what can be requested

Requests can only be made for access you’ve made requestable. If you haven’t yet, set up approval chains and at least one request source - SSO applications, integrated applications, or Custom Access - in the Governance App.
Each endpoint requires one scope, named in its reference page: New API keys get both scopes. An older key may have only read. If submitting or canceling returns 403, contact Customer Success to add write to the key.
An API key identifies your integration, not a person. When a call acts for an employee - browsing what they can request, submitting a request, or canceling one - you name the employee with requesterEmail. It must belong to an active user in your workspace. Make sure your integration has already confirmed who that person is.

What you can work with

Submit a request

1

Find what to request

GET /v1/requestable-subjects?requesterEmail=... lists everything the employee can request. Applications are limited to those federated by an identity provider the employee belongs to. Filter the list with subjectType (Application, CustomAction, or DirectIntegration) or applicationId.Each item’s id is the id of the config that makes it requestable - you pass it as accessRequestConfigId. GET /v1/requestable-subjects/{id}?requesterEmail=... returns one item by that id. The item also says what the requester can choose:
  • Applications list subject.application.groupAssignmentConfigs. Pass the chosen one’s id as selectedGroupAssignmentConfigId.
  • Direct integrations list the groups and roles on offer. Pass the chosen one as selectedDirectIntegrationGroupId or selectedDirectIntegrationRoleId.
  • Custom actions may declare input fields in subject.customAction. Pass the answers in actionInputValues, keyed by field name.
2

Create the request

POST /v1/access-requests submits the request and starts its approval chain. It returns 201 with the new request.
Send justification when the config’s requireJustification is true. Send a duration only when the access lets the requester choose one, up to its maxAccessDurationMinutes. If the employee already holds an active grant of the same access, the new request extends it and previousAccessRequestId is set on the response.
3

Track it to a decision

GET /v1/access-requests/{id} returns the request with its currentStatus, activities (its status history), and the overall review decision once there is one.The response from create doesn’t include requestNumber, the short number shown to people as #N. Read the request back to get it.
Approvers are notified and decide as usual. See Reviewing and approving requests.
Approval can take hours or days. Poll infrequently - every few minutes at most - or check on requests in a scheduled job, rather than holding a request open.

Find requests

GET /v1/access-requests lists requests, newest first. Combine these filters to narrow it: Every list endpoint is paged. Pass pageSize to set the page size, and pass the response’s nextPageToken as pageToken to get the next page. nextPageToken is absent on the last page.

Request statuses

The API reports a more detailed status than the Governance App shows. Each maps to one request status: When access is active, revokeAt is when it’s due to be removed. It’s empty for access with no end date.

Cancel a request

POST /v1/access-requests/{id}/cancel?requesterEmail=... withdraws a request for the employee who made it. It’s allowed until the request is decided, and pending reviews are canceled with it. It returns the updated request.

Errors

Errors use the code and message body described in API Overview. A 409 means the request is valid but the state of something doesn’t allow it. Branch on code:

Contact us

For questions about the Access Requests API, contact us at support@oleria.com.