ACL
API Endpoint
aclACL Module API documentation.
Users ¶
Users ¶
Headers
Content-Type: application/json
Body
{
"data": [
{
"id": 4,
"email": "coen@pixelindustries.com",
"first_name": "Coen",
"last_name": "Zimmerman",
"roles": [
"admin"
]
},
{
"id": 6,
"email": "test@testing.nl",
"first_name": "Tester T.",
"last_name": "Testington",
"roles": [
"editor"
]
}
]
}
Retrieve all usersGET/users
Retrieves a full unpaginated list of users.
Headers
Content-Type: application/json
Body
{
"email": "someuser@somedomain.com",
"password" "secret",
"first_name": "Some",
"last_name": "User",
"roles": [
"admin",
"editor"
]
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 9,
"email": "someuser@somedomain.com",
"first_name": "Some",
"last_name": "User",
"roles": [
"admin",
"editor"
]
}
}
Headers
Content-Type: application/json
Body
{
"email": "someuser@somedomain.com",
"password" "secret"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 9,
"email": "someuser@somedomain.com",
"first_name": "Some",
"last_name": "User",
"roles": [
"admin",
"editor"
]
}
}
Create a userPOST/users
Create a new user, which may log in immediately after.
Single User ¶
Headers
Content-Type: application/json
Body
{
"id": 9,
"email": "someuser@somedomain.com",
"first_name": "Some",
"last_name": "User",
"roles": [
"admin",
"editor"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"email": {
"type": "string",
"description": "Valid e-mail address"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"roles": {
"type": "array",
"description": "A list of the roles currently assigned to the user"
}
},
"required": [
"id"
]
}
Retrieve a userGET/users/{userId}
Retrieves a single user.
- userId
number
(required) Example: 1ID of the user
Headers
Content-Type: application/json
Body
{
"password": "newsecret",
"first_name": "New",
"last_name": "Name",
"roles": [
"editor"
]
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 4,
"email": "coen@pixelindustries.com",
"first_name": "Coen",
"last_name": "Zimmerman",
"roles": [
"admin"
]
}
}
Headers
Content-Type: application/json
Body
{
"roles": [
"editor"
]
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 4,
"email": "coen@pixelindustries.com",
"first_name": "Coen",
"last_name": "Zimmerman",
"roles": [
"admin"
]
}
}
Headers
Content-Type: application/json
Body
{
"password" "newsecret"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 4,
"email": "coen@pixelindustries.com",
"first_name": "Coen",
"last_name": "Zimmerman",
"roles": [
"admin"
]
}
}
Update a userPUT/users/{userId}
Updates a user.
Note that a user’s e-mail address may not be changed. If new roles are set, any roles omitted will be unassigned.
- userId
number
(required) Example: 1ID of the user
Delete a userDELETE/users/{userId}
Deletes a user. This instantly voids any open sessions and denies all access this user may have had.
- userId
number
(required) Example: 1ID of the user
Roles ¶
Roles ¶
Headers
Content-Type: application/json
Body
{
"data": [
{
"key": "admin",
"permissions": [
"acl.roles.show",
"acl.roles.edit",
"acl.roles.create",
"acl.roles.delete",
"acl.users.show"
]
},
{
"key": "editor",
"permissions": [
"acl.roles.show",
"acl.users.show"
]
}
]
}
Retrieve all rolesGET/roles
Retrieves a list of all roles.
Headers
Content-Type: application/json
Body
{
"key": "admin",
"name": "Administrator",
"permissions": [
"acl.users.show",
"acl.roles.show"
]
}
Headers
Content-Type: application/json
Body
{
"data": {
"key": "admin",
"permissions": [
"acl.users.show",
"acl.roles.show"
]
}
}
Create a rolePOST/roles
Creates a new role.
Single Role ¶
Headers
Content-Type: application/json
Body
{
"key": "admin",
"permissions": [
"acl.roles.show",
"acl.users.show"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"permissions": {
"type": "array",
"description": "A list of the permissions that the role offers"
}
},
"required": [
"key"
]
}
Retrieve a roleGET/roles/{roleKey}
Retrieves a single role by its key.
- roleKey
string
(required) Example: adminKey of the role
Body
{
"data": {
"key": "editor",
"permissions": [
"acl.roles.show",
"acl.users.show"
]
}
}
Update a rolePUT/roles/{roleKey}
Updates a role.
- roleKey
string
(required) Example: adminKey of the role
Body
{
"message": "Role is still in use"
}
Delete a roleDELETE/roles/{roleKey}
Deletes a role. Roles which are still in use (assigned to any user) are NOT deleted.
- roleKey
string
(required) Example: adminKey of the role
Permissions ¶
Permissions ¶
Headers
Content-Type: application/json
Body
{
"data": [
{
"key": "do.something"
},
{
"key": "acl.roles.show"
},
{
"key": "acl.roles.create"
},
{
"key": "acl.roles.edit"
},
{
"key": "acl.roles.delete"
},
{
"key": "acl.users.show"
},
{
"key": "acl.users.create"
},
{
"key": "acl.users.edit"
},
{
"key": "acl.users.delete"
}
]
}
Retrieve all available permissionsGET/permissions
Retrieves all permissions that are defined by loaded CMS modules. This will exclude any permissions set for users or roles that are not currently defined by modules.
Permissions per module ¶
Headers
Content-Type: application/json
Body
{
"data": [
{
"key": "acl.roles.show"
},
{
"key": "acl.roles.create"
},
{
"key": "acl.roles.edit"
},
{
"key": "acl.roles.delete"
}
]
}
Retrieve available permissions for a single moduleGET/permissions/module/
Returns all permissions defined for a single module.
Module permissions are defined by their ACL presence data. This endpoint will return a flattened list of all permissions related to a single module.
Permissions in use ¶
Headers
Content-Type: application/json
Body
{
"data": [
{
"key": "acl.roles.show"
},
{
"key": "acl.roles.edit"
}
]
}
Retrieve all permissions in useGET/permissions/used
Retrieves permissions in use, regardless of whether they are considered available or not. This will only return the permissions that are currently assigned to any roles (or users).
Generated by aglio on 04 Aug 2016