Skip to main content

kobana billing team-roles

Commands of kobana billing 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 billing 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_activeboolean,nullnoFilter by active (true) or inactive (false) roles.
is_systemboolean,nullnoFilter by system (true) or custom (false) roles.

Responses

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

team-roles create​

Create custom role

kobana billing 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 _.

Request body

NameTypeRequiredDescription
namestringyesRole name (shown in the UI).
slugstringyesStable slug used to reference the role (e.g.: billing_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 billing.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 billing 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.

Request body

NameTypeRequiredDescription
namestringnoRole name (shown in the UI).
slugstringnoStable slug used to reference the role (e.g.: billing_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 billing.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 billing team-roles get [ID] [OPTIONS]

GET /v1/team_roles/{id}

Path arguments: id

Responses

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

team-roles delete​

Remove role

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

DELETE /v1/team_roles/{id}

Soft-deletes the role. System roles (is_system = true) cannot be removed.

Path arguments: id

Responses

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