curl --request GET \
--url https://api.example.com/organizations/{organizationId}/roles/{slug} \
--header 'Authorization: <authorization>'{
"roleId": "role_env_admin",
"slug": "admin",
"name": "Admin",
"description": "Full access to all resources",
"type": "ENVIRONMENT_ROLE",
"permissions": ["users:read", "users:write", "roles:read", "roles:write"],
"inherited": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
Buscar um role especifico por slug, incluindo suas permissoes e tipo.
curl --request GET \
--url https://api.example.com/organizations/{organizationId}/roles/{slug} \
--header 'Authorization: <authorization>'{
"roleId": "role_env_admin",
"slug": "admin",
"name": "Admin",
"description": "Full access to all resources",
"type": "ENVIRONMENT_ROLE",
"permissions": ["users:read", "users:write", "roles:read", "roles:write"],
"inherited": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
curl https://api.awsales.io/studio/organizations/ORG_ID/roles/editor \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
roles:read.ENVIRONMENT_ROLE ou ORGANIZATION_ROLE).{
"roleId": "role_env_admin",
"slug": "admin",
"name": "Admin",
"description": "Full access to all resources",
"type": "ENVIRONMENT_ROLE",
"permissions": ["users:read", "users:write", "roles:read", "roles:write"],
"inherited": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
404 | organization.not_found | Organizacao nao encontrada |
404 | role.not_found | Role nao encontrado |
500 | internal_server_error | Ocorreu um erro inesperado |