API Reference

Permissions

Permissions, addressed per module, entity or record: the path names what they apply to.

Permissions in Postman

About permissions

Permissions are set at three levels: a module, one entity in it, or one record. Each level holds a default set, which applies to everyone, and sets per user and per group. An entity or record set can inherit from the level above instead of holding its own. The owner_ flags apply to the records a person owns.

Show permissions#

GET /cdna-api/users/permissions/{module}

Reads the permissions at one level: default, and the sets per user and per group.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

modulepathrequired
string
The module, such as Pages. Add /{entity} for one entity, such as Faq/Question, and /{entity}/{record} for one record, such as Blogs/Post/1.

Example

Show permissions
GET /cdna-api/users/permissions/Pages HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "result": "success",
  "data": {
    "default": {
      "owner_read": true,
      "owner_create": true,
      "owner_update": true,
      "owner_delete": true,
      "owner_publish": true,
      "owner_admin": false,
      "read": true,
      "create": false,
      "update": false,
      "delete": false,
      "publish": false,
      "admin": false,
      "configure": false
    },
    "user": [],
    "group": []
  }
}
Open in Postman docs Real response from this documentation site

Change permissions#

PUT /cdna-api/users/permissions/{module}

Replaces the permissions at one level. Flags left out of a set are unset; "inherit": true on an entity or record drops its own sets and follows the level above.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

modulepathrequired
string
The module, such as Pages. Add /{entity} for one entity, such as Faq/Question, and /{entity}/{record} for one record, such as Blogs/Post/1.
defaultbody
object
The flags for everyone: read, create, update, delete, publish, admin and configure, and the owner_ forms of the first six.
user, groupbody
object
Flag sets per user id and per group id.
inheritbody
boolean
On an entity or record, true follows the level above.

Example

Change permissions
PUT /cdna-api/users/permissions/Products HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "default": {
    "owner_read": true,
    "owner_create": false,
    "owner_update": true,
    "owner_delete": false,
    "owner_publish": false,
    "owner_admin": false,
    "read": true,
    "create": false,
    "update": false,
    "delete": false,
    "publish": false,
    "admin": false,
    "configure": false
  },
  "user": {
    "46": {
      "read": true,
      "create": false,
      "update": true,
      "delete": false,
      "publish": true,
      "admin": false,
      "configure": false
    }
  },
  "group": {
    "4": {
      "owner_read": true,
      "owner_create": true,
      "owner_update": true,
      "owner_delete": false,
      "owner_publish": false,
      "owner_admin": false,
      "read": true,
      "create": false,
      "update": false,
      "delete": false,
      "publish": false,
      "admin": false,
      "configure": false
    }
  }
}
Response 200 OK
{
  "result": "success",
  "data": {
    "inherit": false,
    "default": {
      "owner_read": true,
      "owner_create": false,
      "owner_update": true,
      "owner_delete": false,
      "owner_publish": false,
      "owner_admin": false,
      "read": true,
      "create": false,
      "update": false,
      "delete": false
    },
    "user": {
      "46": {
        "read": true,
        "create": false,
        "update": true,
        "delete": false,
        "publish": true,
        "admin": false,
        "configure": false
      }
    },
    "group": {
      "4": {
        "owner_read": true,
        "owner_create": true,
        "owner_update": true,
        "owner_delete": false,
        "owner_publish": false,
        "owner_admin": false,
        "read": true,
        "create": false,
        "update": false,
        "delete": false
      }
    }
  }
}
Open in Postman docs Saved response from the Postman collection, shortened