Autional Autional
API Reference GitHub autional.com →

POST /admin/tenants/{tenant_id}/applications/{app_id}/roles

Create a default role template for an application.

Tenant Service `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
id path string Yes Tenant ID
app_id path string Yes Application ID

Request Body

Schema: dto.CreateAppDefaultRoleRequest

FieldTypeRequiredExampleConstraintsDescription
role string Yes viewer
description string No Read-only access
is_system boolean No
order integer No
permissions array of

string

No ['["read"]']

Responses

StatusDescriptionSchema
201Created successfullydto.AppDefaultRoleDetailResponse
400Invalid request parametersgitee_com_linmes_authms_base_dto.SimpleResponse
401Unauthenticatedgitee_com_linmes_authms_base_dto.SimpleResponse
403Insufficient permissionsgitee_com_linmes_authms_base_dto.SimpleResponse
409Role name conflictgitee_com_linmes_authms_base_dto.SimpleResponse
500Internal server errorgitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.AppDefaultRoleDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.AppDefaultRoleResponse No
message string No

dto.AppDefaultRoleResponse

Application default role details

FieldTypeRequiredExampleConstraintsDescription
application_id string No app_abc123
created_at string No
description string No
id string No adr_abc123
is_system boolean No
order integer No
permissions array of

string

No ['["read"]']
role string No viewer
tenant_id string No tnt_abc123
updated_at string No

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No