Récupérer un rôle d'organisation
GET /v1/organizations/{org_id}/roles/{role_id} · autorisation roles:read
Renvoie le rôle. La réponse contient un ETag à utiliser avec If-Match.
Requête
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
org_id |
path | oui | Identifiant de l'organisation (org_…). |
role_id |
path | oui | Identifiant du rôle (rol_…). |
Aucun corps de requête.
Réponse
200 OK avec le rôle.
{
"id": "rol_01j9xr7s1t2w6x8y0z2a4b6c8e",
"organization_id": "org_01j9xk3m7q8r2s4t6v8w0y2z4a",
"key": "billing-admin",
"name": "Billing admin",
"description": "",
"is_privileged": false,
"assignable_in_self_service": true,
"permission_ids": [],
"created_at": "2026-10-12T09:31:00.123456Z",
"updated_at": "2026-10-12T09:31:00.123456Z",
"version": 1
}
Erreurs
| HTTP | code | Quand |
|---|---|---|
| 404 | not_found |
Le rôle n'existe pas dans cette organisation. |
| 401 | unauthenticated |
Le justificatif est absent, invalide ou révoqué. |
| 403 | insufficient_permissions |
Le justificatif ne dispose pas de l'autorisation requise. |
| 429 | rate_limited |
La limite de débit a été dépassée ; réessayez après la durée indiquée par Retry-After. |
| 503 | service_unavailable |
Une dépendance est temporairement indisponible ; réessayez après la durée indiquée par Retry-After. |
Exemple
curl -i "https://api.eu.keenauth.com/v1/organizations/org_01j9xk3m7q8r2s4t6v8w0y2z4a/roles/rol_01j9xr7s1t2w6x8y0z2a4b6c8e" \
-H "Authorization: Bearer $KEENAUTH_SECRET_KEY"