Role Resource (since 1.0.12)

role is a configurable set of permissions that can be assigned to multiple users, so they all share the same privileges.

There are two types or roles:

Built-in

These are immutable system roles. Their set of permissions will probably change over time, but their name and key are fixed values. As of version 1.0.12 there are two built-in roles: invitee and admin. The latter administrator role will always contain all permissions (available at that time). In free networks the default administrator role has type founder. For enterprise networks this is enterprise_adminVersion 1.0.22 introduced the external built-in role for premium networks.

User-defined

These roles are created by end-users of Speakap and are fully customizable. An API consumer should only ever rely on the set of permissions of such a role and never on its name or EID (in terms of permission checks).

Changelog

1.0.22
  • External role
1.0.23
  • Default Property

Endpoints

Representations

JSON Properties

NameTypeDescription
EIDEIDUnique entity identifier
keystringUnique identifier for built-innon-editable, roles
typestring"role"
roleTypestringRead-only Role type: built_in or user_defined
permissionsarrayList of permissions
renameablebooleanRead-only Whether or not the name of the role can be changed
editablebooleanRead-only Whether or not the permissions can be reconfigured
deletablebooleanRead-only Whether or not the role can be deleted
defaultbooleanSince 1.0.23 Read-only Whether or not it is the default network role
numUsersintegerRead-only Number of users with this role
RelationResourceDescription
networknetworkNetwork

Example - User-defined Role

{
    "_links": {
        "self": {
            "href": "https://api.speakap.io/networks/FEDCBA0987654321/roles/1234567890ABCDEF/"
        },
        "network": {
            "href": "https://api.speakap.io/networks/FEDCBA0987654321/"
        }
    },
    "EID": "1234567890ABCDEF",
    "type": "role",
    "roleType": "user_defined",
    "name": "News Editor",
    "permissions": [
        "...",
        "post_news",
        "delete_news",
        "..."
    ],
    "renameable": true,
    "editable": true,
    "deletable": true,
    "default": false,
    "numUsers": 2
}

Example - Built-in admin role

{
    "_links": {
        "self": {
            "href": "https://api.speakap.io/roles/admin/"
        }
    },
    "key": "admin",
    "type": "role",
    "roleType": "built_in",
    "name": "Administrator",
    "permissions": [
        "..."
    ],
    "renameable": false,
    "editable": false,
    "deletable": false,
    "default": false,
    "numUsers": 1
}