Repository Public
1{2 "openapi": "3.1.0",3 "info": {4 "title": "MacLustr Social Engine & Remote Navigator — API interne",5 "version": "0.1.0",6 "description": "API MacLustr (pas une API Meta). Sessions par cookie HttpOnly lié à l’hôte ; toute requête mutante exige l’en-tête x-csrf. Aucune route n’accepte de JavaScript, de shell, de XPath ou de sélecteur CSS."7 },8 "servers": [9 {10 "url": "https://social.spboucher.ai"11 },12 {13 "url": "https://navigator.spboucher.ai"14 }15 ],16 "paths": {17 "/health/live": {18 "get": {19 "summary": "Processus vivant",20 "tags": [21 "health"22 ],23 "parameters": [],24 "x-auth": "public",25 "security": [],26 "responses": {27 "200": {28 "description": "OK"29 },30 "400": {31 "$ref": "#/components/responses/Error"32 },33 "401": {34 "$ref": "#/components/responses/Error"35 },36 "403": {37 "$ref": "#/components/responses/Error"38 },39 "404": {40 "$ref": "#/components/responses/Error"41 },42 "409": {43 "$ref": "#/components/responses/Error"44 },45 "429": {46 "$ref": "#/components/responses/Error"47 }48 }49 }50 },51 "/health/ready": {52 "get": {53 "summary": "Base joignable et schéma à jour",54 "tags": [55 "health"56 ],57 "parameters": [],58 "x-auth": "public",59 "security": [],60 "responses": {61 "200": {62 "description": "OK"63 },64 "400": {65 "$ref": "#/components/responses/Error"66 },67 "401": {68 "$ref": "#/components/responses/Error"69 },70 "403": {71 "$ref": "#/components/responses/Error"72 },73 "404": {74 "$ref": "#/components/responses/Error"75 },76 "409": {77 "$ref": "#/components/responses/Error"78 },79 "429": {80 "$ref": "#/components/responses/Error"81 }82 }83 }84 },85 "/auth/login/options": {86 "post": {87 "summary": "Défi de connexion par clé d’accès",88 "tags": [89 "auth"90 ],91 "parameters": [],92 "x-auth": "public",93 "security": [],94 "responses": {95 "200": {96 "description": "OK"97 },98 "400": {99 "$ref": "#/components/responses/Error"100 },101 "401": {102 "$ref": "#/components/responses/Error"103 },104 "403": {105 "$ref": "#/components/responses/Error"106 },107 "404": {108 "$ref": "#/components/responses/Error"109 },110 "409": {111 "$ref": "#/components/responses/Error"112 },113 "429": {114 "$ref": "#/components/responses/Error"115 }116 }117 }118 },119 "/auth/login/verify": {120 "post": {121 "summary": "Vérifie la clé d’accès et ouvre une session",122 "tags": [123 "auth"124 ],125 "parameters": [],126 "x-auth": "public",127 "security": [],128 "responses": {129 "200": {130 "description": "OK"131 },132 "400": {133 "$ref": "#/components/responses/Error"134 },135 "401": {136 "$ref": "#/components/responses/Error"137 },138 "403": {139 "$ref": "#/components/responses/Error"140 },141 "404": {142 "$ref": "#/components/responses/Error"143 },144 "409": {145 "$ref": "#/components/responses/Error"146 },147 "429": {148 "$ref": "#/components/responses/Error"149 }150 },151 "requestBody": {152 "required": true,153 "content": {154 "application/json": {155 "schema": {156 "$schema": "https://json-schema.org/draft/2020-12/schema",157 "type": "object",158 "properties": {159 "state": {160 "type": "string",161 "maxLength": 100162 },163 "response": {}164 },165 "required": [166 "state",167 "response"168 ],169 "additionalProperties": false170 }171 }172 }173 }174 }175 },176 "/auth/register/options": {177 "post": {178 "summary": "Défi d’enregistrement (lien d’activation ou session)",179 "tags": [180 "auth"181 ],182 "parameters": [],183 "x-auth": "public",184 "security": [],185 "responses": {186 "200": {187 "description": "OK"188 },189 "400": {190 "$ref": "#/components/responses/Error"191 },192 "401": {193 "$ref": "#/components/responses/Error"194 },195 "403": {196 "$ref": "#/components/responses/Error"197 },198 "404": {199 "$ref": "#/components/responses/Error"200 },201 "409": {202 "$ref": "#/components/responses/Error"203 },204 "429": {205 "$ref": "#/components/responses/Error"206 }207 },208 "requestBody": {209 "required": true,210 "content": {211 "application/json": {212 "schema": {213 "$schema": "https://json-schema.org/draft/2020-12/schema",214 "type": "object",215 "properties": {216 "setupToken": {217 "type": "string",218 "maxLength": 100219 }220 },221 "additionalProperties": false222 }223 }224 }225 }226 }227 },228 "/auth/register/verify": {229 "post": {230 "summary": "Enregistre la clé d’accès",231 "tags": [232 "auth"233 ],234 "parameters": [],235 "x-auth": "public",236 "security": [],237 "responses": {238 "200": {239 "description": "OK"240 },241 "400": {242 "$ref": "#/components/responses/Error"243 },244 "401": {245 "$ref": "#/components/responses/Error"246 },247 "403": {248 "$ref": "#/components/responses/Error"249 },250 "404": {251 "$ref": "#/components/responses/Error"252 },253 "409": {254 "$ref": "#/components/responses/Error"255 },256 "429": {257 "$ref": "#/components/responses/Error"258 }259 },260 "requestBody": {261 "required": true,262 "content": {263 "application/json": {264 "schema": {265 "$schema": "https://json-schema.org/draft/2020-12/schema",266 "type": "object",267 "properties": {268 "state": {269 "type": "string",270 "maxLength": 100271 },272 "response": {},273 "label": {274 "default": "",275 "type": "string",276 "maxLength": 60277 }278 },279 "required": [280 "state",281 "response"282 ],283 "additionalProperties": false284 }285 }286 }287 }288 }289 },290 "/auth/logout": {291 "post": {292 "summary": "Ferme la session",293 "tags": [294 "auth"295 ],296 "parameters": [],297 "x-auth": "user",298 "security": [299 {300 "sessionCookie": [],301 "csrfHeader": []302 }303 ],304 "responses": {305 "200": {306 "description": "OK"307 },308 "400": {309 "$ref": "#/components/responses/Error"310 },311 "401": {312 "$ref": "#/components/responses/Error"313 },314 "403": {315 "$ref": "#/components/responses/Error"316 },317 "404": {318 "$ref": "#/components/responses/Error"319 },320 "409": {321 "$ref": "#/components/responses/Error"322 },323 "429": {324 "$ref": "#/components/responses/Error"325 }326 },327 "requestBody": {328 "required": true,329 "content": {330 "application/json": {331 "schema": {332 "$schema": "https://json-schema.org/draft/2020-12/schema",333 "type": "object",334 "properties": {335 "everywhere": {336 "default": false,337 "type": "boolean"338 }339 },340 "additionalProperties": false341 }342 }343 }344 }345 }346 },347 "/auth/handoff": {348 "post": {349 "summary": "Ticket à usage unique (60 s) vers l’autre domaine privé",350 "tags": [351 "auth"352 ],353 "parameters": [],354 "x-auth": "user",355 "security": [356 {357 "sessionCookie": [],358 "csrfHeader": []359 }360 ],361 "responses": {362 "200": {363 "description": "OK"364 },365 "400": {366 "$ref": "#/components/responses/Error"367 },368 "401": {369 "$ref": "#/components/responses/Error"370 },371 "403": {372 "$ref": "#/components/responses/Error"373 },374 "404": {375 "$ref": "#/components/responses/Error"376 },377 "409": {378 "$ref": "#/components/responses/Error"379 },380 "429": {381 "$ref": "#/components/responses/Error"382 }383 },384 "requestBody": {385 "required": true,386 "content": {387 "application/json": {388 "schema": {389 "$schema": "https://json-schema.org/draft/2020-12/schema",390 "type": "object",391 "properties": {392 "target": {393 "type": "string",394 "enum": [395 "social",396 "navigator"397 ]398 }399 },400 "required": [401 "target"402 ],403 "additionalProperties": false404 }405 }406 }407 }408 }409 },410 "/auth/handoff/consume": {411 "post": {412 "summary": "Échange le ticket contre une session",413 "tags": [414 "auth"415 ],416 "parameters": [],417 "x-auth": "public",418 "security": [],419 "responses": {420 "200": {421 "description": "OK"422 },423 "400": {424 "$ref": "#/components/responses/Error"425 },426 "401": {427 "$ref": "#/components/responses/Error"428 },429 "403": {430 "$ref": "#/components/responses/Error"431 },432 "404": {433 "$ref": "#/components/responses/Error"434 },435 "409": {436 "$ref": "#/components/responses/Error"437 },438 "429": {439 "$ref": "#/components/responses/Error"440 }441 },442 "requestBody": {443 "required": true,444 "content": {445 "application/json": {446 "schema": {447 "$schema": "https://json-schema.org/draft/2020-12/schema",448 "type": "object",449 "properties": {450 "ticket": {451 "type": "string",452 "minLength": 20,453 "maxLength": 100454 }455 },456 "required": [457 "ticket"458 ],459 "additionalProperties": false460 }461 }462 }463 }464 }465 },466 "/v1/me": {467 "get": {468 "summary": "Utilisateur, jeton CSRF, état global",469 "tags": [470 "auth"471 ],472 "parameters": [],473 "x-auth": "user",474 "security": [475 {476 "sessionCookie": [],477 "csrfHeader": []478 }479 ],480 "responses": {481 "200": {482 "description": "OK"483 },484 "400": {485 "$ref": "#/components/responses/Error"486 },487 "401": {488 "$ref": "#/components/responses/Error"489 },490 "403": {491 "$ref": "#/components/responses/Error"492 },493 "404": {494 "$ref": "#/components/responses/Error"495 },496 "409": {497 "$ref": "#/components/responses/Error"498 },499 "429": {500 "$ref": "#/components/responses/Error"501 }502 }503 }504 },505 "/v1/users": {506 "get": {507 "summary": "Utilisateurs",508 "tags": [509 "admin"510 ],511 "parameters": [],512 "x-auth": "user",513 "x-min-role": "admin",514 "security": [515 {516 "sessionCookie": [],517 "csrfHeader": []518 }519 ],520 "responses": {521 "200": {522 "description": "OK"523 },524 "400": {525 "$ref": "#/components/responses/Error"526 },527 "401": {528 "$ref": "#/components/responses/Error"529 },530 "403": {531 "$ref": "#/components/responses/Error"532 },533 "404": {534 "$ref": "#/components/responses/Error"535 },536 "409": {537 "$ref": "#/components/responses/Error"538 },539 "429": {540 "$ref": "#/components/responses/Error"541 }542 }543 },544 "post": {545 "summary": "Crée un utilisateur et son lien d’activation",546 "tags": [547 "admin"548 ],549 "parameters": [],550 "x-auth": "user",551 "x-min-role": "owner",552 "security": [553 {554 "sessionCookie": [],555 "csrfHeader": []556 }557 ],558 "responses": {559 "200": {560 "description": "OK"561 },562 "400": {563 "$ref": "#/components/responses/Error"564 },565 "401": {566 "$ref": "#/components/responses/Error"567 },568 "403": {569 "$ref": "#/components/responses/Error"570 },571 "404": {572 "$ref": "#/components/responses/Error"573 },574 "409": {575 "$ref": "#/components/responses/Error"576 },577 "429": {578 "$ref": "#/components/responses/Error"579 }580 },581 "requestBody": {582 "required": true,583 "content": {584 "application/json": {585 "schema": {586 "$schema": "https://json-schema.org/draft/2020-12/schema",587 "type": "object",588 "properties": {589 "handle": {590 "type": "string",591 "pattern": "^[a-z0-9._-]{2,40}$"592 },593 "displayName": {594 "type": "string",595 "minLength": 1,596 "maxLength": 80597 },598 "role": {599 "type": "string",600 "enum": [601 "owner",602 "admin",603 "approver",604 "editor",605 "viewer"606 ]607 }608 },609 "required": [610 "handle",611 "displayName",612 "role"613 ],614 "additionalProperties": false615 }616 }617 }618 }619 }620 },621 "/v1/users/{id}/setup-link": {622 "post": {623 "summary": "Nouveau lien d’activation (30 min)",624 "tags": [625 "admin"626 ],627 "parameters": [628 {629 "name": "id",630 "in": "path",631 "required": true,632 "schema": {633 "type": "string"634 }635 }636 ],637 "x-auth": "user",638 "x-min-role": "owner",639 "security": [640 {641 "sessionCookie": [],642 "csrfHeader": []643 }644 ],645 "responses": {646 "200": {647 "description": "OK"648 },649 "400": {650 "$ref": "#/components/responses/Error"651 },652 "401": {653 "$ref": "#/components/responses/Error"654 },655 "403": {656 "$ref": "#/components/responses/Error"657 },658 "404": {659 "$ref": "#/components/responses/Error"660 },661 "409": {662 "$ref": "#/components/responses/Error"663 },664 "429": {665 "$ref": "#/components/responses/Error"666 }667 },668 "requestBody": {669 "required": true,670 "content": {671 "application/json": {672 "schema": {673 "$schema": "https://json-schema.org/draft/2020-12/schema",674 "type": "object",675 "properties": {676 "target": {677 "default": "social",678 "type": "string",679 "enum": [680 "social",681 "navigator"682 ]683 }684 },685 "additionalProperties": false686 }687 }688 }689 }690 }691 },692 "/v1/users/{id}/disable": {693 "post": {694 "summary": "Désactive un utilisateur et ferme ses sessions",695 "tags": [696 "admin"697 ],698 "parameters": [699 {700 "name": "id",701 "in": "path",702 "required": true,703 "schema": {704 "type": "string"705 }706 }707 ],708 "x-auth": "user",709 "x-min-role": "owner",710 "security": [711 {712 "sessionCookie": [],713 "csrfHeader": []714 }715 ],716 "responses": {717 "200": {718 "description": "OK"719 },720 "400": {721 "$ref": "#/components/responses/Error"722 },723 "401": {724 "$ref": "#/components/responses/Error"725 },726 "403": {727 "$ref": "#/components/responses/Error"728 },729 "404": {730 "$ref": "#/components/responses/Error"731 },732 "409": {733 "$ref": "#/components/responses/Error"734 },735 "429": {736 "$ref": "#/components/responses/Error"737 }738 },739 "requestBody": {740 "required": true,741 "content": {742 "application/json": {743 "schema": {744 "$schema": "https://json-schema.org/draft/2020-12/schema",745 "type": "object",746 "properties": {},747 "additionalProperties": false748 }749 }750 }751 }752 }753 },754 "/v1/brands": {755 "get": {756 "summary": "Marques autorisées",757 "tags": [758 "brands"759 ],760 "parameters": [],761 "x-auth": "user",762 "security": [763 {764 "sessionCookie": [],765 "csrfHeader": []766 }767 ],768 "responses": {769 "200": {770 "description": "OK"771 },772 "400": {773 "$ref": "#/components/responses/Error"774 },775 "401": {776 "$ref": "#/components/responses/Error"777 },778 "403": {779 "$ref": "#/components/responses/Error"780 },781 "404": {782 "$ref": "#/components/responses/Error"783 },784 "409": {785 "$ref": "#/components/responses/Error"786 },787 "429": {788 "$ref": "#/components/responses/Error"789 }790 }791 },792 "post": {793 "summary": "Ajoute une marque (sans changement de code)",794 "tags": [795 "brands"796 ],797 "parameters": [],798 "x-auth": "user",799 "x-min-role": "admin",800 "security": [801 {802 "sessionCookie": [],803 "csrfHeader": []804 }805 ],806 "responses": {807 "200": {808 "description": "OK"809 },810 "400": {811 "$ref": "#/components/responses/Error"812 },813 "401": {814 "$ref": "#/components/responses/Error"815 },816 "403": {817 "$ref": "#/components/responses/Error"818 },819 "404": {820 "$ref": "#/components/responses/Error"821 },822 "409": {823 "$ref": "#/components/responses/Error"824 },825 "429": {826 "$ref": "#/components/responses/Error"827 }828 },829 "requestBody": {830 "required": true,831 "content": {832 "application/json": {833 "schema": {834 "$schema": "https://json-schema.org/draft/2020-12/schema",835 "type": "object",836 "properties": {837 "slug": {838 "type": "string",839 "pattern": "^[a-z0-9-]{2,40}$"840 },841 "name": {842 "type": "string",843 "minLength": 1,844 "maxLength": 120845 },846 "tone": {847 "default": "",848 "type": "string",849 "maxLength": 2000850 },851 "languages": {852 "default": [853 "fr"854 ],855 "minItems": 1,856 "type": "array",857 "items": {858 "type": "string",859 "enum": [860 "fr",861 "en"862 ]863 }864 },865 "officialUrls": {866 "default": [],867 "maxItems": 20,868 "type": "array",869 "items": {870 "type": "string",871 "format": "uri"872 }873 },874 "categories": {875 "default": [],876 "maxItems": 40,877 "type": "array",878 "items": {879 "type": "string",880 "maxLength": 60881 }882 },883 "identity": {884 "type": "object",885 "properties": {886 "primary": {887 "type": "string",888 "pattern": "^#[0-9a-fA-F]{6}$"889 },890 "ink": {891 "type": "string",892 "pattern": "^#[0-9a-fA-F]{6}$"893 },894 "paper": {895 "type": "string",896 "pattern": "^#[0-9a-fA-F]{6}$"897 },898 "wordmark": {899 "type": "string",900 "maxLength": 60901 }902 },903 "required": [904 "primary",905 "ink",906 "paper",907 "wordmark"908 ],909 "additionalProperties": false910 },911 "frequency": {912 "default": {913 "maxPerDay": 1,914 "minIntervalMinutes": 240915 },916 "type": "object",917 "properties": {918 "maxPerDay": {919 "type": "integer",920 "minimum": 0,921 "maximum": 20922 },923 "minIntervalMinutes": {924 "type": "integer",925 "minimum": 0,926 "maximum": 10080927 }928 },929 "required": [930 "maxPerDay",931 "minIntervalMinutes"932 ],933 "additionalProperties": false934 },935 "validation": {936 "default": {937 "approvalsRequired": 1,938 "allowSelfApproval": false939 },940 "type": "object",941 "properties": {942 "approvalsRequired": {943 "type": "integer",944 "minimum": 1,945 "maximum": 3946 },947 "allowSelfApproval": {948 "type": "boolean"949 }950 },951 "required": [952 "approvalsRequired",953 "allowSelfApproval"954 ],955 "additionalProperties": false956 },957 "timezone": {958 "default": "America/Toronto",959 "type": "string",960 "maxLength": 60961 }962 },963 "required": [964 "slug",965 "name",966 "identity"967 ],968 "additionalProperties": false969 }970 }971 }972 }973 }974 },975 "/v1/brands/{id}": {976 "patch": {977 "summary": "Modifie une marque",978 "tags": [979 "brands"980 ],981 "parameters": [982 {983 "name": "id",984 "in": "path",985 "required": true,986 "schema": {987 "type": "string"988 }989 }990 ],991 "x-auth": "user",992 "x-min-role": "admin",993 "security": [994 {995 "sessionCookie": [],996 "csrfHeader": []997 }998 ],999 "responses": {1000 "200": {1001 "description": "OK"1002 },1003 "400": {1004 "$ref": "#/components/responses/Error"1005 },1006 "401": {1007 "$ref": "#/components/responses/Error"1008 },1009 "403": {1010 "$ref": "#/components/responses/Error"1011 },1012 "404": {1013 "$ref": "#/components/responses/Error"1014 },1015 "409": {1016 "$ref": "#/components/responses/Error"1017 },1018 "429": {1019 "$ref": "#/components/responses/Error"1020 }1021 },1022 "requestBody": {1023 "required": true,1024 "content": {1025 "application/json": {1026 "schema": {1027 "$schema": "https://json-schema.org/draft/2020-12/schema",1028 "type": "object",1029 "properties": {1030 "name": {1031 "type": "string",1032 "minLength": 1,1033 "maxLength": 1201034 },1035 "tone": {1036 "default": "",1037 "type": "string",1038 "maxLength": 20001039 },1040 "languages": {1041 "default": [1042 "fr"1043 ],1044 "minItems": 1,1045 "type": "array",1046 "items": {1047 "type": "string",1048 "enum": [1049 "fr",1050 "en"1051 ]1052 }1053 },1054 "officialUrls": {1055 "default": [],1056 "maxItems": 20,1057 "type": "array",1058 "items": {1059 "type": "string",1060 "format": "uri"1061 }1062 },1063 "categories": {1064 "default": [],1065 "maxItems": 40,1066 "type": "array",1067 "items": {1068 "type": "string",1069 "maxLength": 601070 }1071 },1072 "identity": {1073 "type": "object",1074 "properties": {1075 "primary": {1076 "type": "string",1077 "pattern": "^#[0-9a-fA-F]{6}$"1078 },1079 "ink": {1080 "type": "string",1081 "pattern": "^#[0-9a-fA-F]{6}$"1082 },1083 "paper": {1084 "type": "string",1085 "pattern": "^#[0-9a-fA-F]{6}$"1086 },1087 "wordmark": {1088 "type": "string",1089 "maxLength": 601090 }1091 },1092 "required": [1093 "primary",1094 "ink",1095 "paper",1096 "wordmark"1097 ],1098 "additionalProperties": false1099 },1100 "frequency": {1101 "default": {1102 "maxPerDay": 1,1103 "minIntervalMinutes": 2401104 },1105 "type": "object",1106 "properties": {1107 "maxPerDay": {1108 "type": "integer",1109 "minimum": 0,1110 "maximum": 201111 },1112 "minIntervalMinutes": {1113 "type": "integer",1114 "minimum": 0,1115 "maximum": 100801116 }1117 },1118 "required": [1119 "maxPerDay",1120 "minIntervalMinutes"1121 ],1122 "additionalProperties": false1123 },1124 "validation": {1125 "default": {1126 "approvalsRequired": 1,1127 "allowSelfApproval": false1128 },1129 "type": "object",1130 "properties": {1131 "approvalsRequired": {1132 "type": "integer",1133 "minimum": 1,1134 "maximum": 31135 },1136 "allowSelfApproval": {1137 "type": "boolean"1138 }1139 },1140 "required": [1141 "approvalsRequired",1142 "allowSelfApproval"1143 ],1144 "additionalProperties": false1145 },1146 "timezone": {1147 "default": "America/Toronto",1148 "type": "string",1149 "maxLength": 601150 }1151 },1152 "additionalProperties": false1153 }1154 }1155 }1156 }1157 }1158 },1159 "/v1/brands/{id}/members": {1160 "get": {1161 "summary": "Membres d’une marque",1162 "tags": [1163 "brands"1164 ],1165 "parameters": [1166 {1167 "name": "id",1168 "in": "path",1169 "required": true,1170 "schema": {1171 "type": "string"1172 }1173 }1174 ],1175 "x-auth": "user",1176 "x-min-role": "admin",1177 "security": [1178 {1179 "sessionCookie": [],1180 "csrfHeader": []1181 }1182 ],1183 "responses": {1184 "200": {1185 "description": "OK"1186 },1187 "400": {1188 "$ref": "#/components/responses/Error"1189 },1190 "401": {1191 "$ref": "#/components/responses/Error"1192 },1193 "403": {1194 "$ref": "#/components/responses/Error"1195 },1196 "404": {1197 "$ref": "#/components/responses/Error"1198 },1199 "409": {1200 "$ref": "#/components/responses/Error"1201 },1202 "429": {1203 "$ref": "#/components/responses/Error"1204 }1205 }1206 },1207 "put": {1208 "summary": "Ajoute, modifie ou retire un membre",1209 "tags": [1210 "brands"1211 ],1212 "parameters": [1213 {1214 "name": "id",1215 "in": "path",1216 "required": true,1217 "schema": {1218 "type": "string"1219 }1220 }1221 ],1222 "x-auth": "user",1223 "x-min-role": "admin",1224 "security": [1225 {1226 "sessionCookie": [],1227 "csrfHeader": []1228 }1229 ],1230 "responses": {1231 "200": {1232 "description": "OK"1233 },1234 "400": {1235 "$ref": "#/components/responses/Error"1236 },1237 "401": {1238 "$ref": "#/components/responses/Error"1239 },1240 "403": {1241 "$ref": "#/components/responses/Error"1242 },1243 "404": {1244 "$ref": "#/components/responses/Error"1245 },1246 "409": {1247 "$ref": "#/components/responses/Error"1248 },1249 "429": {1250 "$ref": "#/components/responses/Error"1251 }1252 },1253 "requestBody": {1254 "required": true,1255 "content": {1256 "application/json": {1257 "schema": {1258 "$schema": "https://json-schema.org/draft/2020-12/schema",1259 "type": "object",1260 "properties": {1261 "userId": {1262 "type": "string",1263 "format": "uuid",1264 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"1265 },1266 "role": {1267 "anyOf": [1268 {1269 "type": "string",1270 "enum": [1271 "approver",1272 "editor",1273 "viewer"1274 ]1275 },1276 {1277 "type": "null"1278 }1279 ]1280 }1281 },1282 "required": [1283 "userId",1284 "role"1285 ],1286 "additionalProperties": false1287 }1288 }1289 }1290 }1291 }1292 },1293 "/v1/pages": {1294 "get": {1295 "summary": "Pages par marque, avec le niveau d’automatisation accordé par la politique",1296 "tags": [1297 "pages"1298 ],1299 "parameters": [],1300 "x-auth": "user",1301 "security": [1302 {1303 "sessionCookie": [],1304 "csrfHeader": []1305 }1306 ],1307 "responses": {1308 "200": {1309 "description": "OK"1310 },1311 "400": {1312 "$ref": "#/components/responses/Error"1313 },1314 "401": {1315 "$ref": "#/components/responses/Error"1316 },1317 "403": {1318 "$ref": "#/components/responses/Error"1319 },1320 "404": {1321 "$ref": "#/components/responses/Error"1322 },1323 "409": {1324 "$ref": "#/components/responses/Error"1325 },1326 "429": {1327 "$ref": "#/components/responses/Error"1328 }1329 }1330 },1331 "post": {1332 "summary": "Déclare une page (non confirmée)",1333 "tags": [1334 "pages"1335 ],1336 "parameters": [],1337 "x-auth": "user",1338 "x-min-role": "admin",1339 "security": [1340 {1341 "sessionCookie": [],1342 "csrfHeader": []1343 }1344 ],1345 "responses": {1346 "200": {1347 "description": "OK"1348 },1349 "400": {1350 "$ref": "#/components/responses/Error"1351 },1352 "401": {1353 "$ref": "#/components/responses/Error"1354 },1355 "403": {1356 "$ref": "#/components/responses/Error"1357 },1358 "404": {1359 "$ref": "#/components/responses/Error"1360 },1361 "409": {1362 "$ref": "#/components/responses/Error"1363 },1364 "429": {1365 "$ref": "#/components/responses/Error"1366 }1367 },1368 "requestBody": {1369 "required": true,1370 "content": {1371 "application/json": {1372 "schema": {1373 "$schema": "https://json-schema.org/draft/2020-12/schema",1374 "type": "object",1375 "properties": {1376 "brandId": {1377 "type": "string",1378 "format": "uuid",1379 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"1380 },1381 "platform": {1382 "type": "string",1383 "enum": [1384 "facebook",1385 "fixture"1386 ]1387 },1388 "displayName": {1389 "type": "string",1390 "minLength": 1,1391 "maxLength": 2001392 },1393 "url": {1394 "type": "string",1395 "maxLength": 500,1396 "format": "uri"1397 },1398 "composerUrl": {1399 "default": null,1400 "anyOf": [1401 {1402 "type": "string",1403 "maxLength": 500,1404 "format": "uri"1405 },1406 {1407 "type": "null"1408 }1409 ]1410 },1411 "externalPageId": {1412 "default": null,1413 "anyOf": [1414 {1415 "type": "string",1416 "pattern": "^[A-Za-z0-9._-]{1,80}$"1417 },1418 {1419 "type": "null"1420 }1421 ]1422 }1423 },1424 "required": [1425 "brandId",1426 "platform",1427 "displayName",1428 "url"1429 ],1430 "additionalProperties": false1431 }1432 }1433 }1434 }1435 }1436 },1437 "/v1/pages/{id}/confirm": {1438 "post": {1439 "summary": "Confirmation manuelle de l’identité de la page (nom retapé)",1440 "tags": [1441 "pages"1442 ],1443 "parameters": [1444 {1445 "name": "id",1446 "in": "path",1447 "required": true,1448 "schema": {1449 "type": "string"1450 }1451 }1452 ],1453 "x-auth": "user",1454 "x-min-role": "admin",1455 "security": [1456 {1457 "sessionCookie": [],1458 "csrfHeader": []1459 }1460 ],1461 "responses": {1462 "200": {1463 "description": "OK"1464 },1465 "400": {1466 "$ref": "#/components/responses/Error"1467 },1468 "401": {1469 "$ref": "#/components/responses/Error"1470 },1471 "403": {1472 "$ref": "#/components/responses/Error"1473 },1474 "404": {1475 "$ref": "#/components/responses/Error"1476 },1477 "409": {1478 "$ref": "#/components/responses/Error"1479 },1480 "429": {1481 "$ref": "#/components/responses/Error"1482 }1483 },1484 "requestBody": {1485 "required": true,1486 "content": {1487 "application/json": {1488 "schema": {1489 "$schema": "https://json-schema.org/draft/2020-12/schema",1490 "type": "object",1491 "properties": {1492 "typedName": {1493 "type": "string",1494 "maxLength": 2001495 },1496 "attest": {1497 "type": "boolean",1498 "const": true1499 }1500 },1501 "required": [1502 "typedName",1503 "attest"1504 ],1505 "additionalProperties": false1506 }1507 }1508 }1509 }1510 }1511 },1512 "/v1/pages/{id}/retire": {1513 "post": {1514 "summary": "Retire une page ; invalide les approbations qui la visent",1515 "tags": [1516 "pages"1517 ],1518 "parameters": [1519 {1520 "name": "id",1521 "in": "path",1522 "required": true,1523 "schema": {1524 "type": "string"1525 }1526 }1527 ],1528 "x-auth": "user",1529 "x-min-role": "admin",1530 "security": [1531 {1532 "sessionCookie": [],1533 "csrfHeader": []1534 }1535 ],1536 "responses": {1537 "200": {1538 "description": "OK"1539 },1540 "400": {1541 "$ref": "#/components/responses/Error"1542 },1543 "401": {1544 "$ref": "#/components/responses/Error"1545 },1546 "403": {1547 "$ref": "#/components/responses/Error"1548 },1549 "404": {1550 "$ref": "#/components/responses/Error"1551 },1552 "409": {1553 "$ref": "#/components/responses/Error"1554 },1555 "429": {1556 "$ref": "#/components/responses/Error"1557 }1558 },1559 "requestBody": {1560 "required": true,1561 "content": {1562 "application/json": {1563 "schema": {1564 "$schema": "https://json-schema.org/draft/2020-12/schema",1565 "type": "object",1566 "properties": {},1567 "additionalProperties": false1568 }1569 }1570 }1571 }1572 }1573 },1574 "/v1/campaigns": {1575 "get": {1576 "summary": "Campagnes",1577 "tags": [1578 "campaigns"1579 ],1580 "parameters": [],1581 "x-auth": "user",1582 "security": [1583 {1584 "sessionCookie": [],1585 "csrfHeader": []1586 }1587 ],1588 "responses": {1589 "200": {1590 "description": "OK"1591 },1592 "400": {1593 "$ref": "#/components/responses/Error"1594 },1595 "401": {1596 "$ref": "#/components/responses/Error"1597 },1598 "403": {1599 "$ref": "#/components/responses/Error"1600 },1601 "404": {1602 "$ref": "#/components/responses/Error"1603 },1604 "409": {1605 "$ref": "#/components/responses/Error"1606 },1607 "429": {1608 "$ref": "#/components/responses/Error"1609 }1610 }1611 },1612 "post": {1613 "summary": "Crée une campagne",1614 "tags": [1615 "campaigns"1616 ],1617 "parameters": [],1618 "x-auth": "user",1619 "security": [1620 {1621 "sessionCookie": [],1622 "csrfHeader": []1623 }1624 ],1625 "responses": {1626 "200": {1627 "description": "OK"1628 },1629 "400": {1630 "$ref": "#/components/responses/Error"1631 },1632 "401": {1633 "$ref": "#/components/responses/Error"1634 },1635 "403": {1636 "$ref": "#/components/responses/Error"1637 },1638 "404": {1639 "$ref": "#/components/responses/Error"1640 },1641 "409": {1642 "$ref": "#/components/responses/Error"1643 },1644 "429": {1645 "$ref": "#/components/responses/Error"1646 }1647 },1648 "requestBody": {1649 "required": true,1650 "content": {1651 "application/json": {1652 "schema": {1653 "$schema": "https://json-schema.org/draft/2020-12/schema",1654 "type": "object",1655 "properties": {1656 "brandId": {1657 "type": "string",1658 "format": "uuid",1659 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"1660 },1661 "name": {1662 "type": "string",1663 "minLength": 1,1664 "maxLength": 1601665 },1666 "objective": {1667 "default": "",1668 "type": "string",1669 "maxLength": 20001670 },1671 "startsAt": {1672 "default": null,1673 "anyOf": [1674 {1675 "type": "string",1676 "format": "date-time",1677 "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"1678 },1679 {1680 "type": "null"1681 }1682 ]1683 },1684 "endsAt": {1685 "default": null,1686 "anyOf": [1687 {1688 "type": "string",1689 "format": "date-time",1690 "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"1691 },1692 {1693 "type": "null"1694 }1695 ]1696 }1697 },1698 "required": [1699 "brandId",1700 "name"1701 ],1702 "additionalProperties": false1703 }1704 }1705 }1706 }1707 }1708 },1709 "/v1/content": {1710 "get": {1711 "summary": "Contenus",1712 "tags": [1713 "content"1714 ],1715 "parameters": [],1716 "x-auth": "user",1717 "security": [1718 {1719 "sessionCookie": [],1720 "csrfHeader": []1721 }1722 ],1723 "responses": {1724 "200": {1725 "description": "OK"1726 },1727 "400": {1728 "$ref": "#/components/responses/Error"1729 },1730 "401": {1731 "$ref": "#/components/responses/Error"1732 },1733 "403": {1734 "$ref": "#/components/responses/Error"1735 },1736 "404": {1737 "$ref": "#/components/responses/Error"1738 },1739 "409": {1740 "$ref": "#/components/responses/Error"1741 },1742 "429": {1743 "$ref": "#/components/responses/Error"1744 }1745 }1746 },1747 "post": {1748 "summary": "Brouillon",1749 "tags": [1750 "content"1751 ],1752 "parameters": [],1753 "x-auth": "user",1754 "security": [1755 {1756 "sessionCookie": [],1757 "csrfHeader": []1758 }1759 ],1760 "responses": {1761 "200": {1762 "description": "OK"1763 },1764 "400": {1765 "$ref": "#/components/responses/Error"1766 },1767 "401": {1768 "$ref": "#/components/responses/Error"1769 },1770 "403": {1771 "$ref": "#/components/responses/Error"1772 },1773 "404": {1774 "$ref": "#/components/responses/Error"1775 },1776 "409": {1777 "$ref": "#/components/responses/Error"1778 },1779 "429": {1780 "$ref": "#/components/responses/Error"1781 }1782 },1783 "requestBody": {1784 "required": true,1785 "content": {1786 "application/json": {1787 "schema": {1788 "$schema": "https://json-schema.org/draft/2020-12/schema",1789 "type": "object",1790 "properties": {1791 "brandId": {1792 "type": "string",1793 "format": "uuid",1794 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"1795 },1796 "pageId": {1797 "default": null,1798 "anyOf": [1799 {1800 "type": "string",1801 "format": "uuid",1802 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"1803 },1804 {1805 "type": "null"1806 }1807 ]1808 },1809 "campaignId": {1810 "default": null,1811 "anyOf": [1812 {1813 "type": "string",1814 "format": "uuid",1815 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"1816 },1817 {1818 "type": "null"1819 }1820 ]1821 },1822 "title": {1823 "type": "string",1824 "minLength": 1,1825 "maxLength": 2001826 },1827 "payload": {1828 "type": "object",1829 "properties": {1830 "lang": {1831 "type": "string",1832 "enum": [1833 "fr",1834 "en"1835 ]1836 },1837 "body": {1838 "type": "string",1839 "minLength": 1,1840 "maxLength": 80001841 },1842 "linkUrl": {1843 "default": null,1844 "anyOf": [1845 {1846 "type": "string",1847 "maxLength": 2000,1848 "format": "uri"1849 },1850 {1851 "type": "null"1852 }1853 ]1854 },1855 "mediaSha256": {1856 "default": [],1857 "maxItems": 10,1858 "type": "array",1859 "items": {1860 "type": "string",1861 "pattern": "^[a-f0-9]{64}$"1862 }1863 },1864 "altText": {1865 "default": null,1866 "anyOf": [1867 {1868 "type": "string",1869 "maxLength": 10001870 },1871 {1872 "type": "null"1873 }1874 ]1875 }1876 },1877 "required": [1878 "lang",1879 "body"1880 ],1881 "additionalProperties": false1882 },1883 "sourceEventId": {1884 "default": null,1885 "anyOf": [1886 {1887 "type": "string",1888 "format": "uuid",1889 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"1890 },1891 {1892 "type": "null"1893 }1894 ]1895 }1896 },1897 "required": [1898 "brandId",1899 "title",1900 "payload"1901 ],1902 "additionalProperties": false1903 }1904 }1905 }1906 }1907 }1908 },1909 "/v1/content/{id}": {1910 "get": {1911 "summary": "Contenu : versions, approbations, contrôles, tâches",1912 "tags": [1913 "content"1914 ],1915 "parameters": [1916 {1917 "name": "id",1918 "in": "path",1919 "required": true,1920 "schema": {1921 "type": "string"1922 }1923 }1924 ],1925 "x-auth": "user",1926 "security": [1927 {1928 "sessionCookie": [],1929 "csrfHeader": []1930 }1931 ],1932 "responses": {1933 "200": {1934 "description": "OK"1935 },1936 "400": {1937 "$ref": "#/components/responses/Error"1938 },1939 "401": {1940 "$ref": "#/components/responses/Error"1941 },1942 "403": {1943 "$ref": "#/components/responses/Error"1944 },1945 "404": {1946 "$ref": "#/components/responses/Error"1947 },1948 "409": {1949 "$ref": "#/components/responses/Error"1950 },1951 "429": {1952 "$ref": "#/components/responses/Error"1953 }1954 }1955 },1956 "patch": {1957 "summary": "Modifie (nouvelle version ; invalide les approbations)",1958 "tags": [1959 "content"1960 ],1961 "parameters": [1962 {1963 "name": "id",1964 "in": "path",1965 "required": true,1966 "schema": {1967 "type": "string"1968 }1969 }1970 ],1971 "x-auth": "user",1972 "security": [1973 {1974 "sessionCookie": [],1975 "csrfHeader": []1976 }1977 ],1978 "responses": {1979 "200": {1980 "description": "OK"1981 },1982 "400": {1983 "$ref": "#/components/responses/Error"1984 },1985 "401": {1986 "$ref": "#/components/responses/Error"1987 },1988 "403": {1989 "$ref": "#/components/responses/Error"1990 },1991 "404": {1992 "$ref": "#/components/responses/Error"1993 },1994 "409": {1995 "$ref": "#/components/responses/Error"1996 },1997 "429": {1998 "$ref": "#/components/responses/Error"1999 }2000 },2001 "requestBody": {2002 "required": true,2003 "content": {2004 "application/json": {2005 "schema": {2006 "$schema": "https://json-schema.org/draft/2020-12/schema",2007 "type": "object",2008 "properties": {2009 "title": {2010 "type": "string",2011 "minLength": 1,2012 "maxLength": 2002013 },2014 "pageId": {2015 "anyOf": [2016 {2017 "type": "string",2018 "format": "uuid",2019 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"2020 },2021 {2022 "type": "null"2023 }2024 ]2025 },2026 "payload": {2027 "type": "object",2028 "properties": {2029 "lang": {2030 "type": "string",2031 "enum": [2032 "fr",2033 "en"2034 ]2035 },2036 "body": {2037 "type": "string",2038 "minLength": 1,2039 "maxLength": 80002040 },2041 "linkUrl": {2042 "default": null,2043 "anyOf": [2044 {2045 "type": "string",2046 "maxLength": 2000,2047 "format": "uri"2048 },2049 {2050 "type": "null"2051 }2052 ]2053 },2054 "mediaSha256": {2055 "default": [],2056 "maxItems": 10,2057 "type": "array",2058 "items": {2059 "type": "string",2060 "pattern": "^[a-f0-9]{64}$"2061 }2062 },2063 "altText": {2064 "default": null,2065 "anyOf": [2066 {2067 "type": "string",2068 "maxLength": 10002069 },2070 {2071 "type": "null"2072 }2073 ]2074 }2075 },2076 "required": [2077 "lang",2078 "body"2079 ],2080 "additionalProperties": false2081 }2082 },2083 "additionalProperties": false2084 }2085 }2086 }2087 }2088 }2089 },2090 "/v1/content/{id}/submit": {2091 "post": {2092 "summary": "Soumet à la révision",2093 "tags": [2094 "content"2095 ],2096 "parameters": [2097 {2098 "name": "id",2099 "in": "path",2100 "required": true,2101 "schema": {2102 "type": "string"2103 }2104 }2105 ],2106 "x-auth": "user",2107 "security": [2108 {2109 "sessionCookie": [],2110 "csrfHeader": []2111 }2112 ],2113 "responses": {2114 "200": {2115 "description": "OK"2116 },2117 "400": {2118 "$ref": "#/components/responses/Error"2119 },2120 "401": {2121 "$ref": "#/components/responses/Error"2122 },2123 "403": {2124 "$ref": "#/components/responses/Error"2125 },2126 "404": {2127 "$ref": "#/components/responses/Error"2128 },2129 "409": {2130 "$ref": "#/components/responses/Error"2131 },2132 "429": {2133 "$ref": "#/components/responses/Error"2134 }2135 },2136 "requestBody": {2137 "required": true,2138 "content": {2139 "application/json": {2140 "schema": {2141 "$schema": "https://json-schema.org/draft/2020-12/schema",2142 "type": "object",2143 "properties": {},2144 "additionalProperties": false2145 }2146 }2147 }2148 }2149 }2150 },2151 "/v1/content/{id}/approve": {2152 "post": {2153 "summary": "Approbation versionnée (version + hash + page)",2154 "tags": [2155 "content"2156 ],2157 "parameters": [2158 {2159 "name": "id",2160 "in": "path",2161 "required": true,2162 "schema": {2163 "type": "string"2164 }2165 }2166 ],2167 "x-auth": "user",2168 "security": [2169 {2170 "sessionCookie": [],2171 "csrfHeader": []2172 }2173 ],2174 "responses": {2175 "200": {2176 "description": "OK"2177 },2178 "400": {2179 "$ref": "#/components/responses/Error"2180 },2181 "401": {2182 "$ref": "#/components/responses/Error"2183 },2184 "403": {2185 "$ref": "#/components/responses/Error"2186 },2187 "404": {2188 "$ref": "#/components/responses/Error"2189 },2190 "409": {2191 "$ref": "#/components/responses/Error"2192 },2193 "429": {2194 "$ref": "#/components/responses/Error"2195 }2196 },2197 "requestBody": {2198 "required": true,2199 "content": {2200 "application/json": {2201 "schema": {2202 "$schema": "https://json-schema.org/draft/2020-12/schema",2203 "type": "object",2204 "properties": {2205 "versionId": {2206 "type": "string",2207 "format": "uuid",2208 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"2209 },2210 "contentHash": {2211 "type": "string",2212 "pattern": "^[a-f0-9]{64}$"2213 },2214 "pageId": {2215 "type": "string",2216 "format": "uuid",2217 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"2218 },2219 "decision": {2220 "type": "string",2221 "enum": [2222 "approve",2223 "reject"2224 ]2225 },2226 "comment": {2227 "default": "",2228 "type": "string",2229 "maxLength": 10002230 }2231 },2232 "required": [2233 "versionId",2234 "contentHash",2235 "pageId",2236 "decision"2237 ],2238 "additionalProperties": false2239 }2240 }2241 }2242 }2243 }2244 },2245 "/v1/approvals/pending": {2246 "get": {2247 "summary": "Contenus en attente d’approbation, avec aperçu fidèle",2248 "tags": [2249 "content"2250 ],2251 "parameters": [],2252 "x-auth": "user",2253 "security": [2254 {2255 "sessionCookie": [],2256 "csrfHeader": []2257 }2258 ],2259 "responses": {2260 "200": {2261 "description": "OK"2262 },2263 "400": {2264 "$ref": "#/components/responses/Error"2265 },2266 "401": {2267 "$ref": "#/components/responses/Error"2268 },2269 "403": {2270 "$ref": "#/components/responses/Error"2271 },2272 "404": {2273 "$ref": "#/components/responses/Error"2274 },2275 "409": {2276 "$ref": "#/components/responses/Error"2277 },2278 "429": {2279 "$ref": "#/components/responses/Error"2280 }2281 }2282 }2283 },2284 "/v1/media": {2285 "get": {2286 "summary": "Médiathèque",2287 "tags": [2288 "media"2289 ],2290 "parameters": [],2291 "x-auth": "user",2292 "security": [2293 {2294 "sessionCookie": [],2295 "csrfHeader": []2296 }2297 ],2298 "responses": {2299 "200": {2300 "description": "OK"2301 },2302 "400": {2303 "$ref": "#/components/responses/Error"2304 },2305 "401": {2306 "$ref": "#/components/responses/Error"2307 },2308 "403": {2309 "$ref": "#/components/responses/Error"2310 },2311 "404": {2312 "$ref": "#/components/responses/Error"2313 },2314 "409": {2315 "$ref": "#/components/responses/Error"2316 },2317 "429": {2318 "$ref": "#/components/responses/Error"2319 }2320 }2321 },2322 "post": {2323 "summary": "Téléverse une image (contenu vérifié, métadonnées retirées)",2324 "tags": [2325 "media"2326 ],2327 "parameters": [],2328 "x-auth": "user",2329 "security": [2330 {2331 "sessionCookie": [],2332 "csrfHeader": []2333 }2334 ],2335 "responses": {2336 "200": {2337 "description": "OK"2338 },2339 "400": {2340 "$ref": "#/components/responses/Error"2341 },2342 "401": {2343 "$ref": "#/components/responses/Error"2344 },2345 "403": {2346 "$ref": "#/components/responses/Error"2347 },2348 "404": {2349 "$ref": "#/components/responses/Error"2350 },2351 "409": {2352 "$ref": "#/components/responses/Error"2353 },2354 "429": {2355 "$ref": "#/components/responses/Error"2356 }2357 }2358 }2359 },2360 "/v1/media/template": {2361 "post": {2362 "summary": "Génère un visuel depuis un gabarit de marque",2363 "tags": [2364 "media"2365 ],2366 "parameters": [],2367 "x-auth": "user",2368 "security": [2369 {2370 "sessionCookie": [],2371 "csrfHeader": []2372 }2373 ],2374 "responses": {2375 "200": {2376 "description": "OK"2377 },2378 "400": {2379 "$ref": "#/components/responses/Error"2380 },2381 "401": {2382 "$ref": "#/components/responses/Error"2383 },2384 "403": {2385 "$ref": "#/components/responses/Error"2386 },2387 "404": {2388 "$ref": "#/components/responses/Error"2389 },2390 "409": {2391 "$ref": "#/components/responses/Error"2392 },2393 "429": {2394 "$ref": "#/components/responses/Error"2395 }2396 },2397 "requestBody": {2398 "required": true,2399 "content": {2400 "application/json": {2401 "schema": {2402 "$schema": "https://json-schema.org/draft/2020-12/schema",2403 "type": "object",2404 "properties": {2405 "brandId": {2406 "type": "string",2407 "format": "uuid",2408 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"2409 },2410 "kind": {2411 "type": "string",2412 "enum": [2413 "announcement",2414 "release",2415 "statistic",2416 "app_capture"2417 ]2418 },2419 "headline": {2420 "type": "string",2421 "minLength": 1,2422 "maxLength": 1602423 },2424 "kicker": {2425 "type": "string",2426 "maxLength": 402427 },2428 "body": {2429 "type": "string",2430 "maxLength": 2402431 },2432 "figure": {2433 "type": "string",2434 "maxLength": 122435 },2436 "figureLabel": {2437 "type": "string",2438 "maxLength": 602439 },2440 "source": {2441 "type": "string",2442 "maxLength": 1202443 },2444 "version": {2445 "type": "string",2446 "maxLength": 202447 }2448 },2449 "required": [2450 "brandId",2451 "kind",2452 "headline"2453 ],2454 "additionalProperties": false2455 }2456 }2457 }2458 }2459 }2460 },2461 "/v1/media/{id}/rights": {2462 "post": {2463 "summary": "Atteste les droits d’usage et approuve le média",2464 "tags": [2465 "media"2466 ],2467 "parameters": [2468 {2469 "name": "id",2470 "in": "path",2471 "required": true,2472 "schema": {2473 "type": "string"2474 }2475 }2476 ],2477 "x-auth": "user",2478 "security": [2479 {2480 "sessionCookie": [],2481 "csrfHeader": []2482 }2483 ],2484 "responses": {2485 "200": {2486 "description": "OK"2487 },2488 "400": {2489 "$ref": "#/components/responses/Error"2490 },2491 "401": {2492 "$ref": "#/components/responses/Error"2493 },2494 "403": {2495 "$ref": "#/components/responses/Error"2496 },2497 "404": {2498 "$ref": "#/components/responses/Error"2499 },2500 "409": {2501 "$ref": "#/components/responses/Error"2502 },2503 "429": {2504 "$ref": "#/components/responses/Error"2505 }2506 },2507 "requestBody": {2508 "required": true,2509 "content": {2510 "application/json": {2511 "schema": {2512 "$schema": "https://json-schema.org/draft/2020-12/schema",2513 "type": "object",2514 "properties": {2515 "owner": {2516 "type": "string",2517 "minLength": 2,2518 "maxLength": 2002519 },2520 "license": {2521 "type": "string",2522 "minLength": 2,2523 "maxLength": 3002524 },2525 "source": {2526 "type": "string",2527 "minLength": 2,2528 "maxLength": 3002529 },2530 "thirdPartyListing": {2531 "type": "boolean",2532 "const": false2533 },2534 "attest": {2535 "type": "boolean",2536 "const": true2537 },2538 "altText": {2539 "type": "string",2540 "maxLength": 5002541 }2542 },2543 "required": [2544 "owner",2545 "license",2546 "source",2547 "thirdPartyListing",2548 "attest"2549 ],2550 "additionalProperties": false2551 }2552 }2553 }2554 }2555 }2556 },2557 "/v1/media/{id}/reject": {2558 "post": {2559 "summary": "Rejette un média ; invalide les contenus qui l’utilisent",2560 "tags": [2561 "media"2562 ],2563 "parameters": [2564 {2565 "name": "id",2566 "in": "path",2567 "required": true,2568 "schema": {2569 "type": "string"2570 }2571 }2572 ],2573 "x-auth": "user",2574 "security": [2575 {2576 "sessionCookie": [],2577 "csrfHeader": []2578 }2579 ],2580 "responses": {2581 "200": {2582 "description": "OK"2583 },2584 "400": {2585 "$ref": "#/components/responses/Error"2586 },2587 "401": {2588 "$ref": "#/components/responses/Error"2589 },2590 "403": {2591 "$ref": "#/components/responses/Error"2592 },2593 "404": {2594 "$ref": "#/components/responses/Error"2595 },2596 "409": {2597 "$ref": "#/components/responses/Error"2598 },2599 "429": {2600 "$ref": "#/components/responses/Error"2601 }2602 },2603 "requestBody": {2604 "required": true,2605 "content": {2606 "application/json": {2607 "schema": {2608 "$schema": "https://json-schema.org/draft/2020-12/schema",2609 "type": "object",2610 "properties": {2611 "reason": {2612 "type": "string",2613 "minLength": 3,2614 "maxLength": 3002615 }2616 },2617 "required": [2618 "reason"2619 ],2620 "additionalProperties": false2621 }2622 }2623 }2624 }2625 }2626 },2627 "/media/s/{id}": {2628 "get": {2629 "summary": "Média par URL signée de courte durée",2630 "tags": [2631 "media"2632 ],2633 "parameters": [2634 {2635 "name": "id",2636 "in": "path",2637 "required": true,2638 "schema": {2639 "type": "string"2640 }2641 }2642 ],2643 "x-auth": "public",2644 "security": [],2645 "responses": {2646 "200": {2647 "description": "OK"2648 },2649 "400": {2650 "$ref": "#/components/responses/Error"2651 },2652 "401": {2653 "$ref": "#/components/responses/Error"2654 },2655 "403": {2656 "$ref": "#/components/responses/Error"2657 },2658 "404": {2659 "$ref": "#/components/responses/Error"2660 },2661 "409": {2662 "$ref": "#/components/responses/Error"2663 },2664 "429": {2665 "$ref": "#/components/responses/Error"2666 }2667 }2668 }2669 },2670 "/v1/jobs": {2671 "get": {2672 "summary": "Tâches de publication (calendrier)",2673 "tags": [2674 "jobs"2675 ],2676 "parameters": [],2677 "x-auth": "user",2678 "security": [2679 {2680 "sessionCookie": [],2681 "csrfHeader": []2682 }2683 ],2684 "responses": {2685 "200": {2686 "description": "OK"2687 },2688 "400": {2689 "$ref": "#/components/responses/Error"2690 },2691 "401": {2692 "$ref": "#/components/responses/Error"2693 },2694 "403": {2695 "$ref": "#/components/responses/Error"2696 },2697 "404": {2698 "$ref": "#/components/responses/Error"2699 },2700 "409": {2701 "$ref": "#/components/responses/Error"2702 },2703 "429": {2704 "$ref": "#/components/responses/Error"2705 }2706 }2707 },2708 "post": {2709 "summary": "Planifie (lié au hash approuvé, à la page et au créneau)",2710 "tags": [2711 "jobs"2712 ],2713 "parameters": [],2714 "x-auth": "user",2715 "security": [2716 {2717 "sessionCookie": [],2718 "csrfHeader": []2719 }2720 ],2721 "responses": {2722 "200": {2723 "description": "OK"2724 },2725 "400": {2726 "$ref": "#/components/responses/Error"2727 },2728 "401": {2729 "$ref": "#/components/responses/Error"2730 },2731 "403": {2732 "$ref": "#/components/responses/Error"2733 },2734 "404": {2735 "$ref": "#/components/responses/Error"2736 },2737 "409": {2738 "$ref": "#/components/responses/Error"2739 },2740 "429": {2741 "$ref": "#/components/responses/Error"2742 }2743 },2744 "requestBody": {2745 "required": true,2746 "content": {2747 "application/json": {2748 "schema": {2749 "$schema": "https://json-schema.org/draft/2020-12/schema",2750 "type": "object",2751 "properties": {2752 "contentId": {2753 "type": "string",2754 "format": "uuid",2755 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"2756 },2757 "scheduledAt": {2758 "type": "string",2759 "format": "date-time",2760 "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"2761 },2762 "mode": {2763 "default": "manual_assisted",2764 "type": "string",2765 "enum": [2766 "manual_assisted",2767 "prepare_only",2768 "auto_submit"2769 ]2770 }2771 },2772 "required": [2773 "contentId",2774 "scheduledAt"2775 ],2776 "additionalProperties": false2777 }2778 }2779 }2780 }2781 }2782 },2783 "/v1/jobs/{id}": {2784 "get": {2785 "summary": "État et preuves",2786 "tags": [2787 "jobs"2788 ],2789 "parameters": [2790 {2791 "name": "id",2792 "in": "path",2793 "required": true,2794 "schema": {2795 "type": "string"2796 }2797 }2798 ],2799 "x-auth": "user",2800 "security": [2801 {2802 "sessionCookie": [],2803 "csrfHeader": []2804 }2805 ],2806 "responses": {2807 "200": {2808 "description": "OK"2809 },2810 "400": {2811 "$ref": "#/components/responses/Error"2812 },2813 "401": {2814 "$ref": "#/components/responses/Error"2815 },2816 "403": {2817 "$ref": "#/components/responses/Error"2818 },2819 "404": {2820 "$ref": "#/components/responses/Error"2821 },2822 "409": {2823 "$ref": "#/components/responses/Error"2824 },2825 "429": {2826 "$ref": "#/components/responses/Error"2827 }2828 }2829 }2830 },2831 "/v1/jobs/{id}/cancel": {2832 "post": {2833 "summary": "Annule (avant soumission seulement ; après, aucun retrait garanti)",2834 "tags": [2835 "jobs"2836 ],2837 "parameters": [2838 {2839 "name": "id",2840 "in": "path",2841 "required": true,2842 "schema": {2843 "type": "string"2844 }2845 }2846 ],2847 "x-auth": "user",2848 "security": [2849 {2850 "sessionCookie": [],2851 "csrfHeader": []2852 }2853 ],2854 "responses": {2855 "200": {2856 "description": "OK"2857 },2858 "400": {2859 "$ref": "#/components/responses/Error"2860 },2861 "401": {2862 "$ref": "#/components/responses/Error"2863 },2864 "403": {2865 "$ref": "#/components/responses/Error"2866 },2867 "404": {2868 "$ref": "#/components/responses/Error"2869 },2870 "409": {2871 "$ref": "#/components/responses/Error"2872 },2873 "429": {2874 "$ref": "#/components/responses/Error"2875 }2876 },2877 "requestBody": {2878 "required": true,2879 "content": {2880 "application/json": {2881 "schema": {2882 "$schema": "https://json-schema.org/draft/2020-12/schema",2883 "type": "object",2884 "properties": {},2885 "additionalProperties": false2886 }2887 }2888 }2889 }2890 }2891 },2892 "/v1/jobs/{id}/confirm": {2893 "post": {2894 "summary": "Confirmation humaine : autoriser la soumission, ou attester une publication manuelle",2895 "tags": [2896 "jobs"2897 ],2898 "parameters": [2899 {2900 "name": "id",2901 "in": "path",2902 "required": true,2903 "schema": {2904 "type": "string"2905 }2906 }2907 ],2908 "x-auth": "user",2909 "security": [2910 {2911 "sessionCookie": [],2912 "csrfHeader": []2913 }2914 ],2915 "responses": {2916 "200": {2917 "description": "OK"2918 },2919 "400": {2920 "$ref": "#/components/responses/Error"2921 },2922 "401": {2923 "$ref": "#/components/responses/Error"2924 },2925 "403": {2926 "$ref": "#/components/responses/Error"2927 },2928 "404": {2929 "$ref": "#/components/responses/Error"2930 },2931 "409": {2932 "$ref": "#/components/responses/Error"2933 },2934 "429": {2935 "$ref": "#/components/responses/Error"2936 }2937 },2938 "requestBody": {2939 "required": true,2940 "content": {2941 "application/json": {2942 "schema": {2943 "$schema": "https://json-schema.org/draft/2020-12/schema",2944 "type": "object",2945 "properties": {2946 "action": {2947 "type": "string",2948 "enum": [2949 "authorize_submit",2950 "human_published"2951 ]2952 },2953 "externalUrl": {2954 "default": null,2955 "anyOf": [2956 {2957 "type": "string",2958 "maxLength": 1000,2959 "format": "uri"2960 },2961 {2962 "type": "null"2963 }2964 ]2965 }2966 },2967 "required": [2968 "action"2969 ],2970 "additionalProperties": false2971 }2972 }2973 }2974 }2975 }2976 },2977 "/v1/jobs/{id}/reconcile": {2978 "post": {2979 "summary": "Réconciliation manuelle d’un résultat inconnu",2980 "tags": [2981 "jobs"2982 ],2983 "parameters": [2984 {2985 "name": "id",2986 "in": "path",2987 "required": true,2988 "schema": {2989 "type": "string"2990 }2991 }2992 ],2993 "x-auth": "user",2994 "security": [2995 {2996 "sessionCookie": [],2997 "csrfHeader": []2998 }2999 ],3000 "responses": {3001 "200": {3002 "description": "OK"3003 },3004 "400": {3005 "$ref": "#/components/responses/Error"3006 },3007 "401": {3008 "$ref": "#/components/responses/Error"3009 },3010 "403": {3011 "$ref": "#/components/responses/Error"3012 },3013 "404": {3014 "$ref": "#/components/responses/Error"3015 },3016 "409": {3017 "$ref": "#/components/responses/Error"3018 },3019 "429": {3020 "$ref": "#/components/responses/Error"3021 }3022 },3023 "requestBody": {3024 "required": true,3025 "content": {3026 "application/json": {3027 "schema": {3028 "$schema": "https://json-schema.org/draft/2020-12/schema",3029 "type": "object",3030 "properties": {3031 "outcome": {3032 "type": "string",3033 "enum": [3034 "published",3035 "not_published"3036 ]3037 },3038 "externalUrl": {3039 "default": null,3040 "anyOf": [3041 {3042 "type": "string",3043 "maxLength": 1000,3044 "format": "uri"3045 },3046 {3047 "type": "null"3048 }3049 ]3050 },3051 "note": {3052 "default": "",3053 "type": "string",3054 "maxLength": 10003055 }3056 },3057 "required": [3058 "outcome"3059 ],3060 "additionalProperties": false3061 }3062 }3063 }3064 }3065 }3066 },3067 "/v1/evidence/{ref}": {3068 "get": {3069 "summary": "Capture expurgée",3070 "tags": [3071 "jobs"3072 ],3073 "parameters": [3074 {3075 "name": "ref",3076 "in": "path",3077 "required": true,3078 "schema": {3079 "type": "string"3080 }3081 }3082 ],3083 "x-auth": "user",3084 "security": [3085 {3086 "sessionCookie": [],3087 "csrfHeader": []3088 }3089 ],3090 "responses": {3091 "200": {3092 "description": "OK"3093 },3094 "400": {3095 "$ref": "#/components/responses/Error"3096 },3097 "401": {3098 "$ref": "#/components/responses/Error"3099 },3100 "403": {3101 "$ref": "#/components/responses/Error"3102 },3103 "404": {3104 "$ref": "#/components/responses/Error"3105 },3106 "409": {3107 "$ref": "#/components/responses/Error"3108 },3109 "429": {3110 "$ref": "#/components/responses/Error"3111 }3112 }3113 }3114 },3115 "/v1/comments": {3116 "get": {3117 "summary": "Boîte de commentaires",3118 "tags": [3119 "community"3120 ],3121 "parameters": [],3122 "x-auth": "user",3123 "security": [3124 {3125 "sessionCookie": [],3126 "csrfHeader": []3127 }3128 ],3129 "responses": {3130 "200": {3131 "description": "OK"3132 },3133 "400": {3134 "$ref": "#/components/responses/Error"3135 },3136 "401": {3137 "$ref": "#/components/responses/Error"3138 },3139 "403": {3140 "$ref": "#/components/responses/Error"3141 },3142 "404": {3143 "$ref": "#/components/responses/Error"3144 },3145 "409": {3146 "$ref": "#/components/responses/Error"3147 },3148 "429": {3149 "$ref": "#/components/responses/Error"3150 }3151 }3152 }3153 },3154 "/v1/comments/import": {3155 "post": {3156 "summary": "Importe des commentaires copiés par un humain (aucune identité d’auteur conservée)",3157 "tags": [3158 "community"3159 ],3160 "parameters": [],3161 "x-auth": "user",3162 "security": [3163 {3164 "sessionCookie": [],3165 "csrfHeader": []3166 }3167 ],3168 "responses": {3169 "200": {3170 "description": "OK"3171 },3172 "400": {3173 "$ref": "#/components/responses/Error"3174 },3175 "401": {3176 "$ref": "#/components/responses/Error"3177 },3178 "403": {3179 "$ref": "#/components/responses/Error"3180 },3181 "404": {3182 "$ref": "#/components/responses/Error"3183 },3184 "409": {3185 "$ref": "#/components/responses/Error"3186 },3187 "429": {3188 "$ref": "#/components/responses/Error"3189 }3190 },3191 "requestBody": {3192 "required": true,3193 "content": {3194 "application/json": {3195 "schema": {3196 "$schema": "https://json-schema.org/draft/2020-12/schema",3197 "type": "object",3198 "properties": {3199 "pageId": {3200 "type": "string",3201 "format": "uuid",3202 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3203 },3204 "items": {3205 "minItems": 1,3206 "maxItems": 200,3207 "type": "array",3208 "items": {3209 "type": "object",3210 "properties": {3211 "externalRef": {3212 "type": "string",3213 "maxLength": 2003214 },3215 "body": {3216 "type": "string",3217 "minLength": 1,3218 "maxLength": 50003219 },3220 "capturedAt": {3221 "type": "string",3222 "format": "date-time",3223 "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"3224 }3225 },3226 "required": [3227 "externalRef",3228 "body"3229 ],3230 "additionalProperties": false3231 }3232 }3233 },3234 "required": [3235 "pageId",3236 "items"3237 ],3238 "additionalProperties": false3239 }3240 }3241 }3242 }3243 }3244 },3245 "/v1/comments/{id}/drafts": {3246 "post": {3247 "summary": "Brouillon de réponse rédigé par un humain",3248 "tags": [3249 "community"3250 ],3251 "parameters": [3252 {3253 "name": "id",3254 "in": "path",3255 "required": true,3256 "schema": {3257 "type": "string"3258 }3259 }3260 ],3261 "x-auth": "user",3262 "security": [3263 {3264 "sessionCookie": [],3265 "csrfHeader": []3266 }3267 ],3268 "responses": {3269 "200": {3270 "description": "OK"3271 },3272 "400": {3273 "$ref": "#/components/responses/Error"3274 },3275 "401": {3276 "$ref": "#/components/responses/Error"3277 },3278 "403": {3279 "$ref": "#/components/responses/Error"3280 },3281 "404": {3282 "$ref": "#/components/responses/Error"3283 },3284 "409": {3285 "$ref": "#/components/responses/Error"3286 },3287 "429": {3288 "$ref": "#/components/responses/Error"3289 }3290 },3291 "requestBody": {3292 "required": true,3293 "content": {3294 "application/json": {3295 "schema": {3296 "$schema": "https://json-schema.org/draft/2020-12/schema",3297 "type": "object",3298 "properties": {3299 "body": {3300 "type": "string",3301 "minLength": 1,3302 "maxLength": 12003303 },3304 "lang": {3305 "type": "string",3306 "enum": [3307 "fr",3308 "en"3309 ]3310 }3311 },3312 "required": [3313 "body",3314 "lang"3315 ],3316 "additionalProperties": false3317 }3318 }3319 }3320 }3321 }3322 },3323 "/v1/reply-drafts/{id}/decide": {3324 "post": {3325 "summary": "Approuve, écarte ou marque « publiée à la main » un brouillon de réponse",3326 "tags": [3327 "community"3328 ],3329 "parameters": [3330 {3331 "name": "id",3332 "in": "path",3333 "required": true,3334 "schema": {3335 "type": "string"3336 }3337 }3338 ],3339 "x-auth": "user",3340 "security": [3341 {3342 "sessionCookie": [],3343 "csrfHeader": []3344 }3345 ],3346 "responses": {3347 "200": {3348 "description": "OK"3349 },3350 "400": {3351 "$ref": "#/components/responses/Error"3352 },3353 "401": {3354 "$ref": "#/components/responses/Error"3355 },3356 "403": {3357 "$ref": "#/components/responses/Error"3358 },3359 "404": {3360 "$ref": "#/components/responses/Error"3361 },3362 "409": {3363 "$ref": "#/components/responses/Error"3364 },3365 "429": {3366 "$ref": "#/components/responses/Error"3367 }3368 },3369 "requestBody": {3370 "required": true,3371 "content": {3372 "application/json": {3373 "schema": {3374 "$schema": "https://json-schema.org/draft/2020-12/schema",3375 "type": "object",3376 "properties": {3377 "state": {3378 "type": "string",3379 "enum": [3380 "approved",3381 "discarded",3382 "posted_manually"3383 ]3384 }3385 },3386 "required": [3387 "state"3388 ],3389 "additionalProperties": false3390 }3391 }3392 }3393 }3394 }3395 },3396 "/v1/comments/{id}/close": {3397 "post": {3398 "summary": "Ferme un commentaire",3399 "tags": [3400 "community"3401 ],3402 "parameters": [3403 {3404 "name": "id",3405 "in": "path",3406 "required": true,3407 "schema": {3408 "type": "string"3409 }3410 }3411 ],3412 "x-auth": "user",3413 "security": [3414 {3415 "sessionCookie": [],3416 "csrfHeader": []3417 }3418 ],3419 "responses": {3420 "200": {3421 "description": "OK"3422 },3423 "400": {3424 "$ref": "#/components/responses/Error"3425 },3426 "401": {3427 "$ref": "#/components/responses/Error"3428 },3429 "403": {3430 "$ref": "#/components/responses/Error"3431 },3432 "404": {3433 "$ref": "#/components/responses/Error"3434 },3435 "409": {3436 "$ref": "#/components/responses/Error"3437 },3438 "429": {3439 "$ref": "#/components/responses/Error"3440 }3441 },3442 "requestBody": {3443 "required": true,3444 "content": {3445 "application/json": {3446 "schema": {3447 "$schema": "https://json-schema.org/draft/2020-12/schema",3448 "type": "object",3449 "properties": {},3450 "additionalProperties": false3451 }3452 }3453 }3454 }3455 }3456 },3457 "/v1/metrics": {3458 "get": {3459 "summary": "Mesures relevées (date, période, source, disponibilité)",3460 "tags": [3461 "analytics"3462 ],3463 "parameters": [],3464 "x-auth": "user",3465 "security": [3466 {3467 "sessionCookie": [],3468 "csrfHeader": []3469 }3470 ],3471 "responses": {3472 "200": {3473 "description": "OK"3474 },3475 "400": {3476 "$ref": "#/components/responses/Error"3477 },3478 "401": {3479 "$ref": "#/components/responses/Error"3480 },3481 "403": {3482 "$ref": "#/components/responses/Error"3483 },3484 "404": {3485 "$ref": "#/components/responses/Error"3486 },3487 "409": {3488 "$ref": "#/components/responses/Error"3489 },3490 "429": {3491 "$ref": "#/components/responses/Error"3492 }3493 }3494 }3495 },3496 "/v1/metrics/import": {3497 "post": {3498 "summary": "Saisit des mesures visibles ; null = indisponible (jamais extrapolé)",3499 "tags": [3500 "analytics"3501 ],3502 "parameters": [],3503 "x-auth": "user",3504 "security": [3505 {3506 "sessionCookie": [],3507 "csrfHeader": []3508 }3509 ],3510 "responses": {3511 "200": {3512 "description": "OK"3513 },3514 "400": {3515 "$ref": "#/components/responses/Error"3516 },3517 "401": {3518 "$ref": "#/components/responses/Error"3519 },3520 "403": {3521 "$ref": "#/components/responses/Error"3522 },3523 "404": {3524 "$ref": "#/components/responses/Error"3525 },3526 "409": {3527 "$ref": "#/components/responses/Error"3528 },3529 "429": {3530 "$ref": "#/components/responses/Error"3531 }3532 },3533 "requestBody": {3534 "required": true,3535 "content": {3536 "application/json": {3537 "schema": {3538 "$schema": "https://json-schema.org/draft/2020-12/schema",3539 "type": "object",3540 "properties": {3541 "pageId": {3542 "type": "string",3543 "format": "uuid",3544 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3545 },3546 "contentId": {3547 "default": null,3548 "anyOf": [3549 {3550 "type": "string",3551 "format": "uuid",3552 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3553 },3554 {3555 "type": "null"3556 }3557 ]3558 },3559 "periodStart": {3560 "type": "string",3561 "format": "date-time",3562 "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"3563 },3564 "periodEnd": {3565 "type": "string",3566 "format": "date-time",3567 "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"3568 },3569 "source": {3570 "type": "string",3571 "minLength": 2,3572 "maxLength": 2003573 },3574 "metrics": {3575 "minItems": 1,3576 "maxItems": 20,3577 "type": "array",3578 "items": {3579 "type": "object",3580 "properties": {3581 "metric": {3582 "type": "string",3583 "enum": [3584 "reach",3585 "impressions",3586 "interactions",3587 "reactions",3588 "comments",3589 "shares",3590 "link_clicks",3591 "followers"3592 ]3593 },3594 "value": {3595 "anyOf": [3596 {3597 "type": "number",3598 "minimum": 03599 },3600 {3601 "type": "null"3602 }3603 ]3604 }3605 },3606 "required": [3607 "metric",3608 "value"3609 ],3610 "additionalProperties": false3611 }3612 }3613 },3614 "required": [3615 "pageId",3616 "periodStart",3617 "periodEnd",3618 "source",3619 "metrics"3620 ],3621 "additionalProperties": false3622 }3623 }3624 }3625 }3626 }3627 },3628 "/v1/reports/brand/{id}": {3629 "get": {3630 "summary": "Rapport de marque et comparaison de campagnes",3631 "tags": [3632 "analytics"3633 ],3634 "parameters": [3635 {3636 "name": "id",3637 "in": "path",3638 "required": true,3639 "schema": {3640 "type": "string"3641 }3642 }3643 ],3644 "x-auth": "user",3645 "security": [3646 {3647 "sessionCookie": [],3648 "csrfHeader": []3649 }3650 ],3651 "responses": {3652 "200": {3653 "description": "OK"3654 },3655 "400": {3656 "$ref": "#/components/responses/Error"3657 },3658 "401": {3659 "$ref": "#/components/responses/Error"3660 },3661 "403": {3662 "$ref": "#/components/responses/Error"3663 },3664 "404": {3665 "$ref": "#/components/responses/Error"3666 },3667 "409": {3668 "$ref": "#/components/responses/Error"3669 },3670 "429": {3671 "$ref": "#/components/responses/Error"3672 }3673 }3674 }3675 },3676 "/v1/agents": {3677 "get": {3678 "summary": "Agents, autorité, fournisseurs réellement configurés, dépense du mois",3679 "tags": [3680 "agents"3681 ],3682 "parameters": [],3683 "x-auth": "user",3684 "security": [3685 {3686 "sessionCookie": [],3687 "csrfHeader": []3688 }3689 ],3690 "responses": {3691 "200": {3692 "description": "OK"3693 },3694 "400": {3695 "$ref": "#/components/responses/Error"3696 },3697 "401": {3698 "$ref": "#/components/responses/Error"3699 },3700 "403": {3701 "$ref": "#/components/responses/Error"3702 },3703 "404": {3704 "$ref": "#/components/responses/Error"3705 },3706 "409": {3707 "$ref": "#/components/responses/Error"3708 },3709 "429": {3710 "$ref": "#/components/responses/Error"3711 }3712 }3713 }3714 },3715 "/v1/agents/run": {3716 "post": {3717 "summary": "Lance un agent (résultat = données ; aucune approbation possible)",3718 "tags": [3719 "agents"3720 ],3721 "parameters": [],3722 "x-auth": "user",3723 "security": [3724 {3725 "sessionCookie": [],3726 "csrfHeader": []3727 }3728 ],3729 "responses": {3730 "200": {3731 "description": "OK"3732 },3733 "400": {3734 "$ref": "#/components/responses/Error"3735 },3736 "401": {3737 "$ref": "#/components/responses/Error"3738 },3739 "403": {3740 "$ref": "#/components/responses/Error"3741 },3742 "404": {3743 "$ref": "#/components/responses/Error"3744 },3745 "409": {3746 "$ref": "#/components/responses/Error"3747 },3748 "429": {3749 "$ref": "#/components/responses/Error"3750 }3751 },3752 "requestBody": {3753 "required": true,3754 "content": {3755 "application/json": {3756 "schema": {3757 "$schema": "https://json-schema.org/draft/2020-12/schema",3758 "type": "object",3759 "properties": {3760 "agent": {3761 "type": "string",3762 "enum": [3763 "director",3764 "product",3765 "copywriter",3766 "creative",3767 "fact_checker",3768 "compliance",3769 "publisher",3770 "community",3771 "analytics",3772 "supervisor"3773 ]3774 },3775 "brandId": {3776 "default": null,3777 "anyOf": [3778 {3779 "type": "string",3780 "format": "uuid",3781 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3782 },3783 {3784 "type": "null"3785 }3786 ]3787 },3788 "contentId": {3789 "default": null,3790 "anyOf": [3791 {3792 "type": "string",3793 "format": "uuid",3794 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3795 },3796 {3797 "type": "null"3798 }3799 ]3800 },3801 "commentId": {3802 "default": null,3803 "anyOf": [3804 {3805 "type": "string",3806 "format": "uuid",3807 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3808 },3809 {3810 "type": "null"3811 }3812 ]3813 },3814 "sourceEventId": {3815 "default": null,3816 "anyOf": [3817 {3818 "type": "string",3819 "format": "uuid",3820 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3821 },3822 {3823 "type": "null"3824 }3825 ]3826 },3827 "instruction": {3828 "default": "",3829 "type": "string",3830 "maxLength": 40003831 }3832 },3833 "required": [3834 "agent"3835 ],3836 "additionalProperties": false3837 }3838 }3839 }3840 }3841 }3842 },3843 "/v1/agent-runs": {3844 "get": {3845 "summary": "Historique des exécutions et coûts",3846 "tags": [3847 "agents"3848 ],3849 "parameters": [],3850 "x-auth": "user",3851 "security": [3852 {3853 "sessionCookie": [],3854 "csrfHeader": []3855 }3856 ],3857 "responses": {3858 "200": {3859 "description": "OK"3860 },3861 "400": {3862 "$ref": "#/components/responses/Error"3863 },3864 "401": {3865 "$ref": "#/components/responses/Error"3866 },3867 "403": {3868 "$ref": "#/components/responses/Error"3869 },3870 "404": {3871 "$ref": "#/components/responses/Error"3872 },3873 "409": {3874 "$ref": "#/components/responses/Error"3875 },3876 "429": {3877 "$ref": "#/components/responses/Error"3878 }3879 }3880 }3881 },3882 "/v1/source-events": {3883 "get": {3884 "summary": "Événements sources (releases Git, campagnes…)",3885 "tags": [3886 "sources"3887 ],3888 "parameters": [],3889 "x-auth": "user",3890 "security": [3891 {3892 "sessionCookie": [],3893 "csrfHeader": []3894 }3895 ],3896 "responses": {3897 "200": {3898 "description": "OK"3899 },3900 "400": {3901 "$ref": "#/components/responses/Error"3902 },3903 "401": {3904 "$ref": "#/components/responses/Error"3905 },3906 "403": {3907 "$ref": "#/components/responses/Error"3908 },3909 "404": {3910 "$ref": "#/components/responses/Error"3911 },3912 "409": {3913 "$ref": "#/components/responses/Error"3914 },3915 "429": {3916 "$ref": "#/components/responses/Error"3917 }3918 }3919 },3920 "post": {3921 "summary": "Événement manuel (campagne, donnée produit validée)",3922 "tags": [3923 "sources"3924 ],3925 "parameters": [],3926 "x-auth": "user",3927 "security": [3928 {3929 "sessionCookie": [],3930 "csrfHeader": []3931 }3932 ],3933 "responses": {3934 "200": {3935 "description": "OK"3936 },3937 "400": {3938 "$ref": "#/components/responses/Error"3939 },3940 "401": {3941 "$ref": "#/components/responses/Error"3942 },3943 "403": {3944 "$ref": "#/components/responses/Error"3945 },3946 "404": {3947 "$ref": "#/components/responses/Error"3948 },3949 "409": {3950 "$ref": "#/components/responses/Error"3951 },3952 "429": {3953 "$ref": "#/components/responses/Error"3954 }3955 },3956 "requestBody": {3957 "required": true,3958 "content": {3959 "application/json": {3960 "schema": {3961 "$schema": "https://json-schema.org/draft/2020-12/schema",3962 "type": "object",3963 "properties": {3964 "brandId": {3965 "type": "string",3966 "format": "uuid",3967 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3968 },3969 "kind": {3970 "type": "string",3971 "enum": [3972 "manual_campaign",3973 "calendar",3974 "product_data"3975 ]3976 },3977 "source": {3978 "type": "string",3979 "minLength": 2,3980 "maxLength": 2003981 },3982 "text": {3983 "type": "string",3984 "minLength": 5,3985 "maxLength": 40003986 }3987 },3988 "required": [3989 "brandId",3990 "kind",3991 "source",3992 "text"3993 ],3994 "additionalProperties": false3995 }3996 }3997 }3998 }3999 }4000 },4001 "/v1/source-events/{id}/mark": {4002 "post": {4003 "summary": "Valide comme publiable, ou ignore",4004 "tags": [4005 "sources"4006 ],4007 "parameters": [4008 {4009 "name": "id",4010 "in": "path",4011 "required": true,4012 "schema": {4013 "type": "string"4014 }4015 }4016 ],4017 "x-auth": "user",4018 "security": [4019 {4020 "sessionCookie": [],4021 "csrfHeader": []4022 }4023 ],4024 "responses": {4025 "200": {4026 "description": "OK"4027 },4028 "400": {4029 "$ref": "#/components/responses/Error"4030 },4031 "401": {4032 "$ref": "#/components/responses/Error"4033 },4034 "403": {4035 "$ref": "#/components/responses/Error"4036 },4037 "404": {4038 "$ref": "#/components/responses/Error"4039 },4040 "409": {4041 "$ref": "#/components/responses/Error"4042 },4043 "429": {4044 "$ref": "#/components/responses/Error"4045 }4046 },4047 "requestBody": {4048 "required": true,4049 "content": {4050 "application/json": {4051 "schema": {4052 "$schema": "https://json-schema.org/draft/2020-12/schema",4053 "type": "object",4054 "properties": {4055 "decision": {4056 "type": "string",4057 "enum": [4058 "public_ok",4059 "ignore"4060 ]4061 }4062 },4063 "required": [4064 "decision"4065 ],4066 "additionalProperties": false4067 }4068 }4069 }4070 }4071 }4072 },4073 "/v1/git-sources": {4074 "get": {4075 "summary": "Dépôts associés aux marques",4076 "tags": [4077 "sources"4078 ],4079 "parameters": [],4080 "x-auth": "user",4081 "security": [4082 {4083 "sessionCookie": [],4084 "csrfHeader": []4085 }4086 ],4087 "responses": {4088 "200": {4089 "description": "OK"4090 },4091 "400": {4092 "$ref": "#/components/responses/Error"4093 },4094 "401": {4095 "$ref": "#/components/responses/Error"4096 },4097 "403": {4098 "$ref": "#/components/responses/Error"4099 },4100 "404": {4101 "$ref": "#/components/responses/Error"4102 },4103 "409": {4104 "$ref": "#/components/responses/Error"4105 },4106 "429": {4107 "$ref": "#/components/responses/Error"4108 }4109 }4110 },4111 "post": {4112 "summary": "Associe un dépôt public de la forge à une marque",4113 "tags": [4114 "sources"4115 ],4116 "parameters": [],4117 "x-auth": "user",4118 "x-min-role": "admin",4119 "security": [4120 {4121 "sessionCookie": [],4122 "csrfHeader": []4123 }4124 ],4125 "responses": {4126 "200": {4127 "description": "OK"4128 },4129 "400": {4130 "$ref": "#/components/responses/Error"4131 },4132 "401": {4133 "$ref": "#/components/responses/Error"4134 },4135 "403": {4136 "$ref": "#/components/responses/Error"4137 },4138 "404": {4139 "$ref": "#/components/responses/Error"4140 },4141 "409": {4142 "$ref": "#/components/responses/Error"4143 },4144 "429": {4145 "$ref": "#/components/responses/Error"4146 }4147 },4148 "requestBody": {4149 "required": true,4150 "content": {4151 "application/json": {4152 "schema": {4153 "$schema": "https://json-schema.org/draft/2020-12/schema",4154 "type": "object",4155 "properties": {4156 "brandId": {4157 "type": "string",4158 "format": "uuid",4159 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"4160 },4161 "repo": {4162 "type": "string",4163 "pattern": "^[A-Za-z0-9._-]{1,80}$"4164 }4165 },4166 "required": [4167 "brandId",4168 "repo"4169 ],4170 "additionalProperties": false4171 }4172 }4173 }4174 }4175 }4176 },4177 "/v1/git-sources/{id}": {4178 "delete": {4179 "summary": "Dissocie un dépôt",4180 "tags": [4181 "sources"4182 ],4183 "parameters": [4184 {4185 "name": "id",4186 "in": "path",4187 "required": true,4188 "schema": {4189 "type": "string"4190 }4191 }4192 ],4193 "x-auth": "user",4194 "x-min-role": "admin",4195 "security": [4196 {4197 "sessionCookie": [],4198 "csrfHeader": []4199 }4200 ],4201 "responses": {4202 "200": {4203 "description": "OK"4204 },4205 "400": {4206 "$ref": "#/components/responses/Error"4207 },4208 "401": {4209 "$ref": "#/components/responses/Error"4210 },4211 "403": {4212 "$ref": "#/components/responses/Error"4213 },4214 "404": {4215 "$ref": "#/components/responses/Error"4216 },4217 "409": {4218 "$ref": "#/components/responses/Error"4219 },4220 "429": {4221 "$ref": "#/components/responses/Error"4222 }4223 }4224 }4225 },4226 "/v1/navigator/sessions": {4227 "get": {4228 "summary": "Sessions navigateur et leur état",4229 "tags": [4230 "navigator"4231 ],4232 "parameters": [],4233 "x-auth": "user",4234 "x-min-role": "admin",4235 "security": [4236 {4237 "sessionCookie": [],4238 "csrfHeader": []4239 }4240 ],4241 "responses": {4242 "200": {4243 "description": "OK"4244 },4245 "400": {4246 "$ref": "#/components/responses/Error"4247 },4248 "401": {4249 "$ref": "#/components/responses/Error"4250 },4251 "403": {4252 "$ref": "#/components/responses/Error"4253 },4254 "404": {4255 "$ref": "#/components/responses/Error"4256 },4257 "409": {4258 "$ref": "#/components/responses/Error"4259 },4260 "429": {4261 "$ref": "#/components/responses/Error"4262 }4263 }4264 },4265 "post": {4266 "summary": "Créer session (profil neuf, identifiant opaque)",4267 "tags": [4268 "navigator"4269 ],4270 "parameters": [],4271 "x-auth": "user",4272 "x-min-role": "admin",4273 "security": [4274 {4275 "sessionCookie": [],4276 "csrfHeader": []4277 }4278 ],4279 "responses": {4280 "200": {4281 "description": "OK"4282 },4283 "400": {4284 "$ref": "#/components/responses/Error"4285 },4286 "401": {4287 "$ref": "#/components/responses/Error"4288 },4289 "403": {4290 "$ref": "#/components/responses/Error"4291 },4292 "404": {4293 "$ref": "#/components/responses/Error"4294 },4295 "409": {4296 "$ref": "#/components/responses/Error"4297 },4298 "429": {4299 "$ref": "#/components/responses/Error"4300 }4301 },4302 "requestBody": {4303 "required": true,4304 "content": {4305 "application/json": {4306 "schema": {4307 "$schema": "https://json-schema.org/draft/2020-12/schema",4308 "type": "object",4309 "properties": {4310 "label": {4311 "type": "string",4312 "minLength": 1,4313 "maxLength": 804314 },4315 "workerId": {4316 "type": "string",4317 "format": "uuid",4318 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"4319 },4320 "startUrl": {4321 "type": "string",4322 "maxLength": 500,4323 "format": "uri"4324 }4325 },4326 "required": [4327 "label",4328 "workerId"4329 ],4330 "additionalProperties": false4331 }4332 }4333 }4334 }4335 }4336 },4337 "/v1/navigator/sessions/{id}/takeover": {4338 "post": {4339 "summary": "Contrôle manuel (interrompt immédiatement tout agent)",4340 "tags": [4341 "navigator"4342 ],4343 "parameters": [4344 {4345 "name": "id",4346 "in": "path",4347 "required": true,4348 "schema": {4349 "type": "string"4350 }4351 }4352 ],4353 "x-auth": "user",4354 "x-min-role": "admin",4355 "security": [4356 {4357 "sessionCookie": [],4358 "csrfHeader": []4359 }4360 ],4361 "responses": {4362 "200": {4363 "description": "OK"4364 },4365 "400": {4366 "$ref": "#/components/responses/Error"4367 },4368 "401": {4369 "$ref": "#/components/responses/Error"4370 },4371 "403": {4372 "$ref": "#/components/responses/Error"4373 },4374 "404": {4375 "$ref": "#/components/responses/Error"4376 },4377 "409": {4378 "$ref": "#/components/responses/Error"4379 },4380 "429": {4381 "$ref": "#/components/responses/Error"4382 }4383 },4384 "requestBody": {4385 "required": true,4386 "content": {4387 "application/json": {4388 "schema": {4389 "$schema": "https://json-schema.org/draft/2020-12/schema",4390 "type": "object",4391 "properties": {},4392 "additionalProperties": false4393 }4394 }4395 }4396 }4397 }4398 },4399 "/v1/navigator/sessions/{id}/release": {4400 "post": {4401 "summary": "Libérer contrôle",4402 "tags": [4403 "navigator"4404 ],4405 "parameters": [4406 {4407 "name": "id",4408 "in": "path",4409 "required": true,4410 "schema": {4411 "type": "string"4412 }4413 }4414 ],4415 "x-auth": "user",4416 "x-min-role": "admin",4417 "security": [4418 {4419 "sessionCookie": [],4420 "csrfHeader": []4421 }4422 ],4423 "responses": {4424 "200": {4425 "description": "OK"4426 },4427 "400": {4428 "$ref": "#/components/responses/Error"4429 },4430 "401": {4431 "$ref": "#/components/responses/Error"4432 },4433 "403": {4434 "$ref": "#/components/responses/Error"4435 },4436 "404": {4437 "$ref": "#/components/responses/Error"4438 },4439 "409": {4440 "$ref": "#/components/responses/Error"4441 },4442 "429": {4443 "$ref": "#/components/responses/Error"4444 }4445 },4446 "requestBody": {4447 "required": true,4448 "content": {4449 "application/json": {4450 "schema": {4451 "$schema": "https://json-schema.org/draft/2020-12/schema",4452 "type": "object",4453 "properties": {},4454 "additionalProperties": false4455 }4456 }4457 }4458 }4459 }4460 },4461 "/v1/navigator/sessions/{id}/confirm": {4462 "post": {4463 "summary": "Confirmer la session connectée et les pages autorisées",4464 "tags": [4465 "navigator"4466 ],4467 "parameters": [4468 {4469 "name": "id",4470 "in": "path",4471 "required": true,4472 "schema": {4473 "type": "string"4474 }4475 }4476 ],4477 "x-auth": "user",4478 "x-min-role": "admin",4479 "security": [4480 {4481 "sessionCookie": [],4482 "csrfHeader": []4483 }4484 ],4485 "responses": {4486 "200": {4487 "description": "OK"4488 },4489 "400": {4490 "$ref": "#/components/responses/Error"4491 },4492 "401": {4493 "$ref": "#/components/responses/Error"4494 },4495 "403": {4496 "$ref": "#/components/responses/Error"4497 },4498 "404": {4499 "$ref": "#/components/responses/Error"4500 },4501 "409": {4502 "$ref": "#/components/responses/Error"4503 },4504 "429": {4505 "$ref": "#/components/responses/Error"4506 }4507 },4508 "requestBody": {4509 "required": true,4510 "content": {4511 "application/json": {4512 "schema": {4513 "$schema": "https://json-schema.org/draft/2020-12/schema",4514 "type": "object",4515 "properties": {4516 "pageIds": {4517 "minItems": 1,4518 "maxItems": 20,4519 "type": "array",4520 "items": {4521 "type": "string",4522 "format": "uuid",4523 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"4524 }4525 },4526 "attest": {4527 "type": "boolean",4528 "const": true4529 }4530 },4531 "required": [4532 "pageIds",4533 "attest"4534 ],4535 "additionalProperties": false4536 }4537 }4538 }4539 }4540 }4541 },4542 "/v1/navigator/sessions/{id}/pause": {4543 "post": {4544 "summary": "Suspendre",4545 "tags": [4546 "navigator"4547 ],4548 "parameters": [4549 {4550 "name": "id",4551 "in": "path",4552 "required": true,4553 "schema": {4554 "type": "string"4555 }4556 }4557 ],4558 "x-auth": "user",4559 "x-min-role": "admin",4560 "security": [4561 {4562 "sessionCookie": [],4563 "csrfHeader": []4564 }4565 ],4566 "responses": {4567 "200": {4568 "description": "OK"4569 },4570 "400": {4571 "$ref": "#/components/responses/Error"4572 },4573 "401": {4574 "$ref": "#/components/responses/Error"4575 },4576 "403": {4577 "$ref": "#/components/responses/Error"4578 },4579 "404": {4580 "$ref": "#/components/responses/Error"4581 },4582 "409": {4583 "$ref": "#/components/responses/Error"4584 },4585 "429": {4586 "$ref": "#/components/responses/Error"4587 }4588 },4589 "requestBody": {4590 "required": true,4591 "content": {4592 "application/json": {4593 "schema": {4594 "$schema": "https://json-schema.org/draft/2020-12/schema",4595 "type": "object",4596 "properties": {},4597 "additionalProperties": false4598 }4599 }4600 }4601 }4602 }4603 },4604 "/v1/navigator/sessions/{id}/close": {4605 "post": {4606 "summary": "Fermer le navigateur (le profil reste sur le worker)",4607 "tags": [4608 "navigator"4609 ],4610 "parameters": [4611 {4612 "name": "id",4613 "in": "path",4614 "required": true,4615 "schema": {4616 "type": "string"4617 }4618 }4619 ],4620 "x-auth": "user",4621 "x-min-role": "admin",4622 "security": [4623 {4624 "sessionCookie": [],4625 "csrfHeader": []4626 }4627 ],4628 "responses": {4629 "200": {4630 "description": "OK"4631 },4632 "400": {4633 "$ref": "#/components/responses/Error"4634 },4635 "401": {4636 "$ref": "#/components/responses/Error"4637 },4638 "403": {4639 "$ref": "#/components/responses/Error"4640 },4641 "404": {4642 "$ref": "#/components/responses/Error"4643 },4644 "409": {4645 "$ref": "#/components/responses/Error"4646 },4647 "429": {4648 "$ref": "#/components/responses/Error"4649 }4650 },4651 "requestBody": {4652 "required": true,4653 "content": {4654 "application/json": {4655 "schema": {4656 "$schema": "https://json-schema.org/draft/2020-12/schema",4657 "type": "object",4658 "properties": {},4659 "additionalProperties": false4660 }4661 }4662 }4663 }4664 }4665 },4666 "/v1/navigator/sessions/{id}/resume": {4667 "post": {4668 "summary": "Reprendre / rouvrir",4669 "tags": [4670 "navigator"4671 ],4672 "parameters": [4673 {4674 "name": "id",4675 "in": "path",4676 "required": true,4677 "schema": {4678 "type": "string"4679 }4680 }4681 ],4682 "x-auth": "user",4683 "x-min-role": "admin",4684 "security": [4685 {4686 "sessionCookie": [],4687 "csrfHeader": []4688 }4689 ],4690 "responses": {4691 "200": {4692 "description": "OK"4693 },4694 "400": {4695 "$ref": "#/components/responses/Error"4696 },4697 "401": {4698 "$ref": "#/components/responses/Error"4699 },4700 "403": {4701 "$ref": "#/components/responses/Error"4702 },4703 "404": {4704 "$ref": "#/components/responses/Error"4705 },4706 "409": {4707 "$ref": "#/components/responses/Error"4708 },4709 "429": {4710 "$ref": "#/components/responses/Error"4711 }4712 },4713 "requestBody": {4714 "required": true,4715 "content": {4716 "application/json": {4717 "schema": {4718 "$schema": "https://json-schema.org/draft/2020-12/schema",4719 "type": "object",4720 "properties": {},4721 "additionalProperties": false4722 }4723 }4724 }4725 }4726 }4727 },4728 "/v1/navigator/sessions/{id}/revoke": {4729 "post": {4730 "summary": "Révoquer (ferme le navigateur, efface le profil local ; déconnectez aussi la session depuis Facebook)",4731 "tags": [4732 "navigator"4733 ],4734 "parameters": [4735 {4736 "name": "id",4737 "in": "path",4738 "required": true,4739 "schema": {4740 "type": "string"4741 }4742 }4743 ],4744 "x-auth": "user",4745 "x-min-role": "admin",4746 "security": [4747 {4748 "sessionCookie": [],4749 "csrfHeader": []4750 }4751 ],4752 "responses": {4753 "200": {4754 "description": "OK"4755 },4756 "400": {4757 "$ref": "#/components/responses/Error"4758 },4759 "401": {4760 "$ref": "#/components/responses/Error"4761 },4762 "403": {4763 "$ref": "#/components/responses/Error"4764 },4765 "404": {4766 "$ref": "#/components/responses/Error"4767 },4768 "409": {4769 "$ref": "#/components/responses/Error"4770 },4771 "429": {4772 "$ref": "#/components/responses/Error"4773 }4774 },4775 "requestBody": {4776 "required": true,4777 "content": {4778 "application/json": {4779 "schema": {4780 "$schema": "https://json-schema.org/draft/2020-12/schema",4781 "type": "object",4782 "properties": {},4783 "additionalProperties": false4784 }4785 }4786 }4787 }4788 }4789 },4790 "/v1/navigator/sessions/{id}/assist": {4791 "get": {4792 "summary": "Publications à faire à la main dans cette session",4793 "tags": [4794 "navigator"4795 ],4796 "parameters": [4797 {4798 "name": "id",4799 "in": "path",4800 "required": true,4801 "schema": {4802 "type": "string"4803 }4804 }4805 ],4806 "x-auth": "user",4807 "x-min-role": "admin",4808 "security": [4809 {4810 "sessionCookie": [],4811 "csrfHeader": []4812 }4813 ],4814 "responses": {4815 "200": {4816 "description": "OK"4817 },4818 "400": {4819 "$ref": "#/components/responses/Error"4820 },4821 "401": {4822 "$ref": "#/components/responses/Error"4823 },4824 "403": {4825 "$ref": "#/components/responses/Error"4826 },4827 "404": {4828 "$ref": "#/components/responses/Error"4829 },4830 "409": {4831 "$ref": "#/components/responses/Error"4832 },4833 "429": {4834 "$ref": "#/components/responses/Error"4835 }4836 }4837 }4838 },4839 "/v1/workers": {4840 "get": {4841 "summary": "Workers et santé",4842 "tags": [4843 "workers"4844 ],4845 "parameters": [],4846 "x-auth": "user",4847 "x-min-role": "admin",4848 "security": [4849 {4850 "sessionCookie": [],4851 "csrfHeader": []4852 }4853 ],4854 "responses": {4855 "200": {4856 "description": "OK"4857 },4858 "400": {4859 "$ref": "#/components/responses/Error"4860 },4861 "401": {4862 "$ref": "#/components/responses/Error"4863 },4864 "403": {4865 "$ref": "#/components/responses/Error"4866 },4867 "404": {4868 "$ref": "#/components/responses/Error"4869 },4870 "409": {4871 "$ref": "#/components/responses/Error"4872 },4873 "429": {4874 "$ref": "#/components/responses/Error"4875 }4876 }4877 },4878 "post": {4879 "summary": "Enregistre un worker ; le jeton n’est montré qu’une fois",4880 "tags": [4881 "workers"4882 ],4883 "parameters": [],4884 "x-auth": "user",4885 "x-min-role": "owner",4886 "security": [4887 {4888 "sessionCookie": [],4889 "csrfHeader": []4890 }4891 ],4892 "responses": {4893 "200": {4894 "description": "OK"4895 },4896 "400": {4897 "$ref": "#/components/responses/Error"4898 },4899 "401": {4900 "$ref": "#/components/responses/Error"4901 },4902 "403": {4903 "$ref": "#/components/responses/Error"4904 },4905 "404": {4906 "$ref": "#/components/responses/Error"4907 },4908 "409": {4909 "$ref": "#/components/responses/Error"4910 },4911 "429": {4912 "$ref": "#/components/responses/Error"4913 }4914 },4915 "requestBody": {4916 "required": true,4917 "content": {4918 "application/json": {4919 "schema": {4920 "$schema": "https://json-schema.org/draft/2020-12/schema",4921 "type": "object",4922 "properties": {4923 "name": {4924 "type": "string",4925 "pattern": "^[A-Za-z0-9._-]{2,40}$"4926 },4927 "host": {4928 "default": "",4929 "type": "string",4930 "maxLength": 804931 }4932 },4933 "required": [4934 "name"4935 ],4936 "additionalProperties": false4937 }4938 }4939 }4940 }4941 }4942 },4943 "/v1/workers/{id}/disable": {4944 "post": {4945 "summary": "Désactive un worker",4946 "tags": [4947 "workers"4948 ],4949 "parameters": [4950 {4951 "name": "id",4952 "in": "path",4953 "required": true,4954 "schema": {4955 "type": "string"4956 }4957 }4958 ],4959 "x-auth": "user",4960 "x-min-role": "owner",4961 "security": [4962 {4963 "sessionCookie": [],4964 "csrfHeader": []4965 }4966 ],4967 "responses": {4968 "200": {4969 "description": "OK"4970 },4971 "400": {4972 "$ref": "#/components/responses/Error"4973 },4974 "401": {4975 "$ref": "#/components/responses/Error"4976 },4977 "403": {4978 "$ref": "#/components/responses/Error"4979 },4980 "404": {4981 "$ref": "#/components/responses/Error"4982 },4983 "409": {4984 "$ref": "#/components/responses/Error"4985 },4986 "429": {4987 "$ref": "#/components/responses/Error"4988 }4989 },4990 "requestBody": {4991 "required": true,4992 "content": {4993 "application/json": {4994 "schema": {4995 "$schema": "https://json-schema.org/draft/2020-12/schema",4996 "type": "object",4997 "properties": {},4998 "additionalProperties": false4999 }5000 }5001 }5002 }5003 }5004 },5005 "/v1/workers/heartbeat": {5006 "post": {5007 "summary": "Santé worker (jeton worker, boucle locale seulement)",5008 "tags": [5009 "workers"5010 ],5011 "parameters": [],5012 "x-auth": "worker",5013 "security": [5014 {5015 "workerToken": []5016 }5017 ],5018 "responses": {5019 "200": {5020 "description": "OK"5021 },5022 "400": {5023 "$ref": "#/components/responses/Error"5024 },5025 "401": {5026 "$ref": "#/components/responses/Error"5027 },5028 "403": {5029 "$ref": "#/components/responses/Error"5030 },5031 "404": {5032 "$ref": "#/components/responses/Error"5033 },5034 "409": {5035 "$ref": "#/components/responses/Error"5036 },5037 "429": {5038 "$ref": "#/components/responses/Error"5039 }5040 },5041 "requestBody": {5042 "required": true,5043 "content": {5044 "application/json": {5045 "schema": {5046 "$schema": "https://json-schema.org/draft/2020-12/schema",5047 "type": "object",5048 "properties": {5049 "sessions": {5050 "default": [],5051 "maxItems": 50,5052 "type": "array",5053 "items": {5054 "type": "object",5055 "properties": {5056 "sessionId": {5057 "type": "string",5058 "format": "uuid",5059 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"5060 },5061 "observed": {5062 "type": "string",5063 "enum": [5064 "running",5065 "stopped",5066 "login_required",5067 "security_challenge",5068 "ok"5069 ]5070 },5071 "url": {5072 "type": "string",5073 "maxLength": 20005074 }5075 },5076 "required": [5077 "sessionId",5078 "observed"5079 ],5080 "additionalProperties": false5081 }5082 },5083 "info": {5084 "type": "object",5085 "properties": {5086 "version": {5087 "type": "string",5088 "maxLength": 405089 },5090 "headed": {5091 "type": "boolean"5092 },5093 "freeDiskGb": {5094 "type": "number"5095 },5096 "axPermission": {5097 "type": "boolean"5098 },5099 "screenPermission": {5100 "type": "boolean"5101 }5102 },5103 "required": [5104 "version",5105 "headed"5106 ],5107 "additionalProperties": false5108 }5109 },5110 "required": [5111 "info"5112 ],5113 "additionalProperties": false5114 }5115 }5116 }5117 }5118 }5119 },5120 "/v1/emergency-stop": {5121 "post": {5122 "summary": "Arrêt global (engager : tout administrateur ; lever : propriétaire)",5123 "tags": [5124 "safety"5125 ],5126 "parameters": [],5127 "x-auth": "user",5128 "x-min-role": "admin",5129 "security": [5130 {5131 "sessionCookie": [],5132 "csrfHeader": []5133 }5134 ],5135 "responses": {5136 "200": {5137 "description": "OK"5138 },5139 "400": {5140 "$ref": "#/components/responses/Error"5141 },5142 "401": {5143 "$ref": "#/components/responses/Error"5144 },5145 "403": {5146 "$ref": "#/components/responses/Error"5147 },5148 "404": {5149 "$ref": "#/components/responses/Error"5150 },5151 "409": {5152 "$ref": "#/components/responses/Error"5153 },5154 "429": {5155 "$ref": "#/components/responses/Error"5156 }5157 },5158 "requestBody": {5159 "required": true,5160 "content": {5161 "application/json": {5162 "schema": {5163 "$schema": "https://json-schema.org/draft/2020-12/schema",5164 "type": "object",5165 "properties": {5166 "engage": {5167 "type": "boolean"5168 },5169 "reason": {5170 "type": "string",5171 "minLength": 3,5172 "maxLength": 5005173 }5174 },5175 "required": [5176 "engage",5177 "reason"5178 ],5179 "additionalProperties": false5180 }5181 }5182 }5183 }5184 }5185 },5186 "/v1/overview": {5187 "get": {5188 "summary": "Tableau de bord (comptes réels)",5189 "tags": [5190 "ops"5191 ],5192 "parameters": [],5193 "x-auth": "user",5194 "security": [5195 {5196 "sessionCookie": [],5197 "csrfHeader": []5198 }5199 ],5200 "responses": {5201 "200": {5202 "description": "OK"5203 },5204 "400": {5205 "$ref": "#/components/responses/Error"5206 },5207 "401": {5208 "$ref": "#/components/responses/Error"5209 },5210 "403": {5211 "$ref": "#/components/responses/Error"5212 },5213 "404": {5214 "$ref": "#/components/responses/Error"5215 },5216 "409": {5217 "$ref": "#/components/responses/Error"5218 },5219 "429": {5220 "$ref": "#/components/responses/Error"5221 }5222 }5223 }5224 },5225 "/v1/alerts": {5226 "get": {5227 "summary": "Alertes",5228 "tags": [5229 "ops"5230 ],5231 "parameters": [],5232 "x-auth": "user",5233 "security": [5234 {5235 "sessionCookie": [],5236 "csrfHeader": []5237 }5238 ],5239 "responses": {5240 "200": {5241 "description": "OK"5242 },5243 "400": {5244 "$ref": "#/components/responses/Error"5245 },5246 "401": {5247 "$ref": "#/components/responses/Error"5248 },5249 "403": {5250 "$ref": "#/components/responses/Error"5251 },5252 "404": {5253 "$ref": "#/components/responses/Error"5254 },5255 "409": {5256 "$ref": "#/components/responses/Error"5257 },5258 "429": {5259 "$ref": "#/components/responses/Error"5260 }5261 }5262 }5263 },5264 "/v1/alerts/{id}/ack": {5265 "post": {5266 "summary": "Prend acte d’une alerte",5267 "tags": [5268 "ops"5269 ],5270 "parameters": [5271 {5272 "name": "id",5273 "in": "path",5274 "required": true,5275 "schema": {5276 "type": "string"5277 }5278 }5279 ],5280 "x-auth": "user",5281 "x-min-role": "admin",5282 "security": [5283 {5284 "sessionCookie": [],5285 "csrfHeader": []5286 }5287 ],5288 "responses": {5289 "200": {5290 "description": "OK"5291 },5292 "400": {5293 "$ref": "#/components/responses/Error"5294 },5295 "401": {5296 "$ref": "#/components/responses/Error"5297 },5298 "403": {5299 "$ref": "#/components/responses/Error"5300 },5301 "404": {5302 "$ref": "#/components/responses/Error"5303 },5304 "409": {5305 "$ref": "#/components/responses/Error"5306 },5307 "429": {5308 "$ref": "#/components/responses/Error"5309 }5310 },5311 "requestBody": {5312 "required": true,5313 "content": {5314 "application/json": {5315 "schema": {5316 "$schema": "https://json-schema.org/draft/2020-12/schema",5317 "type": "object",5318 "properties": {},5319 "additionalProperties": false5320 }5321 }5322 }5323 }5324 }5325 },5326 "/v1/audit": {5327 "get": {5328 "summary": "Journal d’audit (ajout seulement)",5329 "tags": [5330 "ops"5331 ],5332 "parameters": [],5333 "x-auth": "user",5334 "x-min-role": "admin",5335 "security": [5336 {5337 "sessionCookie": [],5338 "csrfHeader": []5339 }5340 ],5341 "responses": {5342 "200": {5343 "description": "OK"5344 },5345 "400": {5346 "$ref": "#/components/responses/Error"5347 },5348 "401": {5349 "$ref": "#/components/responses/Error"5350 },5351 "403": {5352 "$ref": "#/components/responses/Error"5353 },5354 "404": {5355 "$ref": "#/components/responses/Error"5356 },5357 "409": {5358 "$ref": "#/components/responses/Error"5359 },5360 "429": {5361 "$ref": "#/components/responses/Error"5362 }5363 }5364 }5365 },5366 "/v1/audit/verify": {5367 "get": {5368 "summary": "Vérifie la chaîne de hachage du journal",5369 "tags": [5370 "ops"5371 ],5372 "parameters": [],5373 "x-auth": "user",5374 "x-min-role": "admin",5375 "security": [5376 {5377 "sessionCookie": [],5378 "csrfHeader": []5379 }5380 ],5381 "responses": {5382 "200": {5383 "description": "OK"5384 },5385 "400": {5386 "$ref": "#/components/responses/Error"5387 },5388 "401": {5389 "$ref": "#/components/responses/Error"5390 },5391 "403": {5392 "$ref": "#/components/responses/Error"5393 },5394 "404": {5395 "$ref": "#/components/responses/Error"5396 },5397 "409": {5398 "$ref": "#/components/responses/Error"5399 },5400 "429": {5401 "$ref": "#/components/responses/Error"5402 }5403 }5404 }5405 },5406 "/v1/policy": {5407 "get": {5408 "summary": "Politique active et historique",5409 "tags": [5410 "safety"5411 ],5412 "parameters": [],5413 "x-auth": "user",5414 "x-min-role": "admin",5415 "security": [5416 {5417 "sessionCookie": [],5418 "csrfHeader": []5419 }5420 ],5421 "responses": {5422 "200": {5423 "description": "OK"5424 },5425 "400": {5426 "$ref": "#/components/responses/Error"5427 },5428 "401": {5429 "$ref": "#/components/responses/Error"5430 },5431 "403": {5432 "$ref": "#/components/responses/Error"5433 },5434 "404": {5435 "$ref": "#/components/responses/Error"5436 },5437 "409": {5438 "$ref": "#/components/responses/Error"5439 },5440 "429": {5441 "$ref": "#/components/responses/Error"5442 }5443 }5444 },5445 "post": {5446 "summary": "Active une nouvelle version de politique (propriétaire humain, justification écrite)",5447 "tags": [5448 "safety"5449 ],5450 "parameters": [],5451 "x-auth": "user",5452 "x-min-role": "owner",5453 "security": [5454 {5455 "sessionCookie": [],5456 "csrfHeader": []5457 }5458 ],5459 "responses": {5460 "200": {5461 "description": "OK"5462 },5463 "400": {5464 "$ref": "#/components/responses/Error"5465 },5466 "401": {5467 "$ref": "#/components/responses/Error"5468 },5469 "403": {5470 "$ref": "#/components/responses/Error"5471 },5472 "404": {5473 "$ref": "#/components/responses/Error"5474 },5475 "409": {5476 "$ref": "#/components/responses/Error"5477 },5478 "429": {5479 "$ref": "#/components/responses/Error"5480 }5481 },5482 "requestBody": {5483 "required": true,5484 "content": {5485 "application/json": {5486 "schema": {5487 "$schema": "https://json-schema.org/draft/2020-12/schema",5488 "type": "object",5489 "properties": {5490 "document": {},5491 "note": {5492 "type": "string",5493 "minLength": 10,5494 "maxLength": 20005495 }5496 },5497 "required": [5498 "document",5499 "note"5500 ],5501 "additionalProperties": false5502 }5503 }5504 }5505 }5506 }5507 },5508 "/v1/recipes": {5509 "get": {5510 "summary": "Recettes et versions",5511 "tags": [5512 "recipes"5513 ],5514 "parameters": [],5515 "x-auth": "user",5516 "x-min-role": "admin",5517 "security": [5518 {5519 "sessionCookie": [],5520 "csrfHeader": []5521 }5522 ],5523 "responses": {5524 "200": {5525 "description": "OK"5526 },5527 "400": {5528 "$ref": "#/components/responses/Error"5529 },5530 "401": {5531 "$ref": "#/components/responses/Error"5532 },5533 "403": {5534 "$ref": "#/components/responses/Error"5535 },5536 "404": {5537 "$ref": "#/components/responses/Error"5538 },5539 "409": {5540 "$ref": "#/components/responses/Error"5541 },5542 "429": {5543 "$ref": "#/components/responses/Error"5544 }5545 }5546 }5547 },5548 "/v1/recipe-versions/{id}": {5549 "get": {5550 "summary": "Définition d’une version",5551 "tags": [5552 "recipes"5553 ],5554 "parameters": [5555 {5556 "name": "id",5557 "in": "path",5558 "required": true,5559 "schema": {5560 "type": "string"5561 }5562 }5563 ],5564 "x-auth": "user",5565 "x-min-role": "admin",5566 "security": [5567 {5568 "sessionCookie": [],5569 "csrfHeader": []5570 }5571 ],5572 "responses": {5573 "200": {5574 "description": "OK"5575 },5576 "400": {5577 "$ref": "#/components/responses/Error"5578 },5579 "401": {5580 "$ref": "#/components/responses/Error"5581 },5582 "403": {5583 "$ref": "#/components/responses/Error"5584 },5585 "404": {5586 "$ref": "#/components/responses/Error"5587 },5588 "409": {5589 "$ref": "#/components/responses/Error"5590 },5591 "429": {5592 "$ref": "#/components/responses/Error"5593 }5594 }5595 }5596 },5597 "/v1/recipes/{id}/versions": {5598 "post": {5599 "summary": "Nouvelle version en brouillon (validation structurelle stricte)",5600 "tags": [5601 "recipes"5602 ],5603 "parameters": [5604 {5605 "name": "id",5606 "in": "path",5607 "required": true,5608 "schema": {5609 "type": "string"5610 }5611 }5612 ],5613 "x-auth": "user",5614 "x-min-role": "admin",5615 "security": [5616 {5617 "sessionCookie": [],5618 "csrfHeader": []5619 }5620 ],5621 "responses": {5622 "200": {5623 "description": "OK"5624 },5625 "400": {5626 "$ref": "#/components/responses/Error"5627 },5628 "401": {5629 "$ref": "#/components/responses/Error"5630 },5631 "403": {5632 "$ref": "#/components/responses/Error"5633 },5634 "404": {5635 "$ref": "#/components/responses/Error"5636 },5637 "409": {5638 "$ref": "#/components/responses/Error"5639 },5640 "429": {5641 "$ref": "#/components/responses/Error"5642 }5643 },5644 "requestBody": {5645 "required": true,5646 "content": {5647 "application/json": {5648 "schema": {5649 "$schema": "https://json-schema.org/draft/2020-12/schema",5650 "type": "object",5651 "properties": {5652 "definition": {},5653 "origin": {5654 "default": "human",5655 "type": "string",5656 "enum": [5657 "human",5658 "vision_proposal"5659 ]5660 }5661 },5662 "required": [5663 "definition"5664 ],5665 "additionalProperties": false5666 }5667 }5668 }5669 }5670 }5671 },5672 "/v1/recipe-versions/{id}/validate": {5673 "post": {5674 "summary": "Valide une version (humain) ; retire la précédente",5675 "tags": [5676 "recipes"5677 ],5678 "parameters": [5679 {5680 "name": "id",5681 "in": "path",5682 "required": true,5683 "schema": {5684 "type": "string"5685 }5686 }5687 ],5688 "x-auth": "user",5689 "x-min-role": "admin",5690 "security": [5691 {5692 "sessionCookie": [],5693 "csrfHeader": []5694 }5695 ],5696 "responses": {5697 "200": {5698 "description": "OK"5699 },5700 "400": {5701 "$ref": "#/components/responses/Error"5702 },5703 "401": {5704 "$ref": "#/components/responses/Error"5705 },5706 "403": {5707 "$ref": "#/components/responses/Error"5708 },5709 "404": {5710 "$ref": "#/components/responses/Error"5711 },5712 "409": {5713 "$ref": "#/components/responses/Error"5714 },5715 "429": {5716 "$ref": "#/components/responses/Error"5717 }5718 },5719 "requestBody": {5720 "required": true,5721 "content": {5722 "application/json": {5723 "schema": {5724 "$schema": "https://json-schema.org/draft/2020-12/schema",5725 "type": "object",5726 "properties": {5727 "attest": {5728 "type": "boolean",5729 "const": true5730 }5731 },5732 "required": [5733 "attest"5734 ],5735 "additionalProperties": false5736 }5737 }5738 }5739 }5740 }5741 }5742 },5743 "components": {5744 "securitySchemes": {5745 "sessionCookie": {5746 "type": "apiKey",5747 "in": "cookie",5748 "name": "__Host-mls"5749 },5750 "csrfHeader": {5751 "type": "apiKey",5752 "in": "header",5753 "name": "x-csrf"5754 },5755 "workerToken": {5756 "type": "http",5757 "scheme": "bearer"5758 },5759 "serviceToken": {5760 "type": "http",5761 "scheme": "bearer"5762 }5763 },5764 "responses": {5765 "Error": {5766 "description": "Erreur structurée",5767 "content": {5768 "application/json": {5769 "schema": {5770 "type": "object",5771 "required": [5772 "error"5773 ],5774 "properties": {5775 "error": {5776 "type": "object",5777 "required": [5778 "code",5779 "message"5780 ],5781 "properties": {5782 "code": {5783 "type": "string"5784 },5785 "message": {5786 "type": "string"5787 },5788 "correlationId": {5789 "type": "string"5790 },5791 "details": {}5792 }5793 }5794 }5795 }5796 }5797 }5798 }5799 }5800 }5801}5802