프로젝트 API
GitLab v19.2Offering: GitLab.com
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated 이 API를 사용하여 GitLab 프로젝트와 관련 설정을 관리하세요. 프로젝트 API는 다음 작업을 수행하는 엔드포인트를 포함합니다:
-
Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
이 API를 사용하여 GitLab 프로젝트와 관련 설정을 관리하세요. 프로젝트는 코드를 저장하고 이슈를 추적하며 팀 활동을 조직하는 협업의 중심 허브입니다. 자세한 내용은 프로젝트 생성을 참고하세요.
프로젝트 API는 다음 작업을 수행하는 엔드포인트를 포함합니다:
-
프로젝트 정보 및 메타데이터 조회
-
프로젝트 생성, 편집 및 삭제
-
프로젝트 가시성, 접근 권한, 보안 설정 제어
-
이슈 추적, 머지 리퀘스트, CI/CD 등 프로젝트 기능 관리
-
프로젝트 아카이브 및 아카이브 해제
-
네임스페이스 간 프로젝트 이전
-
배포 및 컨테이너 레지스트리 설정 관리
전제 조건#
-
프로젝트 속성을 읽으려면 프로젝트에서 기본 역할 이상이 필요합니다.
-
프로젝트 속성을 편집하려면 프로젝트에서 Owner 또는 Maintainer 역할이 필요합니다.
프로젝트 가시성 레벨#
GitLab의 프로젝트 가시성 레벨은 다음 중 하나입니다:
-
Private
-
Internal
-
Public
가시성 레벨은 프로젝트의 visibility 필드로 결정됩니다.
자세한 내용은 프로젝트 가시성을 참고하세요.
응답에서 반환되는 필드는 인증된 사용자의 권한에 따라 달라집니다.
프로젝트 기능 가시성 레벨#
프로젝트를 생성하거나 편집할 때 프로젝트 설정의 가용성을 제어할 수 있습니다.
예를 들어, 기존 프로젝트에서 forking_access_level을 비활성화하려면:
curl --request PUT \
--header "PRIVATE-TOKEN: <your_access_token>" \
--header "Content-Type: application/json" \
--data '{"forking_access_level": "disabled"}' \
--url "https://gitlab.example.com/api/v4/projects/<project_id>"
각 설정은 독립적으로 정의할 수 있으며 다음 값을 허용합니다:
-
disabled: 기능을 비활성화합니다. -
private: 기능을 활성화하고 프로젝트 멤버만으로 설정합니다. -
enabled: 기능을 활성화하고 접근 권한이 있는 모든 사람으로 설정합니다. -
public: 기능을 활성화하고 모든 사람으로 설정합니다.pages_access_level에서만 사용 가능합니다.
자세한 내용은 프로젝트 내 개별 기능의 가시성 변경을 참고하세요.
| Attribute | Type | Required | Description |
|---|---|---|---|
| analytics_access_level | string | No | Set visibility of analytics. |
| builds_access_level | string | No | Set visibility of pipelines. |
| container_registry_access_level | string | No | Set visibility of container registry. |
| environments_access_level | string | No | Set visibility of environments. |
| feature_flags_access_level | string | No | Set visibility of feature flags. |
| forking_access_level | string | No | Set visibility of forks. |
| infrastructure_access_level | string | No | Set visibility of infrastructure management. |
| issues_access_level | string | No | Set visibility of issues. |
| merge_requests_access_level | string | No | Set visibility of merge requests. |
| model_experiments_access_level | string | No | Set visibility of machine learning model experiments. |
| model_registry_access_level | string | No | Set visibility of machine learning model registry. |
| monitor_access_level | string | No | Set visibility of application performance monitoring. |
| pages_access_level | string | No | Set visibility of GitLab Pages. |
| releases_access_level | string | No | Set visibility of releases. |
| repository_access_level | string | No | Set visibility of repository. |
| requirements_access_level | string | No | Set visibility of requirements management. |
| security_and_compliance_access_level | string | No | Set visibility of security and compliance. |
| snippets_access_level | string | No | Set visibility of snippets. |
| wiki_access_level | string | No | Set visibility of wiki. |
더 이상 사용되지 않는 속성#
다음 속성은 더 이상 사용되지 않으며, 향후 REST API 버전에서 제거될 수 있습니다. 대신 대체 속성을 사용하세요.
| Deprecated attribute | Alternative |
|---|---|
| tag_list | Use topics instead. |
| marked_for_deletion_at | Use marked_for_deletion_on instead. Premium and Ultimate only. |
| approvals_before_merge | Deprecated in GitLab 16.0. Use the Merge request approvals API instead. Premium and Ultimate only. |
| packages_enabled | Deprecated in GitLab 17.10. Use package_registry_access_level instead. |
| container_registry_enabled | Use container_registry_access_level instead. |
| public_builds | Use public_jobs instead. |
| emails_disabled | Use emails_enabled instead. |
| issues_enabled | Use issues_access_level instead. |
| jobs_enabled | Use builds_access_level instead. |
| merge_requests_enabled | Use merge_request_access_level instead. |
| snippets_enabled | Use snippets_access_level instead. |
| wiki_enabled | Use wiki_access_level instead. |
| restrict_user_defined_variables | Deprecated in GitLab 17.7. Use ci_pipeline_variables_minimum_override_role instead. |
프로젝트 조회#
History
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default.- Feature flag
mr_default_title_templateremoved in GitLab 19.0.
지정된 프로젝트를 조회합니다. 프로젝트가 공개적으로 접근 가능한 경우 인증 없이도 이 엔드포인트에 접근할 수 있습니다.
GET /projects/:id
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| license | boolean | No | 프로젝트 라이선스 데이터 포함. |
| statistics | boolean | No | 프로젝트 통계 포함. Reporter, Developer, Maintainer 또는 Owner 역할을 가진 사용자만 사용 가능. |
| with_custom_attributes | boolean | No | 응답에 커스텀 속성 포함. 관리자 접근 권한 필요. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | 프로젝트 ID. |
| description | string | 프로젝트 설명. |
| description_html | string | HTML 형식의 프로젝트 설명. |
| name | string | 프로젝트 이름. |
| name_with_namespace | string | 네임스페이스를 포함한 프로젝트 이름. |
| path | string | 프로젝트 경로. |
| path_with_namespace | string | 네임스페이스를 포함한 프로젝트 경로. |
| created_at | datetime | 프로젝트 생성 타임스탬프. |
| default_branch | string | 프로젝트의 기본 브랜치. |
| tag_list | array of strings | 더 이상 사용되지 않음. 대신 topics를 사용하세요. 프로젝트 태그 목록. |
| topics | array of strings | 프로젝트 토픽 목록. |
| ssh_url_to_repo | string | 리포지터리를 클론하기 위한 SSH URL. |
| http_url_to_repo | string | 리포지터리를 클론하기 위한 HTTP URL. |
| web_url | string | 브라우저에서 프로젝트에 접근하기 위한 URL. |
| readme_url | string | 프로젝트 README 파일 URL. |
| forks_count | integer | 프로젝트의 포크 수. |
| avatar_url | string | 프로젝트 아바타 이미지 URL. |
| star_count | integer | 프로젝트가 받은 별 수. |
| last_activity_at | datetime | 프로젝트의 마지막 활동 타임스탬프. |
| visibility | string | 프로젝트 가시성 레벨. 가능한 값: private, internal, public. |
| namespace | object | 프로젝트의 네임스페이스 정보. |
| namespace.id | integer | 네임스페이스 ID. |
| namespace.name | string | 네임스페이스 이름. |
| namespace.path | string | 네임스페이스 경로. |
| namespace.kind | string | 네임스페이스 유형. 가능한 값: user 또는 group. |
| namespace.full_path | string | 네임스페이스의 전체 경로. |
| namespace.parent_id | integer | 상위 네임스페이스 ID (해당하는 경우). |
| namespace.avatar_url | string | 네임스페이스 아바타 이미지 URL. |
| namespace.web_url | string | 브라우저에서 네임스페이스에 접근하기 위한 URL. |
| container_registry_image_prefix | string | 컨테이너 레지스트리 이미지 접두사. |
| _links | object | 프로젝트와 관련된 API 엔드포인트 링크 모음. |
| _links.self | string | 프로젝트 리소스 URL. |
| _links.issues | string | 프로젝트 이슈 URL. |
| _links.merge_requests | string | 프로젝트 머지 리퀘스트 URL. |
| _links.repo_branches | string | 프로젝트 리포지터리 브랜치 URL. |
| _links.labels | string | 프로젝트 레이블 URL. |
| _links.events | string | 프로젝트 이벤트 URL. |
| _links.members | string | 프로젝트 멤버 URL. |
| _links.cluster_agents | string | 프로젝트 클러스터 에이전트 URL. |
| marked_for_deletion_at | date | 더 이상 사용되지 않음. 대신 marked_for_deletion_on을 사용하세요. 프로젝트 삭제 예정 날짜. |
| marked_for_deletion_on | date | 프로젝트 삭제 예정 날짜. |
| packages_enabled | boolean | 프로젝트에 패키지 레지스트리가 활성화되어 있는지 여부. |
| empty_repo | boolean | 리포지터리가 비어 있는지 여부. |
| archived | boolean | 프로젝트가 아카이브되어 있는지 여부. |
| owner | object | 프로젝트 소유자 정보. |
| owner.id | integer | 프로젝트 Owner의 ID. |
| owner.username | string | 소유자의 사용자 이름. |
| owner.public_email | string | 소유자의 공개 이메일 주소. |
| owner.name | string | 프로젝트 Owner의 이름. |
| owner.state | string | 소유자 계정의 현재 상태. |
| owner.locked | boolean | 소유자 계정이 잠겨 있는지 여부. |
| owner.avatar_url | string | 소유자 아바타 이미지 URL. |
| owner.web_url | string | 소유자 프로필 웹 URL. |
| owner.created_at | datetime | Owner가 생성된 타임스탬프. |
| resolve_outdated_diff_discussions | boolean | 오래된 diff 토론이 자동으로 해결되는지 여부. |
| container_expiration_policy | object | 컨테이너 이미지 만료 정책 설정. |
| container_expiration_policy.cadence | string | 컨테이너 만료 정책이 실행되는 주기. |
| container_expiration_policy.enabled | boolean | 컨테이너 만료 정책 활성화 여부. |
| container_expiration_policy.keep_n | integer | 보관할 컨테이너 이미지 수. |
| container_expiration_policy.older_than | string | 이 값보다 오래된 컨테이너 이미지를 삭제합니다. |
| container_expiration_policy.name_regex | string | 더 이상 사용되지 않음. 대신 name_regex_delete를 사용하세요. 컨테이너 이미지 이름 매칭 정규식. |
| container_expiration_policy.name_regex_delete | string | 삭제할 컨테이너 이미지 이름 매칭 정규식. |
| container_expiration_policy.name_regex_keep | string | 보관할 컨테이너 이미지 이름 매칭 정규식. |
| container_expiration_policy.next_run_at | datetime | 다음 예약된 정책 실행 타임스탬프. |
| repository_object_format | string | 리포지터리에서 사용하는 객체 형식. 가능한 값: sha1 또는 sha256. |
| issues_enabled | boolean | 프로젝트에 이슈가 활성화되어 있는지 여부. |
| merge_requests_enabled | boolean | 프로젝트에 머지 리퀘스트가 활성화되어 있는지 여부. |
| wiki_enabled | boolean | 프로젝트에 위키가 활성화되어 있는지 여부. |
| jobs_enabled | boolean | 프로젝트에 잡이 활성화되어 있는지 여부. |
| snippets_enabled | boolean | 프로젝트에 스니펫이 활성화되어 있는지 여부. |
| container_registry_enabled | boolean | 더 이상 사용되지 않음. 대신 container_registry_access_level을 사용하세요. 컨테이너 레지스트리 활성화 여부. |
| service_desk_enabled | boolean | 프로젝트에 서비스 데스크가 활성화되어 있는지 여부. |
| service_desk_address | string | 서비스 데스크 이메일 주소. |
| can_create_merge_request_in | boolean | 현재 사용자가 프로젝트에서 머지 리퀘스트를 생성할 수 있는지 여부. |
| issues_access_level | string | 이슈 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| repository_access_level | string | 리포지터리 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| merge_requests_access_level | string | 머지 리퀘스트 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| forking_access_level | string | 프로젝트 포크에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| wiki_access_level | string | 위키 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| builds_access_level | string | CI/CD 빌드 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| snippets_access_level | string | 스니펫 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| pages_access_level | string | GitLab Pages에 대한 접근 레벨. 가능한 값: disabled, private, enabled, public. |
| analytics_access_level | string | 분석 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| container_registry_access_level | string | 컨테이너 레지스트리에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| security_and_compliance_access_level | string | 보안 및 컴플라이언스 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| releases_access_level | string | 릴리스 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| environments_access_level | string | 환경 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| feature_flags_access_level | string | 피처 플래그 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| infrastructure_access_level | string | 인프라 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| monitor_access_level | string | 모니터 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| model_experiments_access_level | string | 모델 실험 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| model_registry_access_level | string | 모델 레지스트리 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| package_registry_access_level | string | 패키지 레지스트리 기능에 대한 접근 레벨. 가능한 값: disabled, private, enabled. |
| emails_disabled | boolean | 프로젝트에서 이메일이 비활성화되어 있는지 여부. |
| emails_enabled | boolean | 프로젝트에서 이메일이 활성화되어 있는지 여부. |
| show_diff_preview_in_email | boolean | 이메일 알림에 diff 미리보기가 표시되는지 여부. |
| shared_runners_enabled | boolean | 공유 러너가 프로젝트에 활성화되어 있는지 여부. |
| lfs_enabled | boolean | 프로젝트에 Git LFS가 활성화되어 있는지 여부. |
| creator_id | integer | 프로젝트를 생성한 사용자 ID. |
| import_url | string | 프로젝트를 가져온 URL. |
| import_type | string | 프로젝트에 사용된 가져오기 유형. |
| import_status | string | 프로젝트 가져오기 상태. |
| import_error | string | 가져오기 실패 시 오류 메시지. |
| open_issues_count | integer | 열린 이슈 수. |
| updated_at | datetime | 프로젝트 마지막 업데이트 타임스탬프. |
| ci_default_git_depth | integer | CI/CD 파이프라인의 기본 Git 깊이. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_delete_pipelines_in_seconds | integer | 오래된 파이프라인이 삭제되기까지의 시간(초). |
| ci_forward_deployment_enabled | boolean | 순방향 배포 활성화 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_forward_deployment_rollback_allowed | boolean | 순방향 배포에서 롤백 허용 여부. |
| ci_job_token_scope_enabled | boolean | CI/CD 잡 토큰 범위 활성화 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_separated_caches | boolean | CI/CD 캐시가 브랜치별로 분리되어 있는지 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_allow_fork_pipelines_to_run_in_parent_project | boolean | 포크 파이프라인이 상위 프로젝트에서 실행될 수 있는지 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_id_token_sub_claim_components | array of strings | CI/CD ID 토큰 주체 클레임에 포함된 구성 요소. |
| build_git_strategy | string | CI/CD 빌드에 사용되는 Git 전략 (fetch 또는 clone). 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| keep_latest_artifact | boolean | 새 아티팩트가 생성될 때 최신 아티팩트를 보관하는지 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| restrict_user_defined_variables | boolean | 사용자 정의 변수가 제한되는지 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_pipeline_variables_minimum_override_role | string | 파이프라인 변수를 재정의하기 위한 최소 역할. |
| runner_token_expiration_interval | integer | 러너 토큰 만료 간격(초). 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| group_runners_enabled | boolean | 그룹 러너가 프로젝트에 활성화되어 있는지 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| resource_group_default_process_mode | string | 리소스 그룹의 기본 처리 모드. |
| auto_cancel_pending_pipelines | string | 대기 중인 파이프라인을 자동으로 취소하는 설정. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| build_timeout | integer | CI/CD 잡 타임아웃(초). 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| auto_devops_enabled | boolean | 프로젝트에 Auto DevOps가 활성화되어 있는지 여부. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| auto_devops_deploy_strategy | string | Auto DevOps 배포 전략. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_push_repository_for_job_token_allowed | boolean | 잡 토큰을 사용하여 리포지터리에 푸시가 허용되는지 여부. |
| runners_token | string | 프로젝트에 러너를 등록하기 위한 토큰. 관리자 접근 권한 또는 프로젝트 Owner 역할이 있는 경우에만 표시됩니다. |
| ci_config_path | string | CI/CD 설정 파일 경로. |
| public_jobs | boolean | 잡 로그가 공개적으로 접근 가능한지 여부. |
| shared_with_groups | array of objects | 프로젝트가 공유된 그룹 목록. |
| shared_with_groups[].group_id | integer | 프로젝트가 공유된 그룹 ID. |
| shared_with_groups[].group_name | string | 프로젝트가 공유된 그룹 이름. |
| shared_with_groups[].group_full_path | string | 프로젝트가 공유된 그룹의 전체 경로. |
| shared_with_groups[].group_access_level | integer | 그룹에 부여된 접근 레벨. |
| only_allow_merge_if_pipeline_succeeds | boolean | 파이프라인 성공 시에만 머지가 허용되는지 여부. |
| allow_merge_on_skipped_pipeline | boolean | 파이프라인이 건너뛰어진 경우 머지가 허용되는지 여부. |
| request_access_enabled | boolean | 사용자가 프로젝트 접근을 요청할 수 있는지 여부. |
| only_allow_merge_if_all_discussions_are_resolved | boolean | 모든 토론이 해결된 경우에만 머지가 허용되는지 여부. |
| remove_source_branch_after_merge | boolean | 머지 후 소스 브랜치가 자동으로 제거되는지 여부. |
| printing_merge_request_link_enabled | boolean | 푸시 후 머지 리퀘스트 링크가 출력되는지 여부. |
| printing_merge_requests_link_enabled | boolean | 푸시 후 머지 리퀘스트 링크가 출력되는지 여부. |
| merge_method | string | 프로젝트에 사용되는 머지 방법. 가능한 값: merge, rebase_merge, ff. |
| merge_request_title_regex | string | 머지 리퀘스트 제목 검증을 위한 정규식 패턴. |
| merge_request_title_regex_description | string | 머지 리퀘스트 제목 정규식 검증에 대한 설명. |
| squash_option | string | 머지 리퀘스트 스쿼시 옵션. |
| enforce_auth_checks_on_uploads | boolean | 업로드 시 인증 확인이 강제되는지 여부. |
| suggestion_commit_message | string | 제안에 대한 커스텀 커밋 메시지. |
| merge_commit_template | string | 머지 커밋 메시지 템플릿. |
| mr_default_title_template | string | 머지 리퀘스트 제목 템플릿. |
| squash_commit_template | string | 스쿼시 커밋 메시지 템플릿. |
| issue_branch_template | string | 이슈에서 생성된 브랜치 이름 템플릿. |
| warn_about_potentially_unwanted_characters | boolean | 잠재적으로 원치 않는 문자에 대해 경고할지 여부. |
| autoclose_referenced_issues | boolean | 참조된 이슈가 자동으로 닫히는지 여부. |
| max_artifacts_size | integer | CI/CD 아티팩트의 최대 크기(MB). |
| approvals_before_merge | integer | 더 이상 사용되지 않음. 대신 머지 리퀘스트 승인 API를 사용하세요. 머지 전 필요한 승인 수. |
| mirror | boolean | 프로젝트가 미러인지 여부. |
| external_authorization_classification_label | string | 외부 인증 분류 레이블. |
| requirements_enabled | boolean | 요구사항 관리가 활성화되어 있는지 여부. |
| requirements_access_level | string | 요구사항 기능에 대한 접근 레벨. |
| security_and_compliance_enabled | boolean | 보안 및 컴플라이언스 기능이 활성화되어 있는지 여부. |
| secret_push_protection_enabled | boolean | 시크릿 푸시 보호가 활성화되어 있는지 여부. |
| pre_receive_secret_detection_enabled | boolean | 사전 수신 시크릿 감지가 활성화되어 있는지 여부. |
| compliance_frameworks | array of strings | 프로젝트에 적용된 컴플라이언스 프레임워크. |
| issues_template | string | 이슈의 기본 설명. GitLab Flavored Markdown으로 파싱됩니다. Premium 및 Ultimate만 해당. |
| merge_requests_template | string | 머지 리퀘스트 설명 템플릿. Premium 및 Ultimate만 해당. |
| ci_restrict_pipeline_cancellation_role | string | 파이프라인 취소에 필요한 최소 역할. |
| merge_pipelines_enabled | boolean | 머지 파이프라인 활성화 여부. |
| merge_trains_enabled | boolean | 머지 트레인 활성화 여부. |
| merge_trains_skip_train_allowed | boolean | 머지 트레인 건너뛰기 허용 여부. |
| max_pipelines_per_merge_train | integer | 머지 트레인당 최대 병렬 파이프라인 수. |
| only_allow_merge_if_all_status_checks_passed | boolean | 모든 상태 확인이 통과된 경우에만 머지가 허용되는지 여부. Ultimate만 해당. |
| allow_pipeline_trigger_approve_deployment | boolean | 파이프라인 트리거가 배포를 승인할 수 있는지 여부. |
| prevent_merge_without_jira_issue | boolean | 머지에 관련 Jira 이슈가 필요한지 여부. |
| reviewer_assignment_strategy | string | 머지 리퀘스트에 리뷰어를 자동으로 할당하는 데 사용되는 전략. disabled, code_owners, dap_powered 중 하나. Premium 및 Ultimate 전용. |
| duo_remote_flows_enabled | boolean | GitLab Duo 원격 플로우 활성화 여부. |
| duo_foundational_flows_enabled | boolean | GitLab Duo 기초 플로우 활성화 여부. |
| duo_sast_fp_detection_enabled | boolean | GitLab Duo SAST 거짓 양성 감지 활성화 여부. |
| duo_sast_vr_workflow_enabled | boolean | GitLab Duo SAST 취약점 해결 워크플로 활성화 여부. |
| web_based_commit_signing_enabled | boolean | 웹 기반 커밋 서명 활성화 여부. |
| spp_repository_pipeline_access | boolean | 보안 정책을 위한 리포지터리 파이프라인 접근. 보안 오케스트레이션 정책 기능을 사용할 수 있는 경우에만 표시됩니다. |
| permissions | object | 프로젝트에 대한 사용자 권한. |
| permissions.project_access | object | 사용자의 프로젝트 수준 접근 권한. |
| permissions.project_access.access_level | integer | 프로젝트에 대한 접근 레벨. |
| permissions.project_access.notification_level | integer | 프로젝트에 대한 알림 레벨. |
| permissions.group_access | object | 사용자의 그룹 수준 접근 권한. |
| permissions.group_access.access_level | integer | 그룹에 대한 접근 레벨. |
| permissions.group_access.notification_level | integer | 그룹에 대한 알림 레벨. |
| license_url | string | 프로젝트 라이선스 파일 URL. |
| license.key | string | 라이선스 키 식별자. |
| license.name | string | 라이선스 전체 이름. |
| license.nickname | string | 라이선스 닉네임. |
| license.html_url | string | 라이선스 세부 정보를 보기 위한 URL. |
| license.source_url | string | 라이선스 소스 텍스트 URL. |
| repository_storage | string | 프로젝트 리포지터리의 스토리지 위치. |
| mirror_user_id | integer | 미러를 설정한 사용자 ID. |
| mirror_trigger_builds | boolean | 미러 업데이트가 빌드를 트리거하는지 여부. |
| only_mirror_protected_branches | boolean | 보호된 브랜치만 미러링되는지 여부. |
| mirror_overwrites_diverged_branches | boolean | 미러가 분기된 브랜치를 덮어쓰는지 여부. |
| statistics.commit_count | integer | 프로젝트의 커밋 수. |
| statistics.storage_size | integer | 전체 스토리지 크기(바이트). |
| statistics.repository_size | integer | 리포지터리 스토리지 크기(바이트). |
| statistics.wiki_size | integer | 위키 스토리지 크기(바이트). |
| statistics.lfs_objects_size | integer | LFS 객체 스토리지 크기(바이트). |
| statistics.job_artifacts_size | integer | 잡 아티팩트 스토리지 크기(바이트). |
| statistics.pipeline_artifacts_size | integer | 파이프라인 아티팩트 스토리지 크기(바이트). |
| statistics.packages_size | integer | 패키지 스토리지 크기(바이트). |
| statistics.snippets_size | integer | 스니펫 스토리지 크기(바이트). |
| statistics.uploads_size | integer | 업로드 스토리지 크기(바이트). |
| statistics.container_registry_size | integer | 컨테이너 레지스트리 스토리지 크기(바이트). 1 |
| forked_from_project | object | 이 프로젝트가 포크된 업스트림 프로젝트. 업스트림 프로젝트가 비공개인 경우 이 필드를 보려면 인증 토큰이 필요합니다. |
| mr_default_target_self | boolean | 머지 리퀘스트가 기본적으로 이 프로젝트를 대상으로 하는지 여부. false이면 업스트림 프로젝트가 대상입니다. 프로젝트가 포크인 경우에만 표시됩니다. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--header "Accept: application/json" \
--url "https://gitlab.example.com/api/v4/projects/<project_id>"
응답 예시:
{
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
"web_url": "http://example.com/diaspora/diaspora-project-site",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
],
"topics": [
"example",
"disapora project"
],
"owner": {
"id": 3,
"name": "Diaspora",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Diaspora Project Site",
"name_with_namespace": "Diaspora / Diaspora Project Site",
"path": "diaspora-project-site",
"path_with_namespace": "diaspora/diaspora-project-site",
"issues_enabled": true,
"open_issues_count": 1,
"merge_requests_enabled": true,
"jobs_enabled": true,
"wiki_enabled": true,
"snippets_enabled": false,
"can_create_merge_request_in": true,
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": false, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "disabled",
"security_and_compliance_access_level": "disabled",
"container_expiration_policy": {
"cadence": "7d",
"enabled": false,
"keep_n": null,
"older_than": null,
"name_regex": null, // to be deprecated in GitLab 13.0 in favor of `name_regex_delete`
"name_regex_delete": null,
"name_regex_keep": null,
"next_run_at": "2020-01-07T21:42:58.658Z"
},
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"last_activity_at": "2013-09-30T13:46:02Z",
"creator_id": 3,
"namespace": {
"id": 3,
"name": "Diaspora",
"path": "diaspora",
"kind": "group",
"full_path": "diaspora",
"avatar_url": "http://localhost:3000/uploads/group/avatar/3/foo.jpg",
"web_url": "http://localhost:3000/groups/diaspora"
},
"import_url": null,
"import_type": null,
"import_status": "none",
"import_error": null,
"permissions": {
"project_access": {
"access_level": 10,
"notification_level": 3
},
"group_access": {
"access_level": 50,
"notification_level": 3
}
},
"archived": false,
"avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
"license_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
"nickname": "GNU LGPLv3",
"html_url": "http://choosealicense.com/licenses/lgpl-3.0/",
"source_url": "http://www.gnu.org/licenses/lgpl-3.0.txt"
},
"shared_runners_enabled": true,
"group_runners_enabled": true,
"forks_count": 0,
"star_count": 0,
"runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_forward_deployment_rollback_allowed": true,
"ci_allow_fork_pipelines_to_run_in_parent_project": true,
"ci_id_token_sub_claim_components": ["project_path", "ref_type", "ref"],
"ci_separated_caches": true,
"ci_restrict_pipeline_cancellation_role": "developer",
"ci_pipeline_variables_minimum_override_role": "maintainer",
"ci_push_repository_for_job_token_allowed": false,
"ci_display_pipeline_variables": false,
"protect_merge_request_pipelines": true,
"public_jobs": true,
"shared_with_groups": [
{
"group_id": 4,
"group_name": "Twitter",
"group_full_path": "twitter",
"group_access_level": 30
},
{
"group_id": 3,
"group_name": "Gitlab Org",
"group_full_path": "gitlab-org",
"group_access_level": 10
}
],
"repository_storage": "default",
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": false,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": false,
"printing_merge_requests_link_enabled": true,
"request_access_enabled": false,
"merge_method": "merge",
"squash_option": "default_on",
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"mirror_user_id": 45,
"mirror_trigger_builds": false,
"only_mirror_protected_branches": false,
"mirror_overwrites_diverged_branches": false,
"external_authorization_classification_label": null,
"packages_enabled": true,
"empty_repo": false,
"service_desk_enabled": false,
"service_desk_address": null,
"autoclose_referenced_issues": true,
"suggestion_commit_message": null,
"enforce_auth_checks_on_uploads": true,
"merge_commit_template": null,
"squash_commit_template": null,
"issue_branch_template": "gitlab/%{id}-%{title}",
"marked_for_deletion_at": "2020-04-03", // Deprecated in favor of marked_for_deletion_on. Planned for removal in a future version of the REST API.
"marked_for_deletion_on": "2020-04-03",
"compliance_frameworks": [ "sox" ],
"warn_about_potentially_unwanted_characters": true,
"secret_push_protection_enabled": false,
"statistics": {
"commit_count": 37,
"storage_size": 1038090,
"repository_size": 1038090,
"wiki_size" : 0,
"lfs_objects_size": 0,
"job_artifacts_size": 0,
"pipeline_artifacts_size": 0,
"packages_size": 0,
"snippets_size": 0,
"uploads_size": 0,
"container_registry_size": 0
},
"container_registry_image_prefix": "registry.example.com/diaspora/diaspora-client",
"_links": {
"self": "http://example.com/api/v4/projects",
"issues": "http://example.com/api/v4/projects/1/issues",
"merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
"repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members",
"cluster_agents": "http://example.com/api/v4/projects/1/cluster_agents"
},
"spp_repository_pipeline_access": false // Only visible if the security_orchestration_policies feature is available
}
프로젝트 목록 조회#
프로젝트 및 프로젝트 속성 목록을 조회합니다.
모든 프로젝트 목록 조회#
History
web_based_commit_signing_enabledintroduced in GitLab 18.2 with a feature flag nameduse_web_based_commit_signing_enabled. Disabled by default.web_based_commit_signing_enabledgenerally available in GitLab 19.1. Feature flaguse_web_based_commit_signing_enabledremoved.mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default.- Feature flag
mr_default_title_templateremoved in GitLab 19.0.
인증된 사용자가 접근할 수 있는 인스턴스의 모든 프로젝트를 나열합니다. 인증되지 않은 요청은 제한된 속성 집합으로 공개 프로젝트만 반환합니다.
커스텀 속성으로 응답을 필터링할 수 있습니다.
이 엔드포인트는 페이지네이션을 지원합니다:
-
오프셋 기반 페이지네이션을 사용하여 최대 50,000개의 프로젝트에 접근할 수 있습니다.
-
키셋 기반 페이지네이션을 사용하여 50,000개 이상의 프로젝트를 나열할 수 있습니다.
자세한 내용은 페이지네이션을 참고하세요.
GET /projects
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| archived | boolean | No | Limit by archived status. |
| id_after | integer | No | Limit results to projects with IDs greater than the specified ID. |
| id_before | integer | No | Limit results to projects with IDs less than the specified ID. |
| imported | boolean | No | Limit results to projects which were imported from external systems by current user. |
| include_hidden | boolean | No | Include hidden projects. (administrators only) Premium and Ultimate only. |
| include_pending_delete | boolean | No | Include projects pending deletion. (administrators only) |
| last_activity_after | datetime | No | Limit results to projects with last activity after specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ) |
| last_activity_before | datetime | No | Limit results to projects with last activity before specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ) |
| membership | boolean | No | Limit by projects that the current user is a member of. |
| min_access_level | integer | No | Limit to projects where the current user has at least the specified access level. Possible values: 5 (Minimal access), 10 (Guest), 15 (Planner), 20 (Reporter), 25 (Security Manager), 30 (Developer), 40 (Maintainer), or 50 (Owner). |
| order_by | string | No | Return projects ordered by id, name, path, created_at, updated_at, star_count, last_activity_at, or similarity fields. repository_size, storage_size, packages_size or wiki_size fields are only allowed for administrators. similarity is only available when searching and is limited to projects that the current user is a member of. Default is created_at. |
| owned | boolean | No | Limit by projects explicitly owned by the current user. |
| repository_checksum_failed | boolean | No | Limit projects where the repository checksum calculation has failed. Premium and Ultimate only. |
| repository_storage | string | No | Limit results to projects stored on repository_storage. (administrators only) |
| search_namespaces | boolean | No | Include ancestor namespaces when matching search criteria. Default is false. |
| search | string | No | Return list of projects with a path, name, or description matching the search criteria (case-insensitive, substring match). Multiple terms can be provided, separated by an escaped space, either + or %20, and will be ANDed together. Example: one+two will match substrings one and two (in any order). |
| simple | boolean | No | If true, return only limited fields for each project. Unauthenticated requests return only public projects with limited fields, even if simple is not set. |
| sort | string | No | Return projects sorted in asc or desc order. Default is desc. |
| starred | boolean | No | Limit by projects starred by the current user. |
| statistics | boolean | No | Include project statistics. Available only to users with the Reporter, Developer, Maintainer, or Owner role. |
| topic_id | integer | No | Limit results to projects with the assigned topic given by the topic ID. |
| topic | string | No | Comma-separated topic names. Limit results to projects that match all of given topics. See topics attribute. |
| updated_after | datetime | No | Limit results to projects last updated after the specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). Introduced in GitLab 15.10. For this filter to work, you must also provide updated_at as the order_by attribute. |
| updated_before | datetime | No | Limit results to projects last updated before the specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). Introduced in GitLab 15.10. For this filter to work, you must also provide updated_at as the order_by attribute. |
| visibility | string | No | Limit by visibility public, internal, or private. |
| wiki_checksum_failed | boolean | No | Limit projects where the wiki checksum calculation has failed. Premium and Ultimate only. |
| with_custom_attributes | boolean | No | Include custom attributes in response. (administrator only) |
| with_issues_enabled | boolean | No | Limit by enabled issues feature. |
| with_merge_requests_enabled | boolean | No | Limit by enabled merge requests feature. |
| with_programming_language | string | No | Limit by projects which use the given programming language. |
| marked_for_deletion_on | date | No | Filter by date when project was marked for deletion. Introduced in GitLab 17.1. Premium and Ultimate only. |
| active | boolean | No | Limit by projects that are not archived and not marked for deletion. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | ID of the project. |
| description | string | Description of the project. |
| name | string | Name of the project. |
| name_with_namespace | string | Name of the project with its namespace. |
| path | string | Path of the project. |
| path_with_namespace | string | Path of the project with its namespace. |
| created_at | datetime | Timestamp when the project was created. |
| default_branch | string | Default branch of the project. |
| tag_list | array of strings | Deprecated. Use topics instead. List of tags for the project. |
| topics | array of strings | List of topics for the project. |
| ssh_url_to_repo | string | SSH URL to clone the repository. |
| http_url_to_repo | string | HTTP URL to clone the repository. |
| web_url | string | URL to access the project in a browser. |
| readme_url | string | URL to the project’s README file. |
| forks_count | integer | Number of forks of the project. |
| avatar_url | string | URL to the project’s avatar image. |
| star_count | integer | Number of stars the project has received. |
| last_activity_at | datetime | Timestamp of the last activity in the project. |
| visibility | string | Visibility level of the project. Possible values: private, internal, or public. |
| namespace | object | Namespace information for the project. |
| namespace.id | integer | ID of the namespace. |
| namespace.name | string | Name of the namespace. |
| namespace.path | string | Path of the namespace. |
| namespace.kind | string | Type of namespace. Possible values: user or group. |
| namespace.full_path | string | Full path of the namespace. |
| namespace.parent_id | integer | ID of the parent namespace, if applicable. |
| namespace.avatar_url | string | URL to the namespace’s avatar image. |
| namespace.web_url | string | URL to access the namespace in a browser. |
| container_registry_image_prefix | string | Prefix for container registry images. |
| _links | object | Collection of API endpoint links related to the project. |
| _links.self | string | URL to the project resource. |
| _links.issues | string | URL to the project’s issues. |
| _links.merge_requests | string | URL to the project’s merge requests. |
| _links.repo_branches | string | URL to the project’s repository branches. |
| _links.labels | string | URL to the project’s labels. |
| _links.events | string | URL to the project’s events. |
| _links.members | string | URL to the project’s members. |
| _links.cluster_agents | string | URL to the project’s cluster agents. |
| marked_for_deletion_at | date | Deprecated. Use marked_for_deletion_on instead. Date when the project is scheduled for deletion. |
| marked_for_deletion_on | date | Date when the project is scheduled for deletion. |
| packages_enabled | boolean | Whether the package registry is enabled for the project. |
| empty_repo | boolean | Whether the repository is empty. |
| archived | boolean | Whether the project is archived. |
| resolve_outdated_diff_discussions | boolean | Whether outdated diff discussions are automatically resolved. |
| container_expiration_policy | object | Settings for container image expiration policy. |
| container_expiration_policy.cadence | string | How often the container expiration policy runs. |
| container_expiration_policy.enabled | boolean | Whether the container expiration policy is enabled. |
| container_expiration_policy.keep_n | integer | Number of container images to keep. |
| container_expiration_policy.older_than | string | Remove container images older than this value. |
| container_expiration_policy.name_regex | string | Deprecated. Use name_regex_delete instead. Regular expression to match container image names. |
| container_expiration_policy.name_regex_keep | string | Regular expression to match container image names to keep. |
| container_expiration_policy.next_run_at | datetime | Timestamp for the next scheduled policy run. |
| repository_object_format | string | Object format used by the repository (sha1 or sha256). |
| issues_enabled | boolean | Whether issues are enabled for the project. |
| merge_requests_enabled | boolean | Whether merge requests are enabled for the project. |
| wiki_enabled | boolean | Whether the wiki is enabled for the project. |
| jobs_enabled | boolean | Whether jobs are enabled for the project. |
| snippets_enabled | boolean | Whether snippets are enabled for the project. |
| container_registry_enabled | boolean | Deprecated. Use container_registry_access_level instead. Whether the container registry is enabled. |
| service_desk_enabled | boolean | Whether Service Desk is enabled for the project. |
| can_create_merge_request_in | boolean | Whether the current user can create merge requests in the project. |
| issues_access_level | string | Access level for the issues feature. Possible values: disabled, private, or enabled. |
| repository_access_level | string | Access level for the repository feature. Possible values: disabled, private, or enabled. |
| merge_requests_access_level | string | Access level for the merge requests feature. Possible values: disabled, private, or enabled. |
| forking_access_level | string | Access level for forking the project. Possible values: disabled, private, or enabled. |
| wiki_access_level | string | Access level for the wiki feature. Possible values: disabled, private, or enabled. |
| builds_access_level | string | Access level for the CI/CD builds feature. Possible values: disabled, private, or enabled. |
| snippets_access_level | string | Access level for the snippets feature. Possible values: disabled, private, or enabled. |
| pages_access_level | string | Access level for GitLab Pages. Possible values: disabled, private, enabled, or public. |
| analytics_access_level | string | Access level for analytics features. Possible values: disabled, private, or enabled. |
| container_registry_access_level | string | Access level for the container registry. Possible values: disabled, private, or enabled. |
| security_and_compliance_access_level | string | Access level for security and compliance features. Possible values: disabled, private, or enabled. |
| releases_access_level | string | Access level for the releases feature. Possible values: disabled, private, or enabled. |
| environments_access_level | string | Access level for the environments feature. Possible values: disabled, private, or enabled. |
| feature_flags_access_level | string | Access level for the feature flags feature. Possible values: disabled, private, or enabled. |
| infrastructure_access_level | string | Access level for the infrastructure feature. Possible values: disabled, private, or enabled. |
| monitor_access_level | string | Access level for the monitor feature. Possible values: disabled, private, or enabled. |
| model_experiments_access_level | string | Access level for the model experiments feature. Possible values: disabled, private, or enabled. |
| model_registry_access_level | string | Access level for the model registry feature. Possible values: disabled, private, or enabled. |
| package_registry_access_level | string | Access level for the package registry feature. Possible values: disabled, private, or enabled. |
| emails_disabled | boolean | Indicates if emails are disabled for the project. |
| emails_enabled | boolean | Indicates if emails are enabled for the project. |
| show_diff_preview_in_email | boolean | Indicates if diff previews are shown in email notifications. |
| shared_runners_enabled | boolean | Whether shared runners are enabled for the project. |
| lfs_enabled | boolean | Indicates if Git LFS is enabled for the project. |
| creator_id | integer | ID of the user who created the project. |
| import_status | string | Status of the project import. |
| open_issues_count | integer | Number of open issues. |
| description_html | string | Description of the project in HTML format. |
| updated_at | datetime | Timestamp when the project was last updated. |
| ci_config_path | string | Path to the CI/CD configuration file. |
| public_jobs | boolean | Whether job logs are publicly accessible. |
| shared_with_groups | array of objects | List of groups the project is shared with. |
| only_allow_merge_if_pipeline_succeeds | boolean | Whether merges are allowed only if the pipeline succeeds. |
| allow_merge_on_skipped_pipeline | boolean | Whether merges are allowed when the pipeline is skipped. |
| request_access_enabled | boolean | Whether users can request access to the project. |
| only_allow_merge_if_all_discussions_are_resolved | boolean | Whether merges are allowed only if all discussions are resolved. |
| remove_source_branch_after_merge | boolean | Whether the source branch is automatically removed after merge. |
| printing_merge_request_link_enabled | boolean | Indicates if merge request links are printed after pushing. |
| merge_method | string | Merge method used for the project. Possible values: merge, rebase_merge, or ff. |
| merge_request_title_regex | string | Regex pattern for validating merge request titles. |
| merge_request_title_regex_description | string | Description of the merge request title regex validation. |
| squash_option | string | Squash option for merge requests. |
| enforce_auth_checks_on_uploads | boolean | Whether authentication checks are enforced on uploads. |
| suggestion_commit_message | string | Custom commit message for suggestions. |
| merge_commit_template | string | Template for merge commit messages. |
| mr_default_title_template | string | Template for merge request titles. |
| squash_commit_template | string | Template for squash commit messages. |
| issue_branch_template | string | Template for branch names created from issues. |
| warn_about_potentially_unwanted_characters | boolean | Whether to warn about potentially unwanted characters. |
| autoclose_referenced_issues | boolean | Whether referenced issues are automatically closed. |
| max_artifacts_size | integer | Maximum size in MB for CI/CD artifacts. |
| approvals_before_merge | integer | Deprecated. Use merge request approvals API instead. Number of approvals required before merge. |
| mirror | boolean | Whether the project is a mirror. |
| external_authorization_classification_label | string | External authorization classification label. |
| requirements_enabled | boolean | Indicates if requirements management is enabled. |
| requirements_access_level | string | Access level for the requirements feature. |
| security_and_compliance_enabled | boolean | Indicates if security and compliance features are enabled. |
| compliance_frameworks | array of strings | Compliance frameworks applied to the project. |
| issues_template | string | Default description for issues. Description is parsed with GitLab Flavored Markdown. Premium and Ultimate only. |
| merge_requests_template | string | Template for merge request descriptions. Premium and Ultimate only. |
| merge_pipelines_enabled | boolean | Indicates if merge pipelines are enabled. |
| merge_trains_enabled | boolean | Indicates if merge trains are enabled. |
| merge_trains_skip_train_allowed | boolean | Indicates if skipping the merge train is allowed. |
| max_pipelines_per_merge_train | integer | Maximum number of parallel pipelines per merge train. |
| only_allow_merge_if_all_status_checks_passed | boolean | Whether merges are allowed only if all status checks have passed. Ultimate only. |
| allow_pipeline_trigger_approve_deployment | boolean | Whether pipeline triggers can approve deployments. |
| prevent_merge_without_jira_issue | boolean | Indicates if merges require an associated Jira issue. |
| reviewer_assignment_strategy | string | Strategy used to automatically assign reviewers to merge requests. One of disabled, code_owners, or dap_powered. Premium and Ultimate only. |
| duo_remote_flows_enabled | boolean | Indicates if GitLab Duo remote flows are enabled. |
| duo_foundational_flows_enabled | boolean | Indicates if GitLab Duo foundational flows are enabled. |
| duo_sast_fp_detection_enabled | boolean | Indicates if GitLab Duo SAST false positive detection is enabled. |
| duo_sast_vr_workflow_enabled | boolean | Indicates if GitLab Duo SAST vulnerability resolution workflow is enabled. |
| spp_repository_pipeline_access | boolean | Repository pipeline access for security policies. Only visible if the security orchestration policies feature is available. |
| permissions | object | User permissions for the project. |
| permissions.project_access | object | Project access permissions for the user. |
| permissions.group_access | object | Group access permissions for the user. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--header "Accept: application/json" \
--url "https://gitlab.example.com/api/v4/projects
응답 예시:
[
{
"id": 4,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"name": "Diaspora Client",
"name_with_namespace": "Diaspora / Diaspora Client",
"path": "diaspora-client",
"path_with_namespace": "diaspora/diaspora-client",
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"default_branch": "main",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora client"
],
"topics": [
"example",
"disapora client"
],
"ssh_url_to_repo": "git@gitlab.example.com:diaspora/diaspora-client.git",
"http_url_to_repo": "https://gitlab.example.com/diaspora/diaspora-client.git",
"web_url": "https://gitlab.example.com/diaspora/diaspora-client",
"readme_url": "https://gitlab.example.com/diaspora/diaspora-client/blob/main/README.md",
"avatar_url": "https://gitlab.example.com/uploads/project/avatar/4/uploads/avatar.png",
"forks_count": 0,
"star_count": 0,
"last_activity_at": "2022-06-24T17:11:26.841Z",
"namespace": {
"id": 3,
"name": "Diaspora",
"path": "diaspora",
"kind": "group",
"full_path": "diaspora",
"parent_id": null,
"avatar_url": "https://gitlab.example.com/uploads/project/avatar/6/uploads/avatar.png",
"web_url": "https://gitlab.example.com/diaspora"
},
"container_registry_image_prefix": "registry.gitlab.example.com/diaspora/diaspora-client",
"_links": {
"self": "https://gitlab.example.com/api/v4/projects/4",
"issues": "https://gitlab.example.com/api/v4/projects/4/issues",
"merge_requests": "https://gitlab.example.com/api/v4/projects/4/merge_requests",
"repo_branches": "https://gitlab.example.com/api/v4/projects/4/repository/branches",
"labels": "https://gitlab.example.com/api/v4/projects/4/labels",
"events": "https://gitlab.example.com/api/v4/projects/4/events",
"members": "https://gitlab.example.com/api/v4/projects/4/members",
"cluster_agents": "https://gitlab.example.com/api/v4/projects/4/cluster_agents"
},
"packages_enabled": true, // deprecated, use package_registry_access_level instead
"package_registry_access_level": "enabled",
"empty_repo": false,
"archived": false,
"visibility": "public",
"resolve_outdated_diff_discussions": false,
"container_expiration_policy": {
"cadence": "1month",
"enabled": true,
"keep_n": 1,
"older_than": "14d",
"name_regex": "",
"name_regex_keep": ".*-main",
"next_run_at": "2022-06-25T17:11:26.865Z"
},
"issues_enabled": true,
"merge_requests_enabled": true,
"wiki_enabled": true,
"jobs_enabled": true,
"snippets_enabled": true,
"container_registry_enabled": true,
"service_desk_enabled": true,
"can_create_merge_request_in": true,
"issues_access_level": "enabled",
"repository_access_level": "enabled",
"merge_requests_access_level": "enabled",
"forking_access_level": "enabled",
"wiki_access_level": "enabled",
"builds_access_level": "enabled",
"snippets_access_level": "enabled",
"pages_access_level": "enabled",
"analytics_access_level": "enabled",
"container_registry_access_level": "enabled",
"security_and_compliance_access_level": "private",
"emails_disabled": null,
"emails_enabled": null,
"shared_runners_enabled": true,
"group_runners_enabled": true,
"lfs_enabled": true,
"creator_id": 1,
"import_url": null,
"import_type": null,
"import_status": "none",
"import_error": null,
"open_issues_count": 0,
"ci_default_git_depth": 20,
"ci_forward_deployment_enabled": true,
"ci_forward_deployment_rollback_allowed": true,
"ci_allow_fork_pipelines_to_run_in_parent_project": true,
"ci_id_token_sub_claim_components": ["project_path", "ref_type", "ref"],
"ci_job_token_scope_enabled": false,
"ci_separated_caches": true,
"ci_restrict_pipeline_cancellation_role": "developer",
"ci_pipeline_variables_minimum_override_role": "maintainer",
"ci_push_repository_for_job_token_allowed": false,
"ci_display_pipeline_variables": false,
"protect_merge_request_pipelines": true,
"public_jobs": true,
"build_timeout": 3600,
"auto_cancel_pending_pipelines": "enabled",
"ci_config_path": "",
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": null,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"request_access_enabled": true,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": true,
"printing_merge_request_link_enabled": true,
"merge_method": "merge",
"squash_option": "default_off",
"enforce_auth_checks_on_uploads": true,
"suggestion_commit_message": null,
"merge_commit_template": null,
"squash_commit_template": null,
"issue_branch_template": "gitlab/%{id}-%{title}",
"auto_devops_enabled": false,
"auto_devops_deploy_strategy": "continuous",
"autoclose_referenced_issues": true,
"keep_latest_artifact": true,
"runner_token_expiration_interval": null,
"external_authorization_classification_label": "",
"requirements_enabled": false,
"requirements_access_level": "enabled",
"security_and_compliance_enabled": false,
"secret_push_protection_enabled": false,
"compliance_frameworks": [],
"warn_about_potentially_unwanted_characters": true,
"permissions": {
"project_access": null,
"group_access": null
}
},
{
...
}
]
`last_activity_at`는 [프로젝트 활동](/19.0/user/project/working_with_projects/#view-project-activity) 및 [프로젝트 이벤트](/19.0/api/events/)를 기반으로 업데이트됩니다. 데이터베이스 성능을 최적화하기 위해 이 필드는 최대 1시간에 한 번 업데이트됩니다.
마지막 업데이트 후 1시간 이내에 발생한 이벤트는 타임스탬프를 수정하지 않습니다.
따라서 last_activity_at는 최대 1시간까지 최신 상태가 아닐 수 있습니다.
updated_at는 데이터베이스에서 프로젝트 레코드가 변경될 때마다 업데이트됩니다.
사용자의 모든 개인 프로젝트 목록 조회#
History
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default.- Feature flag
mr_default_title_templateremoved in GitLab 19.0.
지정된 사용자의 모든 개인 프로젝트를 나열합니다. 다음 제한 사항이 적용됩니다:
-
그룹 또는 하위 그룹 프로젝트가 아닌 사용자의 개인 네임스페이스에 있는 프로젝트만 반환합니다.
-
사용자 프로필이 비공개인 경우 빈 목록을 반환합니다.
-
인증 없는 요청은 공개 프로젝트만 반환합니다.
이 엔드포인트는 페이지네이션을 지원합니다:
-
오프셋 기반 페이지네이션을 사용하여 최대 50,000개의 프로젝트에 접근할 수 있습니다.
-
키셋 기반 페이지네이션을 사용하여 50,000개 이상의 프로젝트를 나열할 수 있습니다.
자세한 내용은 페이지네이션을 참고하세요.
GET /users/:user_id/projects
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | The ID or username of the user. |
| archived | boolean | No | Limit by archived status. |
| id_after | integer | No | Limit results to projects with IDs greater than the specified ID. |
| id_before | integer | No | Limit results to projects with IDs less than the specified ID. |
| membership | boolean | No | Limit by projects that the current user is a member of. |
| min_access_level | integer | No | Limit to projects where the current user has at least the specified access level. Possible values: 5 (Minimal access), 10 (Guest), 15 (Planner), 20 (Reporter), 25 (Security Manager), 30 (Developer), 40 (Maintainer), or 50 (Owner). |
| order_by | string | No | Return projects ordered by id, name, path, created_at, updated_at, star_count, or last_activity_at fields. Default is created_at. |
| owned | boolean | No | Limit by projects explicitly owned by the current user. |
| search | string | No | Return list of projects matching the search criteria. |
| simple | boolean | No | If true, return only limited fields for each project. Unauthenticated requests return only public projects with limited fields, even if simple is not set. |
| sort | string | No | Return projects sorted in asc or desc order. Default is desc. |
| starred | boolean | No | Limit by projects starred by the current user. |
| statistics | boolean | No | Include project statistics. Available only to users with the Reporter, Developer, Maintainer, or Owner role. |
| updated_after | datetime | No | Limit results to projects last updated after the specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). |
| updated_before | datetime | No | Limit results to projects last updated before the specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). |
| visibility | string | No | Limit by visibility. Possible values: public, internal, or private. |
| with_custom_attributes | boolean | No | Include custom attributes in response. Administrator access. |
| with_issues_enabled | boolean | No | Limit by enabled issues feature. |
| with_merge_requests_enabled | boolean | No | Limit by enabled merge requests feature. |
| with_programming_language | string | No | Limit by projects which use the given programming language. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | ID of the project. |
| description | string | Description of the project. |
| name | string | Name of the project. |
| name_with_namespace | string | Name of the project with its namespace. |
| path | string | Path of the project. |
| path_with_namespace | string | Path of the project with its namespace. |
| created_at | datetime | Timestamp when the project was created. |
| default_branch | string | Default branch of the project. |
| tag_list | array of strings | Deprecated. Use topics instead. List of tags for the project. |
| topics | array of strings | List of topics for the project. |
| ssh_url_to_repo | string | SSH URL to clone the repository. |
| http_url_to_repo | string | HTTP URL to clone the repository. |
| web_url | string | URL to access the project in a browser. |
| readme_url | string | URL to the project’s README file. |
| forks_count | integer | Number of forks of the project. |
| avatar_url | string | URL to the project’s avatar image. |
| star_count | integer | Number of stars the project has received. |
| last_activity_at | datetime | Timestamp of the last activity in the project. |
| visibility | string | Visibility level of the project. Possible values: private, internal, or public. |
| namespace | object | Namespace information for the project. |
| namespace.id | integer | ID of the namespace. |
| namespace.name | string | Name of the namespace. |
| namespace.path | string | Path of the namespace. |
| namespace.kind | string | Type of namespace. Possible values: user or group. |
| namespace.full_path | string | Full path of the namespace. |
| namespace.parent_id | integer | ID of the parent namespace, if applicable. |
| namespace.avatar_url | string | URL to the namespace’s avatar image. |
| namespace.web_url | string | URL to access the namespace in a browser. |
| container_registry_image_prefix | string | Prefix for container registry images. |
| _links | object | Collection of API endpoint links related to the project. |
| _links.self | string | URL to the project resource. |
| _links.issues | string | URL to the project’s issues. |
| _links.merge_requests | string | URL to the project’s merge requests. |
| _links.repo_branches | string | URL to the project’s repository branches. |
| _links.labels | string | URL to the project’s labels. |
| _links.events | string | URL to the project’s events. |
| _links.members | string | URL to the project’s members. |
| _links.cluster_agents | string | URL to the project’s cluster agents. |
| marked_for_deletion_at | date | Deprecated. Use marked_for_deletion_on instead. Date when the project is scheduled for deletion. |
| marked_for_deletion_on | date | Date when the project is scheduled for deletion. |
| packages_enabled | boolean | Whether the package registry is enabled for the project. |
| empty_repo | boolean | Whether the repository is empty. |
| archived | boolean | Whether the project is archived. |
| resolve_outdated_diff_discussions | boolean | Whether outdated diff discussions are automatically resolved. |
| container_expiration_policy | object | Settings for container image expiration policy. |
| container_expiration_policy.cadence | string | How often the container expiration policy runs. |
| container_expiration_policy.enabled | boolean | Whether the container expiration policy is enabled. |
| container_expiration_policy.keep_n | integer | Number of container images to keep. |
| container_expiration_policy.older_than | string | Remove container images older than this value. |
| container_expiration_policy.name_regex | string | Deprecated. Use name_regex_delete instead. Regular expression to match container image names. |
| container_expiration_policy.name_regex_keep | string | Regular expression to match container image names to keep. |
| container_expiration_policy.next_run_at | datetime | Timestamp for the next scheduled policy run. |
| repository_object_format | string | Object format used by the repository (sha1 or sha256). |
| issues_enabled | boolean | Whether issues are enabled for the project. |
| merge_requests_enabled | boolean | Whether merge requests are enabled for the project. |
| wiki_enabled | boolean | Whether the wiki is enabled for the project. |
| jobs_enabled | boolean | Whether jobs are enabled for the project. |
| snippets_enabled | boolean | Whether snippets are enabled for the project. |
| container_registry_enabled | boolean | Deprecated. Use container_registry_access_level instead. Whether the container registry is enabled. |
| service_desk_enabled | boolean | Whether Service Desk is enabled for the project. |
| can_create_merge_request_in | boolean | Whether the current user can create merge requests in the project. |
| issues_access_level | string | Access level for the issues feature. Possible values: disabled, private, or enabled. |
| repository_access_level | string | Access level for the repository feature. Possible values: disabled, private, or enabled. |
| merge_requests_access_level | string | Access level for the merge requests feature. Possible values: disabled, private, or enabled. |
| forking_access_level | string | Access level for forking the project. Possible values: disabled, private, or enabled. |
| wiki_access_level | string | Access level for the wiki feature. Possible values: disabled, private, or enabled. |
| builds_access_level | string | Access level for the CI/CD builds feature. Possible values: disabled, private, or enabled. |
| snippets_access_level | string | Access level for the snippets feature. Possible values: disabled, private, or enabled. |
| pages_access_level | string | Access level for GitLab Pages. Possible values: disabled, private, enabled, or public. |
| analytics_access_level | string | Access level for analytics features. Possible values: disabled, private, or enabled. |
| container_registry_access_level | string | Access level for the container registry. Possible values: disabled, private, or enabled. |
| security_and_compliance_access_level | string | Access level for security and compliance features. Possible values: disabled, private, or enabled. |
| releases_access_level | string | Access level for the releases feature. Possible values: disabled, private, or enabled. |
| environments_access_level | string | Access level for the environments feature. Possible values: disabled, private, or enabled. |
| feature_flags_access_level | string | Access level for the feature flags feature. Possible values: disabled, private, or enabled. |
| infrastructure_access_level | string | Access level for the infrastructure feature. Possible values: disabled, private, or enabled. |
| monitor_access_level | string | Access level for the monitor feature. Possible values: disabled, private, or enabled. |
| model_experiments_access_level | string | Access level for the model experiments feature. Possible values: disabled, private, or enabled. |
| model_registry_access_level | string | Access level for the model registry feature. Possible values: disabled, private, or enabled. |
| package_registry_access_level | string | Access level for the package registry feature. Possible values: disabled, private, or enabled. |
| emails_disabled | boolean | Indicates if emails are disabled for the project. |
| emails_enabled | boolean | Indicates if emails are enabled for the project. |
| show_diff_preview_in_email | boolean | Indicates if diff previews are shown in email notifications. |
| shared_runners_enabled | boolean | Whether shared runners are enabled for the project. |
| lfs_enabled | boolean | Indicates if Git LFS is enabled for the project. |
| creator_id | integer | ID of the user who created the project. |
| import_status | string | Status of the project import. |
| open_issues_count | integer | Number of open issues. |
| description_html | string | Description of the project in HTML format. |
| updated_at | datetime | Timestamp when the project was last updated. |
| ci_default_git_depth | integer | Default Git depth for CI/CD pipelines. Only visible if you have administrator access or the Owner role for the project. |
| ci_forward_deployment_enabled | boolean | Whether forward deployment is enabled. Only visible if you have administrator access or the Owner role for the project. |
| ci_job_token_scope_enabled | boolean | Indicates if CI/CD job token scope is enabled. Only visible if you have administrator access or the Owner role for the project. |
| ci_separated_caches | boolean | Whether CI/CD caches are separated by branch. Only visible if you have administrator access or the Owner role for the project. |
| ci_allow_fork_pipelines_to_run_in_parent_project | boolean | Whether fork pipelines can run in the parent project. Only visible if you have administrator access or the Owner role for the project. |
| build_git_strategy | string | Git strategy used for CI/CD builds (fetch or clone). Only visible if you have administrator access or the Owner role for the project. |
| keep_latest_artifact | boolean | Indicates if the latest artifact is kept when a new one is created. Only visible if you have administrator access or the Owner role for the project. |
| restrict_user_defined_variables | boolean | Whether user-defined variables are restricted. Only visible if you have administrator access or the Owner role for the project. |
| runners_token | string | Token for registering runners with the project. Only visible if you have administrator access or the Owner role for the project. |
| runner_token_expiration_interval | integer | Expiration interval in seconds for runner tokens. Only visible if you have administrator access or the Owner role for the project. |
| group_runners_enabled | boolean | Whether group runners are enabled for the project. Only visible if you have administrator access or the Owner role for the project. |
| auto_cancel_pending_pipelines | string | Setting for automatically canceling pending pipelines. Only visible if you have administrator access or the Owner role for the project. |
| build_timeout | integer | Timeout in seconds for CI/CD jobs. Only visible if you have administrator access or the Owner role for the project. |
| auto_devops_enabled | boolean | Whether Auto DevOps is enabled for the project. Only visible if you have administrator access or the Owner role for the project. |
| auto_devops_deploy_strategy | string | Deployment strategy for Auto DevOps. Only visible if you have administrator access or the Owner role for the project. |
| ci_config_path | string | Path to the CI/CD configuration file. |
| public_jobs | boolean | Whether job logs are publicly accessible. |
| shared_with_groups | array of objects | List of groups the project is shared with. |
| only_allow_merge_if_pipeline_succeeds | boolean | Whether merges are allowed only if the pipeline succeeds. |
| allow_merge_on_skipped_pipeline | boolean | Whether merges are allowed when the pipeline is skipped. |
| request_access_enabled | boolean | Whether users can request access to the project. |
| only_allow_merge_if_all_discussions_are_resolved | boolean | Whether merges are allowed only if all discussions are resolved. |
| remove_source_branch_after_merge | boolean | Whether the source branch is automatically removed after merge. |
| printing_merge_request_link_enabled | boolean | Indicates if merge request links are printed after pushing. |
| merge_method | string | Merge method used for the project. Possible values: merge, rebase_merge, or ff. |
| merge_request_title_regex | string | Regex pattern for validating merge request titles. |
| merge_request_title_regex_description | string | Description of the merge request title regex validation. |
| squash_option | string | Squash option for merge requests. |
| enforce_auth_checks_on_uploads | boolean | Whether authentication checks are enforced on uploads. |
| suggestion_commit_message | string | Custom commit message for suggestions. |
| merge_commit_template | string | Template for merge commit messages. |
| mr_default_title_template | string | Template for merge request titles. |
| squash_commit_template | string | Template for squash commit messages. |
| issue_branch_template | string | Template for branch names created from issues. |
| warn_about_potentially_unwanted_characters | boolean | Whether to warn about potentially unwanted characters. |
| autoclose_referenced_issues | boolean | Whether referenced issues are automatically closed. |
| max_artifacts_size | integer | Maximum size in MB for CI/CD artifacts. |
| approvals_before_merge | integer | Deprecated. Use merge request approvals API instead. Number of approvals required before merge. |
| mirror | boolean | Whether the project is a mirror. |
| external_authorization_classification_label | string | External authorization classification label. |
| requirements_enabled | boolean | Indicates if requirements management is enabled. |
| requirements_access_level | string | Access level for the requirements feature. |
| security_and_compliance_enabled | boolean | Indicates if security and compliance features are enabled. |
| compliance_frameworks | array of strings | Compliance frameworks applied to the project. |
| issues_template | string | Default description for issues. Description is parsed with GitLab Flavored Markdown. Premium and Ultimate only. |
| merge_requests_template | string | Template for merge request descriptions. Premium and Ultimate only. |
| merge_pipelines_enabled | boolean | Indicates if merge pipelines are enabled. |
| merge_trains_enabled | boolean | Indicates if merge trains are enabled. |
| merge_trains_skip_train_allowed | boolean | Indicates if skipping the merge train is allowed. |
| max_pipelines_per_merge_train | integer | Maximum number of parallel pipelines per merge train. |
| only_allow_merge_if_all_status_checks_passed | boolean | Whether merges are allowed only if all status checks have passed. Ultimate only. |
| allow_pipeline_trigger_approve_deployment | boolean | Whether pipeline triggers can approve deployments. |
| prevent_merge_without_jira_issue | boolean | Indicates if merges require an associated Jira issue. |
| reviewer_assignment_strategy | string | Strategy used to automatically assign reviewers to merge requests. One of disabled, code_owners, or dap_powered. Premium and Ultimate only. |
| duo_remote_flows_enabled | boolean | Indicates if GitLab Duo remote flows are enabled. |
| duo_foundational_flows_enabled | boolean | Indicates if GitLab Duo foundational flows are enabled. |
| duo_sast_fp_detection_enabled | boolean | Indicates if GitLab Duo SAST false positive detection is enabled. |
| duo_sast_vr_workflow_enabled | boolean | Indicates if GitLab Duo SAST vulnerability resolution workflow is enabled. |
| spp_repository_pipeline_access | boolean | Repository pipeline access for security policies. Only visible if the security orchestration policies feature is available. |
| permissions | object | User permissions for the project. |
| permissions.project_access | object | Project access permissions for the user. |
| permissions.group_access | object | Group access permissions for the user. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--header "Accept: application/json" \
--url "https://gitlab.example.com/api/v4/users/:user_id/projects
응답 예시:
[
{
"id": 4,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
"web_url": "http://example.com/diaspora/diaspora-client",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora client"
],
"topics": [
"example",
"disapora client"
],
"owner": {
"id": 3,
"name": "Diaspora",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Diaspora Client",
"name_with_namespace": "Diaspora / Diaspora Client",
"path": "diaspora-client",
"path_with_namespace": "diaspora/diaspora-client",
"issues_enabled": true,
"open_issues_count": 1,
"merge_requests_enabled": true,
"jobs_enabled": true,
"wiki_enabled": true,
"snippets_enabled": false,
"can_create_merge_request_in": true,
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": false, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "disabled",
"security_and_compliance_access_level": "disabled",
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"last_activity_at": "2013-09-30T13:46:02Z",
"creator_id": 3,
"import_url": null,
"import_type": null,
"import_status": "none",
"import_error": null,
"namespace": {
"id": 3,
"name": "Diaspora",
"path": "diaspora",
"kind": "group",
"full_path": "diaspora"
},
"import_status": "none",
"archived": false,
"avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png",
"shared_runners_enabled": true,
"group_runners_enabled": true,
"forks_count": 0,
"star_count": 0,
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_forward_deployment_rollback_allowed": true,
"ci_allow_fork_pipelines_to_run_in_parent_project": true,
"ci_id_token_sub_claim_components": ["project_path", "ref_type", "ref"],
"ci_separated_caches": true,
"ci_restrict_pipeline_cancellation_role": "developer",
"ci_pipeline_variables_minimum_override_role": "maintainer",
"ci_push_repository_for_job_token_allowed": false,
"ci_display_pipeline_variables": false,
"protect_merge_request_pipelines": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": false,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": false,
"request_access_enabled": false,
"merge_method": "merge",
"squash_option": "default_on",
"autoclose_referenced_issues": true,
"enforce_auth_checks_on_uploads": true,
"suggestion_commit_message": null,
"merge_commit_template": null,
"squash_commit_template": null,
"secret_push_protection_enabled": false,
"issue_branch_template": "gitlab/%{id}-%{title}",
"marked_for_deletion_at": "2020-04-03", // Deprecated in favor of marked_for_deletion_on. Planned for removal in a future version of the REST API.
"marked_for_deletion_on": "2020-04-03",
"statistics": {
"commit_count": 37,
"storage_size": 1038090,
"repository_size": 1038090,
"wiki_size" : 0,
"lfs_objects_size": 0,
"job_artifacts_size": 0,
"pipeline_artifacts_size": 0,
"packages_size": 0,
"snippets_size": 0,
"uploads_size": 0,
"container_registry_size": 0
},
"container_registry_image_prefix": "registry.example.com/diaspora/diaspora-client",
"_links": {
"self": "http://example.com/api/v4/projects",
"issues": "http://example.com/api/v4/projects/1/issues",
"merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
"repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members",
"cluster_agents": "http://example.com/api/v4/projects/1/cluster_agents"
}
},
{
"id": 6,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
"http_url_to_repo": "http://example.com/brightbox/puppet.git",
"web_url": "http://example.com/brightbox/puppet",
"readme_url": "http://example.com/brightbox/puppet/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"puppet"
],
"topics": [
"example",
"puppet"
],
"owner": {
"id": 4,
"name": "Brightbox",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Puppet",
"name_with_namespace": "Brightbox / Puppet",
"path": "puppet",
"path_with_namespace": "brightbox/puppet",
"issues_enabled": true,
"open_issues_count": 1,
"merge_requests_enabled": true,
"jobs_enabled": true,
"wiki_enabled": true,
"snippets_enabled": false,
"can_create_merge_request_in": true,
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": false, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "disabled",
"security_and_compliance_access_level": "disabled",
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"last_activity_at": "2013-09-30T13:46:02Z",
"creator_id": 3,
"import_url": null,
"import_type": null,
"import_status": "none",
"import_error": null,
"namespace": {
"id": 4,
"name": "Brightbox",
"path": "brightbox",
"kind": "group",
"full_path": "brightbox"
},
"import_status": "none",
"import_error": null,
"permissions": {
"project_access": {
"access_level": 10,
"notification_level": 3
},
"group_access": {
"access_level": 50,
"notification_level": 3
}
},
"archived": false,
"avatar_url": null,
"shared_runners_enabled": true,
"group_runners_enabled": true,
"forks_count": 0,
"star_count": 0,
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"ci_default_git_depth": 0,
"ci_forward_deployment_enabled": true,
"ci_forward_deployment_rollback_allowed": true,
"ci_allow_fork_pipelines_to_run_in_parent_project": true,
"ci_id_token_sub_claim_components": ["project_path", "ref_type", "ref"],
"ci_separated_caches": true,
"ci_restrict_pipeline_cancellation_role": "developer",
"ci_pipeline_variables_minimum_override_role": "maintainer",
"ci_push_repository_for_job_token_allowed": false,
"ci_display_pipeline_variables": false,
"protect_merge_request_pipelines": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": false,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": false,
"request_access_enabled": false,
"merge_method": "merge",
"squash_option": "default_on",
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"repository_storage": "default",
"approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"mirror_user_id": 45,
"mirror_trigger_builds": false,
"only_mirror_protected_branches": false,
"mirror_overwrites_diverged_branches": false,
"external_authorization_classification_label": null,
"packages_enabled": true, // deprecated, use package_registry_access_level instead
"empty_repo": false,
"package_registry_access_level": "enabled",
"service_desk_enabled": false,
"service_desk_address": null,
"autoclose_referenced_issues": true,
"enforce_auth_checks_on_uploads": true,
"suggestion_commit_message": null,
"merge_commit_template": null,
"squash_commit_template": null,
"secret_push_protection_enabled": false,
"issue_branch_template": "gitlab/%{id}-%{title}",
"statistics": {
"commit_count": 12,
"storage_size": 2066080,
"repository_size": 2066080,
"wiki_size" : 0,
"lfs_objects_size": 0,
"job_artifacts_size": 0,
"pipeline_artifacts_size": 0,
"packages_size": 0,
"snippets_size": 0,
"uploads_size": 0,
"container_registry_size": 0
},
"container_registry_image_prefix": "registry.example.com/brightbox/puppet",
"_links": {
"self": "http://example.com/api/v4/projects",
"issues": "http://example.com/api/v4/projects/1/issues",
"merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
"repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members",
"cluster_agents": "http://example.com/api/v4/projects/1/cluster_agents"
}
}
]
사용자의 모든 프로젝트 기여 목록 조회#
History
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default.- Feature flag
mr_default_title_templateremoved in GitLab 19.0.
지정된 사용자의 모든 보이는 프로젝트에 대한 기여를 나열합니다. 지난 1년간의 기여만 반환합니다. 기여로 간주되는 항목에 대한 자세한 내용은 함께 작업하는 프로젝트 보기를 참고하세요.
GET /users/:user_id/contributed_projects
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | The ID or username of the user. |
| order_by | string | No | Return projects ordered by id, name, path, created_at, updated_at, star_count, or last_activity_at fields. Default is created_at. |
| simple | boolean | No | If true, return only limited fields for each project. Unauthenticated requests return only public projects with limited fields, even if simple is not set. |
| sort | string | No | Return projects sorted in asc or desc order. Default is desc. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | ID of the project. |
| description | string | Description of the project. |
| name | string | Name of the project. |
| name_with_namespace | string | Name of the project with its namespace. |
| path | string | Path of the project. |
| path_with_namespace | string | Path of the project with its namespace. |
| created_at | datetime | Timestamp when the project was created. |
| default_branch | string | Default branch of the project. |
| tag_list | array of strings | Deprecated. Use topics instead. List of tags for the project. |
| topics | array of strings | List of topics for the project. |
| ssh_url_to_repo | string | SSH URL to clone the repository. |
| http_url_to_repo | string | HTTP URL to clone the repository. |
| web_url | string | URL to access the project in a browser. |
| readme_url | string | URL to the project’s README file. |
| forks_count | integer | Number of forks of the project. |
| avatar_url | string | URL to the project’s avatar image. |
| star_count | integer | Number of stars the project has received. |
| last_activity_at | datetime | Timestamp of the last activity in the project. |
| visibility | string | Visibility level of the project. Possible values: private, internal, or public. |
| namespace | object | Namespace information for the project. |
| namespace.id | integer | ID of the namespace. |
| namespace.name | string | Name of the namespace. |
| namespace.path | string | Path of the namespace. |
| namespace.kind | string | Type of namespace. Possible values: user or group. |
| namespace.full_path | string | Full path of the namespace. |
| namespace.parent_id | integer | ID of the parent namespace, if applicable. |
| namespace.avatar_url | string | URL to the namespace’s avatar image. |
| namespace.web_url | string | URL to access the namespace in a browser. |
| container_registry_image_prefix | string | Prefix for container registry images. |
| _links | object | Collection of API endpoint links related to the project. |
| _links.self | string | URL to the project resource. |
| _links.issues | string | URL to the project’s issues. |
| _links.merge_requests | string | URL to the project’s merge requests. |
| _links.repo_branches | string | URL to the project’s repository branches. |
| _links.labels | string | URL to the project’s labels. |
| _links.events | string | URL to the project’s events. |
| _links.members | string | URL to the project’s members. |
| _links.cluster_agents | string | URL to the project’s cluster agents. |
| marked_for_deletion_at | date | Deprecated. Use marked_for_deletion_on instead. Date when the project is scheduled for deletion. |
| marked_for_deletion_on | date | Date when the project is scheduled for deletion. |
| packages_enabled | boolean | Whether the package registry is enabled for the project. |
| empty_repo | boolean | Whether the repository is empty. |
| archived | boolean | Whether the project is archived. |
| resolve_outdated_diff_discussions | boolean | Whether outdated diff discussions are automatically resolved. |
| container_expiration_policy | object | Settings for container image expiration policy. |
| container_expiration_policy.cadence | string | How often the container expiration policy runs. |
| container_expiration_policy.enabled | boolean | Whether the container expiration policy is enabled. |
| container_expiration_policy.keep_n | integer | Number of container images to keep. |
| container_expiration_policy.older_than | string | Remove container images older than this value. |
| container_expiration_policy.name_regex | string | Deprecated. Use name_regex_delete instead. Regular expression to match container image names. |
| container_expiration_policy.name_regex_keep | string | Regular expression to match container image names to keep. |
| container_expiration_policy.next_run_at | datetime | Timestamp for the next scheduled policy run. |
| repository_object_format | string | Object format used by the repository (sha1 or sha256). |
| issues_enabled | boolean | Whether issues are enabled for the project. |
| merge_requests_enabled | boolean | Whether merge requests are enabled for the project. |
| wiki_enabled | boolean | Whether the wiki is enabled for the project. |
| jobs_enabled | boolean | Whether jobs are enabled for the project. |
| snippets_enabled | boolean | Whether snippets are enabled for the project. |
| container_registry_enabled | boolean | Deprecated. Use container_registry_access_level instead. Whether the container registry is enabled. |
| service_desk_enabled | boolean | Whether Service Desk is enabled for the project. |
| can_create_merge_request_in | boolean | Whether the current user can create merge requests in the project. |
| issues_access_level | string | Access level for the issues feature. Possible values: disabled, private, or enabled. |
| repository_access_level | string | Access level for the repository feature. Possible values: disabled, private, or enabled. |
| merge_requests_access_level | string | Access level for the merge requests feature. Possible values: disabled, private, or enabled. |
| forking_access_level | string | Access level for forking the project. Possible values: disabled, private, or enabled. |
| wiki_access_level | string | Access level for the wiki feature. Possible values: disabled, private, or enabled. |
| builds_access_level | string | Access level for the CI/CD builds feature. Possible values: disabled, private, or enabled. |
| snippets_access_level | string | Access level for the snippets feature. Possible values: disabled, private, or enabled. |
| pages_access_level | string | Access level for GitLab Pages. Possible values: disabled, private, enabled, or public. |
| analytics_access_level | string | Access level for analytics features. Possible values: disabled, private, or enabled. |
| container_registry_access_level | string | Access level for the container registry. Possible values: disabled, private, or enabled. |
| security_and_compliance_access_level | string | Access level for security and compliance features. Possible values: disabled, private, or enabled. |
| releases_access_level | string | Access level for the releases feature. Possible values: disabled, private, or enabled. |
| environments_access_level | string | Access level for the environments feature. Possible values: disabled, private, or enabled. |
| feature_flags_access_level | string | Access level for the feature flags feature. Possible values: disabled, private, or enabled. |
| infrastructure_access_level | string | Access level for the infrastructure feature. Possible values: disabled, private, or enabled. |
| monitor_access_level | string | Access level for the monitor feature. Possible values: disabled, private, or enabled. |
| model_experiments_access_level | string | Access level for the model experiments feature. Possible values: disabled, private, or enabled. |
| model_registry_access_level | string | Access level for the model registry feature. Possible values: disabled, private, or enabled. |
| package_registry_access_level | string | Access level for the package registry feature. Possible values: disabled, private, or enabled. |
| emails_disabled | boolean | Indicates if emails are disabled for the project. |
| emails_enabled | boolean | Indicates if emails are enabled for the project. |
| show_diff_preview_in_email | boolean | Indicates if diff previews are shown in email notifications. |
| shared_runners_enabled | boolean | Whether shared runners are enabled for the project. |
| lfs_enabled | boolean | Indicates if Git LFS is enabled for the project. |
| creator_id | integer | ID of the user who created the project. |
| import_status | string | Status of the project import. |
| open_issues_count | integer | Number of open issues. |
| description_html | string | Description of the project in HTML format. |
| updated_at | datetime | Timestamp when the project was last updated. |
| ci_default_git_depth | integer | Default Git depth for CI/CD pipelines. Only visible if you have administrator access or the Owner role for the project. |
| ci_forward_deployment_enabled | boolean | Whether forward deployment is enabled. Only visible if you have administrator access or the Owner role for the project. |
| ci_job_token_scope_enabled | boolean | Indicates if CI/CD job token scope is enabled. Only visible if you have administrator access or the Owner role for the project. |
| ci_separated_caches | boolean | Whether CI/CD caches are separated by branch. Only visible if you have administrator access or the Owner role for the project. |
| ci_allow_fork_pipelines_to_run_in_parent_project | boolean | Whether fork pipelines can run in the parent project. Only visible if you have administrator access or the Owner role for the project. |
| build_git_strategy | string | Git strategy used for CI/CD builds (fetch or clone). Only visible if you have administrator access or the Owner role for the project. |
| keep_latest_artifact | boolean | Indicates if the latest artifact is kept when a new one is created. Only visible if you have administrator access or the Owner role for the project. |
| restrict_user_defined_variables | boolean | Whether user-defined variables are restricted. Only visible if you have administrator access or the Owner role for the project. |
| runners_token | string | Token for registering runners with the project. Only visible if you have administrator access or the Owner role for the project. |
| runner_token_expiration_interval | integer | Expiration interval in seconds for runner tokens. Only visible if you have administrator access or the Owner role for the project. |
| group_runners_enabled | boolean | Whether group runners are enabled for the project. Only visible if you have administrator access or the Owner role for the project. |
| auto_cancel_pending_pipelines | string | Setting for automatically canceling pending pipelines. Only visible if you have administrator access or the Owner role for the project. |
| build_timeout | integer | Timeout in seconds for CI/CD jobs. Only visible if you have administrator access or the Owner role for the project. |
| auto_devops_enabled | boolean | Whether Auto DevOps is enabled for the project. Only visible if you have administrator access or the Owner role for the project. |
| auto_devops_deploy_strategy | string | Deployment strategy for Auto DevOps. Only visible if you have administrator access or the Owner role for the project. |
| ci_config_path | string | Path to the CI/CD configuration file. |
| public_jobs | boolean | Whether job logs are publicly accessible. |
| shared_with_groups | array of objects | List of groups the project is shared with. |
| only_allow_merge_if_pipeline_succeeds | boolean | Whether merges are allowed only if the pipeline succeeds. |
| allow_merge_on_skipped_pipeline | boolean | Whether merges are allowed when the pipeline is skipped. |
| request_access_enabled | boolean | Whether users can request access to the project. |
| only_allow_merge_if_all_discussions_are_resolved | boolean | Whether merges are allowed only if all discussions are resolved. |
| remove_source_branch_after_merge | boolean | Whether the source branch is automatically removed after merge. |
| printing_merge_request_link_enabled | boolean | Indicates if merge request links are printed after pushing. |
| merge_method | string | Merge method used for the project. Possible values: merge, rebase_merge, or ff. |
| merge_request_title_regex | string | Regex pattern for validating merge request titles. |
| merge_request_title_regex_description | string | Description of the merge request title regex validation. |
| squash_option | string | Squash option for merge requests. |
| enforce_auth_checks_on_uploads | boolean | Whether authentication checks are enforced on uploads. |
| suggestion_commit_message | string | Custom commit message for suggestions. |
| merge_commit_template | string | Template for merge commit messages. |
| mr_default_title_template | string | Template for merge request titles. |
| squash_commit_template | string | Template for squash commit messages. |
| issue_branch_template | string | Template for branch names created from issues. |
| warn_about_potentially_unwanted_characters | boolean | Whether to warn about potentially unwanted characters. |
| autoclose_referenced_issues | boolean | Whether referenced issues are automatically closed. |
| max_artifacts_size | integer | Maximum size in MB for CI/CD artifacts. |
| approvals_before_merge | integer | Deprecated. Use merge request approvals API instead. Number of approvals required before merge. |
| mirror | boolean | Whether the project is a mirror. |
| external_authorization_classification_label | string | External authorization classification label. |
| requirements_enabled | boolean | Indicates if requirements management is enabled. |
| requirements_access_level | string | Access level for the requirements feature. |
| security_and_compliance_enabled | boolean | Indicates if security and compliance features are enabled. |
| compliance_frameworks | array of strings | Compliance frameworks applied to the project. |
| issues_template | string | Default description for issues. Description is parsed with GitLab Flavored Markdown. Premium and Ultimate only. |
| merge_requests_template | string | Template for merge request descriptions. Premium and Ultimate only. |
| merge_pipelines_enabled | boolean | Indicates if merge pipelines are enabled. |
| merge_trains_enabled | boolean | Indicates if merge trains are enabled. |
| merge_trains_skip_train_allowed | boolean | Indicates if skipping the merge train is allowed. |
| max_pipelines_per_merge_train | integer | Maximum number of parallel pipelines per merge train. |
| only_allow_merge_if_all_status_checks_passed | boolean | Whether merges are allowed only if all status checks have passed. Ultimate only. |
| allow_pipeline_trigger_approve_deployment | boolean | Whether pipeline triggers can approve deployments. |
| prevent_merge_without_jira_issue | boolean | Indicates if merges require an associated Jira issue. |
| reviewer_assignment_strategy | string | Strategy used to automatically assign reviewers to merge requests. One of disabled, code_owners, or dap_powered. Premium and Ultimate only. |
| duo_remote_flows_enabled | boolean | Indicates if GitLab Duo remote flows are enabled. |
| duo_foundational_flows_enabled | boolean | Indicates if GitLab Duo foundational flows are enabled. |
| duo_sast_fp_detection_enabled | boolean | Indicates if GitLab Duo SAST false positive detection is enabled. |
| duo_sast_vr_workflow_enabled | boolean | Indicates if GitLab Duo SAST vulnerability resolution workflow is enabled. |
| spp_repository_pipeline_access | boolean | Repository pipeline access for security policies. Only visible if the security orchestration policies feature is available. |
| permissions | object | User permissions for the project. |
| permissions.project_access | object | Project access permissions for the user. |
| permissions.group_access | object | Group access permissions for the user. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/users/5/contributed_projects"
응답 예시:
[
{
"id": 4,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
"web_url": "http://example.com/diaspora/diaspora-client",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora client"
],
"topics": [
"example",
"disapora client"
],
"owner": {
"id": 3,
"name": "Diaspora",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Diaspora Client",
"name_with_namespace": "Diaspora / Diaspora Client",
"path": "diaspora-client",
"path_with_namespace": "diaspora/diaspora-client",
"issues_enabled": true,
"open_issues_count": 1,
"merge_requests_enabled": true,
"jobs_enabled": true,
"wiki_enabled": true,
"snippets_enabled": false,
"can_create_merge_request_in": true,
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": false, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "disabled",
"security_and_compliance_access_level": "disabled",
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"last_activity_at": "2013-09-30T13:46:02Z",
"creator_id": 3,
"namespace": {
"id": 3,
"name": "Diaspora",
"path": "diaspora",
"kind": "group",
"full_path": "diaspora"
},
"import_status": "none",
"archived": false,
"avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png",
"shared_runners_enabled": true,
"group_runners_enabled": true,
"forks_count": 0,
"star_count": 0,
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": false,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": false,
"request_access_enabled": false,
"merge_method": "merge",
"squash_option": "default_on",
"autoclose_referenced_issues": true,
"enforce_auth_checks_on_uploads": true,
"suggestion_commit_message": null,
"merge_commit_template": null,
"squash_commit_template": null,
"secret_push_protection_enabled": false,
"issue_branch_template": "gitlab/%{id}-%{title}",
"statistics": {
"commit_count": 37,
"storage_size": 1038090,
"repository_size": 1038090,
"lfs_objects_size": 0,
"job_artifacts_size": 0,
"pipeline_artifacts_size": 0,
"packages_size": 0,
"snippets_size": 0,
"uploads_size": 0,
"container_registry_size": 0
},
"container_registry_image_prefix": "registry.example.com/diaspora/diaspora-client",
"_links": {
"self": "http://example.com/api/v4/projects",
"issues": "http://example.com/api/v4/projects/1/issues",
"merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
"repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members",
"cluster_agents": "http://example.com/api/v4/projects/1/cluster_agents"
}
},
{
"id": 6,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
"http_url_to_repo": "http://example.com/brightbox/puppet.git",
"web_url": "http://example.com/brightbox/puppet",
"readme_url": "http://example.com/brightbox/puppet/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"puppet"
],
"topics": [
"example",
"puppet"
],
"owner": {
"id": 4,
"name": "Brightbox",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Puppet",
"name_with_namespace": "Brightbox / Puppet",
"path": "puppet",
"path_with_namespace": "brightbox/puppet",
"issues_enabled": true,
"open_issues_count": 1,
"merge_requests_enabled": true,
"jobs_enabled": true,
"wiki_enabled": true,
"snippets_enabled": false,
"can_create_merge_request_in": true,
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": false, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "disabled",
"security_and_compliance_access_level": "disabled",
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"last_activity_at": "2013-09-30T13:46:02Z",
"creator_id": 3,
"namespace": {
"id": 4,
"name": "Brightbox",
"path": "brightbox",
"kind": "group",
"full_path": "brightbox"
},
"import_status": "none",
"import_error": null,
"permissions": {
"project_access": {
"access_level": 10,
"notification_level": 3
},
"group_access": {
"access_level": 50,
"notification_level": 3
}
},
"archived": false,
"avatar_url": null,
"shared_runners_enabled": true,
"group_runners_enabled": true,
"forks_count": 0,
"star_count": 0,
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": false,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": false,
"request_access_enabled": false,
"merge_method": "merge",
"squash_option": "default_on",
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"repository_storage": "default",
"approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"mirror_user_id": 45,
"mirror_trigger_builds": false,
"only_mirror_protected_branches": false,
"mirror_overwrites_diverged_branches": false,
"external_authorization_classification_label": null,
"packages_enabled": true, // deprecated, use package_registry_access_level instead
"empty_repo": false,
"package_registry_access_level": "enabled",
"service_desk_enabled": false,
"service_desk_address": null,
"autoclose_referenced_issues": true,
"enforce_auth_checks_on_uploads": true,
"suggestion_commit_message": null,
"merge_commit_template": null,
"squash_commit_template": null,
"secret_push_protection_enabled": false,
"issue_branch_template": "gitlab/%{id}-%{title}",
"statistics": {
"commit_count": 12,
"storage_size": 2066080,
"repository_size": 2066080,
"lfs_objects_size": 0,
"job_artifacts_size": 0,
"pipeline_artifacts_size": 0,
"packages_size": 0,
"snippets_size": 0,
"uploads_size": 0,
"container_registry_size": 0
},
"container_registry_image_prefix": "registry.example.com/brightbox/puppet",
"_links": {
"self": "http://example.com/api/v4/projects",
"issues": "http://example.com/api/v4/projects/1/issues",
"merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
"repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members",
"cluster_agents": "http://example.com/api/v4/projects/1/cluster_agents"
}
}
]
속성 목록 조회#
프로젝트의 속성 목록을 조회합니다.
프로젝트의 모든 멤버 목록 조회#
지정된 프로젝트에 접근 권한이 있는 모든 멤버를 나열합니다.
GET /projects/:id/users
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| search | string | No | Search for a specific member by their username or name. |
| skip_users | integer array | No | Filter out members with the specified IDs. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | ID of the user. |
| username | string | Username of the user. |
| name | string | Full name of the user. |
| state | string | State of the user account. Possible values: active or blocked. |
| avatar_url | string | URL of the user’s avatar image. |
| web_url | string | URL to access the user’s profile in a browser. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.com/api/v4/projects/<project_id>/users" \
응답 예시:
[
{
"id": 1,
"username": "john_smith",
"name": "John Smith",
"state": "active",
"avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
"web_url": "http://localhost:3000/john_smith"
},
{
"id": 2,
"username": "jack_smith",
"name": "Jack Smith",
"state": "blocked",
"avatar_url": "http://gravatar.com/../e32131cd8.jpeg",
"web_url": "http://localhost:3000/jack_smith"
}
]
모든 상위 그룹 목록 조회#
지정된 프로젝트의 모든 상위 그룹을 나열합니다.
GET /projects/:id/groups
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| search | string | No | Search for specific groups by group ID. |
| shared_min_access_level | integer | No | Limit to shared groups with at least the specified access level. Possible values: 5 (Minimal access), 10 (Guest), 15 (Planner), 20 (Reporter), 25 (Security Manager), 30 (Developer), 40 (Maintainer), or 50 (Owner). |
| shared_visible_only | boolean | No | If true, returns only shared groups the authenticated user can access. |
| skip_groups | array of integers | No | Skip the group IDs passed. |
| with_shared | boolean | No | Include projects shared with this group. Default is false. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | ID of the group. |
| name | string | Name of the group. |
| avatar_url | string | URL of the group’s avatar image. |
| web_url | string | URL to access the group in a browser. |
| full_name | string | Full name of the group. |
| full_path | string | Full path of the group. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/<project_id>/groups"
응답 예시:
[
{
"id": 1,
"name": "Foobar Group",
"avatar_url": "http://localhost:3000/uploads/group/avatar/1/foo.jpg",
"web_url": "http://localhost:3000/groups/foo-bar",
"full_name": "Foobar Group",
"full_path": "foo-bar"
},
{
"id": 2,
"name": "Shared Group",
"avatar_url": "http://gitlab.example.com/uploads/group/avatar/1/bar.jpg",
"web_url": "http://gitlab.example.com/groups/foo/bar",
"full_name": "Shared Group",
"full_path": "foo/shared"
}
]
프로젝트에 초대 가능한 모든 그룹 목록 조회#
프로젝트에 초대할 수 있는 모든 그룹을 나열합니다.
GET /projects/:id/share_locations
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| search | string | No | Search for specific groups by group ID. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | ID of the group. |
| web_url | string | URL to access the group in a browser. |
| name | string | Name of the group. |
| avatar_url | string | URL of the group’s avatar image. |
| full_name | string | Full name of the group. |
| full_path | string | Full path of the group. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/<project_id>/share_locations"
응답 예시:
[
{
"id": 22,
"web_url": "http://127.0.0.1:3000/groups/gitlab-org",
"name": "Gitlab Org",
"avatar_url": null,
"full_name": "Gitlab Org",
"full_path": "gitlab-org"
},
{
"id": 25,
"web_url": "http://127.0.0.1:3000/groups/gnuwget",
"name": "Gnuwget",
"avatar_url": null,
"full_name": "Gnuwget",
"full_path": "gnuwget"
}
]
프로젝트에 초대된 모든 그룹 목록 조회#
프로젝트에 초대된 모든 그룹을 나열합니다. 인증 없이 접근하면 공개 초대 그룹만 반환합니다. 이 엔드포인트는 다음 기준으로 분당 60개의 요청으로 속도가 제한됩니다:
-
인증된 사용자의 경우 사용자별
-
인증되지 않은 사용자의 경우 IP 주소별
이 엔드포인트는 페이지네이션을 지원합니다:
-
오프셋 기반 페이지네이션을 사용하여 최대 50,000개의 프로젝트에 접근할 수 있습니다.
-
키셋 기반 페이지네이션을 사용하여 50,000개 이상의 프로젝트를 나열할 수 있습니다.
자세한 내용은 페이지네이션을 참고하세요.
GET /projects/:id/invited_groups
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | yes | The ID or URL-encoded path of the group. |
| search | string | no | Return the list of authorized groups matching the search criteria. |
| min_access_level | integer | no | Limit to groups where the current user has at least the specified access level. Possible values: 5 (Minimal access), 10 (Guest), 15 (Planner), 20 (Reporter), 25 (Security Manager), 30 (Developer), 40 (Maintainer), or 50 (Owner). |
| relation | array of strings | no | Filter the groups by relation. Possible values: direct or inherited. |
| with_custom_attributes | boolean | no | If true, returns custom attributes in response. Requires administrator access. |
성공 시 200 OK와 다음 응답 속성을 반환합니다:
| Attribute | Type | Description |
|---|---|---|
| id | integer | ID of the group. |
| web_url | string | URL to access the group in a browser. |
| name | string | Name of the group. |
| avatar_url | string | URL of the group’s avatar image. |
| full_name | string | Full name of the group. |
| full_path | string | Full path of the group. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/<project_id>/invited_groups"
응답 예시:
[
{
"id": 35,
"web_url": "https://gitlab.example.com/groups/twitter",
"name": "Twitter",
"avatar_url": null,
"full_name": "Twitter",
"full_path": "twitter"
}
]
프로그래밍 언어 사용 정보 조회#
지정된 프로젝트에서 사용된 모든 프로그래밍 언어에 대한 정보를 조회합니다.
GET /projects/:id/languages
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
성공 시 200 OK와 프로그래밍 언어 및 사용 비율 목록을 반환합니다.
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/languages"
응답 예시:
{
"Ruby": 66.69,
"JavaScript": 22.98,
"HTML": 7.91,
"CoffeeScript": 2.42
}
프로젝트 관리#
생성, 삭제, 아카이브 등 프로젝트를 관리합니다.
프로젝트 생성#
History
-
operations_access_levelremoved in GitLab 16.0. -
model_registry_access_levelintroduced in GitLab 16.7. -
packages_enableddeprecated in GitLab 17.10. -
package_registry_access_levelintroduced in GitLab 18.5.
인증된 사용자가 소유한 프로젝트를 생성합니다.
HTTP 리포지터리가 공개적으로 접근 가능하지 않은 경우, api 범위가 활성화된 공개 액세스 키를 password로 사용하여 URL에 인증 정보를 추가하세요: https://username:password@gitlab.company.com/group/project.git.
POST /projects
package_registry_access_level을 disabled로 설정하여 프로젝트를 생성하면, 패키지 레지스트리가 계속 활성화되어 있을 수 있습니다.
이를 우회하려면 동일한 요청에서 packages_enabled도 false로 설정하세요.
자세한 내용은 이슈 572010을 참조하세요.
지원하는 일반 프로젝트 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| name | string | Yes (if path isn’t provided) | The name of the new project. Equals path if not provided. |
| path | string | Yes (if name isn’t provided) | Repository name for new project. Generated based on name if not provided (generated as lowercase with dashes). The path must not start or end with a special character and must not contain consecutive special characters. |
| allow_merge_on_skipped_pipeline | boolean | No | Set whether or not merge requests can be merged with skipped jobs. |
| approvals_before_merge | integer | No | How many approvers should approve merge requests by default. To configure approval rules, see Merge request approvals API. Deprecated in GitLab 16.0. Premium and Ultimate only. |
| auto_cancel_pending_pipelines | string | No | Auto-cancel pending pipelines. This action toggles between an enabled state and a disabled state; it is not a boolean. |
| auto_devops_deploy_strategy | string | No | Auto Deploy strategy (continuous, manual or timed_incremental). |
| auto_devops_enabled | boolean | No | Enable Auto DevOps for this project. |
| autoclose_referenced_issues | boolean | No | Set whether auto-closing referenced issues on default branch. |
| avatar | mixed | No | Image file for avatar of the project. |
| build_git_strategy | string | No | The Git strategy. Defaults to fetch. |
| build_timeout | integer | No | The maximum amount of time, in seconds, that a job can run. |
| ci_config_path | string | No | The path to CI configuration file. |
| container_expiration_policy_attributes | hash | No | Update the image cleanup policy for this project. Accepts: cadence (string), keep_n (integer), older_than (string), name_regex (string), name_regex_delete (string), name_regex_keep (string), enabled (boolean). See the container registry documentation for more information on cadence, keep_n and older_than values. |
| container_registry_enabled | boolean | No | (Deprecated) Enable container registry for this project. Use container_registry_access_level instead. |
| default_branch | string | No | The default branch name. Accepts a branch name (for example, main) or a fully qualified reference (for example, refs/heads/main). If a fully qualified reference is provided, the API strips the refs/heads/ prefix. Requires initialize_with_readme to be true. |
| description | string | No | Short project description. |
| emails_disabled | boolean | No | (Deprecated) Disable email notifications. Use emails_enabled instead |
| emails_enabled | boolean | No | Enable email notifications. |
| external_authorization_classification_label | string | No | The classification label for the project. Premium and Ultimate only. |
| group_runners_enabled | boolean | No | Enable group runners for this project. |
| group_with_project_templates_id | integer | No | For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires use_custom_template to be true. Premium and Ultimate only. |
| import_url | string | No | URL to import repository from. When the URL value isn’t empty, you must not set initialize_with_readme to true. Doing so might result in the following error: not a git repository. |
| initialize_with_readme | boolean | No | Whether to create a Git repository with just a README.md file. Default is false. When this boolean is true, you must not pass import_url or other attributes of this endpoint which specify alternative contents for the repository. Doing so might result in the following error: not a git repository. |
| issues_enabled | boolean | No | (Deprecated) Enable issues for this project. Use issues_access_level instead. |
| jobs_enabled | boolean | No | (Deprecated) Enable jobs for this project. Use builds_access_level instead. |
| lfs_enabled | boolean | No | Enable LFS. |
| merge_method | string | No | Set the project’s merge method. Can be merge (merge commit), rebase_merge (merge commit with semi-linear history), or ff (fast-forward merge). |
| merge_pipelines_enabled | boolean | No | Enable or disable merged results pipelines. |
| merge_requests_enabled | boolean | No | (Deprecated) Enable merge requests for this project. Use merge_requests_access_level instead. |
| mr_default_title_template | string | No | Template used to set default merge request title. |
| merge_trains_enabled | boolean | No | Enable or disable merge trains. |
| merge_trains_skip_train_allowed | boolean | No | Allows merge train merge requests to be merged without waiting for pipelines to finish. |
| max_pipelines_per_merge_train | integer | No | Maximum number of parallel pipelines per merge train. |
| mirror_trigger_builds | boolean | No | Pull mirroring triggers builds. Premium and Ultimate only. |
| mirror | boolean | No | Enables pull mirroring in a project. Premium and Ultimate only. |
| namespace_id | integer | No | Namespace for the new project. Specify a group ID or subgroup ID. If not provided, defaults to the current user’s personal namespace. |
| only_allow_merge_if_all_discussions_are_resolved | boolean | No | Set whether merge requests can only be merged when all the discussions are resolved. |
| only_allow_merge_if_all_status_checks_passed | boolean | No | Indicates that merges of merge requests should be blocked unless all status checks have passed. Defaults to false. Introduced in GitLab 15.5 with feature flag only_allow_merge_if_all_status_checks_passed disabled by default. Ultimate only. |
| only_allow_merge_if_pipeline_succeeds | boolean | No | Set whether merge requests can only be merged with successful pipelines. This setting is named Pipelines must succeed in the project settings. |
| packages_enabled | boolean | No | Deprecated in GitLab 17.10. Enable or disable packages repository feature. Use package_registry_access_level instead. |
| package_registry_access_level | string | No | Enable or disable packages repository feature. |
| printing_merge_request_link_enabled | boolean | No | Show link to create/view merge request when pushing from the command line. |
| public_builds | boolean | No | (Deprecated) If true, jobs can be viewed by non-project members. Use public_jobs instead. |
| public_jobs | boolean | No | If true, jobs can be viewed by non-project members. |
| repository_object_format | string | No | Repository object format. Defaults to sha1. Introduced in GitLab 16.9. |
| remove_source_branch_after_merge | boolean | No | Enable Delete source branch option by default for all new merge requests. |
| repository_storage | string | No | Which storage shard the repository is on. (administrator only) |
| request_access_enabled | boolean | No | Allow users to request member access. |
| resolve_outdated_diff_discussions | boolean | No | Automatically resolve merge request diffs discussions on lines changed with a push. |
| reviewer_assignment_strategy | string | No | Strategy used to automatically assign reviewers to merge requests. One of disabled, code_owners, or dap_powered. Introduced in GitLab 19.1. Premium and Ultimate only. |
| shared_runners_enabled | boolean | No | Enable instance runners for this project. |
| show_default_award_emojis | boolean | No | Show default emoji reactions. |
| snippets_enabled | boolean | No | (Deprecated) Enable snippets for this project. Use snippets_access_level instead. |
| squash_option | string | No | One of never, always, default_on, or default_off. |
| tag_list | array | No | The list of tags for a project; put array of tags, that should be finally assigned to a project. Deprecated in GitLab 14.0. Use topics instead. |
| template_name | string | No | When used without use_custom_template, name of a built-in project template. When used with use_custom_template, name of a custom project template. |
| template_project_id | integer | No | When used with use_custom_template, project ID of a custom project template. Using a project ID is preferable to using template_name because template_name can be ambiguous. Premium and Ultimate only. |
| topics | array | No | The list of topics for a project; put array of topics, that should be finally assigned to a project. |
| use_custom_template | boolean | No | Use either custom instance or group (with group_with_project_templates_id) project template. Premium and Ultimate only. |
| visibility | string | No | See project visibility level. |
| warn_about_potentially_unwanted_characters | boolean | No | Enable warnings about usage of potentially unwanted characters in this project. |
| wiki_enabled | boolean | No | (Deprecated) Enable wiki for this project. Use wiki_access_level instead. |
요청 예시:
curl --request POST --header "PRIVATE-TOKEN: <your-token>" \
--header "Content-Type: application/json" --data '{
"name": "new_project", "description": "New Project", "path": "new_project",
"namespace_id": "42", "initialize_with_readme": "true"}' \
--url "https://gitlab.example.com/api/v4/projects/"
개별 프로젝트 기능의 가시성 레벨을 설정하려면 프로젝트 기능 가시성 레벨을 참고하세요.
사용자를 위한 프로젝트 생성#
History
-
operations_access_levelremoved in GitLab 16.0. -
model_registry_access_levelintroduced in GitLab 16.7. -
packages_enableddeprecated in GitLab 17.10. -
package_registry_access_levelintroduced in GitLab 18.5. -
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default. -
Feature flag
mr_default_title_templateremoved in GitLab 19.0.
사용자를 위한 프로젝트를 생성합니다.
전제 조건:
- 관리자여야 합니다.
HTTP 리포지터리가 공개적으로 접근 가능하지 않은 경우, URL에 인증 정보를 추가하세요. 예를 들어 https://username:password@gitlab.company.com/group/project.git에서 password는 api 범위가 활성화된 공개 액세스 키입니다.
POST /projects/user/:user_id
지원하는 일반 프로젝트 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the new project. |
| user_id | integer | Yes | The user ID of the project owner. |
| allow_merge_on_skipped_pipeline | boolean | No | Set whether or not merge requests can be merged with skipped jobs. |
| approvals_before_merge | integer | No | How many approvers should approve merge requests by default. Deprecated in GitLab 16.0. To configure approval rules, see Merge request approvals API. Premium and Ultimate only. |
| auto_cancel_pending_pipelines | string | No | Auto-cancel pending pipelines. This action toggles between an enabled state and a disabled state; it is not a boolean. |
| auto_devops_deploy_strategy | string | No | Auto Deploy strategy (continuous, manual or timed_incremental). |
| auto_devops_enabled | boolean | No | Enable Auto DevOps for this project. |
| autoclose_referenced_issues | boolean | No | Set whether auto-closing referenced issues on default branch. |
| avatar | mixed | No | Image file for avatar of the project. |
| build_git_strategy | string | No | The Git strategy. Defaults to fetch. |
| build_timeout | integer | No | The maximum amount of time, in seconds, that a job can run. |
| ci_config_path | string | No | The path to CI configuration file. |
| container_registry_enabled | boolean | No | (Deprecated) Enable container registry for this project. Use container_registry_access_level instead. |
| default_branch | string | No | The default branch name. Requires initialize_with_readme to be true. |
| description | string | No | Short project description. |
| emails_disabled | boolean | No | (Deprecated) Disable email notifications. Use emails_enabled instead |
| emails_enabled | boolean | No | Enable email notifications. |
| enforce_auth_checks_on_uploads | boolean | No | Enforce auth checks on uploads. |
| external_authorization_classification_label | string | No | The classification label for the project. Premium and Ultimate only. |
| group_runners_enabled | boolean | No | Enable group runners for this project. |
| group_with_project_templates_id | integer | No | For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires use_custom_template to be true. Premium and Ultimate only. |
| import_url | string | No | URL to import repository from. |
| initialize_with_readme | boolean | No | false by default. |
| issue_branch_template | string | No | Template used to suggest names for branches created from issues. (Introduced in GitLab 15.6.) |
| issues_enabled | boolean | No | (Deprecated) Enable issues for this project. Use issues_access_level instead. |
| jobs_enabled | boolean | No | (Deprecated) Enable jobs for this project. Use builds_access_level instead. |
| lfs_enabled | boolean | No | Enable LFS. |
| merge_commit_template | string | No | Template used to create merge commit message in merge requests. |
| merge_method | string | No | Set the project’s merge method. Can be merge (merge commit), rebase_merge (merge commit with semi-linear history), or ff (fast-forward merge). |
| merge_requests_enabled | boolean | No | (Deprecated) Enable merge requests for this project. Use merge_requests_access_level instead. |
| mr_default_title_template | string | No | Template used to set default merge request title. |
| mirror_trigger_builds | boolean | No | Pull mirroring triggers builds. Premium and Ultimate only. |
| mirror | boolean | No | Enables pull mirroring in a project. Premium and Ultimate only. |
| namespace_id | integer | No | Namespace for the new project (defaults to the current user’s namespace). |
| only_allow_merge_if_all_discussions_are_resolved | boolean | No | Set whether merge requests can only be merged when all the discussions are resolved. |
| only_allow_merge_if_all_status_checks_passed | boolean | No | Indicates that merges of merge requests should be blocked unless all status checks have passed. Defaults to false. Introduced in GitLab 15.5 with feature flag only_allow_merge_if_all_status_checks_passed disabled by default. Ultimate only. |
| only_allow_merge_if_pipeline_succeeds | boolean | No | Set whether merge requests can only be merged with successful jobs. |
| packages_enabled | boolean | No | Deprecated in GitLab 17.10. Enable or disable packages repository feature. Use package_registry_access_level instead. |
| package_registry_access_level | string | No | Enable or disable packages repository feature. |
| path | string | No | Custom repository name for new project. By default generated based on name. |
| printing_merge_request_link_enabled | boolean | No | Show link to create/view merge request when pushing from the command line. |
| public_builds | boolean | No | (Deprecated) If true, jobs can be viewed by non-project members. Use public_jobs instead. |
| public_jobs | boolean | No | If true, jobs can be viewed by non-project members. |
| repository_object_format | string | No | Repository object format. Defaults to sha1. Introduced in GitLab 16.9. |
| remove_source_branch_after_merge | boolean | No | Enable Delete source branch option by default for all new merge requests. |
| repository_storage | string | No | Which storage shard the repository is on. (administrators only) |
| request_access_enabled | boolean | No | Allow users to request member access. |
| resolve_outdated_diff_discussions | boolean | No | Automatically resolve merge request diffs discussions on lines changed with a push. |
| shared_runners_enabled | boolean | No | Enable instance runners for this project. |
| show_default_award_emojis | boolean | No | Show default emoji reactions. |
| snippets_enabled | boolean | No | (Deprecated) Enable snippets for this project. Use snippets_access_level instead. |
| squash_commit_template | string | No | Template used to create squash commit message in merge requests. |
| squash_option | string | No | One of never, always, default_on, or default_off. |
| suggestion_commit_message | string | No | The commit message used to apply merge request suggestions. |
| tag_list | array | No | (Deprecated in GitLab 14.0) The list of tags for a project; put array of tags, that should be finally assigned to a project. Use topics instead. |
| template_name | string | No | When used without use_custom_template, name of a built-in project template. When used with use_custom_template, name of a custom project template. |
| topics | array | No | The list of topics for the project. |
| use_custom_template | boolean | No | Use either custom instance or group (with group_with_project_templates_id) project template. Premium and Ultimate only. |
| visibility | string | No | See project visibility level. |
| warn_about_potentially_unwanted_characters | boolean | No | Enable warnings about usage of potentially unwanted characters in this project. |
| wiki_enabled | boolean | No | (Deprecated) Enable wiki for this project. Use wiki_access_level instead. |
개별 프로젝트 기능의 가시성 레벨을 설정하려면 프로젝트 기능 가시성 레벨을 참고하세요.
프로젝트 업데이트#
History
-
operations_access_levelremoved in GitLab 16.0. -
model_registry_access_levelintroduced in GitLab 16.7. -
packages_enableddeprecated in GitLab 17.10. -
package_registry_access_levelintroduced in GitLab 18.5. -
protect_merge_request_pipelinesandci_display_pipeline_variablesintroduced in GitLab 18.10. -
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default. -
Feature flag
mr_default_title_templateremoved in GitLab 19.0.
기존 프로젝트를 업데이트합니다.
HTTP 리포지터리가 공개적으로 접근 가능하지 않은 경우, api 범위가 활성화된 공개 액세스 키를 password로 사용하여 URL https://username:password@gitlab.company.com/group/project.git에 인증 정보를 추가하세요.
PUT /projects/:id
지원하는 일반 프로젝트 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| allow_merge_on_skipped_pipeline | boolean | No | Set whether or not merge requests can be merged with skipped jobs. |
| allow_pipeline_trigger_approve_deployment | boolean | No | Set whether or not a pipeline triggerer is allowed to approve deployments. Premium and Ultimate only. |
| only_allow_merge_if_all_status_checks_passed | boolean | No | Indicates that merges of merge requests should be blocked unless all status checks have passed. Defaults to false.Introduced in GitLab 15.5 with feature flag only_allow_merge_if_all_status_checks_passed disabled by default. The feature flag was enabled by default in GitLab 15.9. Ultimate only. |
| approvals_before_merge | integer | No | How many approvers should approve merge requests by default. Deprecated in GitLab 16.0. To configure approval rules, see Merge request approvals API. Premium and Ultimate only. |
| auto_cancel_pending_pipelines | string | No | Auto-cancel pending pipelines. This action toggles between an enabled state and a disabled state; it is not a boolean. |
| auto_devops_deploy_strategy | string | No | Auto Deploy strategy (continuous, manual, or timed_incremental). |
| auto_devops_enabled | boolean | No | Enable Auto DevOps for this project. |
| auto_duo_code_review_enabled | boolean | No | Enable automatic reviews by GitLab Duo on merge requests. See GitLab Duo in merge requests. Ultimate only. |
| autoclose_referenced_issues | boolean | No | Set whether auto-closing referenced issues on default branch. |
| avatar | mixed | No | Image file for avatar of the project. |
| build_git_strategy | string | No | The Git strategy. Defaults to fetch. |
| build_timeout | integer | No | The maximum amount of time, in seconds, that a job can run. |
| ci_config_path | string | No | The path to CI configuration file. |
| ci_default_git_depth | integer | No | Default number of revisions for shallow cloning. |
| ci_delete_pipelines_in_seconds | integer | No | Pipelines older than the configured time are deleted. |
| ci_display_pipeline_variables | boolean | No | Display all manually-defined variables in the pipeline details page after running a pipeline manually. |
| ci_forward_deployment_enabled | boolean | No | Enable or disable prevent outdated deployment jobs. |
| ci_forward_deployment_rollback_allowed | boolean | No | Enable or disable allow job retries for rollback deployments. |
| ci_allow_fork_pipelines_to_run_in_parent_project | boolean | No | Enable or disable running pipelines in the parent project for merge requests from forks. (Introduced in GitLab 15.3.) |
| ci_id_token_sub_claim_components | array | No | Fields included in the sub claim of the ID Token. Accepts an array starting with project_path. The array might also include ref_type, ref, ref_protected, environment_protected, and deployment_tier. Defaults to ["project_path", "ref_type", "ref"]. Introduced in GitLab 17.10. Support for environment_protected and deployment_tier introduced in GitLab 18.7. |
| ci_separated_caches | boolean | No | Set whether or not caches should be separated by branch protection status. |
| ci_restrict_pipeline_cancellation_role | string | No | Set the role required to cancel a pipeline or job. One of developer, maintainer, or no_one. Introduced in GitLab 16.8. Premium and Ultimate only. |
| ci_pipeline_variables_minimum_override_role | string | No | You can specify which role can override variables. One of owner, maintainer, developer or no_one_allowed. Introduced in GitLab 17.1. In GitLab 17.1 to 17.7, restrict_user_defined_variables must be enabled. |
| ci_push_repository_for_job_token_allowed | boolean | No | Enable or disable the ability to push to the project repository using job token. Introduced in GitLab 17.2. |
| container_expiration_policy_attributes | hash | No | Update the image cleanup policy for this project. Accepts: cadence (string), keep_n (integer), older_than (string), name_regex (string), name_regex_delete (string), name_regex_keep (string), enabled (boolean). |
| container_registry_enabled | boolean | No | (Deprecated) Enable container registry for this project. Use container_registry_access_level instead. |
| default_branch | string | No | The default branch name. |
| description | string | No | Short project description. |
| duo_remote_flows_enabled | boolean | No | Determine whether or not flows can run in your project. |
| duo_sast_fp_detection_enabled | boolean | No | If true, turns on SAST false positive detection. Requires the Security Manager, Maintainer, or Owner role. See turn on SAST false positive detection. |
| duo_secret_detection_fp_enabled | boolean | No | If true, turns on secret detection false positive detection. Requires the Security Manager, Maintainer, or Owner role. See turn on secret detection false positive detection. |
| duo_sast_vr_workflow_enabled | boolean | No | If true, turns on SAST vulnerability resolution workflow. Requires the Security Manager, Maintainer, or Owner role. See turn on SAST vulnerability resolution workflow. |
| emails_disabled | boolean | No | (Deprecated) Disable email notifications. Use emails_enabled instead |
| emails_enabled | boolean | No | Enable email notifications. |
| enforce_auth_checks_on_uploads | boolean | No | Enforce auth checks on uploads. |
| external_authorization_classification_label | string | No | The classification label for the project. Premium and Ultimate only. |
| group_runners_enabled | boolean | No | Enable group runners for this project. |
| import_url | string | No | URL the repository was imported from. |
| issues_enabled | boolean | No | (Deprecated) Enable issues for this project. Use issues_access_level instead. |
| issues_template | string | No | Default description for new issues. Formatted as GitLab Flavored Markdown. Premium and Ultimate only. |
| merge_requests_template | string | No | Default description for new merge requests. Formatted as GitLab Flavored Markdown. Premium and Ultimate only. |
| jobs_enabled | boolean | No | (Deprecated) Enable jobs for this project. Use builds_access_level instead. |
| keep_latest_artifact | boolean | No | Disable or enable the ability to keep the latest artifact for this project. |
| lfs_enabled | boolean | No | Enable LFS. |
| max_artifacts_size | integer | No | The maximum file size in megabytes for individual job artifacts. |
| merge_commit_template | string | No | Template used to create merge commit message in merge requests. |
| merge_method | string | No | Set the project’s merge method. Can be merge (merge commit), rebase_merge (merge commit with semi-linear history), or ff (fast-forward merge). |
| merge_pipelines_enabled | boolean | No | Enable or disable merged results pipelines. |
| merge_requests_enabled | boolean | No | (Deprecated) Enable merge requests for this project. Use merge_requests_access_level instead. |
| mr_default_title_template | string | No | Template used to set default merge request title. |
| merge_trains_enabled | boolean | No | Enable or disable merge trains. |
| merge_trains_skip_train_allowed | boolean | No | Allows merge train merge requests to be merged without waiting for pipelines to finish. |
| max_pipelines_per_merge_train | integer | No | Maximum number of parallel pipelines per merge train. |
| mirror_overwrites_diverged_branches | boolean | No | Pull mirror overwrites diverged branches. Premium and Ultimate only. |
| mirror_trigger_builds | boolean | No | Pull mirroring triggers builds. Premium and Ultimate only. |
| mirror_user_id | integer | No | User responsible for all the activity surrounding a pull mirror event. (administrators only) Premium and Ultimate only. |
| mirror | boolean | No | Enables pull mirroring in a project. Premium and Ultimate only. |
| mr_default_target_self | boolean | No | For forked projects, target merge requests to this project. If false, the target is the upstream project. |
| name | string | No | The name of the project. |
| only_allow_merge_if_all_discussions_are_resolved | boolean | No | Set whether merge requests can only be merged when all the discussions are resolved. |
| only_allow_merge_if_pipeline_succeeds | boolean | No | Set whether merge requests can only be merged with successful jobs. |
| only_mirror_protected_branches | boolean | No | Only mirror protected branches. Premium and Ultimate only. |
| packages_enabled | boolean | No | Deprecated in GitLab 17.10. Enable or disable packages repository feature. Use package_registry_access_level instead. |
| package_registry_access_level | string | No | Enable or disable packages repository feature. |
| path | string | No | Custom repository name for the project. By default generated based on name. |
| prevent_merge_without_jira_issue | boolean | No | Set whether merge requests require an associated issue from Jira. Ultimate only. |
| printing_merge_request_link_enabled | boolean | No | Show link to create/view merge request when pushing from the command line. |
| protect_merge_request_pipelines | boolean | No | Enable or disable control access to protected variables and runners. |
| public_builds | boolean | No | (Deprecated) If true, jobs can be viewed by non-project members. Use public_jobs instead. |
| public_jobs | boolean | No | If true, jobs can be viewed by non-project members. |
| remove_source_branch_after_merge | boolean | No | Enable Delete source branch option by default for all new merge requests. |
| repository_storage | string | No | Which storage shard the repository is on. (administrators only) |
| request_access_enabled | boolean | No | Allow users to request member access. |
| resolve_outdated_diff_discussions | boolean | No | Automatically resolve merge request diffs discussions on lines changed with a push. |
| restrict_user_defined_variables | boolean | No | (Deprecated in GitLab 17.7 in favour of ci_pipeline_variables_minimum_override_role) Allow only users with the Maintainer role to pass user-defined variables when triggering a pipeline. For example when the pipeline is triggered in the UI, with the API, or by a trigger token. |
| service_desk_enabled | boolean | No | Enable or disable Service Desk feature. |
| shared_runners_enabled | boolean | No | Enable instance runners for this project. |
| show_default_award_emojis | boolean | No | Show default emoji reactions. |
| snippets_enabled | boolean | No | (Deprecated) Enable snippets for this project. Use snippets_access_level instead. |
| issue_branch_template | string | No | Template used to suggest names for branches created from issues. (Introduced in GitLab 15.6.) |
| spp_repository_pipeline_access | boolean | No | Allow users and tokens read-only access to fetch security policy configurations from this project. Required for enforcing security policies in projects that use this project as their security policy source. Ultimate only. |
| squash_commit_template | string | No | Template used to create squash commit message in merge requests. |
| squash_option | string | No | One of never, always, default_on, or default_off. |
| suggestion_commit_message | string | No | The commit message used to apply merge request suggestions. |
| tag_list | array | No | (Deprecated in GitLab 14.0) The list of tags for a project; put array of tags, that should be finally assigned to a project. Use topics instead. |
| topics | array | No | The list of topics for the project. This replaces any existing topics that are already added to the project. |
| visibility | string | No | See project visibility level. |
| warn_about_potentially_unwanted_characters | boolean | No | Enable warnings about usage of potentially unwanted characters in this project. |
| wiki_enabled | boolean | No | (Deprecated) Enable wiki for this project. Use wiki_access_level instead. |
| web_based_commit_signing_enabled | boolean | No | Enables web-based commit signing for commits created from the GitLab UI. Available only on GitLab.com. |
예를 들어 GitLab.com 프로젝트의 인스턴스 러너 설정을 토글하려면:
curl --request PUT --header "PRIVATE-TOKEN: <your-token>" \
--url "https://gitlab.com/api/v4/projects/<your-project-ID>" \
--data "shared_runners_enabled=true" # to turn off: "shared_runners_enabled=false"
개별 프로젝트 기능의 가시성 레벨을 설정하려면 프로젝트 기능 가시성 레벨을 참고하세요.
여러 프로젝트에서 서비스 데스크 끄기#
GitLab은 각 프로젝트에 대해 서비스 데스크 설정을 저장합니다. 새 프로젝트는 서비스 데스크가 기본적으로 활성화되어 있습니다. 네임스페이스의 여러 프로젝트에서 서비스 데스크를 끄려면, 프로젝트 업데이트 엔드포인트로 각 프로젝트를 업데이트하세요.
사전 요건:
- 변경하려는 각 프로젝트에 대한 Maintainer 또는 Owner 역할이 있어야 합니다.
프로젝트에서 서비스 데스크를 끄려면 service_desk_enabled 속성을 false로 설정하세요:
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
--data "service_desk_enabled=false" \
--url "https://gitlab.example.com/api/v4/projects/<project_id>"
네임스페이스의 프로젝트를 찾으려면 include_subgroups=true와 함께
그룹 프로젝트 나열 엔드포인트를 사용하거나,
개인 네임스페이스의 경우 사용자 프로젝트 나열
엔드포인트를 사용하세요. 그런 다음 변경하려는 각 프로젝트에 대해 이전 요청을 실행하세요.
API가 반환하는 service_desk_enabled 필드는 계산된 값입니다. 프로젝트 설정이 켜져 있고
인스턴스에 수신 이메일이 구성된 경우에만 true입니다.
수신 이메일이 구성되지 않은 경우, 프로젝트 설정이 켜져 있어도 이 필드는 false로 표시됩니다.
멤버 가져오기#
다른 프로젝트에서 멤버를 가져옵니다.
가져오는 멤버의 대상 프로젝트 역할이 다음과 같은 경우:
-
Maintainer인 경우, 소스 프로젝트의 Owner 역할을 가진 멤버는 Maintainer 역할로 가져옵니다.
-
Owner인 경우, 소스 프로젝트의 Owner 역할을 가진 멤버는 Owner 역할로 가져옵니다.
POST /projects/:id/import_project_members/:project_id
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | The ID or URL-encoded path of the target project to receive the members. |
| project_id | integer or string | Yes | The ID or URL-encoded path of the source project to import the members from. |
요청 예시:
curl --request POST \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/import_project_members/32"
반환 값:
-
성공 시
200 OK. -
대상 또는 소스 프로젝트가 존재하지 않거나 요청자가 접근할 수 없는 경우
404 Project Not Found. -
프로젝트 멤버 가져오기가 성공적으로 완료되지 않은 경우
422 Unprocessable Entity.
응답 예시:
모든 이메일이 성공적으로 전송된 경우 (200 HTTP 상태 코드):
{ "status": "success" }
1명 이상의 멤버를 가져오는 중 오류가 발생한 경우 (200 HTTP 상태 코드):
{
"status": "error",
"message": {
"john_smith": "Some individual error message",
"jane_smith": "Some individual error message"
},
"total_members_count": 3
}
When there is a system error (404 and 422 HTTP status codes):
{ "message": "Import failed" }
프로젝트 보관#
History
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default.- Feature flag
mr_default_title_templateremoved in GitLab 19.0.
지정된 프로젝트를 보관합니다.
전제 조건:
- 관리자이거나 프로젝트에서 Owner 역할이 있어야 합니다.
이 엔드포인트는 멱등성을 가집니다. 이미 보관된 프로젝트를 보관해도 프로젝트는 변경되지 않습니다.
POST /projects/:id/archive
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
요청 예시:
curl --request POST \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/archive"
응답 예시:
{
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
"web_url": "http://example.com/diaspora/diaspora-project-site",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
],
"topics": [
"example",
"disapora project"
],
"owner": {
"id": 3,
"name": "Diaspora",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Diaspora Project Site",
"name_with_namespace": "Diaspora / Diaspora Project Site",
"path": "diaspora-project-site",
"path_with_namespace": "diaspora/diaspora-project-site",
"repository_object_format": "sha1",
"issues_enabled": true,
"open_issues_count": 1,
"merge_requests_enabled": true,
"jobs_enabled": true,
"wiki_enabled": true,
"snippets_enabled": false,
"can_create_merge_request_in": true,
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": false, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "disabled",
"security_and_compliance_access_level": "disabled",
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"last_activity_at": "2013-09-30T13:46:02Z",
"creator_id": 3,
"namespace": {
"id": 3,
"name": "Diaspora",
"path": "diaspora",
"kind": "group",
"full_path": "diaspora"
},
"import_status": "none",
"import_error": null,
"permissions": {
"project_access": {
"access_level": 10,
"notification_level": 3
},
"group_access": {
"access_level": 50,
"notification_level": 3
}
},
"archived": true,
"avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
"license_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
"nickname": "GNU LGPLv3",
"html_url": "http://choosealicense.com/licenses/lgpl-3.0/",
"source_url": "http://www.gnu.org/licenses/lgpl-3.0.txt"
},
"shared_runners_enabled": true,
"group_runners_enabled": true,
"forks_count": 0,
"star_count": 0,
"runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_forward_deployment_rollback_allowed": true,
"ci_allow_fork_pipelines_to_run_in_parent_project": true,
"ci_id_token_sub_claim_components": ["project_path", "ref_type", "ref"],
"ci_separated_caches": true,
"ci_restrict_pipeline_cancellation_role": "developer",
"ci_pipeline_variables_minimum_override_role": "maintainer",
"ci_push_repository_for_job_token_allowed": false,
"ci_display_pipeline_variables": false,
"protect_merge_request_pipelines": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": false,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": false,
"request_access_enabled": false,
"merge_method": "merge",
"squash_option": "default_on",
"autoclose_referenced_issues": true,
"enforce_auth_checks_on_uploads": true,
"suggestion_commit_message": null,
"merge_commit_template": null,
"secret_push_protection_enabled": false,
"container_registry_image_prefix": "registry.example.com/diaspora/diaspora-project-site",
"_links": {
"self": "http://example.com/api/v4/projects",
"issues": "http://example.com/api/v4/projects/1/issues",
"merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
"repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members",
"cluster_agents": "http://example.com/api/v4/projects/1/cluster_agents"
}
}
프로젝트 보관 해제#
History
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default.- Feature flag
mr_default_title_templateremoved in GitLab 19.0.
지정된 프로젝트의 보관을 해제합니다.
전제 조건:
- 관리자이거나 프로젝트에서 Owner 역할이 있어야 합니다.
이 엔드포인트는 멱등성을 가집니다. 보관되지 않은 프로젝트의 보관을 해제해도 프로젝트는 변경되지 않습니다.
POST /projects/:id/unarchive
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
요청 예시:
curl --request POST \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/unarchive"
응답 예시:
{
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
"web_url": "http://example.com/diaspora/diaspora-project-site",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
],
"topics": [
"example",
"disapora project"
],
"owner": {
"id": 3,
"name": "Diaspora",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Diaspora Project Site",
"name_with_namespace": "Diaspora / Diaspora Project Site",
"path": "diaspora-project-site",
"path_with_namespace": "diaspora/diaspora-project-site",
"repository_object_format": "sha1",
"issues_enabled": true,
"open_issues_count": 1,
"merge_requests_enabled": true,
"jobs_enabled": true,
"wiki_enabled": true,
"snippets_enabled": false,
"can_create_merge_request_in": true,
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": false, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "disabled",
"security_and_compliance_access_level": "disabled",
"created_at": "2013-09-30T13:46:02Z",
"updated_at": "2013-09-30T13:46:02Z",
"last_activity_at": "2013-09-30T13:46:02Z",
"creator_id": 3,
"namespace": {
"id": 3,
"name": "Diaspora",
"path": "diaspora",
"kind": "group",
"full_path": "diaspora"
},
"import_status": "none",
"import_error": null,
"permissions": {
"project_access": {
"access_level": 10,
"notification_level": 3
},
"group_access": {
"access_level": 50,
"notification_level": 3
}
},
"archived": false,
"avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
"license_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
"nickname": "GNU LGPLv3",
"html_url": "http://choosealicense.com/licenses/lgpl-3.0/",
"source_url": "http://www.gnu.org/licenses/lgpl-3.0.txt"
},
"shared_runners_enabled": true,
"group_runners_enabled": true,
"forks_count": 0,
"star_count": 0,
"runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_forward_deployment_rollback_allowed": true,
"ci_allow_fork_pipelines_to_run_in_parent_project": true,
"ci_id_token_sub_claim_components": ["project_path", "ref_type", "ref"],
"ci_separated_caches": true,
"ci_restrict_pipeline_cancellation_role": "developer",
"ci_pipeline_variables_minimum_override_role": "maintainer",
"ci_push_repository_for_job_token_allowed": false,
"ci_display_pipeline_variables": false,
"protect_merge_request_pipelines": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": false,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": false,
"request_access_enabled": false,
"merge_method": "merge",
"squash_option": "default_on",
"autoclose_referenced_issues": true,
"enforce_auth_checks_on_uploads": true,
"suggestion_commit_message": null,
"merge_commit_template": null,
"container_registry_image_prefix": "registry.example.com/diaspora/diaspora-project-site",
"secret_push_protection_enabled": false,
"_links": {
"self": "http://example.com/api/v4/projects",
"issues": "http://example.com/api/v4/projects/1/issues",
"merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
"repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members",
"cluster_agents": "http://example.com/api/v4/projects/1/cluster_agents"
}
}
프로젝트 삭제#
History
-
Generally available in GitLab 16.0. Premium and Ultimate only.
-
Moved from GitLab Premium to GitLab Free in GitLab 18.0.
전제 조건:
- 관리자이거나 프로젝트에서 Owner 역할이 있어야 합니다.
프로젝트를 삭제 예약 상태로 표시합니다. 프로젝트는 보존 기간이 끝날 때 삭제됩니다:
-
GitLab.com에서는 프로젝트가 30일 동안 보존됩니다.
-
GitLab Self-Managed에서는 보존 기간이 인스턴스 설정에 의해 제어됩니다.
이 엔드포인트는 이전에 삭제 예약으로 표시된 프로젝트를 즉시 삭제할 수도 있습니다.
GitLab.com에서 프로젝트가 삭제된 후 데이터는 30일 동안 보존되며, 영구 삭제는 불가능합니다.
GitLab.com에서 프로젝트를 즉시 삭제해야 하는 경우 지원 티켓을 열 수 있습니다.
DELETE /projects/:id
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| full_path | string | no | permanently_remove와 함께 사용할 프로젝트의 전체 경로. GitLab 15.11에서 Premium 및 Ultimate 전용으로 도입되었으며 18.0에서 GitLab Free로 이전됨. 프로젝트 경로를 찾으려면 단일 프로젝트 조회에서 path_with_namespace를 사용하세요. |
| permanently_remove | boolean/string | no | 삭제 예약으로 표시된 프로젝트를 즉시 삭제합니다. GitLab 15.11에서 Premium 및 Ultimate 전용으로 도입되었으며 18.0에서 GitLab Free로 이전됨. GitLab.com 및 Dedicated에서는 비활성화됨. |
삭제 예약된 프로젝트 복원#
삭제 예약으로 표시된 지정된 프로젝트를 복원합니다.
POST /projects/:id/restore
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
프로젝트를 새 네임스페이스로 이전#
History
mr_default_title_templateintroduced in GitLab 18.11 with a feature flag namedmr_default_title_template. Disabled by default.- Feature flag
mr_default_title_templateremoved in GitLab 19.0.
프로젝트를 새 네임스페이스로 이전합니다.
프로젝트 이전 전제 조건에 대한 자세한 내용은 다른 네임스페이스로 프로젝트 이전을 참조하세요.
PUT /projects/:id/transfer
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| namespace | integer or string | Yes | 프로젝트를 이전할 네임스페이스의 ID 또는 경로. |
요청 예시:
curl --request PUT \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/transfer?namespace=14"
응답 예시:
{
"id": 7,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"name": "hello-world",
"name_with_namespace": "cute-cats / hello-world",
"path": "hello-world",
"path_with_namespace": "cute-cats/hello-world",
"created_at": "2020-10-15T16:25:22.415Z",
"updated_at": "2020-10-15T16:25:22.415Z",
"default_branch": "main",
"tag_list": [], //deprecated, use `topics` instead
"topics": [],
"ssh_url_to_repo": "git@gitlab.example.com:cute-cats/hello-world.git",
"http_url_to_repo": "https://gitlab.example.com/cute-cats/hello-world.git",
"web_url": "https://gitlab.example.com/cute-cats/hello-world",
"readme_url": "https://gitlab.example.com/cute-cats/hello-world/-/blob/main/README.md",
"avatar_url": null,
"forks_count": 0,
"star_count": 0,
"last_activity_at": "2020-10-15T16:25:22.415Z",
"namespace": {
"id": 18,
"name": "cute-cats",
"path": "cute-cats",
"kind": "group",
"full_path": "cute-cats",
"parent_id": null,
"avatar_url": null,
"web_url": "https://gitlab.example.com/groups/cute-cats"
},
"container_registry_image_prefix": "registry.example.com/cute-cats/hello-world",
"_links": {
"self": "https://gitlab.example.com/api/v4/projects/7",
"issues": "https://gitlab.example.com/api/v4/projects/7/issues",
"merge_requests": "https://gitlab.example.com/api/v4/projects/7/merge_requests",
"repo_branches": "https://gitlab.example.com/api/v4/projects/7/repository/branches",
"labels": "https://gitlab.example.com/api/v4/projects/7/labels",
"events": "https://gitlab.example.com/api/v4/projects/7/events",
"members": "https://gitlab.example.com/api/v4/projects/7/members"
},
"packages_enabled": true, // deprecated, use package_registry_access_level instead
"package_registry_access_level": "enabled",
"empty_repo": false,
"archived": false,
"visibility": "private",
"resolve_outdated_diff_discussions": false,
"container_registry_enabled": true, // deprecated, use container_registry_access_level instead
"container_registry_access_level": "enabled",
"container_expiration_policy": {
"cadence": "7d",
"enabled": false,
"keep_n": null,
"older_than": null,
"name_regex": null,
"name_regex_keep": null,
"next_run_at": "2020-10-22T16:25:22.746Z"
},
"issues_enabled": true,
"merge_requests_enabled": true,
"wiki_enabled": true,
"jobs_enabled": true,
"snippets_enabled": true,
"service_desk_enabled": false,
"service_desk_address": null,
"can_create_merge_request_in": true,
"issues_access_level": "enabled",
"repository_access_level": "enabled",
"merge_requests_access_level": "enabled",
"forking_access_level": "enabled",
"analytics_access_level": "enabled",
"wiki_access_level": "enabled",
"builds_access_level": "enabled",
"snippets_access_level": "enabled",
"pages_access_level": "enabled",
"security_and_compliance_access_level": "enabled",
"emails_disabled": null,
"emails_enabled": null,
"shared_runners_enabled": true,
"group_runners_enabled": true,
"lfs_enabled": true,
"creator_id": 2,
"import_status": "none",
"open_issues_count": 0,
"ci_default_git_depth": 50,
"public_jobs": true,
"build_timeout": 3600,
"auto_cancel_pending_pipelines": "enabled",
"ci_config_path": null,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": null,
"allow_pipeline_trigger_approve_deployment": false,
"restrict_user_defined_variables": false,
"request_access_enabled": true,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": true,
"printing_merge_request_link_enabled": true,
"merge_method": "merge",
"squash_option": "default_on",
"suggestion_commit_message": null,
"merge_commit_template": null,
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"autoclose_referenced_issues": true,
"approvals_before_merge": 0, // Deprecated. Use merge request approvals API instead.
"mirror": false,
"compliance_frameworks": [],
"warn_about_potentially_unwanted_characters": true,
"secret_push_protection_enabled": false
}
프로젝트 이전 가능한 그룹 목록 조회#
사용자가 프로젝트를 이전할 수 있는 그룹 목록을 조회합니다.
GET /projects/:id/transfer_locations
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| search | string | No | 검색할 그룹 이름. |
요청 예시:
curl --url "https://gitlab.example.com/api/v4/projects/1/transfer_locations"
응답 예시:
[
{
"id": 27,
"web_url": "https://gitlab.example.com/groups/gitlab",
"name": "GitLab",
"avatar_url": null,
"full_name": "GitLab",
"full_path": "GitLab"
},
{
"id": 31,
"web_url": "https://gitlab.example.com/groups/foobar",
"name": "FooBar",
"avatar_url": null,
"full_name": "FooBar",
"full_path": "FooBar"
}
]
프로젝트 아바타 업로드#
지정된 프로젝트에 아바타를 업로드합니다.
PUT /projects/:id
전제 조건:
-
프로젝트에서 Maintainer 또는 Owner 역할이 있어야 합니다.
-
파일 크기는 200 KB 이하여야 합니다. 이상적인 이미지 크기는 192 x 192 픽셀입니다.
-
이미지는 다음 파일 형식 중 하나여야 합니다:
.bmp
-
.gif -
.ico -
.jpeg -
.png -
.tiff
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| avatar | string | Yes | 업로드할 파일. |
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
파일 시스템에서 아바타를 업로드하려면 --form 인수를 사용하세요. 이렇게 하면 cURL이 Content-Type: multipart/form-data 헤더를 사용하여 데이터를 전송합니다. avatar= 매개변수는 파일 시스템의 이미지 파일을 가리켜야 하며 앞에 @를 붙여야 합니다.
요청 예시:
curl --request PUT \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5" \
--form "avatar=@dk.png"
응답 예시:
{
"avatar_url": "https://gitlab.example.com/uploads/-/system/project/avatar/2/dk.png"
}
프로젝트 아바타 다운로드#
History
- Introduced in GitLab 16.9.
프로젝트 아바타를 다운로드합니다. 프로젝트가 공개적으로 접근 가능한 경우 인증 없이 이 엔드포인트에 접근할 수 있습니다.
GET /projects/:id/avatar
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
요청 예시:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/4/avatar"
프로젝트 아바타 삭제#
프로젝트 아바타를 삭제하려면 avatar 속성에 빈 값을 사용하세요.
요청 예시:
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
--data "avatar=" "https://gitlab.example.com/api/v4/projects/5"
프로젝트 공유#
그룹과 프로젝트를 공유합니다.
자세한 내용은 프로젝트에 그룹 초대를 참조하세요.
그룹과 프로젝트 공유#
지정된 프로젝트를 그룹과 공유합니다.
POST /projects/:id/share
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| group_access | integer | Yes | 그룹에 부여할 액세스 레벨. 가능한 값: 5 (최소 액세스), 10 (Guest), 15 (Planner), 20 (Reporter), 25 (Security Manager), 30 (Developer), 40 (Maintainer), 또는 50 (Owner). |
| group_id | integer | Yes | 공유할 그룹의 ID. |
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| expires_at | string | No | ISO 8601 형식의 공유 만료 날짜. 예: 2016-09-26. |
그룹의 공유 프로젝트 링크 삭제#
지정된 그룹과의 프로젝트 공유를 해제합니다. 성공 시 204와 콘텐츠 없음을 반환합니다.
DELETE /projects/:id/share/:group_id
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| group_id | integer | Yes | 그룹의 ID. |
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
요청 예시:
curl --request DELETE \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/share/17"
프로젝트 하우스키핑 작업 시작#
프로젝트의 하우스키핑 작업을 시작합니다.
POST /projects/:id/housekeeping
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| task | string | No | 도달할 수 없는 객체의 수동 prune을 트리거하려면 prune, eager 하우스키핑을 트리거하려면 eager를 사용합니다. |
실시간 보안 스캔#
-
Status: Experiment
History
- Introduced in GitLab 17.6. This feature is an experiment.
단일 파일에 대한 SAST 스캔 결과를 실시간으로 반환합니다.
POST /projects/:id/security_scans/sast/scan
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
요청 예시:
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
--header "Content-Type: application/json" \
--data '{
"file_path":"src/main.c",
"content":"#include<string.h>\nint main(int argc, char **argv) {\n char buff[128];\n strcpy(buff, argv[1]);\n return 0;\n}\n"
}' \
--url "https://gitlab.example.com/api/v4/projects/:id/security_scans/sast/scan"
응답 예시:
{
"vulnerabilities": [
{
"name": "Insecure string processing function (strcpy)",
"description": "The `strcpy` family of functions do not provide the ability to limit or check buffer\nsizes before copying to a destination buffer. This can lead to buffer overflows. Consider\nusing more secure alternatives such as `strncpy` and provide the correct limit to the\ndestination buffer and ensure the string is null terminated.\n\nFor more information please see: https://linux.die.net/man/3/strncpy\n\nIf developing for C Runtime Library (CRT), more secure versions of these functions should be\nused, see:\nhttps://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l?view=msvc-170\n",
"severity": "High",
"location": {
"file": "src/main.c",
"start_line": 5,
"end_line": 5,
"start_column": 3,
"end_column": 23
}
}
]
}
Git 리포지터리 스냅샷 다운로드#
이 엔드포인트는 관리자 사용자만 접근할 수 있습니다.
프로젝트(또는 요청 시 위키)의 Git 리포지터리 스냅샷을 다운로드합니다. 이 스냅샷은 항상 압축되지 않은 tar 형식입니다.
리포지터리가 git clone이 작동하지 않을 정도로 손상된 경우, 스냅샷을 통해 일부 데이터를 복구할 수 있습니다.
GET /projects/:id/snapshot
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
| wiki | boolean | No | 프로젝트 리포지터리 대신 위키를 다운로드할지 여부. |
리포지터리 스토리지 경로 조회#
지정된 프로젝트의 리포지터리 스토리지 경로를 조회합니다. Gitaly Cluster(Praefect)를 사용하는 경우 대신 Praefect 생성 복제본 경로를 참조하세요.
관리자 전용입니다.
GET /projects/:id/storage
지원하는 속성:
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | integer or string | Yes | 프로젝트의 ID 또는 URL 인코딩된 경로. |
[
{
"project_id": 1,
"disk_path": "@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b",
"created_at": "2012-10-12T17:04:47Z",
"repository_storage": "default"
}
]
시크릿 푸시 보호 상태#
-
Tier: Ultimate
History
-
Introduced in GitLab 17.3.
-
Renamed from
setPreReceiveSecretDetectionin GitLab 17.11.
Security Manager, Developer, Maintainer 또는 Owner 역할이 있는 경우 다음 요청에서도 secret_push_protection_enabled 값이 반환될 수 있습니다.
이러한 요청 중 일부는 역할에 대한 더 엄격한 요구사항이 있습니다. 자세한 내용은 앞서 언급된 엔드포인트를 참조하세요.
이 정보를 사용하여 프로젝트에 시크릿 푸시 보호가 활성화되어 있는지 확인하세요.
secret_push_protection_enabled 값을 수정하려면 프로젝트 보안 설정 API를 사용하세요.
-
GET /projects -
GET /projects/:id -
GET /users/:user_id/projects -
GET /users/:user_id/contributed_projects -
PUT /projects/:project_id/transfer?namespace=:namespace_id -
PUT /projects/:id -
POST /projects -
POST /projects/user/:user_id -
POST /projects/:id/archive -
POST /projects/:id/unarchive
응답 예시:
{
"id": 1,
"project_id": 3,
"secret_push_protection_enabled": true,
...
}
트러블슈팅#
응답에서 예상치 못한 restrict_user_defined_variables 값#
restrict_user_defined_variables와 ci_pipeline_variables_minimum_override_role에 충돌하는 값을 설정하면 pipeline_variables_minimum_override_role 설정이 더 높은 우선순위를 갖기 때문에 응답 값이 예상과 다를 수 있습니다.
예를 들어:
-
restrict_user_defined_variables를true로,ci_pipeline_variables_minimum_override_role을developer로 설정하면 응답은restrict_user_defined_variables: false를 반환합니다.ci_pipeline_variables_minimum_override_role을developer로 설정하면 우선 적용되어 변수가 제한되지 않습니다. -
restrict_user_defined_variables를false로,ci_pipeline_variables_minimum_override_role을maintainer로 설정하면ci_pipeline_variables_minimum_override_role을maintainer로 설정하면 우선 적용되어 변수가 제한되기 때문에 응답은restrict_user_defined_variables: true를 반환합니다.