CreateListingRole
/api/v1/listings/{listing}/rolesCreate a new application role that users can request access to.
Example request
curl -X POST \ -H "Authorization: Bearer ${OBLIQUE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "displayName": "string", "priority": "string" }' \ "https://us.oblique.security/api/v1/listings/{listing}/roles"Set OBLIQUE_API_KEY to your API key.
curl -X POST \ -H "Authorization: Bearer ${OBLIQUE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "displayName": "string", "priority": "string" }' \ "https://eu.oblique.security/api/v1/listings/{listing}/roles"Set OBLIQUE_API_KEY to your API key.
Path parameters
parentstringrequiredFormat:
listings/{listing}
Query parameters
listingRoleIdstringID of the listing role to create. This value should be 4-63 characters. Valid characters are
/[a-z][0-9]-/.
Request body
namestringAssigned by Oblique. Name of the role of the format
listings/{listing}/roles/{role}.createTimestring (date-time)read-onlyCreate and update timestamps.
updateTimestring (date-time)read-onlydeleteTimestring (date-time)read-onlyIf present, the listing role has been deleted and won’t be returned in List operations.
displayNamestringrequiredA short display name of the role. For example “Viewer”, “Editor”, or “Admin”.
descriptionstringA longer description of the role explaining to the end user when they would request this role over another role.
resourcesstring[]The set of resources that represent the role.
When requesting a role, the target user, team, or group will be granted entitlements for all resources in this list, regardless of existing entitlements. For example, if a user has an entitlement for one resource out of two, they will be granted access to the second.
Updating the list of resources does NOT change any entitlements that were granted through previous requests for this role. Removing a resource does NOT revoke access. Adding a resource does NOT grant access.
prioritystring (int64)requiredPriority indicates the order roles are displayed to the user. Generally roles with less access should be first (“Viewer”, “Editor”, “Admin”). Roles with lower priority values are displayed first. For example:
- “Viewer” (priority = 0)
- “Editor” (priority = 1)
- “Admin” (priority = 2)
managementManagementHow this role is managed. Inherited from the parent listing: roles of Terraform-managed listings are themselves Terraform managed and can only be created, updated, or deleted through the Terraform provider; manage the parent listing to change this. Omitted from responses when the parent listing is manually managed (the default).
managerstringHow the resource is managed. Set automatically by the server based on the caller: Terraform clients produce TERRAFORM; for all other clients the management field is left unset on the response.
repoUristringURI of the VCS repository that holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
repoDirstringOptionally, the subdirectory within
repo_urithat holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
Response
200ListingRoleListingRole is the set of roles that can be requested for a listing.
namestringAssigned by Oblique. Name of the role of the format
listings/{listing}/roles/{role}.createTimestring (date-time)read-onlyCreate and update timestamps.
updateTimestring (date-time)read-onlydeleteTimestring (date-time)read-onlyIf present, the listing role has been deleted and won’t be returned in List operations.
displayNamestringrequiredA short display name of the role. For example “Viewer”, “Editor”, or “Admin”.
descriptionstringA longer description of the role explaining to the end user when they would request this role over another role.
resourcesstring[]The set of resources that represent the role.
When requesting a role, the target user, team, or group will be granted entitlements for all resources in this list, regardless of existing entitlements. For example, if a user has an entitlement for one resource out of two, they will be granted access to the second.
Updating the list of resources does NOT change any entitlements that were granted through previous requests for this role. Removing a resource does NOT revoke access. Adding a resource does NOT grant access.
prioritystring (int64)requiredPriority indicates the order roles are displayed to the user. Generally roles with less access should be first (“Viewer”, “Editor”, “Admin”). Roles with lower priority values are displayed first. For example:
- “Viewer” (priority = 0)
- “Editor” (priority = 1)
- “Admin” (priority = 2)
managementManagementHow this role is managed. Inherited from the parent listing: roles of Terraform-managed listings are themselves Terraform managed and can only be created, updated, or deleted through the Terraform provider; manage the parent listing to change this. Omitted from responses when the parent listing is manually managed (the default).
managerstringHow the resource is managed. Set automatically by the server based on the caller: Terraform clients produce TERRAFORM; for all other clients the management field is left unset on the response.
repoUristringURI of the VCS repository that holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
repoDirstringOptionally, the subdirectory within
repo_urithat holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
Errors
| Status | Meaning |
|---|---|
400 | Malformed request |
401 | Missing or invalid API key |
403 | Not allowed for this API key |
404 | Not found |
429 | Too many requests |
500 | Internal server error |