Manage Subscription Requests
Subscription API reference guide
This page describes the subscription endpoint, which allows you to view and manage subscription requests on data sources and projects.
Subscription workflow
Get pending subscription requests
GET
Get pending subscription requests the calling user can approve.
GET
Get pending request information for specified model and requesting user (or specified entity).
Get pending subscription requests you can approve
GET /subscription/getPendingRequestsForUser
Get pending subscription requests the calling user can approve.
Query parameters
groupByEntity
boolean If true, group request results by user/group.
No
profileId
integer Match against profile ID.
No
groupId
integer Match against group ID.
No
name
string A partial name to match against user or group names.
No
string A partial email address to match against user or group email addresses.
No
modelName
string A partial name to match against model names.
No
modelTypes
array[string] Model types to include.
No
size
integer The max number of matches to return. Default 15.
No
sortField
string The field to sort results on. Defaults to name.
No
sortOrder
string The order that the results will be sorted in. Default asc.
No
offset
integer Offset to start returning values.
No
Response parameters
hits
array Metadata details regarding the subscription requests.
count
integer The number of subscription requests.
Request example
The following request gets pending subscription requests the calling user can approve.
Response example
Get pending subscription requests for a specified model
GET /subscription/requestInfo/{modelType}/{modelId}
Get pending request information for specified model and requesting user (or specified entity).
Query parameters
modelType
string The model that a pending request is out for. Options are datasource or project.
Yes
modelId
integer The data source or project ID.
Yes
profileId
integer A user ID if you want to get pending requests for another user.
No
groupId
integer A group ID if you want to get pending requests for a whole group.
No
Response parameters
records
array Details about each of the pending subscription requests, including subscriptionId, requiredPermission, state, approverId, ownerModelId, approver, and ownerModelName.
Request example
The following request gets pending subscription requests for the data source with the ID 6 for the current user.
Response example
Approve subscription requests
Approve specified subscription requests
POST /subscription/approve
Approve specified subscription requests.
Requirement: AUDIT permission, GOVERNANCE permission, USER_ADMIN permission, or you must be the owner of the data source, depending on the subscription policy
Payload parameters
id
integer The subscription ID of the request to approve.
Yes
expiration
date The date to expire this user's access.
No
Response parameters
id
integer If the request fails, the response includes the ID of the subscription request.
model
array[object] If the request fails, the response includes details about the data source or project.
entity
array[object] If the request fails, the response includes details about the user making the subscription request.
Request example
The following request approves the subscription request.
Payload example
Response example
Approve bulk subscription requests
POST /subscription/approve/bulk
Bulk approve subscription requests.
Requirement: AUDIT permission, GOVERNANCE permission, USER_ADMIN permission, or you must be the owner of the data source, depending on the subscription policy
Payload parameters
requestIds
integer A list of the subscription request IDs to be approved. If requestIds is provided, jobs will only be created for the IDs listed. Otherwise, the id and type values will be used to find and create jobs for all approval requests.
Yes
id
integer The ID for the type. If requestIds is provided, jobs will only be created for the IDs listed. Otherwise, the id and type values will be used to find and create jobs for all approval requests.
Yes
type
string The type of ID: profile. If requestIds is provided, jobs will only be created for the IDs listed. Otherwise, the id and type values will be used to find and create jobs for all approval requests.
Yes
Response parameters
success
boolean If true, all of the subscription requests have been successfully approved.
Request example
The following request approves all of the subscription requests.
Payload example
Response example
Deny subscription requests
Deny specified subscription requests
POST /subscription/deny
Deny specified subscription requests.
Requirement: AUDIT permission, GOVERNANCE permission, USER_ADMIN permission, or you must be the owner of the data source, depending on the subscription policy
Payload parameters
id
integer The subscription ID of the request to deny.
Yes
denialReasoning
string The reason the user is denied access to the data source or project.
Yes
Response parameters
id
integer If the request fails, the response includes the ID of the subscription request.
model
array[object] If the request fails, the response includes details about the data source or project.
entity
array[object] If the request fails, the response includes details about the user making the subscription request.
Request example
The following request denies the subscription request.
Payload example
Response example
Deny bulk subscription requests
POST /subscription/deny/bulk
Bulk deny subscription requests.
Requirement: AUDIT permission, GOVERNANCE permission, USER_ADMIN permission, or you must be the owner of the data source, depending on the subscription policy
Payload parameters
requestIds
integer A list of the subscription request IDs to be approved. If requestIds is provided, jobs will only be created for the IDs listed. Otherwise, the id and type values will be used to find and create jobs for all denial requests.
Yes
id
integer The ID for the type you select. If requestIds is provided, jobs will only be created for the IDs listed. Otherwise, the id and type values will be used to find and create jobs for all denial requests.
Yes
type
string The type of ID: profile. If requestIds is provided, jobs will only be created for the IDs listed. Otherwise, the id and type values will be used to find and create jobs for all denial requests.
Yes
denialReasoning
string The reason that you are denying the subscription requests.
Yes
Response parameters
success
boolean If true, all of the subscription requests have been successfully denied.
Request example
The following request with the payload below denies the subscription requests with the IDs 40 and 41.
Payload example
Response example
Last updated
Was this helpful?

