Permission
  • 05 Jul 2022
  • 1 Minute to read
  • Dark
    Light

Permission

  • Dark
    Light

Article summary

Permission JSON Format

Permission is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idintegerID of the permission.
moduleIdstringID of the module that the permission belongs to.
namestringName of the permission.
descriptionstringDescription of the permission.
orderintegerOrder of the permission.
isEnabledForAgentByDefaultboolWhether the permission is enabled for agents by default or not.
parentIdintegerID of the parent permission.
isDeletedboolWhether the permission is deleted or not.

Get site Permissions

GET global/sites/{stieId}/permissions

  • Parameters:

No Parameters

  • Response:

An array of Permission

  • Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/sites/100/permissions \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "id": 1,
      "moduleId": "Global",
      "name": "Manage My Profile",
      "description": "• Edit My Profile",
      "order": 1,
      "isEnabledForAgentByDefault": false,
      "parentId": 0,
      "isDeleted": false
  }
] 

Get agent Permissions

GET global/agents/{agentId}/permissions

  • Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesID of the site.
  • Response:

NameTypeDescription
permissionIdsarrayThe list of permission IDs.
  • Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/agents/edd568c2-9e9f-416c-b98b-17fb03c1ee52/permissions?siteId=100 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "permissionIds": [
      1,
      2
  ]
} 

Was this article helpful?

What's Next