@hgdc/docs 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/package.json +1 -1
  2. package/src/integration.ts +8 -1
  3. package/src/overrides/ThemeToggle.astro +6 -6
  4. package/src/styles/theme.css +36 -5
  5. package/template/.astro/content-modules.mjs +15 -35
  6. package/template/.build/.well-known/llms.txt +34 -51
  7. package/template/.build/404.html +4 -4
  8. package/template/.build/_astro/Search.astro_astro_type_script_index_0_lang.VKDD8r2I.js +1 -0
  9. package/template/.build/_astro/common.BoKrWC_6.css +3 -0
  10. package/template/.build/_astro/logo-clair.BqNh6JNi.svg +1 -0
  11. package/template/.build/_astro/logo-sombre.BkgsFXxh.svg +1 -0
  12. package/template/.build/_hgdc/corpus.json +1 -1
  13. package/template/.build/demarrer/premiere-doc/index.html +25 -0
  14. package/template/.build/demarrer/premiere-doc.md +65 -0
  15. package/template/.build/explications/donnees/index.html +55 -0
  16. package/template/.build/explications/donnees.md +28 -0
  17. package/template/.build/explications/fonctionnement/index.html +33 -0
  18. package/template/.build/explications/fonctionnement.md +32 -0
  19. package/template/.build/guides/agents/index.html +59 -0
  20. package/template/.build/guides/agents.md +54 -0
  21. package/template/.build/guides/assistant/index.html +60 -0
  22. package/template/.build/guides/assistant.md +46 -0
  23. package/template/.build/guides/composants/index.html +38 -0
  24. package/template/.build/guides/composants.md +103 -0
  25. package/template/.build/guides/ecrire/index.html +56 -0
  26. package/template/.build/guides/ecrire.md +63 -0
  27. package/template/.build/guides/elements/index.html +1 -0
  28. package/template/.build/guides/navigation/index.html +30 -0
  29. package/template/.build/guides/navigation.md +63 -0
  30. package/template/.build/guides/publier/index.html +27 -0
  31. package/template/.build/guides/publier.md +65 -0
  32. package/template/.build/guides/theme/index.html +27 -0
  33. package/template/.build/guides/theme.md +33 -0
  34. package/template/.build/images/favicon.svg +1 -0
  35. package/template/.build/images/logo-clair.svg +1 -0
  36. package/template/.build/images/logo-sombre.svg +1 -0
  37. package/template/.build/index.html +14 -18
  38. package/template/.build/index.md +21 -59
  39. package/template/.build/llms-full.txt +515 -2331
  40. package/template/.build/llms.txt +34 -51
  41. package/template/.build/pagefind/fragment/fr-ch_1aa5706.pf_fragment +0 -0
  42. package/template/.build/pagefind/fragment/fr-ch_21308c9.pf_fragment +0 -0
  43. package/template/.build/pagefind/fragment/fr-ch_256be83.pf_fragment +0 -0
  44. package/template/.build/pagefind/fragment/fr-ch_3786e05.pf_fragment +0 -0
  45. package/template/.build/pagefind/fragment/fr-ch_3e2d7bf.pf_fragment +0 -0
  46. package/template/.build/pagefind/fragment/fr-ch_53e6d95.pf_fragment +0 -0
  47. package/template/.build/pagefind/fragment/fr-ch_7011e1a.pf_fragment +0 -0
  48. package/template/.build/pagefind/fragment/fr-ch_7252d5b.pf_fragment +0 -0
  49. package/template/.build/pagefind/fragment/fr-ch_8a5f581.pf_fragment +0 -0
  50. package/template/.build/pagefind/fragment/fr-ch_9221692.pf_fragment +0 -0
  51. package/template/.build/pagefind/fragment/fr-ch_a4b68e2.pf_fragment +0 -0
  52. package/template/.build/pagefind/fragment/fr-ch_d4ef5e9.pf_fragment +0 -0
  53. package/template/.build/pagefind/fragment/fr-ch_edaf413.pf_fragment +0 -0
  54. package/template/.build/pagefind/fragment/fr-ch_f017e56.pf_fragment +0 -0
  55. package/template/.build/pagefind/fragment/fr-ch_fe71cc1.pf_fragment +0 -0
  56. package/template/.build/pagefind/index/fr-ch_481c81a.pf_index +0 -0
  57. package/template/.build/pagefind/pagefind-entry.json +1 -1
  58. package/template/.build/pagefind/pagefind.fr-ch_46a632d8eba7e.pf_meta +0 -0
  59. package/template/.build/reference/api-assistant/index.html +102 -0
  60. package/template/.build/reference/api-assistant.md +60 -0
  61. package/template/.build/reference/cli/index.html +11 -153
  62. package/template/.build/reference/cli.md +23 -159
  63. package/template/.build/reference/docs-json/index.html +157 -0
  64. package/template/.build/reference/docs-json.md +47 -0
  65. package/template/.build/reference/mcp/index.html +92 -0
  66. package/template/.build/reference/mcp.md +49 -0
  67. package/template/node_modules/.vite/deps/_metadata.json +8 -8
  68. package/template/.astro/data-store.json +0 -1
  69. package/template/.astro/settings.json +0 -5
  70. package/template/.build/_astro/Search.astro_astro_type_script_index_0_lang.D7EcezBU.js +0 -1
  71. package/template/.build/_astro/common.Dx3aBIS0.css +0 -3
  72. package/template/.build/_astro/logo.BPu921Tp.svg +0 -1
  73. package/template/.build/concepts/confidentialite/index.html +0 -50
  74. package/template/.build/concepts/confidentialite.md +0 -38
  75. package/template/.build/concepts/deploiements/index.html +0 -106
  76. package/template/.build/concepts/deploiements.md +0 -70
  77. package/template/.build/concepts/organisations-et-roles/index.html +0 -83
  78. package/template/.build/concepts/organisations-et-roles.md +0 -39
  79. package/template/.build/concepts/preversion/index.html +0 -49
  80. package/template/.build/concepts/preversion.md +0 -52
  81. package/template/.build/concepts/secrets-et-coffre/index.html +0 -70
  82. package/template/.build/concepts/secrets-et-coffre.md +0 -54
  83. package/template/.build/demarrer/depuis-github/index.html +0 -34
  84. package/template/.build/demarrer/depuis-github.md +0 -68
  85. package/template/.build/demarrer/premier-site/index.html +0 -28
  86. package/template/.build/demarrer/premier-site.md +0 -94
  87. package/template/.build/guides/brancher-un-domaine/index.html +0 -91
  88. package/template/.build/guides/brancher-un-domaine.md +0 -81
  89. package/template/.build/guides/cle-d-api/index.html +0 -62
  90. package/template/.build/guides/cle-d-api.md +0 -78
  91. package/template/.build/guides/depannage/index.html +0 -64
  92. package/template/.build/guides/depannage.md +0 -69
  93. package/template/.build/guides/deployer-depuis-github/index.html +0 -45
  94. package/template/.build/guides/deployer-depuis-github.md +0 -70
  95. package/template/.build/guides/deployer-un-framework/index.html +0 -81
  96. package/template/.build/guides/deployer-un-framework.md +0 -74
  97. package/template/.build/guides/github-actions-sans-application/index.html +0 -53
  98. package/template/.build/guides/github-actions-sans-application.md +0 -95
  99. package/template/.build/guides/inviter-une-personne/index.html +0 -28
  100. package/template/.build/guides/inviter-une-personne.md +0 -38
  101. package/template/.build/guides/lire-les-logs/index.html +0 -37
  102. package/template/.build/guides/lire-les-logs.md +0 -48
  103. package/template/.build/guides/migrer-depuis-vercel/index.html +0 -25
  104. package/template/.build/guides/migrer-depuis-vercel.md +0 -51
  105. package/template/.build/guides/monorepo/index.html +0 -40
  106. package/template/.build/guides/monorepo.md +0 -42
  107. package/template/.build/guides/revenir-en-arriere/index.html +0 -39
  108. package/template/.build/guides/revenir-en-arriere.md +0 -50
  109. package/template/.build/guides/site-statique/index.html +0 -41
  110. package/template/.build/guides/site-statique.md +0 -59
  111. package/template/.build/guides/synchroniser-doppler/index.html +0 -46
  112. package/template/.build/guides/synchroniser-doppler.md +0 -63
  113. package/template/.build/guides/variables-d-environnement/index.html +0 -73
  114. package/template/.build/guides/variables-d-environnement.md +0 -92
  115. package/template/.build/images/famille/account.svg +0 -1
  116. package/template/.build/images/famille/analytics.svg +0 -1
  117. package/template/.build/images/famille/docs.svg +0 -1
  118. package/template/.build/images/famille/host.svg +0 -1
  119. package/template/.build/images/famille/mail.svg +0 -1
  120. package/template/.build/images/famille/portal.svg +0 -1
  121. package/template/.build/images/famille/status.svg +0 -1
  122. package/template/.build/images/logo.svg +0 -1
  123. package/template/.build/pagefind/fragment/fr-ch_16987e2.pf_fragment +0 -0
  124. package/template/.build/pagefind/fragment/fr-ch_2b4c97b.pf_fragment +0 -0
  125. package/template/.build/pagefind/fragment/fr-ch_3294a5c.pf_fragment +0 -0
  126. package/template/.build/pagefind/fragment/fr-ch_34858c9.pf_fragment +0 -0
  127. package/template/.build/pagefind/fragment/fr-ch_39ddba1.pf_fragment +0 -0
  128. package/template/.build/pagefind/fragment/fr-ch_4ab1899.pf_fragment +0 -0
  129. package/template/.build/pagefind/fragment/fr-ch_4d3a52a.pf_fragment +0 -0
  130. package/template/.build/pagefind/fragment/fr-ch_506c187.pf_fragment +0 -0
  131. package/template/.build/pagefind/fragment/fr-ch_5aa255a.pf_fragment +0 -0
  132. package/template/.build/pagefind/fragment/fr-ch_6841c7d.pf_fragment +0 -0
  133. package/template/.build/pagefind/fragment/fr-ch_6dc7a2d.pf_fragment +0 -0
  134. package/template/.build/pagefind/fragment/fr-ch_847edff.pf_fragment +0 -0
  135. package/template/.build/pagefind/fragment/fr-ch_8745af7.pf_fragment +0 -0
  136. package/template/.build/pagefind/fragment/fr-ch_8aac5e6.pf_fragment +0 -0
  137. package/template/.build/pagefind/fragment/fr-ch_916b233.pf_fragment +0 -0
  138. package/template/.build/pagefind/fragment/fr-ch_9fd014a.pf_fragment +0 -0
  139. package/template/.build/pagefind/fragment/fr-ch_a0808f8.pf_fragment +0 -0
  140. package/template/.build/pagefind/fragment/fr-ch_a4e1f69.pf_fragment +0 -0
  141. package/template/.build/pagefind/fragment/fr-ch_a80a53d.pf_fragment +0 -0
  142. package/template/.build/pagefind/fragment/fr-ch_a9e725b.pf_fragment +0 -0
  143. package/template/.build/pagefind/fragment/fr-ch_ac3f64c.pf_fragment +0 -0
  144. package/template/.build/pagefind/fragment/fr-ch_af292f1.pf_fragment +0 -0
  145. package/template/.build/pagefind/fragment/fr-ch_af3e716.pf_fragment +0 -0
  146. package/template/.build/pagefind/fragment/fr-ch_b0689a4.pf_fragment +0 -0
  147. package/template/.build/pagefind/fragment/fr-ch_baed996.pf_fragment +0 -0
  148. package/template/.build/pagefind/fragment/fr-ch_c89e27a.pf_fragment +0 -0
  149. package/template/.build/pagefind/fragment/fr-ch_cd6ca13.pf_fragment +0 -0
  150. package/template/.build/pagefind/fragment/fr-ch_d09af09.pf_fragment +0 -0
  151. package/template/.build/pagefind/fragment/fr-ch_d4bcea8.pf_fragment +0 -0
  152. package/template/.build/pagefind/fragment/fr-ch_dc2a134.pf_fragment +0 -0
  153. package/template/.build/pagefind/fragment/fr-ch_ded7ddc.pf_fragment +0 -0
  154. package/template/.build/pagefind/fragment/fr-ch_e2528cb.pf_fragment +0 -0
  155. package/template/.build/pagefind/fragment/fr-ch_e3cbb4e.pf_fragment +0 -0
  156. package/template/.build/pagefind/fragment/fr-ch_e7902d9.pf_fragment +0 -0
  157. package/template/.build/pagefind/fragment/fr-ch_f48ca47.pf_fragment +0 -0
  158. package/template/.build/pagefind/index/fr-ch_8a5f905.pf_index +0 -0
  159. package/template/.build/pagefind/index/fr-ch_fbd9c96.pf_index +0 -0
  160. package/template/.build/pagefind/pagefind.fr-ch_211aacbfa7f0e.pf_meta +0 -0
  161. package/template/.build/reference/api/deploiements/index.html +0 -326
  162. package/template/.build/reference/api/deploiements.md +0 -170
  163. package/template/.build/reference/api/erreurs/index.html +0 -102
  164. package/template/.build/reference/api/erreurs.md +0 -50
  165. package/template/.build/reference/api/fichiers/index.html +0 -82
  166. package/template/.build/reference/api/fichiers.md +0 -62
  167. package/template/.build/reference/api/introduction/index.html +0 -126
  168. package/template/.build/reference/api/introduction.md +0 -84
  169. package/template/.build/reference/api/projets/index.html +0 -184
  170. package/template/.build/reference/api/projets.md +0 -102
  171. package/template/.build/reference/api/utilisateur/index.html +0 -96
  172. package/template/.build/reference/api/utilisateur.md +0 -89
  173. package/template/.build/reference/api/variables/index.html +0 -75
  174. package/template/.build/reference/api/variables.md +0 -58
  175. package/template/.build/reference/compatibilite/index.html +0 -196
  176. package/template/.build/reference/compatibilite.md +0 -64
  177. package/template/.build/reference/domaines/index.html +0 -171
  178. package/template/.build/reference/domaines.md +0 -76
  179. package/template/.build/reference/limites/index.html +0 -159
  180. package/template/.build/reference/limites.md +0 -56
  181. package/template/.build/reference/variables/index.html +0 -164
  182. package/template/.build/reference/variables.md +0 -63
  183. package/template/.build/reference/vercel-json/index.html +0 -65
  184. package/template/.build/reference/vercel-json.md +0 -51
@@ -1,84 +0,0 @@
1
- # Introduction à l'API
2
-
3
- L’API de Host reprend le sous-ensemble de l’API Vercel qu’utilise la CLI pour relier un dossier, construire et déployer. Elle accepte du JSON, renvoie du JSON, et s’authentifie par une clé d’API.
4
-
5
- Utilise l’API si tu écris ton propre outil. Pour déployer depuis un poste ou une CI, la [CLI](/docs/reference/cli/) suffit.
6
-
7
- ## Adresse de base
8
-
9
- ```text
10
- https://api.host.hgdc.ch
11
- ```
12
-
13
- Toutes les requêtes passent en HTTPS.
14
-
15
- ## Authentification
16
-
17
- Envoie ta clé dans l’en-tête `Authorization`. Les clés commencent par `ah_` et se créent dans l’onglet **Clés d’API** de l’organisation. Voir [Créer et révoquer une clé d’API](/docs/guides/cle-d-api/).
18
-
19
- ```http
20
- Authorization: Bearer ah_…
21
- ```
22
-
23
- ```bash
24
- curl https://api.host.hgdc.ch/v2/user \
25
- -H "Authorization: Bearer $VERCEL_TOKEN"
26
- ```
27
-
28
- Il existe deux sortes de clés :
29
-
30
- | Clé | Portée | Variables sensibles |
31
- | --------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------ |
32
- | Clé d’organisation, créée par un admin ou un propriétaire | Tous les projets de l’organisation, création de projets comprise | Jamais renvoyées |
33
- | Clé de projet, posée par l’app GitHub dans le dépôt | Ce seul projet. Tout autre projet répond `404` | Renvoyées, pour le build |
34
-
35
- > **Attention**
36
- >
37
- > Une clé donne accès aux variables d’environnement de tes projets. Garde-la dans un gestionnaire de secrets, jamais dans le code ni dans le navigateur.
38
-
39
- ## L’organisation vient de la clé
40
-
41
- Chaque clé appartient à une organisation, et chaque requête s’exécute dans cette organisation. Un identifiant d’organisation dans l’URL, ou un paramètre `teamId` ou `slug`, que la CLI ajoute parfois, est ignoré.
42
-
43
- ## Versions dans le chemin
44
-
45
- Les chemins gardent les numéros de version de l’API Vercel, comme `/v2`, `/v9` ou `/v13`, pour que la CLI fonctionne sans modification. Plusieurs versions d’un même endpoint renvoient la même réponse : `/v9/projects` et `/v10/projects` par exemple.
46
-
47
- ## Pagination
48
-
49
- Les listes ne sont pas paginées. Elles renvoient un objet `pagination` pour la compatibilité, avec `next` toujours à `null`.
50
-
51
- ## Limites de débit
52
-
53
- Chaque clé dispose de 600 requêtes par minute, avec des rafales de 120. L’envoi de fichiers a son propre budget : 6 000 par minute, avec des rafales de 3 000.
54
-
55
- Au-delà, l’API répond `429` avec le code `rate_limited` :
56
-
57
- ```json
58
- {
59
- "error": {
60
- "code": "rate_limited",
61
- "message": "Trop de requêtes, réessaie dans un instant."
62
- }
63
- }
64
- ```
65
-
66
- La réponse porte un en-tête `retry-after` quand l’attente est connue. La création de déploiements est aussi limitée par organisation : voir [Limites](/docs/reference/limites/).
67
-
68
- ## Endpoints
69
-
70
- | Méthode | Chemin | Rôle |
71
- | ------- | ----------------------------------------------------------------- | ------------------------------------- |
72
- | `GET` | [`/v2/user`](/docs/reference/api/utilisateur/) | Personne qui a créé la clé |
73
- | `GET` | [`/v2/teams`](/docs/reference/api/utilisateur/) | Organisation de la clé |
74
- | `GET` | [`/v2/teams/:idOrSlug`](/docs/reference/api/utilisateur/) | Lire l’organisation |
75
- | `GET` | [`/v9/projects`](/docs/reference/api/projets/) | Lister les projets |
76
- | `GET` | [`/v9/projects/:idOrName`](/docs/reference/api/projets/) | Lire un projet |
77
- | `POST` | [`/v11/projects`](/docs/reference/api/projets/) | Créer un projet |
78
- | `POST` | [`/v2/files`](/docs/reference/api/fichiers/) | Envoyer un fichier |
79
- | `POST` | [`/v13/deployments`](/docs/reference/api/deploiements/) | Créer un déploiement |
80
- | `GET` | [`/v13/deployments/:id`](/docs/reference/api/deploiements/) | Lire un déploiement |
81
- | `GET` | [`/v3/deployments/:id/events`](/docs/reference/api/deploiements/) | Suivre les logs |
82
- | `GET` | [`/v3/env/pull/:project/:target`](/docs/reference/api/variables/) | Lire les variables d’un environnement |
83
-
84
- Les erreurs et leurs codes sont sur [Erreurs](/docs/reference/api/erreurs/).
@@ -1,184 +0,0 @@
1
- <!DOCTYPE html><html lang="fr-CH" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-mxbotnn6"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Projets | Host</title><style>:root{--sl-color-accent-low:#172544;--sl-color-accent:#4b8eff;--sl-color-accent-high:#87d3ff;--hgdc-on-accent:#000000;}:root:not([data-hd-theme="dark"]){--sl-color-accent-low:#dcf1ff;--sl-color-accent:#194ff7;--sl-color-accent-high:#0400bf;--hgdc-on-accent:#ffffff;}</style><link rel="shortcut icon" href="/docs/images/logo.svg" type="image/svg+xml"/><meta name="generator" content="Astro v7.3.8"/><meta name="generator" content="Starlight v0.42.6"/><meta property="og:title" content="Projets"/><meta property="og:type" content="article"/><meta property="og:locale" content="fr-CH"/><meta property="og:description" content="Lister, lire et créer des projets avec l'API Host. Champs de l'objet projet et erreurs."/><meta property="og:site_name" content="Host"/><meta name="twitter:card" content="summary_large_image"/><meta name="description" content="Lister, lire et créer des projets avec l'API Host. Champs de l'objet projet et erreurs."/><link rel="alternate" type="text/markdown" href="/docs/reference/api/projets.md"><link rel="describedby" type="text/markdown" href="/docs/llms.txt"><script>
2
- ;(() => {
3
- let stored = null
4
- try {
5
- stored = localStorage.getItem("starlight-theme")
6
- } catch {}
7
- const dark =
8
- stored === "dark" || (stored === "auto" && matchMedia("(prefers-color-scheme: dark)").matches)
9
- const theme = dark ? "dark" : "light"
10
- document.documentElement.dataset.theme = theme
11
- document.documentElement.dataset.hdTheme = theme
12
- window.StarlightThemeProvider = { updatePickers() {} }
13
- })()
14
- </script><link rel="stylesheet" href="/docs/_astro/print.ehPL0gv-.css" media="print"><link rel="stylesheet" href="/docs/_astro/common.Dx3aBIS0.css"><style>@layer starlight.components{svg:where(.astro-lgqmsw3b){color:var(--sl-icon-color);font-size:var(--sl-icon-size,1em);width:1em;height:1em;overflow:visible}}
15
- @layer starlight.components{starlight-tabs:where(.astro-a5blunwz){display:block}.tablist-wrapper:where(.astro-a5blunwz){overflow-x:auto}:where(.astro-a5blunwz)[role=tablist]{border-bottom:2px solid var(--sl-color-gray-5);padding:0;list-style:none;display:flex}.tab:where(.astro-a5blunwz){display:flex}.tab:where(.astro-a5blunwz)>:where(.astro-a5blunwz)[role=tab]{--sl-tab-color-border:var(--sl-color-gray-5);line-height:var(--sl-line-height-headings);box-shadow:0 2px 0 var(--sl-tab-color-border);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial;align-items:center;gap:.5rem;padding:.275rem 1.25rem;text-decoration:none;display:flex}.tab:where(.astro-a5blunwz) :where(.astro-a5blunwz)[role=tab][aria-selected=true]{--sl-tab-color-border:var(--sl-color-text-accent);color:var(--sl-color-white);font-weight:600}.tablist-wrapper:where(.astro-a5blunwz)~[role=tabpanel]{margin-top:1rem}}
16
- </style><script type="module" src="/docs/_astro/page.cNngjUgL.js"></script></head><body class="astro-mxbotnn6"><a class="sl-skip-link astro-k4td3kwj" href="#_top">Aller au contenu</a><div class="hd-page"><header class="hd-topbar"><div class="hd-header"><div class="hd-header__start"><button type="button" class="hd-icon-button hd-menu-button" popovertarget="starlight__sidebar" aria-label="Menu de la documentation" aria-controls="starlight__sidebar"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16M4 12h16M4 17h10"></path></svg></button><a class="hd-brand" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="24" height="24"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="24" height="24"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-header__end"><hd-search data-base="/docs" data-assistant><button type="button" class="hd-search-trigger" data-open aria-haspopup="dialog" aria-label="Rechercher (Ctrl K)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><span class="hd-search-trigger__label">Rechercher</span><kbd class="hd-kbd" data-shortcut>Ctrl K</kbd></button><dialog class="hd-palette" aria-label="Rechercher dans la documentation"><div class="hd-palette__box"><div class="hd-palette__field"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><input type="search" data-input placeholder="Rechercher dans la documentation" autocomplete="off" spellcheck="false" role="combobox" aria-expanded="false" aria-controls="hd-palette-results" aria-autocomplete="list"><button type="button" class="hd-kbd hd-kbd--button" data-close>Échap</button></div><div class="hd-palette__results" id="hd-palette-results" role="listbox" aria-label="Résultats" data-results></div><p class="hd-palette__status" data-status role="status">Tape un mot pour chercher dans les pages.</p><footer class="hd-palette__hints" aria-hidden="true"><span><kbd class="hd-kbd">↑</kbd><kbd class="hd-kbd">↓</kbd> Choisir</span><span><kbd class="hd-kbd">↵</kbd> Ouvrir</span><span><kbd class="hd-kbd">Échap</kbd> Fermer</span></footer></div></dialog></hd-search><script type="module" src="/docs/_astro/Search.astro_astro_type_script_index_0_lang.D7EcezBU.js"></script><button type="button" class="hd-icon-button" data-hgdc-ask aria-label="Demander à l'assistant" title="Demander à l'assistant (Ctrl I)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg></button><button type="button" class="hd-icon-button hd-theme-button" data-hd-theme-toggle aria-label="Passer au thème sombre"><svg class="hd-icon hd-theme-button__moon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg><svg class="hd-icon hd-theme-button__sun" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><script type="module">var e=`starlight-theme`,t=()=>{try{return localStorage.getItem(e)||`light`}catch{return`light`}},n=()=>matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`,r=t=>{try{localStorage.setItem(e,t)}catch{}let r=t===`auto`?n():t;document.documentElement.dataset.theme=r,document.documentElement.dataset.hdTheme=r,i()},i=()=>{let e=t(),n=document.documentElement.dataset.theme===`dark`;for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.setAttribute(`aria-label`,n?`Passer au thème clair`:`Passer au thème sombre`);for(let t of document.querySelectorAll(`[data-hd-theme]`)){let n=t.dataset.hdTheme===e;t.setAttribute(`aria-checked`,String(n)),t.tabIndex=n?0:-1}};for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.addEventListener(`click`,()=>r(document.documentElement.dataset.theme===`dark`?`light`:`dark`));for(let e of document.querySelectorAll(`.hd-theme-choice`)){let t=[...e.querySelectorAll(`[data-hd-theme]`)];for(let e of t)e.addEventListener(`click`,()=>r(e.dataset.hdTheme));e.addEventListener(`keydown`,e=>{let n=e.key===`ArrowRight`||e.key===`ArrowDown`?1:e.key===`ArrowLeft`||e.key===`ArrowUp`?-1:0;if(!n)return;e.preventDefault();let i=t.findIndex(e=>e.getAttribute(`aria-checked`)===`true`),a=t[(i+n+t.length)%t.length];r(a.dataset.hdTheme),a.focus()})}matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{t()===`auto`&&r(`auto`)}),i();</script></div></div></header><nav class="hd-sidebar" aria-label="Navigation de la documentation"><script type="module">for(let e of document.querySelectorAll(`[data-hgdc-version]`))e.addEventListener(`change`,()=>window.location.assign(e.value));var e=document.querySelector(`.sidebar-pane`);if(e){let t=`hd-sidebar-scroll`;try{let n=Number(sessionStorage.getItem(t));n&&(e.scrollTop=n)}catch{}let n=e.querySelector(`[aria-current="page"]`);if(n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();(r.top<t.top||r.bottom>t.bottom)&&n.scrollIntoView({block:`center`})}addEventListener(`pagehide`,()=>{try{sessionStorage.setItem(t,String(e.scrollTop))}catch{}})}</script><hd-sidebar-pane popover="auto" id="starlight__sidebar" class="sidebar-pane"><div class="hd-sidebar__content"><div class="hd-mobile-only hd-sidebar-head"><a class="hd-brand" href="/docs/"><span class="hd-brand__name">Host</span></a><button type="button" class="hd-icon-button" popovertarget="starlight__sidebar" popovertargetaction="hide" aria-label="Fermer le menu"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div><ul class="hd-nav hd-nav--depth-0"><li class="hd-nav__group"><p class="hd-nav__heading">Démarrer</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/" class="hd-nav__link"><span>Accueil</span></a></li><li><a href="/docs/demarrer/premier-site/" class="hd-nav__link"><span>Premier site</span></a></li><li><a href="/docs/demarrer/depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Guides</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/guides/cle-d-api/" class="hd-nav__link"><span>Clés d&#39;API</span></a></li><li><a href="/docs/guides/deployer-depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li><li><a href="/docs/guides/github-actions-sans-application/" class="hd-nav__link"><span>GitHub Actions sans l&#39;app</span></a></li><li><a href="/docs/guides/deployer-un-framework/" class="hd-nav__link"><span>Un framework</span></a></li><li><a href="/docs/guides/site-statique/" class="hd-nav__link"><span>Site statique</span></a></li><li><a href="/docs/guides/monorepo/" class="hd-nav__link"><span>Monorepo</span></a></li><li><a href="/docs/guides/brancher-un-domaine/" class="hd-nav__link"><span>Brancher un domaine</span></a></li><li><a href="/docs/guides/variables-d-environnement/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/guides/synchroniser-doppler/" class="hd-nav__link"><span>Doppler</span></a></li><li><a href="/docs/guides/revenir-en-arriere/" class="hd-nav__link"><span>Revenir en arrière</span></a></li><li><a href="/docs/guides/inviter-une-personne/" class="hd-nav__link"><span>Inviter une personne</span></a></li><li><a href="/docs/guides/lire-les-logs/" class="hd-nav__link"><span>Lire les logs</span></a></li><li><a href="/docs/guides/migrer-depuis-vercel/" class="hd-nav__link"><span>Migrer depuis Vercel</span></a></li><li><a href="/docs/guides/depannage/" class="hd-nav__link"><span>Dépannage</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Référence</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/reference/cli/" class="hd-nav__link"><span>CLI</span></a></li><li><a href="/docs/reference/variables/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/reference/domaines/" class="hd-nav__link"><span>Domaines</span></a></li><li><a href="/docs/reference/vercel-json/" class="hd-nav__link"><span>vercel.json</span></a></li><li><a href="/docs/reference/compatibilite/" class="hd-nav__link"><span>Compatibilité</span></a></li><li><a href="/docs/reference/limites/" class="hd-nav__link"><span>Limites</span></a></li><li><details class="hd-nav__fold" open><summary class="hd-nav__link"><span>API</span><svg class="hd-icon hd-nav__chevron" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></summary><ul class="hd-nav hd-nav--depth-2"><li><a href="/docs/reference/api/introduction/" class="hd-nav__link"><span>Introduction</span></a></li><li><a href="/docs/reference/api/erreurs/" class="hd-nav__link"><span>Erreurs</span></a></li><li><a href="/docs/reference/api/utilisateur/" class="hd-nav__link"><span>Utilisateur et organisation</span></a></li><li><a href="/docs/reference/api/projets/" class="hd-nav__link" aria-current="page"><span>Projets</span></a></li><li><a href="/docs/reference/api/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/reference/api/fichiers/" class="hd-nav__link"><span>Envoyer un fichier</span></a></li><li><a href="/docs/reference/api/variables/" class="hd-nav__link"><span>Variables</span></a></li></ul></details></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Concepts</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/concepts/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/concepts/organisations-et-roles/" class="hd-nav__link"><span>Organisations et rôles</span></a></li><li><a href="/docs/concepts/secrets-et-coffre/" class="hd-nav__link"><span>Secrets et coffre</span></a></li><li><a href="/docs/concepts/preversion/" class="hd-nav__link"><span>Préversion</span></a></li><li><a href="/docs/concepts/confidentialite/" class="hd-nav__link"><span>Sécurité et confidentialité</span></a></li></ul></li></ul><div class="hd-mobile-only hd-sidebar-footer"><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></div></hd-sidebar-pane></nav><div class="hd-main-frame main-frame"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="hd-columns hd-columns--toc"><div class="hd-columns__main main-pane"><main data-pagefind-body class="astro-mxbotnn6" lang="fr-CH" dir="ltr"><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="hd-title not-content"><p class="hd-eyebrow" data-pagefind-meta="section">Référence</p><div class="hd-title__row"><h1 id="_top">Projets</h1><div class="hd-page-actions" data-hgdc-skip data-pagefind-ignore><div class="hd-split"><button type="button" class="hd-split__main" data-hgdc-copy="/docs/reference/api/projets.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span data-label>Copier la page</span></button><details class="hd-menu"><summary class="hd-split__more" aria-label="Autres formats de la page"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg></summary><ul class="hd-menu__list"><li><button type="button" data-hgdc-copy-item><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span><strong>Copier la page</strong><small>En Markdown, pour un LLM</small></span></button></li><li><a href="/docs/reference/api/projets.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm3 9V9l2.5 3L12 9v6m5-6v6m-2-2 2 2 2-2"></path></svg><span><strong>Voir en Markdown</strong><small>La page en texte brut</small></span></a></li><li><a data-hgdc-open="claude" href="https://claude.ai/new" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans Claude</strong><small>Poser une question sur cette page</small></span></a></li><li><a data-hgdc-open="chatgpt" href="https://chatgpt.com/" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans ChatGPT</strong><small>Poser une question sur cette page</small></span></a></li><li><a href="/docs/llms.txt"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Zm0 0v5h5M9 13h6m-6 4h4"></path></svg><span><strong>llms.txt</strong><small>L'index de la doc pour les agents</small></span></a></li></ul></details></div><span class="sr-only" role="status" aria-live="polite" data-hgdc-copy-status></span></div></div><p class="hd-lead">Lister, lire et créer des projets avec l&#39;API Host. Champs de l&#39;objet projet et erreurs.</p></div><script type="module">var e=document.querySelector(`[data-hgdc-copy-status]`),t=document.querySelector(`[data-hgdc-copy]`);async function n(){if(!t)return;let n=t.querySelector(`[data-label]`),r=t=>{n.textContent=t,e&&(e.textContent=t),setTimeout(()=>n.textContent=`Copier la page`,2e3)};try{let e=await fetch(t.dataset.hgdcCopy);if(!e.ok)throw Error(String(e.status));await navigator.clipboard.writeText(await e.text()),r(`Page copiée`)}catch{r(`Copie impossible`)}}if(t?.addEventListener(`click`,()=>void n()),document.querySelector(`[data-hgdc-copy-item]`)?.addEventListener(`click`,()=>{document.querySelector(`.hd-menu`).open=!1,n()}),t){let e=`Lis ${new URL(t.dataset.hgdcCopy,location.href).href} et réponds à mes questions sur cette page.`;for(let t of document.querySelectorAll(`[data-hgdc-open]`))t.href=`${t.dataset.hgdcOpen===`claude`?`https://claude.ai/new`:`https://chatgpt.com/`}?q=${encodeURIComponent(e)}`}for(let e of document.querySelectorAll(`.hd-menu`))document.addEventListener(`click`,t=>{e.open&&!e.contains(t.target)&&(e.open=!1)}),e.addEventListener(`keydown`,t=>{t.key===`Escape`&&e.open&&(t.stopPropagation(),e.open=!1,e.querySelector(`summary`)?.focus())});</script></div></div><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="sl-markdown-content"><p>Un projet correspond à un site. Il a ses variables, ses domaines et son historique de déploiements.</p>
17
- <h2 class="hd-endpoint" id="get-v9projects"><span class="hd-method" data-method="get">GET</span> <code class="hd-path">/v9/projects</code></h2>
18
- <p>Liste les projets de l’organisation. Avec une clé de projet, la liste ne contient que ce projet. La liste compte 100 projets au plus.</p>
19
- <div class="expressive-code"><link rel="stylesheet" href="/docs/_astro/ec.t9qpe.css"><script type="module" src="/docs/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#953800;--1:#FFA657">curl</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">https://api.host.hgdc.ch/v9/projects</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#CA212D;--1:#FF7B72">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#0550AE;--1:#79C0FF">-H</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">"Authorization: Bearer </span><span style="--0:#1F2328;--1:#E6EDF3">$VERCEL_TOKEN</span><span style="--0:#0A3069;--1:#A5D6FF">"</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copier dans le presse-papiers" data-copied="Copié !" data-code="curl https://api.host.hgdc.ch/v9/projects \ -H &#x22;Authorization: Bearer $VERCEL_TOKEN&#x22;"><div></div></button></div></figure></div>
20
- <p>Réponse <code>200</code> :</p>
21
- <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="json"><code><div class="ec-line"><div class="code"><span style="--0:#1F2328;--1:#E6EDF3">{</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"projects"</span><span style="--0:#1F2328;--1:#E6EDF3">: [</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#1F2328;--1:#E6EDF3"> </span></span><span style="--0:#1F2328;--1:#E6EDF3">{</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"id"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0A3069;--1:#A5D6FF">"j97d3k2m8x1q4p6s7t9v0w2y5z"</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"name"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0A3069;--1:#A5D6FF">"site-atelier"</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"accountId"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0A3069;--1:#A5D6FF">"k57a1b2c3d4e5f6g7h8j9k0m1n"</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"framework"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0A3069;--1:#A5D6FF">"astro"</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"rootDirectory"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">null</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"buildCommand"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">null</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"installCommand"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">null</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"outputDirectory"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">null</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"nodeVersion"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0A3069;--1:#A5D6FF">"24.x"</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"createdAt"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">1760259600000</span><span style="--0:#1F2328;--1:#E6EDF3">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"updatedAt"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">1760259600000</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#1F2328;--1:#E6EDF3"> </span></span><span style="--0:#1F2328;--1:#E6EDF3">}</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#1F2328;--1:#E6EDF3"> </span></span><span style="--0:#1F2328;--1:#E6EDF3">],</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#116329;--1:#7EE787">"pagination"</span><span style="--0:#1F2328;--1:#E6EDF3">: { </span><span style="--0:#116329;--1:#7EE787">"count"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">1</span><span style="--0:#1F2328;--1:#E6EDF3">, </span><span style="--0:#116329;--1:#7EE787">"next"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">null</span><span style="--0:#1F2328;--1:#E6EDF3">, </span><span style="--0:#116329;--1:#7EE787">"prev"</span><span style="--0:#1F2328;--1:#E6EDF3">: </span><span style="--0:#0550AE;--1:#79C0FF">null</span><span style="--0:#1F2328;--1:#E6EDF3"> }</span></div></div><div class="ec-line"><div class="code"><span style="--0:#1F2328;--1:#E6EDF3">}</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copier dans le presse-papiers" data-copied="Copié !" data-code="{ &#x22;projects&#x22;: [ { &#x22;id&#x22;: &#x22;j97d3k2m8x1q4p6s7t9v0w2y5z&#x22;, &#x22;name&#x22;: &#x22;site-atelier&#x22;, &#x22;accountId&#x22;: &#x22;k57a1b2c3d4e5f6g7h8j9k0m1n&#x22;, &#x22;framework&#x22;: &#x22;astro&#x22;, &#x22;rootDirectory&#x22;: null, &#x22;buildCommand&#x22;: null, &#x22;installCommand&#x22;: null, &#x22;outputDirectory&#x22;: null, &#x22;nodeVersion&#x22;: &#x22;24.x&#x22;, &#x22;createdAt&#x22;: 1760259600000, &#x22;updatedAt&#x22;: 1760259600000 } ], &#x22;pagination&#x22;: { &#x22;count&#x22;: 1, &#x22;next&#x22;: null, &#x22;prev&#x22;: null }}"><div></div></button></div></figure></div>
22
- <p>Le même endpoint répond aussi sous <code>/v10/projects</code>.</p>
23
- <h2 class="hd-endpoint" id="get-v9projectsidorname"><span class="hd-method" data-method="get">GET</span> <code class="hd-path">/v9/projects/<span class="hd-path__param">:idOrName</span></code></h2>
24
- <p>Lit un projet, par son identifiant ou son nom, sans tenir compte de la casse.</p>
25
- <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#953800;--1:#FFA657">curl</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">https://api.host.hgdc.ch/v9/projects/site-atelier</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#CA212D;--1:#FF7B72">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#0550AE;--1:#79C0FF">-H</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">"Authorization: Bearer </span><span style="--0:#1F2328;--1:#E6EDF3">$VERCEL_TOKEN</span><span style="--0:#0A3069;--1:#A5D6FF">"</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copier dans le presse-papiers" data-copied="Copié !" data-code="curl https://api.host.hgdc.ch/v9/projects/site-atelier \ -H &#x22;Authorization: Bearer $VERCEL_TOKEN&#x22;"><div></div></button></div></figure></div>
26
- <p>Réponse <code>200</code> : l’objet projet, décrit ci-dessous. Les routes <code>/v9</code> et <code>/v10</code> renvoient la même réponse.</p>
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
- <div class="hd-table"><table><thead><tr><th>Erreur</th><th>Code</th><th>Cause</th></tr></thead><tbody><tr><td><code>404</code></td><td><code>not_found</code></td><td>Aucun projet de ce nom dans l’organisation, ou projet hors de la portée de la clé</td></tr></tbody></table></div>
43
- <h2 class="hd-endpoint" id="post-v11projects"><span class="hd-method" data-method="post">POST</span> <code class="hd-path">/v11/projects</code></h2>
44
- <p>Crée un projet. Tu peux aussi t’en passer : le premier déploiement sur un nom inconnu crée le projet.</p>
45
- <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#953800;--1:#FFA657">curl</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0550AE;--1:#79C0FF">-X</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">POST</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">https://api.host.hgdc.ch/v11/projects</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#CA212D;--1:#FF7B72">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#0550AE;--1:#79C0FF">-H</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">"Authorization: Bearer </span><span style="--0:#1F2328;--1:#E6EDF3">$VERCEL_TOKEN</span><span style="--0:#0A3069;--1:#A5D6FF">"</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#CA212D;--1:#FF7B72">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#0550AE;--1:#79C0FF">-H</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">"Content-Type: application/json"</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#CA212D;--1:#FF7B72">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#0550AE;--1:#79C0FF">-d</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">'{"name":"site-atelier","framework":"astro"}'</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copier dans le presse-papiers" data-copied="Copié !" data-code="curl -X POST https://api.host.hgdc.ch/v11/projects \ -H &#x22;Authorization: Bearer $VERCEL_TOKEN&#x22; \ -H &#x22;Content-Type: application/json&#x22; \ -d &#x27;{&#x22;name&#x22;:&#x22;site-atelier&#x22;,&#x22;framework&#x22;:&#x22;astro&#x22;}&#x27;"><div></div></button></div></figure></div>
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
- <div class="hd-table"><table><thead><tr><th>Champ</th><th>Type</th><th>Requis</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>Oui</td><td>Nom du projet, 100 caractères au plus. Il devient le nom dans l’URL, en minuscules</td></tr><tr><td><code>framework</code></td><td><code>string</code> ou <code>null</code></td><td>Non</td><td><code>nextjs</code>, <code>astro</code>, <code>vite</code>, <code>sveltekit</code>, <code>nuxt</code>, <code>tanstack-start</code> ou <code>react-router</code>. Une autre valeur, ou <code>null</code>, enregistre un site sans framework</td></tr></tbody></table></div>
70
- <p>Réponse <code>200</code> : l’objet projet créé.</p>
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <div class="hd-table"><table><thead><tr><th>Erreur</th><th>Code</th><th>Cause</th></tr></thead><tbody><tr><td><code>400</code></td><td><code>bad_request</code></td><td>Nom absent ou trop long</td></tr><tr><td><code>403</code></td><td><code>forbidden</code></td><td>La clé est limitée à un projet : elle ne crée rien</td></tr><tr><td><code>409</code></td><td><code>conflict</code></td><td>Un projet porte déjà ce nom</td></tr></tbody></table></div>
97
- <h2 id="lobjet-projet">L’objet projet</h2>
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
- <div class="hd-table"><table><thead><tr><th>Champ</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>string</code></td><td>Identifiant du projet. C’est la valeur de <code>VERCEL_PROJECT_ID</code></td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Nom du projet, dans l’URL de la console</td></tr><tr><td><code>accountId</code></td><td><code>string</code></td><td>Identifiant de l’organisation propriétaire</td></tr><tr><td><code>framework</code></td><td><code>string</code> ou <code>null</code></td><td>Framework enregistré, ou <code>null</code> pour un site sans framework</td></tr><tr><td><code>rootDirectory</code></td><td><code>string</code> ou <code>null</code></td><td>Dossier de l’app dans le dépôt, pour un monorepo</td></tr><tr><td><code>buildCommand</code></td><td><code>string</code> ou <code>null</code></td><td>Commande de build imposée. <code>null</code> : celle détectée par <code>vercel build</code></td></tr><tr><td><code>installCommand</code></td><td><code>string</code> ou <code>null</code></td><td>Commande d’installation imposée</td></tr><tr><td><code>outputDirectory</code></td><td><code>string</code> ou <code>null</code></td><td>Dossier de sortie imposé</td></tr><tr><td><code>nodeVersion</code></td><td><code>"22.x"</code> ou <code>"24.x"</code></td><td>Version de Node.js du build</td></tr><tr><td><code>createdAt</code></td><td><code>number</code></td><td>Date de création, en millisecondes depuis l’époque Unix</td></tr><tr><td><code>updatedAt</code></td><td><code>number</code></td><td>Même valeur que <code>createdAt</code></td></tr><tr><td><code>link</code></td><td><code>object</code></td><td>Présent seulement pour un projet relié à GitHub : <code>type</code> (<code>github</code>), <code>repo</code> (<code>propriétaire/dépôt</code>) et <code>productionBranch</code></td></tr><tr><td><code>alias</code></td><td><code>object[]</code></td><td>Adresse de production du projet : <code>domain</code> (<code>&#x3C;projet>.hgdc.cloud</code>), <code>target</code> (<code>PRODUCTION</code>), <code>environment</code> (<code>production</code>), <code>createdAt</code>, <code>deployment</code> (<code>null</code>). Les domaines personnalisés n’y figurent pas</td></tr><tr><td><code>targets.production</code></td><td><code>object</code></td><td>Présent une fois une production en ligne : le déploiement servi, avec <code>id</code>, <code>url</code>, <code>alias</code> (<code>["&#x3C;projet>.hgdc.cloud"]</code>), <code>aliasAssigned</code> (moment de la mise en ligne), <code>readyState</code>, <code>createdAt</code>, <code>readyAt</code> et <code>meta</code>. <code>targets</code> vaut <code>{}</code> avant la première production</td></tr></tbody></table></div>
179
- <p>Pour un projet dont le framework n’est pas reconnu, <code>framework</code> vaut <code>null</code>.</p>
180
- <h2 id="voir-aussi">Voir aussi</h2>
181
- <ul>
182
- <li><a href="/docs/reference/api/deploiements/">Déploiements</a> : créer un déploiement pour ce projet.</li>
183
- <li><a href="/docs/reference/api/erreurs/">Erreurs</a> : la liste des codes.</li>
184
- </ul></div><hgdc-feedback class="hgdc-feedback not-content" data-endpoint="https://docs.hgdc.ch/api/v1/feedback" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-pagefind-ignore="true"><div data-step="ask"><p class="hgdc-feedback__question">Cette page t'a aidé ?</p><div class="hgdc-feedback__choices"><button type="button" data-helpful="true"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 10v11M15 5.9 14 10h5.8a2 2 0 0 1 1.9 2.5l-2.3 7A2 2 0 0 1 17.5 21H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h2.8a2 2 0 0 0 1.8-1.1L12 2a3.1 3.1 0 0 1 3 3.9Z"></path></svg>Oui</button><button type="button" data-helpful="false"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 14V3M9 18.1 10 14H4.2a2 2 0 0 1-1.9-2.5l2.3-7A2 2 0 0 1 6.5 3H20a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-2.8a2 2 0 0 0-1.8 1.1L12 22a3.1 3.1 0 0 1-3-3.9Z"></path></svg>Non</button></div></div><form data-step="comment" hidden><label for="hgdc-feedback-comment">Qu'est-ce qui manquait ou pourrait être plus clair ? (facultatif)</label><textarea id="hgdc-feedback-comment" name="comment" rows="3" maxlength="1000"></textarea><div class="hgdc-feedback__choices"><button type="submit">Envoyer</button><button type="button" data-skip>Passer</button></div></form><p data-step="done" class="hgdc-feedback__done" role="status" hidden>Merci, c'est noté.</p></hgdc-feedback><nav class="hd-pagination not-content" aria-label="Pages voisines" data-pagefind-ignore><a class="hd-pagination__link" href="/docs/reference/api/utilisateur/" rel="prev"><span class="hd-pagination__hint"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m15 6-6 6 6 6"></path></svg>Précédent</span><span class="hd-pagination__title">Utilisateur et organisation</span></a><a class="hd-pagination__link hd-pagination__link--next" href="/docs/reference/api/deploiements/" rel="next"><span class="hd-pagination__hint">Suivant<svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></span><span class="hd-pagination__title">Déploiements</span></a></nav><script type="module" src="/docs/_astro/Footer.astro_astro_type_script_index_0_lang.DzCnn3OT.js"></script></div></div></main><form class="hd-askbar" data-askbar data-pagefind-ignore><label class="sr-only" for="hd-askbar-input">Pose une question à l'assistant</label><input id="hd-askbar-input" data-askbar-input type="text" maxlength="1000" placeholder="Pose une question…" autocomplete="off"><kbd class="hd-kbd" data-shortcut aria-hidden="true">Ctrl I</kbd><button type="submit" class="hd-send" aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form></div><aside class="hd-columns__toc" aria-label="Sur cette page"><div class="hd-toc-scroll"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">Sur cette page</h2><ul class="astro-jxyovztp" style="--depth: 0;"><li style="--depth: 0;" class="astro-jxyovztp"><a href="#_top" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Vue d’ensemble</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#get-v9projects" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">GET /v9/projects</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#get-v9projectsidorname" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">GET /v9/projects/:idOrName</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#post-v11projects" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">POST /v11/projects</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#lobjet-projet" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">L’objet projet</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#voir-aussi" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Voir aussi</span></a></li></ul></nav></starlight-toc><script type="module">var e=`_top`,t=class extends HTMLElement{_current=this.querySelector(`a[aria-current="true"]`);minH=parseInt(this.dataset.minH||`2`,10);maxH=parseInt(this.dataset.maxH||`3`,10);tocHeadingSelector=`h1#${e},:where(${[...Array.from({length:1+this.maxH-this.minH}).map((e,t)=>`h${this.minH+t}`)].join()})[id]`;set current(e){e!==this._current&&(this._current&&this._current.removeAttribute(`aria-current`),e.setAttribute(`aria-current`,`true`),this._current=e)}onIdle=e=>(window.requestIdleCallback||(e=>setTimeout(e,1)))(e);constructor(){super(),this.onIdle(()=>this.init())}init=()=>{let t=[...this.querySelectorAll(`a`)],n=e=>e.matches(this.tocHeadingSelector),r=t=>{for(;t;){if(t.matches(`.sl-markdown-content, main > *`))return document.getElementById(e);if(n(t))return t;let r=t.querySelector(this.tocHeadingSelector);if(r)return r;let i=t.previousElementSibling;for(;i?.lastElementChild;)i=i.lastElementChild;t=i??t.parentElement}return null},i=e=>{for(let{isIntersecting:n,target:i}of e){if(!n)continue;let e=r(i);if(!e)continue;let a=t.find(t=>t.hash===`#`+encodeURIComponent(e.id));if(a){this.current=a;break}}},a=document.querySelectorAll([`main :where(${this.tocHeadingSelector})`,`main :where(${this.tocHeadingSelector}, .sl-heading-wrapper) ~ *:not(:has(${this.tocHeadingSelector}))`,`main .sl-markdown-content > *:not(:has(${this.tocHeadingSelector}))`,`main > *:not(:has(${this.tocHeadingSelector}))`].join()),o,s=()=>{o||(o=new IntersectionObserver(i,{rootMargin:this.getRootMargin()}),a.forEach(e=>o.observe(e)))};s();let c;window.addEventListener(`resize`,()=>{o&&=(o.disconnect(),void 0),clearTimeout(c),c=setTimeout(()=>this.onIdle(s),200)})};getRootMargin(){let e=(document.querySelector(`header`)?.getBoundingClientRect().height||0)+(this.querySelector(`summary`)?.getBoundingClientRect().height||0)+32;return`-${e}px 0% ${e+53-document.documentElement.clientHeight}px`}};customElements.define(`starlight-toc`,t);</script></div></aside></div><footer class="hd-site-footer" data-pagefind-ignore><div class="hd-site-footer__row"><a class="hd-brand hd-brand--footer" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-site-footer__row hd-site-footer__row--meta"><p>Ton site en ligne, déployé à chaque modification.</p><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></footer></div><hgdc-assistant data-endpoint="https://docs.hgdc.ch/api/v1/ask" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-name="Host"><section class="hgdc-panel" role="dialog" aria-modal="false" aria-labelledby="hgdc-assistant-title" data-panel inert><div class="hgdc-panel__grip" aria-hidden="true"></div><header class="hgdc-panel__header"><h2 id="hgdc-assistant-title"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg>Assistant</h2><div class="hgdc-panel__tools"><button type="button" class="hd-icon-button" data-reset aria-label="Nouvelle conversation" title="Nouvelle conversation" hidden><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12a8 8 0 1 0 2.3-5.7M4 4v4h4"></path></svg></button><button type="button" class="hd-icon-button" data-close aria-label="Fermer l'assistant" title="Fermer (Échap)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div></header><div class="hgdc-panel__body" data-log aria-live="polite"><div class="hgdc-empty" data-empty><p class="hgdc-empty__title">Pose ta question sur Host.</p><p>Je cherche dans les pages de cette documentation et je cite mes sources. Si la réponse n'y est pas, je te le dis.</p></div></div><form class="hgdc-panel__form" data-form><label class="sr-only" for="hgdc-question">Ta question</label><textarea id="hgdc-question" data-input rows="1" maxlength="1000" placeholder="Pose une question…" required></textarea><button type="submit" class="hd-send" data-send aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form><p class="hgdc-panel__note">Réponses générées par IA (Claude, d'Anthropic), à vérifier. Les questions sont conservées 90 jours pour améliorer cette documentation.</p></section></hgdc-assistant><script type="module" src="/docs/_astro/Assistant.astro_astro_type_script_index_0_lang.C1pz7yK1.js"></script></div><script type="module">var e=class extends HTMLElement{connectedCallback(){let e=matchMedia(`(min-width: 50em)`),t=()=>{e.matches&&this.matches(`:popover-open`)&&this.hidePopover(),this.popover=e.matches?null:`auto`};t(),e.addEventListener(`change`,t),this.addEventListener(`toggle`,e=>{let t=e.newState===`open`;for(let e of document.querySelectorAll(`.hd-main-frame, .hd-askbar`))e.toggleAttribute(`inert`,t);document.documentElement.toggleAttribute(`data-hd-menu`,t)}),this.addEventListener(`click`,e=>{e.target.closest(`a`)&&this.matches(`:popover-open`)&&this.hidePopover()})}};customElements.define(`hd-sidebar-pane`,e);</script></body></html>
@@ -1,102 +0,0 @@
1
- # Projets
2
-
3
- Un projet correspond à un site. Il a ses variables, ses domaines et son historique de déploiements.
4
-
5
- ## GET `/v9/projects`
6
-
7
- Liste les projets de l’organisation. Avec une clé de projet, la liste ne contient que ce projet. La liste compte 100 projets au plus.
8
-
9
- ```bash
10
- curl https://api.host.hgdc.ch/v9/projects \
11
- -H "Authorization: Bearer $VERCEL_TOKEN"
12
- ```
13
-
14
- Réponse `200` :
15
-
16
- ```json
17
- {
18
- "projects": [
19
- {
20
- "id": "j97d3k2m8x1q4p6s7t9v0w2y5z",
21
- "name": "site-atelier",
22
- "accountId": "k57a1b2c3d4e5f6g7h8j9k0m1n",
23
- "framework": "astro",
24
- "rootDirectory": null,
25
- "buildCommand": null,
26
- "installCommand": null,
27
- "outputDirectory": null,
28
- "nodeVersion": "24.x",
29
- "createdAt": 1760259600000,
30
- "updatedAt": 1760259600000
31
- }
32
- ],
33
- "pagination": { "count": 1, "next": null, "prev": null }
34
- }
35
- ```
36
-
37
- Le même endpoint répond aussi sous `/v10/projects`.
38
-
39
- ## GET `/v9/projects/:idOrName`
40
-
41
- Lit un projet, par son identifiant ou son nom, sans tenir compte de la casse.
42
-
43
- ```bash
44
- curl https://api.host.hgdc.ch/v9/projects/site-atelier \
45
- -H "Authorization: Bearer $VERCEL_TOKEN"
46
- ```
47
-
48
- Réponse `200` : l’objet projet, décrit ci-dessous. Les routes `/v9` et `/v10` renvoient la même réponse.
49
-
50
- | Erreur | Code | Cause |
51
- | ------ | ----------- | --------------------------------------------------------------------------------- |
52
- | `404` | `not_found` | Aucun projet de ce nom dans l’organisation, ou projet hors de la portée de la clé |
53
-
54
- ## POST `/v11/projects`
55
-
56
- Crée un projet. Tu peux aussi t’en passer : le premier déploiement sur un nom inconnu crée le projet.
57
-
58
- ```bash
59
- curl -X POST https://api.host.hgdc.ch/v11/projects \
60
- -H "Authorization: Bearer $VERCEL_TOKEN" \
61
- -H "Content-Type: application/json" \
62
- -d '{"name":"site-atelier","framework":"astro"}'
63
- ```
64
-
65
- | Champ | Type | Requis | Description |
66
- | ----------- | ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
67
- | `name` | `string` | Oui | Nom du projet, 100 caractères au plus. Il devient le nom dans l’URL, en minuscules |
68
- | `framework` | `string` ou `null` | Non | `nextjs`, `astro`, `vite`, `sveltekit`, `nuxt`, `tanstack-start` ou `react-router`. Une autre valeur, ou `null`, enregistre un site sans framework |
69
-
70
- Réponse `200` : l’objet projet créé.
71
-
72
- | Erreur | Code | Cause |
73
- | ------ | ------------- | -------------------------------------------------- |
74
- | `400` | `bad_request` | Nom absent ou trop long |
75
- | `403` | `forbidden` | La clé est limitée à un projet : elle ne crée rien |
76
- | `409` | `conflict` | Un projet porte déjà ce nom |
77
-
78
- ## L’objet projet
79
-
80
- | Champ | Type | Description |
81
- | -------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
82
- | `id` | `string` | Identifiant du projet. C’est la valeur de `VERCEL_PROJECT_ID` |
83
- | `name` | `string` | Nom du projet, dans l’URL de la console |
84
- | `accountId` | `string` | Identifiant de l’organisation propriétaire |
85
- | `framework` | `string` ou `null` | Framework enregistré, ou `null` pour un site sans framework |
86
- | `rootDirectory` | `string` ou `null` | Dossier de l’app dans le dépôt, pour un monorepo |
87
- | `buildCommand` | `string` ou `null` | Commande de build imposée. `null` : celle détectée par `vercel build` |
88
- | `installCommand` | `string` ou `null` | Commande d’installation imposée |
89
- | `outputDirectory` | `string` ou `null` | Dossier de sortie imposé |
90
- | `nodeVersion` | `"22.x"` ou `"24.x"` | Version de Node.js du build |
91
- | `createdAt` | `number` | Date de création, en millisecondes depuis l’époque Unix |
92
- | `updatedAt` | `number` | Même valeur que `createdAt` |
93
- | `link` | `object` | Présent seulement pour un projet relié à GitHub : `type` (`github`), `repo` (`propriétaire/dépôt`) et `productionBranch` |
94
- | `alias` | `object[]` | Adresse de production du projet : `domain` (`<projet>.hgdc.cloud`), `target` (`PRODUCTION`), `environment` (`production`), `createdAt`, `deployment` (`null`). Les domaines personnalisés n’y figurent pas |
95
- | `targets.production` | `object` | Présent une fois une production en ligne : le déploiement servi, avec `id`, `url`, `alias` (`["<projet>.hgdc.cloud"]`), `aliasAssigned` (moment de la mise en ligne), `readyState`, `createdAt`, `readyAt` et `meta`. `targets` vaut `{}` avant la première production |
96
-
97
- Pour un projet dont le framework n’est pas reconnu, `framework` vaut `null`.
98
-
99
- ## Voir aussi
100
-
101
- - [Déploiements](/docs/reference/api/deploiements/) : créer un déploiement pour ce projet.
102
- - [Erreurs](/docs/reference/api/erreurs/) : la liste des codes.