Access requests
Filing a request
Create Access Request keeps every body field exceptrequestable_permission_ids, which becomes entitlement_ids.
v0
v1
201 with a response like this:
v1 response
access_length that the app doesn’t offer returns 400. v0 returned 422.
Reading requests
List Access Requests and Get Access Request have the same filters and expansions across versions:user_id, requester_user_id, target_user_id, statuses, and expand. The list uses page
tokens, like every v1 list. Beyond that, four things change:
- Entitlements replace requestable permissions. v0 listed what was requested under
requestable_permissions, as full requestable-permission objects. v1 listsentitlementsinstead, as described in Entitlements on a request. sortis noworder_by. Sendorder_by=created_atfor oldest first, which is the default, ororder_by=created_at descfor newest first. Asortparameter returns400withcodeset tovalidation.unknown_query_parameter.statusandstatusestake labels. See Status values.- Embedded tasks are v1 tasks. With
expand=tasks, each task has the shape and values that Tasks describes.
Status values
status in responses and statuses in filters take lowercase kebab-case labels. notes is keyed
by the same labels. A v0 value in statuses returns 400.
The embedded users’
status is a label too, such as active. For every user status, see
The User object.
Cancelling a request
v0 cancelled withDELETE and took the reason as a query parameter. v1 cancels with the :cancel
custom method and takes the reason in an optional JSON body:
v1
- Both versions return
204. - Send the reason in the body. A
reasonquery parameter returns400withcodeset tovalidation.unknown_query_parameter. - If the request’s status no longer allows cancelling, the call returns
409. v0 returned422. Cancelling lists the statuses you can cancel from.
Tasks
Listing tasks
Both versions of List Tasks list only the tasks you can see, as Which tasks you can see describes. Both list only open tasks (pending, accepted, and blocked) unless you pass status. v1 renames or
replaces seven v0 parameters:
status, product_area, search, assigned_group_ids, access_request_id, show_all_tasks,
and expand keep their names. status and product_area take v1’s labels.
To sort in descending order, add
desc after the field, as in order_by=created_at desc, which
is order_by=created_at%20desc in a URL. Without order_by, v1 lists newest first.
A v0 parameter name sent to v1, such as
task_type or sort_by, returns 400 with code set
to validation.unknown_query_parameter.status=PENDING returns 400, because v1
expects pending. Filtering the list lists the
other values that return an error.
To list your open approval tasks, 50 at a time:
v0
v1
v1 response
Task fields
entitlement_idholds an entitlement ID, not the requestable-permission ID thatrequestable_permission_idheld. Entitlement IDs on tasks covers when it’snull.- v0’s task endpoints omitted fields that had no value. v1 returns them as
null. The exceptions areassignees,actions, andcomments, which appear only when you name them inexpand.
Values
type, category, status, and product_area take lowercase kebab-case labels in v1, in
responses and in filters alike. An unknown value in any of the four filters returns 400.
Some v1 types cover more than one v0 type. Filtering by one of those labels returns tasks of every
v0 type behind it.
The same status labels appear in
transition_to, both in the actions a task lists and in the body
of Perform Task Action.
With
expand=assignees, an assignee’s type is user or group. v0 returned USER or GROUP.
Acting on a task
Complete, dismiss, and reassign work as they did on v0, with the same bodies and the same status code on success. v1 adds acode to several of their errors, which
Acting on a task lists.
Perform Task Action accepts different values:
action_typetakes a label, such asapprove-access-requestrather thanAPPROVE_SUPPORT_REQUEST. The labels a task accepts are theaction_typevalues in its actions, which List Task Actions returns, as does List Tasks withexpand=actions. A v0 action type returns400withcodeset totask.action_unknown.transition_totakes a status label, such ascompletedrather thanCOMPLETED. It must be one of the transitions the action lists. Otherwise the call returns400withcodeset totask.transition_not_allowed.
201 on both versions.
v0’s response had no body. v1’s response is the comment it created, with body, created_by, and
created_at.
Task types v1 doesn’t return
AGENT_ISSUE tasks have no v1 label. v0’s task list already omitted them. v1 also omits them from
an access request’s tasks, and reading or acting on one by ID returns 404.