API (administration) : GET /roles/{idRole} #67

Closed
opened 2026-04-21 16:25:59 +00:00 by djalim · 0 comments
Collaborator

Fonctionnalité a ajouter :
Récupérer le détail d'un rôle par son identifiant, incluant ses permissions.
Accessible uniquement par un administrateur.

Route :
GET /roles/{idRole}

Paramètres path :

Paramètre Type Description
idRole integer Identifiant du rôle

Exemples

GET /roles/2

{
  "id": 2,
  "nom": "Enseignant",
  "permissions": ["student_read", "note_read", "note_write", "module_read"]
}

Réponse 404 :

{
  "error": "Ressource introuvable"
}
**Fonctionnalité a ajouter :** Récupérer le détail d'un rôle par son identifiant, incluant ses permissions. Accessible uniquement par un administrateur. **Route :** `GET /roles/{idRole}` **Paramètres path :** | Paramètre | Type | Description | |-----------|---------|-----------------------| | idRole | integer | Identifiant du rôle | **Exemples** `GET /roles/2` ```json { "id": 2, "nom": "Enseignant", "permissions": ["student_read", "note_read", "note_write", "module_read"] } ``` **Réponse 404 :** ```json { "error": "Ressource introuvable" } ```
djalim added this to the Module Managment project 2026-04-21 16:30:35 +00:00
djalim moved this to 🟢 Low priority in Module Managment on 2026-04-21 16:31:50 +00:00
djalim moved this to 🗂️ Project Backlog in Module Managment on 2026-04-21 16:31:51 +00:00
djalim moved this to ⚙️ in progress in Module Managment on 2026-04-22 11:39:28 +00:00
djalim moved this to ✅ done in Module Managment on 2026-04-22 11:48:22 +00:00
djalim self-assigned this 2026-04-22 12:56:56 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/PolyMPR#67