Update Permission

PUT /permissions/{permissionId}

Updates an existing permission. Response either returns the updated permission (success) or the reason why it was not possible to update (failure).

Required Permissions

NameConditions

Permissions:Update

Always Required

Parameters

Path parameters

Path parameterDescription

permissionId

Unique identifier of the permission. Permission IDs look like this: pm-orange-apple-2b17a80613

Request body

In the request body specify the permisison name and/or a list of operations that this permission will allow.

properyRequired/OptionalDescription

name

String - Optional

Name of the permission.

operations

String Array - Optional

List of allowed operations. This this list for all the available operations.

Request example

{
  "name": "US Perms",
  "operations": ["Wallets:Read", "Wallets:Create"]
}

Response

Response example 200 - no approval required

If successful, a response object of the updated permission will be returned:

// permission
{
    "id": "pm-orange-apple-2b17a80613",
    "name": "US",
    "operations": ["Wallets:Read", "Wallets:Create"],
    "status": "Active",
    "isImmutable": false,
    "dateCreated": "2022-10-26T08:30:25.348Z",
    "dateUpdated": "2022-10-26T08:30:25.348Z",
    "isArchived": false
}

Response example 202 - approval required

// permission change request
{
   "id":"cr-...",
   "kind":"Permission",
   "operationKind":"Update",
   "status":"Pending",
   "entityId":"pm-...",
   "approvalId": "ap-...",
   "dateCreated":"2023-12-22T20:57:55.814Z",
   "dateResolved":"2023-12-22T20:57:55.814Z",
   "requester":{
     "appId":"ap-...",
     "userId":"us-...",
     "tokenId":"to-..."
   },
   "body":{
      "id":"pm-orange-apple-2b17a80613",
      "name":"US",
      "operations":["Wallets:Read", "Wallets:Create"],
      "status":"Active",
      "isImmutable":false,
      "isArchived":false
   },
}

Notes

A permission name cannot be an empty string and a permission must have at least one operation specified.

A permission name is the unique identifier of a permission created in your organization. Therefore, multiple permissions with the same name cannot exist. If a permission has been archived, its name is still considered as taken.

Last updated