doc-locale/fr-fr/api/organizations.md
{{< details >}}
{{< /details >}}
Utilisez cette API pour interagir avec les organisations GitLab. Pour plus d'informations, consultez organization.
{{< history >}}
allow_organization_creation. Désactivé par défaut. Cette fonctionnalité est une expérimentation.allow_organization_creation a été consolidé et renommé en organization_switching.{{< /history >}}
[!flag] La disponibilité de cette fonctionnalité est contrôlée par un feature flag. Pour plus d'informations, consultez l'historique.
Crée une organisation.
Ce point de terminaison est une expérience et peut être modifié ou supprimé sans préavis.
POST /organizations
Paramètres :
| Attribut | Type | Obligatoire | Description |
|---|---|---|---|
name | string | oui | Le nom de l'organisation |
path | string | oui | Le chemin de l'organisation |
description | string | non | La description de l'organisation |
avatar | file | non | L'image d'avatar de l'organisation |
Exemple de requête :
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
--form "name=New Organization" \
--form "path=new-org" \
--form "description=A new organization" \
--form "avatar=@/path/to/avatar.png" \
"https://gitlab.example.com/api/v4/organizations"
Exemple de réponse :
{
"id": 42,
"name": "New Organization",
"path": "new-org",
"description": "A new organization",
"created_at": "2024-09-18T02:35:15.371Z",
"updated_at": "2024-09-18T02:35:15.371Z",
"web_url": "https://gitlab.example.com/o/new-org/-/overview",
"avatar_url": "https://gitlab.example.com/uploads/-/system/organizations/organization_detail/avatar/42/avatar.png"
}