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

GET /roles

Description

Retrieve all of the roles in the company.

Permissions

user.manage

Resource URL

https://app.klipfolio.com/api/1.0/roles

Parameters

client_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}

Description

Get the details for the specific role id.

Permissions

user.manage

Resource URL

https://app.klipfolio.com/api/1.0/roles/{id}

Parameters

full (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}

Description

Update the specified role. Permissions specified will replace existing permissions.

Permissions

user.manage

Resource URL

https://app.klipfolio.com/api/1.0/roles/{id}

Fields

name, 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

Description

create custom role

Permissions

user.manage

Resource URL

https://app.klipfolio.com/api/1.0/roles/{id}

Fields

name, 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}

Description

Delete the specific role

Permissions

user.manage

Resource URL

https://app.klipfolio.com/api/1.0/roles/{id}

Parameters

None.

Example Request

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

Example Response

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