{
  "info": {
    "name": "Manifst API v1",
    "description": "Collection complète de l'API REST Manifst v1.\n\n**Pré-requis :** compte Pro ou Max + clé API générée depuis Paramètres → Clés API.\n\n**Configuration :** renseigner les variables de collection `baseUrl` et `apiKey` avant de lancer les requêtes.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.0.0"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      { "key": "token", "value": "{{apiKey}}", "type": "string" }
    ]
  },
  "variable": [
    { "key": "baseUrl",     "value": "https://manifst.net/api/v1", "type": "string" },
    { "key": "apiKey",      "value": "mfst_live_REMPLACER_PAR_VOTRE_CLE", "type": "string" },
    { "key": "projectUuid", "value": "", "type": "string", "description": "UUID d'un projet (récupéré via GET /projects)" },
    { "key": "superEpicUuid", "value": "", "type": "string" },
    { "key": "epicUuid",    "value": "", "type": "string" },
    { "key": "sprintUuid",  "value": "", "type": "string" },
    { "key": "ticketUuid",   "value": "", "type": "string" },
    { "key": "commentUuid", "value": "", "type": "string" }
  ],
  "item": [

    {
      "name": "Projets",
      "item": [
        {
          "name": "Lister les projets",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/projects", "host": ["{{baseUrl}}"], "path": ["projects"] },
            "description": "Retourne tous les projets dont l'utilisateur est membre.\n\n**Scope :** `projects:read`"
          },
          "response": []
        },
        {
          "name": "Détail d'un projet",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/projects/{{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["projects", "{{projectUuid}}"]
            },
            "description": "**Scope :** `projects:read`"
          },
          "response": []
        },
        {
          "name": "Membres d'un projet",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/projects/{{projectUuid}}/members",
              "host": ["{{baseUrl}}"],
              "path": ["projects", "{{projectUuid}}", "members"]
            },
            "description": "**Scope :** `team:read`"
          },
          "response": []
        },
        {
          "name": "Créer un projet",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Mon projet\",          // requis, 1–80 caractères\n  \"description\": \"Description\",  // optionnel\n  \"color\": \"#6366f1\",              // optionnel, hex #rrggbb (défaut: #6366f1)\n  \"default_dod\": [\"Tests OK\", \"Code review\"], // optionnel — DoD projet (array)\n  \"contingency_pct\": 10.00         // optionnel — aléas finance 0–100 % (défaut: 10)\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": { "raw": "{{baseUrl}}/projects", "host": ["{{baseUrl}}"], "path": ["projects"] },
            "description": "**Scope :** `projects:write`\n\nLa création initialise automatiquement 6 statuts par défaut (Backlog, À faire, En cours, En revue, Terminé, Bloqué) et 2 types de tickets (Story, Bug).\n\n- `name` : requis, 1–80 caractères\n- `description` : optionnel\n- `color` : optionnel, format hex\n- `default_dod` : optionnel — tableau d'items Definition of Done\n- `contingency_pct` : optionnel — aléas finance, 0–100 % (défaut: 10)\n\n**Réponse 201 :**\n```json\n{\n  \"data\": {\n    \"uuid\": \"...\",\n    \"name\": \"Mon projet\",\n    \"description\": null,\n    \"color\": \"#6366f1\",\n    \"default_dod\": null,\n    \"contingency_pct\": 10.0,\n    \"user_role\": \"owner\",\n    \"created_at\": \"2026-03-24 20:00:00\",\n    \"updated_at\": \"2026-03-24 20:00:00\"\n  }\n}\n```"
          },
          "response": []
        },
        {
          "name": "Modifier un projet",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Nouveau nom\",                // optionnel\n  \"description\": \"Nouvelle description\",  // optionnel\n  \"color\": \"#f59e0b\",                     // optionnel\n  \"default_dod\": [\"item 1\", \"item 2\"],   // optionnel — null ou [] pour vider\n  \"contingency_pct\": 15.00                // optionnel — 0–100 %\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{baseUrl}}/projects/{{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["projects", "{{projectUuid}}"]
            },
            "description": "**Scope :** `projects:write` — owner uniquement\n\nTous les champs sont optionnels. Pour vider un DoD, envoyer `null` ou `[]`."
          },
          "response": []
        },
        {
          "name": "Supprimer un projet",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/projects/{{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["projects", "{{projectUuid}}"]
            },
            "description": "**Scope :** `projects:write` — owner uniquement"
          },
          "response": []
        }
      ]
    },

    {
      "name": "Super-épics",
      "item": [
        {
          "name": "Lister les super-épics",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/super-epics?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["super-epics"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `super-epics:read`"
          },
          "response": []
        },
        {
          "name": "Détail d'un super-épic",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/super-epics/{{superEpicUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["super-epics", "{{superEpicUuid}}"]
            },
            "description": "**Scope :** `super-epics:read`"
          },
          "response": []
        },
        {
          "name": "Créer un super-épic",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_uuid\": \"{{projectUuid}}\",\n  \"title\": \"Super-épic titre\",\n  \"description\": \"Description\",  // optionnel\n  \"status\": \"backlog\",               // optionnel — backlog | in_progress | done (défaut: backlog)\n  \"tags\": [\"tag-uuid-1\"]           // optionnel — array d'UUID de tags\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": { "raw": "{{baseUrl}}/super-epics", "host": ["{{baseUrl}}"], "path": ["super-epics"] },
            "description": "**Scope :** `super-epics:write`\n\nStatuts : `backlog` `in_progress` `done`\n\n**Réponse 201 :**\n```json\n{\n  \"data\": {\n    \"uuid\": \"...\",\n    \"project_id\": 1,\n    \"title\": \"Super-épic titre\",\n    \"description\": null,\n    \"status\": \"backlog\",\n    \"created_at\": \"2026-03-24 20:00:00\",\n    \"updated_at\": \"2026-03-24 20:00:00\"\n  }\n}\n```"
          },
          "response": []
        },
        {
          "name": "Modifier un super-épic",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Nouveau titre\",   // optionnel\n  \"description\": \"...\",        // optionnel\n  \"status\": \"in_progress\",      // optionnel — backlog | in_progress | done\n  \"tags\": [\"tag-uuid-1\"]     // optionnel — remplace l'ensemble des tags\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{baseUrl}}/super-epics/{{superEpicUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["super-epics", "{{superEpicUuid}}"]
            },
            "description": "**Scope :** `super-epics:write`"
          },
          "response": []
        },
        {
          "name": "Supprimer un super-épic",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/super-epics/{{superEpicUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["super-epics", "{{superEpicUuid}}"]
            },
            "description": "**Scope :** `super-epics:write` — les épics liés sont détachés, pas supprimés."
          },
          "response": []
        }
      ]
    },

    {
      "name": "Épics",
      "item": [
        {
          "name": "Lister les épics",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/epics?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["epics"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `epics:read`"
          },
          "response": []
        },
        {
          "name": "Détail d'un épic",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/epics/{{epicUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["epics", "{{epicUuid}}"]
            },
            "description": "**Scope :** `epics:read`"
          },
          "response": []
        },
        {
          "name": "Créer un épic",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_uuid\": \"{{projectUuid}}\",\n  \"title\": \"Titre de l'épic\",\n  \"description\": \"...\",              // optionnel\n  \"super_epic_uuid\": \"{{superEpicUuid}}\", // optionnel\n  \"status\": \"backlog\",                  // optionnel — backlog | todo | in_progress | in_review | done | blocked (défaut: backlog)\n  \"tags\": [\"tag-uuid-1\"]              // optionnel — array d'UUID de tags\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": { "raw": "{{baseUrl}}/epics", "host": ["{{baseUrl}}"], "path": ["epics"] },
            "description": "**Scope :** `epics:write`\n\n- `super_epic_uuid` : optionnel\n- Statuts : `backlog` `todo` `in_progress` `in_review` `done` `blocked`\n\n**Réponse 201 :**\n```json\n{\n  \"data\": {\n    \"uuid\": \"...\",\n    \"project_id\": 1,\n    \"super_epic_id\": null,\n    \"super_epic_uuid\": null,\n    \"title\": \"Titre\",\n    \"description\": null,\n    \"status\": \"backlog\",\n    \"created_at\": \"2026-03-24 20:00:00\",\n    \"updated_at\": \"2026-03-24 20:00:00\"\n  }\n}\n```"
          },
          "response": []
        },
        {
          "name": "Modifier un épic",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Nouveau titre\",    // optionnel\n  \"description\": \"...\",         // optionnel\n  \"super_epic_uuid\": null,       // optionnel — uuid ou null pour détacher\n  \"status\": \"done\",              // optionnel — backlog | todo | in_progress | in_review | done | blocked\n  \"tags\": [\"tag-uuid-1\"]        // optionnel — remplace l'ensemble des tags\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{baseUrl}}/epics/{{epicUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["epics", "{{epicUuid}}"]
            },
            "description": "**Scope :** `epics:write`"
          },
          "response": []
        },
        {
          "name": "Supprimer un épic",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/epics/{{epicUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["epics", "{{epicUuid}}"]
            },
            "description": "**Scope :** `epics:write` — les tickets liées sont détachées."
          },
          "response": []
        }
      ]
    },

    {
      "name": "Sprints",
      "item": [
        {
          "name": "Lister les sprints",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/sprints?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["sprints"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `sprints:read`"
          },
          "response": []
        },
        {
          "name": "Détail d'un sprint",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/sprints/{{sprintUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["sprints", "{{sprintUuid}}"]
            },
            "description": "**Scope :** `sprints:read`"
          },
          "response": []
        },
        {
          "name": "Créer un sprint",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_uuid\": \"{{projectUuid}}\",\n  \"title\": \"Sprint 1\",\n  \"goal\": \"Objectif du sprint\", // optionnel\n  \"status\": \"planning\",         // optionnel — planning | active | completed (défaut: planning)\n  \"start_date\": \"2026-04-01\",   // optionnel\n  \"end_date\": \"2026-04-14\",     // optionnel\n  \"dod\": [\"item 1\", \"item 2\"]   // optionnel — Definition of Done du sprint (array)\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": { "raw": "{{baseUrl}}/sprints", "host": ["{{baseUrl}}"], "path": ["sprints"] },
            "description": "**Scope :** `sprints:write`\n\n**Réponse 201 :**\n```json\n{\n  \"data\": {\n    \"uuid\": \"...\",\n    \"project_id\": 1,\n    \"title\": \"Sprint 1\",\n    \"goal\": null,\n    \"status\": \"planning\",\n    \"start_date\": \"2026-04-01\",\n    \"end_date\": \"2026-04-14\",\n    \"dod\": null,\n    \"created_at\": \"2026-03-24 20:00:00\"\n  }\n}\n```"
          },
          "response": []
        },
        {
          "name": "Modifier un sprint",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Sprint 1\",          // optionnel\n  \"status\": \"active\",           // optionnel — planning | active | completed\n  \"goal\": \"Objectif\",           // optionnel\n  \"start_date\": \"2026-04-01\",   // optionnel\n  \"end_date\": \"2026-04-14\",     // optionnel\n  \"dod\": [\"item 1\"]             // optionnel — null ou [] pour vider\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{baseUrl}}/sprints/{{sprintUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["sprints", "{{sprintUuid}}"]
            },
            "description": "**Scope :** `sprints:write`\n\nStatuts : `planning` `active` `completed`"
          },
          "response": []
        }
      ]
    },

    {
      "name": "Tickets",
      "item": [
        {
          "name": "Lister les tickets",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/tickets?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["tickets"],
              "query": [
                { "key": "project", "value": "{{projectUuid}}" },
                { "key": "sprint",  "value": "{{sprintUuid}}", "disabled": true },
                { "key": "epic",    "value": "{{epicUuid}}",   "disabled": true }
              ]
            },
            "description": "**Scope :** `stories:read`\n\nFiltres optionnels : `?sprint={uuid}` et `?epic={uuid}`"
          },
          "response": []
        },
        {
          "name": "Détail d'une ticket",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/tickets/{{ticketUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["tickets", "{{ticketUuid}}"]
            },
            "description": "**Scope :** `stories:read`\n\nInclut les critères d'acceptation et les dépendances."
          },
          "response": []
        },
        {
          "name": "Créer une ticket",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_uuid\": \"{{projectUuid}}\",\n  \"title\": \"En tant qu'utilisateur…\",\n  \"description\": \"Je veux…\",\n  \"priority\": \"haute\",\n  \"status\": \"backlog\",\n  \"story_points\": 5,              // optionnel\n  \"epic_uuid\": \"{{epicUuid}}\",   // optionnel\n  \"sprint_uuid\": \"{{sprintUuid}}\", // optionnel\n  \"assignee_id\": null,            // optionnel\n  \"acceptance_criteria\": [\"Critère 1\", \"Critère 2\"], // optionnel\n  \"dependencies\": [],             // optionnel\n  \"tags\": [\"tag-uuid-1\"]         // optionnel — array d'UUID de tags\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": { "raw": "{{baseUrl}}/tickets", "host": ["{{baseUrl}}"], "path": ["tickets"] },
            "description": "**Scope :** `stories:write`\n\n- `priority` : `critique` `haute` `normale` `faible`\n- `status` : `backlog` `todo` `in_progress` `in_review` `done` `blocked`\n- `epic_uuid`, `sprint_uuid`, `assignee_id` : optionnels\n\n**Réponse 201 :**\n```json\n{\n  \"data\": {\n    \"uuid\": \"...\",\n    \"project_id\": 1,\n    \"epic_id\": null,\n    \"sprint_id\": null,\n    \"assignee_id\": null,\n    \"assignee\": null,\n    \"title\": \"En tant qu'utilisateur…\",\n    \"description\": null,\n    \"priority\": \"haute\",\n    \"status\": \"backlog\",\n    \"story_points\": 5,\n    \"created_at\": \"2026-03-24 20:00:00\",\n    \"updated_at\": \"2026-03-24 20:00:00\",\n    \"acceptance_criteria\": [\"Critère 1\"],\n    \"dependencies\": []\n  }\n}\n```"
          },
          "response": []
        },
        {
          "name": "Modifier une ticket",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Nouveau titre\",\n  \"status\": \"in_progress\",\n  \"story_points\": 8,\n  \"tags\": [\"tag-uuid-1\"]\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{baseUrl}}/tickets/{{ticketUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["tickets", "{{ticketUuid}}"]
            },
            "description": "**Scope :** `stories:write` — tous les champs sont optionnels."
          },
          "response": []
        },
        {
          "name": "Supprimer une ticket",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/tickets/{{ticketUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["tickets", "{{ticketUuid}}"]
            },
            "description": "**Scope :** `stories:write`"
          },
          "response": []
        }
      ]
    },

    {
      "name": "Commentaires",
      "item": [
        {
          "name": "Lister les commentaires d'une US",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/comments?us={{ticketUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["comments"],
              "query": [{ "key": "us", "value": "{{ticketUuid}}", "description": "UUID de la ticket" }]
            },
            "description": "**Scope :** `comments:read`\n\nRetourne tous les commentaires d'une ticket, triés par date croissante.\n\n**Réponse 200 :**\n```json\n{\n  \"data\": [\n    {\n      \"uuid\": \"...\",\n      \"author_id\": 3,\n      \"author_name\": \"Alice Martin\",\n      \"author_initials\": \"AM\",\n      \"content\": \"<p>Texte du commentaire</p>\",\n      \"mentions\": [4, 7],\n      \"us_uuid\": \"...\",\n      \"created_at\": \"2026-04-02 10:00:00\",\n      \"updated_at\": \"2026-04-02 10:00:00\"\n    }\n  ],\n  \"meta\": { \"total\": 1 }\n}\n```"
          },
          "response": []
        },
        {
          "name": "Détail d'un commentaire",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/comments/{{commentUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["comments", "{{commentUuid}}"]
            },
            "description": "**Scope :** `comments:read`\n\nRetourne un commentaire avec ses mentions."
          },
          "response": []
        },
        {
          "name": "Créer un commentaire",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"us_uuid\": \"{{ticketUuid}}\",\n  \"content\": \"<p>Contenu du commentaire</p>\",\n  \"mentions\": [4, 7]  // optionnel — liste d'user IDs mentionnés\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": { "raw": "{{baseUrl}}/comments", "host": ["{{baseUrl}}"], "path": ["comments"] },
            "description": "**Scope :** `comments:write`\n\n- `us_uuid` : requis — UUID de la ticket cible\n- `content` : requis — HTML sanitisé (scripts et handlers JS retirés)\n- `mentions` : optionnel — tableau d'IDs utilisateurs mentionnés\n\n**Réponse 201 :**\n```json\n{\n  \"data\": {\n    \"uuid\": \"...\",\n    \"author_id\": 3,\n    \"author_name\": \"Alice Martin\",\n    \"author_initials\": \"AM\",\n    \"content\": \"<p>Contenu du commentaire</p>\",\n    \"mentions\": [4],\n    \"us_uuid\": \"...\",\n    \"created_at\": \"2026-04-02 10:00:00\",\n    \"updated_at\": \"2026-04-02 10:00:00\"\n  }\n}\n```"
          },
          "response": []
        },
        {
          "name": "Modifier un commentaire",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"content\": \"<p>Contenu modifié</p>\",  // optionnel\n  \"mentions\": [4, 7]                  // optionnel — remplace la liste complète\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{baseUrl}}/comments/{{commentUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["comments", "{{commentUuid}}"]
            },
            "description": "**Scope :** `comments:write`\n\nRéservé à l'auteur du commentaire (ou admin). Les champs sont tous optionnels.\n\n- `mentions` : si fourni, remplace entièrement la liste précédente."
          },
          "response": []
        },
        {
          "name": "Supprimer un commentaire",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/comments/{{commentUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["comments", "{{commentUuid}}"]
            },
            "description": "**Scope :** `comments:write`\n\nRéservé à l'auteur du commentaire (ou admin).\n\n**Réponse 200 :**\n```json\n{ \"data\": { \"deleted\": true } }\n```"
          },
          "response": []
        }
      ]
    },

    {
      "name": "Équipe",
      "item": [
        {
          "name": "Membres du projet",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/team?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["team"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `team:read`"
          },
          "response": []
        }
      ]
    },

    {
      "name": "Entrées de temps",
      "item": [
        {
          "name": "Lister les temps",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/time-entries?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["time-entries"],
              "query": [
                { "key": "project", "value": "{{projectUuid}}" },
                { "key": "story",   "value": "{{ticketUuid}}", "disabled": true }
              ]
            },
            "description": "**Scope :** `time:read`\n\nFiltre optionnel : `?story={uuid}` pour une story spécifique."
          },
          "response": []
        },
        {
          "name": "Enregistrer du temps",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"us_uuid\": \"{{ticketUuid}}\",\n  \"duration_minutes\": 90,\n  \"logged_at\": \"2026-03-24\",\n  \"comment\": \"Revue de code\"\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": { "raw": "{{baseUrl}}/time-entries", "host": ["{{baseUrl}}"], "path": ["time-entries"] },
            "description": "**Scope :** `time:write`\n\n- `us_uuid` : requis\n- `duration_minutes` : requis\n- `logged_at` : requis, format `YYYY-MM-DD`\n- `comment` : optionnel\n\n**Réponse 201 :**\n```json\n{\n  \"data\": {\n    \"uuid\": \"...\",\n    \"ticket_id\": 12,\n    \"user_id\": 3,\n    \"user_name\": \"Alice Martin\",\n    \"ticket_uuid\": \"...\",\n    \"ticket_title\": \"En tant qu'utilisateur…\",\n    \"duration_minutes\": 90,\n    \"comment\": \"Revue de code\",\n    \"logged_at\": \"2026-03-24 00:00:00\",\n    \"created_at\": \"2026-03-24 20:00:00\"\n  }\n}\n```"
          },
          "response": []
        }
      ]
    },

    {
      "name": "Statuts",
      "item": [
        {
          "name": "Lister les statuts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/statuses?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["statuses"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `statuses:read`\n\nRetourne tous les statuts du projet (par défaut et personnalisés), triés par `sort_order`.\n\n**Réponse 200 :**\n```json\n[\n  {\n    \"key\":        \"backlog\",\n    \"label\":      \"Backlog\",\n    \"color\":      \"#64748b\",\n    \"bg_color\":   \"#f1f5f9\",\n    \"sort_order\": 1,\n    \"is_done\":    false,\n    \"is_default\": true\n  }\n]\n```"
          },
          "response": []
        }
      ]
    },

    {
      "name": "Dépendances (roadmap)",
      "item": [
        {
          "name": "Lister les dépendances",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/dependencies?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["dependencies"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `roadmap:read`\n\nLiens finish-to-start entre épics / super-épics (pred_uuid → succ_uuid)."
          },
          "response": []
        }
      ]
    },

    {
      "name": "Jalons (roadmap)",
      "item": [
        {
          "name": "Lister les jalons",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/milestones?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["milestones"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `roadmap:read`\n\nJalons datés { name, date, color } de la timeline."
          },
          "response": []
        }
      ]
    },

    {
      "name": "Finance / EVM",
      "item": [
        {
          "name": "Indicateurs EVM d'un projet",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/finance?project={{projectUuid}}",
              "host": ["{{baseUrl}}"],
              "path": ["finance"],
              "query": [{ "key": "project", "value": "{{projectUuid}}" }]
            },
            "description": "**Scope :** `finance:read`\n\nBAC / PV / EV / AC, indices CPI/SPI/TCPI, atterrissage EAC/ETC/VAC, charge engagée. Indicateurs liés au budget = null tant qu'aucun BAC n'est déclaré."
          },
          "response": []
        },
        {
          "name": "Consolidation portefeuille",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/portfolio/finance",
              "host": ["{{baseUrl}}"],
              "path": ["portfolio", "finance"]
            },
            "description": "**Scope :** `finance:read`\n\nRoll-up EVM sur tous les projets de la clé (bloc `totals` + détail par projet). Filtre optionnel `?projects=uuid1,uuid2`."
          },
          "response": []
        }
      ]
    }

  ]
}
