curl --request GET \
--url https://api.example.com/roles \
--header 'Authorization: <authorization>'[
{
"roleId": "1",
"organizationId": null,
"slug": "admin",
"name": "Admin",
"description": null,
"type": "ENVIRONMENT_ROLE",
"permissions": ["users:read", "users:write", "roles:read", "roles:write"],
"inherited": true,
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:00:00.000Z"
}
]
Recuperar todos os papeis, opcionalmente filtrados por organizacao ou tipo de papel.
curl --request GET \
--url https://api.example.com/roles \
--header 'Authorization: <authorization>'[
{
"roleId": "1",
"organizationId": null,
"slug": "admin",
"name": "Admin",
"description": null,
"type": "ENVIRONMENT_ROLE",
"permissions": ["users:read", "users:write", "roles:read", "roles:write"],
"inherited": true,
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:00:00.000Z"
}
]
roles:read.[
{
"roleId": "1",
"organizationId": null,
"slug": "admin",
"name": "Admin",
"description": null,
"type": "ENVIRONMENT_ROLE",
"permissions": ["users:read", "users:write", "roles:read", "roles:write"],
"inherited": true,
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:00:00.000Z"
}
]
curl https://api.awsales.io/admin/roles \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
500 | internal_server_error | Ocorreu um erro inesperado |