Skip to main content

kobana dashboards team-roles

Commands of kobana dashboards team-roles. Every global option (Global options) applies here.

CommandHTTPDescription
team-roles listGET /v1/team_rolesList team roles
team-roles createPOST /v1/team_rolesCreate custom role
team-roles updatePUT /v1/team_rolesCreate or update a team role
team-roles getGET /v1/team_roles/{id}Get role
team-roles deleteDELETE /v1/team_roles/{id}Remove role

team-roles list​

List team roles

kobana dashboards team-roles list [OPTIONS]

GET /v1/team_roles

Returns the paginated list of roles configured for the organization team. Includes both system roles (is_system = true) and custom roles.

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
searchstringnoText search by name or slug.
is_activestringnoFilter by active (true, the default), inactive (false) or all (all) roles. Values: true, false, all.
is_systemboolean,nullnoFilter by system (true) or custom (false) roles.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Paginated list of roles.
404Resource not found in the current organization.

team-roles create​

Create custom role

kobana dashboards team-roles create [OPTIONS]

POST /v1/team_roles

Creates a custom role. slug must start with a lowercase letter and contain only lowercase letters, digits and _. With a person token, that person must have access to every workspace of the organization (or be an owner): a role applies in all of them. Otherwise 403.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringyesRole name (shown in the UI).
slugstringyesStable slug used to reference the role (e.g.: support_manager).
permissionsarray<string>yesList of permission slugs granted by the role.
descriptionstringnoOptional description of what the role grants.
is_activebooleannoIndicates whether the role is active and can be assigned.
external_idstringnoIdentifier in your external system, for idempotency/sync.
custom_metadataobjectnoArbitrary client-defined metadata (key/value).

More fields and nested objects: kobana schema dashboards.team-roles.create.

Responses

HTTPDescription
201Role created.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

team-roles update​

Create or update a team role

kobana dashboards team-roles update [OPTIONS]

PUT /v1/team_roles

Looks the role up by id, public_id or external_id. The slug carries no unique constraint and therefore does not identify a row. If found, updates it; otherwise creates it and returns 201. With a person token, that person must have access to every workspace of the organization (or be an owner): a role applies in all of them. Otherwise 403.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringnoRole name (shown in the UI).
slugstringnoStable slug used to reference the role (e.g.: support_manager).
descriptionstringnoOptional description of what the role grants.
permissionsarray<string>noList of permission slugs granted by the role.
is_activebooleannoIndicates whether the role is active and can be assigned.
external_idstringnoIdentifier in your external system, for idempotency/sync.
custom_metadataobjectnoArbitrary client-defined metadata (key/value).
idstring (uuid)noRecord UUID. Used only to locate it — never written.
public_idstring (uuid)noPublic UUID of the record, used to locate it.

More fields and nested objects: kobana schema dashboards.team-roles.update.

Responses

HTTPDescription
200Record updated.
201Record created.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

team-roles get​

Get role

kobana dashboards team-roles get [ID] [OPTIONS]

GET /v1/team_roles/{id}

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Role detail.
404Resource not found in the current organization.

team-roles delete​

Remove role

kobana dashboards team-roles delete [ID] [OPTIONS]

DELETE /v1/team_roles/{id}

Soft-deletes the role. System roles (is_system = true) cannot be removed. With a person token, that person must have access to every workspace of the organization (or be an owner): a role applies in all of them. Otherwise 403.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Role removed.
404Resource not found in the current organization.