Skip to main content
GET
/
organizations
/
{organizationId}
/
roles
/
{slug}
Obter Role
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"
}
Retorna um role pelo slug.
curl https://api.awsales.io/studio/organizations/ORG_ID/roles/editor \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Requer permissao roles:read.

Cabecalhos

Authorization
string
required
Token bearer.

Parametros de Rota

organizationId
string
required
O UUID da organizacao.
slug
string
required
O slug do role.

Resposta

roleId
string
O ID do role.
organizationId
string
O UUID da organizacao. Present only for organization roles.
slug
string
Identificador unico do role.
name
string
Nome de exibicao.
description
string
Descricao do role.
type
string
Tipo do role (ENVIRONMENT_ROLE ou ORGANIZATION_ROLE).
permissions
string[]
Array de slugs de permissao.
inherited
boolean
Se o role e herdado do ambiente.
createdAt
string
Timestamp de criacao ISO 8601.
updatedAt
string
Timestamp da ultima atualizacao ISO 8601.
{
  "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"
}

Codigos de Erro

StatusCodigoDescricao
400validation_errorEntrada invalida ou campos obrigatorios ausentes
401unauthorizedAutenticacao ausente ou invalida
403forbiddenPermissoes insuficientes
404organization.not_foundOrganizacao nao encontrada
404role.not_foundRole nao encontrado
500internal_server_errorOcorreu um erro inesperado