API (administration) : POST /users #61

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

Fonctionnalité a ajouter :
Créer un nouvel utilisateur dans la base de données.
Accessible uniquement par un administrateur.

Route :
POST /users

Exemples

POST /users

{
  "id": "j.martin",
  "nom": "Martin",
  "prenom": "Jean",
  "idRole": 2
}

Réponse 201 :

{
  "id": "j.martin",
  "nom": "Martin",
  "prenom": "Jean",
  "idRole": 2
}

Réponse 409 :

{
  "error": "Un utilisateur avec cet identifiant existe déjà"
}
**Fonctionnalité a ajouter :** Créer un nouvel utilisateur dans la base de données. Accessible uniquement par un administrateur. **Route :** `POST /users` **Exemples** `POST /users` ```json { "id": "j.martin", "nom": "Martin", "prenom": "Jean", "idRole": 2 } ``` **Réponse 201 :** ```json { "id": "j.martin", "nom": "Martin", "prenom": "Jean", "idRole": 2 } ``` **Réponse 409 :** ```json { "error": "Un utilisateur avec cet identifiant existe déjà" } ```
djalim added this to the Module Managment project 2026-04-21 16:30:35 +00:00
djalim moved this to 🗂️ Project Backlog in Module Managment on 2026-04-21 16:31:46 +00:00
djalim moved this to ⚙️ in progress in Module Managment on 2026-04-22 11:38:57 +00:00
djalim moved this to ✅ done in Module Managment on 2026-04-22 11:48:18 +00:00
djalim self-assigned this 2026-04-22 12:56:55 +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#61