조직 API
GitLab v19.5Tier: Free, Premium, Ultimate
Offering: GitLab.com, GitLab Self-Managed
Offering: GitLab.com, GitLab Self-Managed
요약
이 API를 사용하여 GitLab 조직과 상호작용합니다. 이 기능의 사용 가능 여부는 기능 플래그로 제어됩니다. 이 엔드포인트는 실험 기능이며 예고 없이 변경되거나 제거될 수 있습니다.
이 API를 사용하여 GitLab 조직과 상호작용합니다. 자세한 내용은 조직을 참고합니다.
조직 생성#
히스토리
- GitLab 17.5에서
allow_organization_creation이라는 플래그와 함께 도입되었습니다. 기본적으로 비활성화되어 있습니다. 이 기능은 실험 기능입니다. - GitLab 18.4에서 변경되었습니다.
allow_organization_creation기능 플래그가 통합되어organization_switching으로 이름이 변경되었습니다. - GitLab 19.4에서 기능 플래그가
org_stage_experimental로 변경되었습니다. 기본적으로 비활성화되어 있습니다.organization_switching기능 플래그가 제거되었습니다.
Feature flag
이 기능의 사용 가능 여부는 기능 플래그로 제어됩니다. 자세한 내용은 히스토리를 참고합니다.
조직을 생성합니다.
이 엔드포인트는 실험 기능이며 예고 없이 변경되거나 제거될 수 있습니다.
POST /organizations
매개변수:
| 속성 | 유형 | 필수 | 설명 |
|---|---|---|---|
name |
string | 예 | 조직의 이름 |
path |
string | 예 | 조직의 경로 |
description |
string | 아니요 | 조직의 설명 |
avatar |
file | 아니요 | 조직의 아바타 이미지 |
요청 예시:
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" \
--url "https://gitlab.example.com/api/v4/organizations"
응답 예시:
{
"id": 42,
"uuid": "0192f8c2-1a2b-7cde-89ab-0123456789ab",
"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"
}