Roles

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

GET /roles

DescriptionRetrieve all of the roles in the company or client account.
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles
Parametersoptional: client_id — show only roles that belong to a specific client

Example Request

GET https://app.klipfolio.com/api/1/roles
GET https://app.klipfolio.com/api/1/roles?client_id=0123456789abcdef0123456789abcdef

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 in the company or client account.
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles/{id}
Parametersrole id
full (true/false) — include associations in the listing (users, num_users, permissions)
optional: client_id

Example Request

GET https://app.klipfolio.com/api/1/roles/0123456789abcdef0123456789abcdef
GET https://app.klipfolio.com/api/1/roles/3210456789abcdef0123456789abcdef?client_id=0123456789abcdef0123456789abcdef
GET https://app.klipfolio.com/api/1/roles/0123456789abcdef0123456789abcdef?full=true

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 in the company or client account. Permissions specified will replace existing permissions.
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles/{id}
Fieldsname, description, permissions
optional: client_id

Example Request

PUT https://app.klipfolio.com/api/1/roles/abcd56789abcdef0123456789abcdef — d {'name': Updated Name',  'description': 'Updated description', 'permissions':['klip.build','klip.edit']}
PUT https://app.klipfolio.com/api/1/roles/3210456789abcdef0123456789abcdef?client_id=0123456789abcdef0123456789abcdef — d {'name': Updated Name',  'description': 'Updated description', 'permissions':['klip.build','klip.edit']}

Example Response

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

POST/roles

Descriptioncreate custom role in the company or client account.
Permissionsuser.manage
Resource URLhttps://app.klipfolio.com/api/1.0/roles/{id}
Fields

name, description, permissions
optional: client_id

Permission options:
"account.api",
"account.api_key",
"account.profile",
"account.settings",
"account.tokens",
"account.usage",
"admin.annotation",
"admin.client",
"admin.datasource",
"admin.klip",
"admin.tab",
"client.access",
"client.build",
"client.delete",
"client.edit",
"client.login",
"client.share",
"dashboard.annotation.edit",
"dashboard.annotation.view",
"dashboard.ds_warning.view",
"dashboard.fullscreen",
"dashboard.klip",
"dashboard.library",
"dashboard.tab",
"dashboard.theme",
"datasource.create",
"datasource.delete",
"datasource.download",
"datasource.edit",
"datasource.import",
"datasource.library",
"datasource.share",
"group.view",
"klip.build",
"klip.delete",
"klip.download",
"klip.edit",
"klip.email",
"klip.embed",
"klip.import",
"klip.library",
"klip.share",
"tab.build",
"tab.delete",
"tab.download",
"tab.edit",
"tab.email",
"tab.import",
"tab.publish",
"tab.push",
"tab.share",
"tag.assign",
"tag.create",
"tag.delete",
"tag.edit",
"tag.view",
"user.manage",
"user.view",
"user.viewonly.manage"

Example Request

POST https://app.klipfolio.com/api/1/roles/abcd56789abcdef0123456789abcdef — d {'name': 'My New Role',  'description': 'New role description', 'permissions':['klip.build','klip.edit']}
POST https://app.klipfolio.com/api/1/roles/3210456789abcdef0123456789abcdef — d {'name': 'My New Role',  'description': 'Updated description', 'permissions':['klip.build','klip.edit'], 'client_id':'0123456789abcdef0123456789abcdef'}

Example Response

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

DELETE /roles/{id}

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

Example Request

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

Example Response

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