Roles

What are roles?

{
    "data": [
        {
            "id": 1,
            "name": "Admin",
            "handle": "admin",
            "weight": 0,
            "permissions": [
                {
                    "id": 1,
                    "name": null,
                    "handle": "create"
                },
                {
                    "id": 2,
                    "name": null,
                    "handle": "read"
                },
                {
                    "id": 3,
                    "name": null,
                    "handle": "update"
                },
                {
                    "id": 4,
                    "name": null,
                    "handle": "delete"
                }
            ]
        },
        {
            "id": 2,
            "name": "Manager",
            "handle": "manager",
            "weight": 0,
            "permissions": [
                {
                    "id": 2,
                    "name": null,
                    "handle": "read"
                },
                {
                    "id": 3,
                    "name": null,
                    "handle": "update"
                },
                {
                    "id": 4,
                    "name": null,
                    "handle": "delete"
                }
            ]
        },
        {
            "id": 3,
            "name": "Reporting",
            "handle": "reporting",
            "weight": 0,
            "permissions": [
                {
                    "id": 2,
                    "name": null,
                    "handle": "read"
                }
            ]
        },
        {
            "id": 4,
            "name": "Machine",
            "handle": "machine",
            "weight": 0,
            "permissions": [
                {
                    "id": 1,
                    "name": null,
                    "handle": "create"
                },
                {
                    "id": 2,
                    "name": null,
                    "handle": "read"
                },
                {
                    "id": 3,
                    "name": null,
                    "handle": "update"
                },
                {
                    "id": 4,
                    "name": null,
                    "handle": "delete"
                }
            ]
        }
    ],
    "links": {
        "first": "http://example-site.getomneo.com/api/v3/roles?page.number=1",
        "last": "http://example-site.getomneo.com/api/v3/roles?page.number=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http://api.example-site.getomneo.com/api/v3/roles",
        "per_page": 15,
        "to": 4,
        "total": 4
    }
}

A role is made up of individual permissions. These roles, can be assigned to an Omneo user.
Once a role is assigned, the user is given all the associated permissions of the Role.
Multiple roles can be assigned to a single user, and multiple permissions can be assigned to a role.
The user inherits all permissions for their assigned roles.

AttributeDescription
id
INTEGER
A unique Omneo ID for the role
name
STRING
The display name for the role
handle
STRING
A unique handle for the role
weight
INTEGER
An integer determining the strength of the permission. The higher the number, the stronger the permission set.
A role with permissions granting read/create/update/delete access to everything in Omneo would be stronger than one that grants read access only, and logically have a higher weight
permissions
Object
An object containing the Permissions assigned for the role.