View, create, update and manage roles associated with your account.

GET /roles

DescriptionRetrieve all of the roles in the company.
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles
Parametersclient_id (string) — show only roles that belong to a specific client

Example Request

GET https://app.klipfolio.com/api/1/roles
##Example Response

{
"data": {
    "roles":[
    {"id":"12345678901234567890123abcde",
     "name":"Admin",
     "description":"Manage all assets, users, groups, roles, and account settings."},
    {...}
]
},
"meta": {
   "status": 200,
   "success": true
}
}

GET /roles/{id}

DescriptionGet the details for the specific role id.
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles/{id}
Parametersfull (true/false) — include associations in the listing (users, num_users, permissions)

Example Request

GET https://app.klipfolio.com/api/1/roles/0123456789abcdef0123456789abcdef
##Example Response

{
"data": {
    "id":"0123456789abcdef0123456789abcdef",
    "company":"N/A",
    "name":"View-Only",
    "description":"View-only dashboard with no customization."
},
"meta": {
   "status": 200,
   "success": true
}
}

PUT /roles/{id}

DescriptionUpdate the specified role. Permissions specified will replace existing permissions.
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles/{id}
Fieldsname, description, permissions

Example Request

PUT https://app.klipfolio.com/api/1/roles/abcdef9876543210 — d “{ 'name': Updated Name', 'description': 'Updated description', 'permissions':['klip.build','klip.edit']}”
##Example Response

{
"meta": {
   "status": 200,
   "success": true
}
}

POST/roles

Descriptioncreate custom role
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles/{id}
Fieldsname, description, permissions

Example Request

POST https://app.klipfolio.com/api/1/roles —d “{ 'name': My New Role', 'description': 'This is a description', 'permissions':['klip.build','klip.edit']}”

Example Response

{
"meta": {
   "status": 201,
   "success": true,
   "location": "/roles/1a12345678ab1234a123b1cd12345c49"
}
"data": {}
}

DELETE /roles/{id}

DescriptionDelete the specific role
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles/{id}
ParametersNone.

Example Request

DELETE https://app.klipfolio.com/api/1/roles/0123456789abcdef0123456789abcdef

Example Response

{
"meta": {
      "status": 200,
      "success": true
  }
}