프로젝트 API

Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

REST API를 사용하여 프로젝트를 관리합니다.

사용자는 다음과 같은 권한을 가집니다:

  • 프로젝트의 기본 역할을 가진 사용자는 프로젝트의 속성을 읽을 수 있습니다.
  • 프로젝트의 소유자 또는 유지관리자 역할을 가진 사용자는 프로젝트의 속성을 수정할 수 있습니다.

프로젝트 가시성 수준

GitLab의 프로젝트는 다음 중 하나의 가시성 수준을 가질 수 있습니다:

  • 비공개
  • 내부
  • 공개

가시성 수준은 프로젝트의 visibility 필드에 의해 결정됩니다.

자세한 내용은 프로젝트 가시성을 참조하세요.

응답에서 반환되는 필드는 인증된 사용자의 권한에 따라 다릅니다.

사용 중단된 속성

이 속성은 사용 중단되었으며 REST API의 향후 버전에서 제거될 수 있습니다. 대신 대체 속성을 사용하세요.

사용 중단된 속성 대체 속성
tag_list topics 속성
marked_for_deletion_at marked_for_deletion_on. Premium 및 Ultimate 등급에서만 사용 가능.
approvals_before_merge 병합 요청 승인 API. Premium 및 Ultimate 등급에서만 사용 가능.

모든 프로젝트 목록

인증된 사용자에 대한 GitLab의 모든 보이는 프로젝트 목록을 가져옵니다.

인증 없이 접근했을 때는 단순 필드가 포함된 공개 프로젝트만 반환됩니다.

GET /projects

지원되는 속성:

속성 타입 필수 설명
archived boolean 아니오 보관된 상태로 제한합니다.
id_after integer 아니오 지정된 ID보다 큰 프로젝트로 결과를 제한합니다.
id_before integer 아니오 지정된 ID보다 작은 프로젝트로 결과를 제한합니다.
imported boolean 아니오 현재 사용자에 의해 외부 시스템에서 가져온 프로젝트로 결과를 제한합니다.
include_hidden boolean 아니오 숨겨진 프로젝트를 포함합니다. (관리자 전용) Premium 및 Ultimate에 대해서만 사용 가능.
include_pending_delete boolean 아니오 삭제 대기 중인 프로젝트를 포함합니다. (관리자 전용)
last_activity_after datetime 아니오 지정된 시간 이후 마지막으로 활동한 프로젝트로 결과를 제한합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)
last_activity_before datetime 아니오 지정된 시간 이전 마지막으로 활동한 프로젝트로 결과를 제한합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)
membership boolean 아니오 현재 사용자가 구성원인 프로젝트로 제한합니다.
min_access_level integer 아니오 현재 사용자의 최소 역할 (access_level)로 제한합니다.
order_by string 아니오 id, name, path, created_at, updated_at, star_count, last_activity_at 또는 similarity 필드로 정렬된 프로젝트를 반환합니다. repository_size, storage_size, packages_size 또는 wiki_size 필드는 관리자에게만 허용됩니다. similarity는 검색 중에만 사용할 수 있으며 현재 사용자가 구성원인 프로젝트로 제한됩니다. 기본값은 created_at입니다.
owned boolean 아니오 현재 사용자가 명시적으로 소유한 프로젝트로 제한합니다.
repository_checksum_failed boolean 아니오 저장소 체크섬 계산에 실패한 프로젝트로 제한합니다. Premium 및 Ultimate에 대해서만 사용 가능.
repository_storage string 아니오 repository_storage에 저장된 프로젝트로 결과를 제한합니다. (관리자 전용)
search_namespaces boolean 아니오 검색 기준과 일치할 때 조상 네임스페이스를 포함합니다. 기본값은 false입니다.
search string 아니오 검색 기준과 일치하는 프로젝트 목록을 반환합니다.
simple boolean 아니오 각 프로젝트에 대한 제한된 필드만 반환합니다. 인증 없이 수행될 때는 단순 필드만 반환됩니다.
sort string 아니오 asc 또는 desc 순서로 정렬된 프로젝트를 반환합니다. 기본값은 desc입니다.
starred boolean 아니오 현재 사용자가 별표를 표시한 프로젝트로 제한합니다.
statistics boolean 아니오 프로젝트 통계를 포함합니다. 최소 Reporter 역할을 가진 사용자만 사용할 수 있습니다.
topic_id integer 아니오 주어진 주제 ID로 지정된 프로젝트로 결과를 제한합니다.
topic string 아니오 쉼표로 구분된 주제 이름. 주어진 모든 주제와 일치하는 프로젝트로 결과를 제한합니다. topics 속성을 참조하세요.
updated_after datetime 아니오 지정된 시간 이후 마지막으로 업데이트된 프로젝트로 결과를 제한합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). GitLab 15.10에서 도입됨. 이 필터가 작동하려면 updated_atorder_by 속성으로 지정해야 합니다.
updated_before datetime 아니오 지정된 시간 이전 마지막으로 업데이트된 프로젝트로 결과를 제한합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). GitLab 15.10에서 도입됨. 이 필터가 작동하려면 updated_atorder_by 속성으로 지정해야 합니다.
visibility string 아니오 가시성 public, internal, 또는 private로 제한합니다.
wiki_checksum_failed boolean 아니오 위키 체크섬 계산에 실패한 프로젝트로 제한합니다. Premium 및 Ultimate에 대해서만 사용 가능.
with_custom_attributes boolean 아니오 응답에 사용자 정의 속성을 포함합니다. (관리자 전용)
with_issues_enabled boolean 아니오 활성화된 문제 기능으로 제한합니다.
with_merge_requests_enabled boolean 아니오 활성화된 병합 요청 기능으로 제한합니다.
with_programming_language string 아니오 주어진 프로그래밍 언어를 사용하는 프로젝트로 제한합니다.
marked_for_deletion_on date 아니오 프로젝트가 삭제로 표시된 날짜로 필터링합니다. GitLab 17.1에서 도입됨. Premium 및 Ultimate에 대해서만 사용 가능.

이 엔드포인트는 선택한 order_by 옵션에 대해 키셋 페이지네이션을 지원합니다.

simple=true이거나 사용자가 인증되지 않은 경우 다음과 같이 반환됩니다:

예제 요청:

curl --request GET "https://gitlab.example.com/api/v4/projects"

예제 응답:

[
  {
    "id": 4,
    "description": null,
    "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",
    "default_branch": "main",
    "tag_list": [
      "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",
    "avatar_url": "https://gitlab.example.com/uploads/project/avatar/4/uploads/avatar.png",
    "star_count": 0,
    "last_activity_at": "2013-09-30T13:46:02Z",
    "namespace": {
      "id": 2,
      "name": "Diaspora",
      "path": "diaspora",
      "kind": "group",
      "full_path": "diaspora",
      "parent_id": null,
      "avatar_url": null,
      "web_url": "https://gitlab.example.com/diaspora"
    }
  },
  {
    ...
  }
]

사용자가 인증되고 simple이 설정되지 않으면 이 엔드포인트는 다음과 같이 반환됩니다:

[
  {
    "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": [ //사용 중단됨, 대신 `topics` 사용
      "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,
    "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_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,
    "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,
    "compliance_frameworks": [],
    "warn_about_potentially_unwanted_characters": true,
    "permissions": {
      "project_access": null,
      "group_access": null
    }
  },
  {
    ...
  }
]

참고: last_activity_at프로젝트 활동프로젝트 이벤트에 따라 업데이트됩니다. updated_at은 데이터베이스에서 프로젝트 레코드가 변경될 때마다 업데이트됩니다.

다음과 같이 사용자 정의 속성로 필터링할 수 있습니다:

GET /projects?custom_attributes[key]=value&custom_attributes[other_key]=other_value

예제 요청:

curl --globoff --request GET "https://gitlab.example.com/api/v4/projects?custom_attributes[location]=Antarctica&custom_attributes[role]=Developer"

페이지 매김 한계

오프셋 기반 페이지 매김을 사용하여 최대 50,000개의 프로젝트에 액세스할 수 있습니다.

이 한계를 초과하는 프로젝트를 검색하려면 키셋 페이지 매김을 사용하세요.
키셋 페이지 매김은 order_by=id만 지원합니다. 다른 정렬 옵션은 사용할 수 없습니다.

사용자의 프로젝트 목록

주어진 사용자가 소유한 보이는 프로젝트 목록을 가져옵니다.
인증 없이 액세스하면 공용 프로젝트만 반환됩니다.

사전 조건:

  • 특정 속성을 보려면
    관리자가 아니거나 프로젝트의 소유자 역할이 있어야 합니다.

참고:
user_id로 지정된 사용자의 네임스페이스에 있는 프로젝트만 반환됩니다.
사용자가 소속된 그룹 또는 하위 그룹에 있는 프로젝트는 반환되지 않습니다. 프로필이 비공식일 경우 빈 목록이 반환됩니다.

이 엔드포인트는 선택된 order_by 옵션에 대해 키셋 페이지 매김을 지원합니다.

GET /users/:user_id/projects

지원되는 속성:

속성 유형 필수 설명
user_id string 사용자 ID 또는 사용자 이름.
archived boolean 아니오 보관된 상태로 제한합니다.
id_after integer 아니오 지정된 ID보다 큰 프로젝트로 결과를 제한합니다.
id_before integer 아니오 지정된 ID보다 작은 프로젝트로 결과를 제한합니다.
membership boolean 아니오 현재 사용자가 구성원인 프로젝트로 제한합니다.
min_access_level integer 아니오 현재 사용자의 최소 역할(access_level)로 제한합니다.
order_by string 아니오 id, name, path, created_at, updated_at, star_count 또는 last_activity_at 필드로 정렬된 프로젝트를 반환합니다. 기본값은 created_at입니다.
owned boolean 아니오 현재 사용자가 명시적으로 소유한 프로젝트로 제한합니다.
search string 아니오 검색 기준에 맞는 프로젝트 목록을 반환합니다.
simple boolean 아니오 각 프로젝트에 대한 제한된 필드만 반환합니다. 인증 없이 이 작업은 무효입니다; 간단한 필드만 반환됩니다.
sort string 아니오 asc 또는 desc 순서로 정렬된 프로젝트를 반환합니다. 기본값은 desc입니다.
starred boolean 아니오 현재 사용자가 스타한 프로젝트로 제한합니다.
statistics boolean 아니오 프로젝트 통계를 포함합니다. 최소한 Reporter 역할을 가진 사용자만 사용할 수 있습니다.
updated_after datetime 아니오 지정된 시간 이후에 마지막으로 업데이트된 프로젝트로 결과를 제한합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). 도입됨 GitLab 15.10.
updated_before datetime 아니오 지정된 시간 이전에 마지막으로 업데이트된 프로젝트로 결과를 제한합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). 도입됨 GitLab 15.10.
visibility string 아니오 가시성으로 제한합니다: public, internal 또는 private.
with_custom_attributes boolean 아니오 응답에 사용자 정의 속성을 포함합니다. (관리자 전용)
with_issues_enabled boolean 아니오 활성화된 이슈 기능으로 제한합니다.
with_merge_requests_enabled boolean 아니오 활성화된 병합 요청 기능으로 제한합니다.
with_programming_language string 아니오 주어진 프로그래밍 언어를 사용하는 프로젝트로 제한합니다.

예제 응답:

[
  {
    "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_separated_caches": true,
    "ci_restrict_pipeline_cancellation_role": "developer",
    "ci_pipeline_variables_minimum_override_role": "maintainer",
    "ci_push_repository_for_job_token_allowed": false,
    "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,
    "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_separated_caches": true,
    "ci_restrict_pipeline_cancellation_role": "developer",
    "ci_pipeline_variables_minimum_override_role": "maintainer",
    "ci_push_repository_for_job_token_allowed": false,
    "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,
    "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,
    "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"
    }
  }
]

사용자가 기여한 프로젝트 목록

주어진 사용자가 기여한 보이는 프로젝트의 목록을 가져옵니다.

GET /users/:user_id/contributed_projects

지원되는 속성:

속성 타입 필수 설명
user_id string 사용자의 ID 또는 사용자 이름.
order_by string 아니오 id, name, path, created_at, updated_at, star_count, 또는 last_activity_at 필드로 정렬된 프로젝트를 반환합니다. 기본값은 created_at입니다.
simple boolean 아니오 각 프로젝트에 대한 제한된 필드만 반환합니다. 인증 없이 이 작업은 수행되지 않으며, 간단한 필드만 반환됩니다.
sort string 아니오 asc 또는 desc 순서로 정렬된 프로젝트를 반환합니다. 기본값은 desc입니다.

예시 요청:

curl --header "PRIVATE-TOKEN: <your_access_token>" "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,
    "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,
    "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,
    "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

예제 속성:

속성 유형 필수 여부 설명
search string 프로젝트 이름에 포함된 문자열입니다.
order_by string 아니요 id, name, created_at, star_count, 또는 last_activity_at 필드를 기준으로 정렬된 요청을 반환합니다.
sort string 아니요 asc 또는 desc 순서로 정렬된 요청을 반환합니다.

예제 요청:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects?search=test"

단일 프로젝트 얻기

특정 프로젝트를 가져옵니다. 이 엔드포인트는 프로젝트가 공개적으로 접근 가능하면 인증 없이 접근할 수 있습니다.

GET /projects/:id

지원되는 속성:

속성 유형 필수 여부 설명
id integer or string 프로젝트의 ID 또는 URL 인코딩 경로입니다.
license boolean 아니요 프로젝트 라이센스 데이터를 포함합니다.
statistics boolean 아니요 프로젝트 통계를 포함합니다. 최소 Reporter 역할의 사용자만 가능합니다.
with_custom_attributes boolean 아니요 응답에 사용자 정의 속성을 포함합니다. (관리자 전용)

예제 응답:

{
  "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_separated_caches": true,
  "ci_restrict_pipeline_cancellation_role": "developer",
  "ci_pipeline_variables_minimum_override_role": "maintainer",
  "ci_push_repository_for_job_token_allowed": false,
  "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,
  "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,
  "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"
  }
}

GitLab Ultimate 사용자는 GitLab 15.5 이상에서 only_allow_merge_if_all_status_checks_passed 매개변수도 볼 수 있습니다:

{
  "id": 1,
  "project_id": 3,
  "only_allow_merge_if_all_status_checks_passed": false,
  ...
}

프로젝트가 포크인 경우 forked_from_project 필드가 응답에 나타납니다. 이 필드의 경우, 업스트림 프로젝트가 비공식적이면 인증을 위한 유효한 토큰이 제공되어야 합니다. mr_default_target_self 필드도 나타납니다. 이 값이 false이면, 모든 병합 요청이 기본적으로 업스트림 프로젝트를 대상으로 합니다.

{
   "id":3,

   ...

   "mr_default_target_self": false,
   "forked_from_project":{
      "id":13083,
      "description":"GitLab Community Edition",
      "name":"GitLab Community Edition",
      "name_with_namespace":"GitLab.org / GitLab Community Edition",
      "path":"gitlab-foss",
      "path_with_namespace":"gitlab-org/gitlab-foss",
      "created_at":"2013-09-26T06:02:36.000Z",
      "default_branch":"main",
      "tag_list":[], //deprecated, use `topics` instead
      "topics":[],
      "ssh_url_to_repo":"git@gitlab.com:gitlab-org/gitlab-foss.git",
      "http_url_to_repo":"https://gitlab.com/gitlab-org/gitlab-foss.git",
      "web_url":"https://gitlab.com/gitlab-org/gitlab-foss",
      "avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/13083/logo-extra-whitespace.png",
      "license_url": "https://gitlab.com/gitlab-org/gitlab/-/blob/main/LICENSE",
      "license": {
        "key": "mit",
        "name": "MIT License",
        "nickname": null,
        "html_url": "http://choosealicense.com/licenses/mit/",
        "source_url": "https://opensource.org/licenses/MIT"
      },
      "star_count":3812,
      "forks_count":3561,
      "last_activity_at":"2018-01-02T11:40:26.570Z",
      "namespace": {
            "id": 72,
            "name": "GitLab.org",
            "path": "gitlab-org",
            "kind": "group",
            "full_path": "gitlab-org",
            "parent_id": null
      },
      "repository_storage": "default"
   }

   ...

}

이슈 및 병합 요청 템플릿

Tier: Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

GitLab Premium 또는 Ultimate 사용자들은 issues_templatemerge_requests_template 매개변수를 통해
이슈 및 병합 요청 설명 템플릿을 관리할 수 있습니다.

{
  "id": 3,
  "issues_template": null,
  "merge_requests_template": null,
  ...
}

프로젝트의 사용자 가져오기

프로젝트의 사용자 목록을 가져옵니다.

GET /projects/:id/users

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로입니다.
search 문자열 아니오 특정 사용자를 검색합니다.
skip_users 정수 배열 아니오 지정된 ID를 가진 사용자를 필터링합니다.

예시 응답:

[
  {
    "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

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로입니다.
search 문자열 아니오 특정 그룹을 검색합니다.
shared_min_access_level 정수 아니오 최소 역할(access_level)에 따라 공유된 그룹으로 제한합니다.
shared_visible_only 불리언 아니오 사용자가 접근할 수 있는 공유 그룹으로 제한합니다.
skip_groups 정수 배열 아니오 전달된 그룹 ID를 건너뜁니다.
with_shared 불리언 아니오 이 그룹과 공유된 프로젝트를 포함합니다. 기본값은 false입니다.

예시 응답:

[
  {
    "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

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩 경로입니다.
search 문자열 아니오 특정 그룹을 검색합니다.

예시 응답:

[
  {
    "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"
  }
]

프로젝트 생성

  • operations_access_level 제거됨 GitLab 16.0에서.
  • model_registry_access_level 도입됨 GitLab 16.7에서.

인증된 사용자가 소유한 새로운 프로젝트를 생성합니다.

HTTP 리포지토리에 공개 액세스가 없는 경우 URL에 인증 정보를 추가하세요:
https://username:password@gitlab.company.com/group/project.git, 여기서 passwordapi 스코프가 활성화된 공용 액세스 키입니다.

POST /projects

지원되는 일반 프로젝트 속성:

속성 유형 필수 설명
name 문자열 예 (if path 제공되지 않은 경우) 새 프로젝트의 이름입니다. 제공되지 않으면 경로와 동일합니다.
path 문자열 예 (if name 제공되지 않은 경우) 새 프로젝트의 리포지토리 이름입니다. 제공되지 않으면 이름에 기반하여 생성됩니다 (소문자 및 하이픈 사용). 경로는 특수 문자로 시작하거나 끝나지 않아야 하며 연속된 특수 문자를 포함해서는 안됩니다.
allow_merge_on_skipped_pipeline 부울 아니오 건너뛴 작업으로 병합 요청을 병합할 수 있는지 여부를 설정합니다.
approvals_before_merge 정수 아니오 기본적으로 병합 요청을 승인할 수 있는 승인자의 수입니다. 승인 규칙을 구성하려면 Merge request approvals API를 참조하세요. Deprecated GitLab 16.0에서. Premium 및 Ultimate 전용입니다.
auto_cancel_pending_pipelines 문자열 아니오 대기 중인 파이프라인을 자동 취소합니다. 이 작업은 활성화된 상태와 비활성화된 상태 간 전환됩니다; 부울이 아닙니다.
auto_devops_deploy_strategy 문자열 아니오 자동 배포 전략(지속적, 수동 또는 타임드 증분).
auto_devops_enabled 부울 아니오 이 프로젝트에 대해 Auto DevOps를 활성화합니다.
autoclose_referenced_issues 부울 아니오 기본 브랜치에서 참조된 문제를 자동으로 닫을지 여부를 설정합니다.
avatar 혼합 아니오 프로젝트의 아바타 이미지 파일입니다.
build_git_strategy 문자열 아니오 Git 전략입니다. 기본값은 fetch입니다.
build_timeout 정수 아니오 작업이 실행될 수 있는 최대 시간(초)입니다.
ci_config_path 문자열 아니오 CI 구성 파일의 경로입니다.
container_expiration_policy_attributes 해시 아니오 이 프로젝트의 이미지 정리 정책을 업데이트합니다. 수용 가능: cadence (문자열), keep_n (정수), older_than (문자열), name_regex (문자열), name_regex_delete (문자열), name_regex_keep (문자열), enabled (부울). cadence, keep_nolder_than 값에 대한 자세한 정보는 컨테이너 레지스트리 문서를 참조하세요.
container_registry_enabled 부울 아니오 (Deprecated) 이 프로젝트에 대해 컨테이너 레지스트리를 활성화합니다. 대신 container_registry_access_level을 사용하세요.
default_branch 문자열 아니오 기본 브랜치 이름입니다. initialize_with_readmetrue이어야 합니다.
description 문자열 아니오 짧은 프로젝트 설명입니다.
emails_disabled 부울 아니오 (Deprecated) 이메일 알림을 비활성화합니다. 대신 emails_enabled를 사용하세요.
emails_enabled 부울 아니오 이메일 알림을 활성화합니다.
external_authorization_classification_label 문자열 아니오 프로젝트에 대한 분류 레이블입니다. Premium 및 Ultimate 전용입니다.
group_runners_enabled 부울 아니오 이 프로젝트에 대해 그룹 러너를 활성화합니다.
group_with_project_templates_id 정수 아니오 그룹 수준의 사용자 정의 템플릿에 대해, 모든 사용자 정의 프로젝트 템플릿이 소스되는 그룹의 ID를 지정합니다. 인스턴스 수준 템플릿에 대해 비워 둡니다. use_custom_template가 true여야 합니다. Premium 및 Ultimate 전용입니다.
import_url 문자열 아니오 리포지토리에서 가져올 URL입니다. URL 값이 비어 있지 않으면 initialize_with_readmetrue로 설정하지 않아야 합니다. 그렇게 하면 다음 오류: not a git repository가 발생할 수 있습니다.
initialize_with_readme 부울 아니오 README.md 파일만으로 Git 리포지토리를 생성할지 여부입니다. 기본값은 false입니다. 이 부울이 true일 때는 import_url이나 이 엔드포인트의 다른 속성을 통과시켜서는 안됩니다. 그렇게 하면 다음 오류: not a git repository가 발생할 수 있습니다.
issues_enabled 부울 아니오 (Deprecated) 이 프로젝트에 대해 문제를 활성화합니다. 대신 issues_access_level을 사용하세요.
jobs_enabled 부울 아니오 (Deprecated) 이 프로젝트에 대해 작업을 활성화합니다. 대신 builds_access_level을 사용하세요.
lfs_enabled 부울 아니오 LFS를 활성화합니다.
merge_method 문자열 아니오 프로젝트의 병합 방법을 설정합니다. merge (병합 커밋), rebase_merge (세미-선형 기록이 있는 병합 커밋) 또는 ff (패스트 포워드 병합) 중 하나일 수 있습니다.
merge_pipelines_enabled 부울 아니오 병합된 결과 파이프라인을 활성화 또는 비활성화합니다.
merge_requests_enabled 부울 아니오 (Deprecated) 이 프로젝트에 대해 병합 요청을 활성화합니다. 대신 merge_requests_access_level을 사용하세요.
merge_trains_enabled 부울 아니오 병합 기차를 활성화 또는 비활성화합니다.
merge_trains_skip_train_allowed 부울 아니오 병합 기차의 병합 요청을 파이프라인 완료를 기다리지 않고 병합할 수 있도록 허용합니다.
mirror_trigger_builds 부울 아니오 풀 미러링이 빌드를 트리거합니다. Premium 및 Ultimate 전용입니다.
mirror 부울 아니오 프로젝트에서 풀 미러링을 활성화합니다. Premium 및 Ultimate 전용입니다.
namespace_id 정수 아니오 새 프로젝트의 네임스페이스(기본적으로 현재 사용자의 네임스페이스).
only_allow_merge_if_all_discussions_are_resolved 부울 아니오 모든 논의가 해결된 경우에만 병합 요청을 병합할 수 있도록 설정합니다.
only_allow_merge_if_all_status_checks_passed 부울 아니오 모든 상태 검사가 통과할 때까지 병합 요청의 병합을 차단하도록 설정합니다. 기본값은 false입니다. 도입됨 GitLab 15.5에서 기능 플래그 only_allow_merge_if_all_status_checks_passed가 기본적으로 비활성화되어 있습니다. Ultimate 전용입니다.
only_allow_merge_if_pipeline_succeeds 부울 아니오 병합 요청을 성공적인 파이프라인으로만 병합할 수 있도록 설정합니다. 이 설정은 파이프라인이 성공해야 함으로 프로젝트 설정에서 이름이 지정됩니다.
packages_enabled 부울 아니오 패키지 리포지토리 기능을 활성화 또는 비활성화합니다.
printing_merge_request_link_enabled 부울 아니오 명령줄에서 푸시할 때 병합 요청을 생성/보기 위한 링크를 표시합니다.
public_builds 부울 아니오 (Deprecated) true일 경우, 작업이 프로젝트 구성원 외부에서도 볼 수 있습니다. 대신 public_jobs를 사용하세요.
public_jobs 부울 아니오 true인 경우, 작업이 프로젝트 구성원 외부에서도 볼 수 있습니다.
repository_object_format 문자열 아니오 리포지토리 객체 형식입니다. 기본값은 sha1입니다. 도입됨 GitLab 16.9에서.
remove_source_branch_after_merge 부울 아니오 모든 새로운 병합 요청에 대해 기본적으로 소스 브랜치 삭제 옵션을 활성화합니다.
repository_storage 문자열 아니오 리포지토리가 있는 저장소 샤드입니다. (관리자 전용)
request_access_enabled 부울 아니오 사용자가 멤버 액세스를 요청할 수 있도록 허용합니다.
resolve_outdated_diff_discussions 부울 아니오 푸시로 변경된 행의 병합 요청 차이 논의를 자동으로 해결합니다.
shared_runners_enabled 부울 아니오 이 프로젝트에 대해 공유 러너를 활성화합니다.
show_default_award_emojis 부울 아니오 기본 이모지 반응을 표시합니다.
snippets_enabled 부울 아니오 (Deprecated) 이 프로젝트에 대해 스니펫을 활성화합니다. 대신 snippets_access_level을 사용하세요.
squash_option 문자열 아니오 never, always, default_on, 또는 default_off 중 하나입니다.
tag_list 배열 아니오 프로젝트에 대한 태그 목록입니다; 프로젝트에 최종적으로 할당될 태그 배열을 넣습니다. Deprecated GitLab 14.0에서. 대신 topics를 사용하세요.
template_name 문자열 아니오 use_custom_template 없이 사용할 때 내장된 프로젝트 템플릿의 이름입니다. use_custom_template와 함께 사용할 때 사용자 정의 프로젝트 템플릿의 이름입니다.
template_project_id 정수 아니오 use_custom_template과 함께 사용할 때 사용자 정의 프로젝트 템플릿의 프로젝트 ID입니다. 사용자 정의 템플릿을 사용할 때는 template_name보다 template_project_id를 사용하는 것이 바람직합니다. Premium 및 Ultimate 전용입니다.
topics 배열 아니오 프로젝트에 대한 주제 목록입니다; 프로젝트에 최종적으로 할당될 주제 배열을 넣습니다.
use_custom_template 부울 아니오 사용자 정의 인스턴스 또는 그룹(group_with_project_templates_id와 함께) 프로젝트 템플릿을 사용합니다. Premium 및 Ultimate 전용입니다.
visibility 문자열 아니오 프로젝트 가시성 수준 참조.
warn_about_potentially_unwanted_characters 부울 아니오 이 프로젝트에서 잠재적으로 원하지 않는 문자 사용에 대한 경고를 활성화합니다.
wiki_enabled 부울 아니오 (Deprecated) 이 프로젝트에 대해 위키를 활성화합니다. 대신 wiki_access_level을 사용하세요.

프로젝트 기능 가시성 설정은 다음과 같은 액세스 제어 옵션을 가질 수 있습니다:

  • disabled: 기능을 비활성화합니다.
  • private: 기능을 활성화하고 프로젝트 구성원만으로 설정합니다.
  • enabled: 기능을 활성화하고 접근 가능한 모든 사용자로 설정합니다.
속성 유형 필수 설명
analytics_access_level 문자열 아니오 분석의 가시성을 설정합니다.
builds_access_level 문자열 아니오 파이프라인의 가시성을 설정합니다.
container_registry_access_level 문자열 아니오 컨테이너 레지스트리의 가시성을 설정합니다.
environments_access_level 문자열 아니오 환경의 가시성을 설정합니다.
feature_flags_access_level 문자열 아니오 기능 플래그의 가시성을 설정합니다.
forking_access_level 문자열 아니오 포크의 가시성을 설정합니다.
infrastructure_access_level 문자열 아니오 인프라 관리의 가시성을 설정합니다.
issues_access_level 문자열 아니오 문제의 가시성을 설정합니다.
merge_requests_access_level 문자열 아니오 병합 요청의 가시성을 설정합니다.
model_experiments_access_level 문자열 아니오 기계 학습 모델 실험의 가시성을 설정합니다.
model_registry_access_level 문자열 아니오 기계 학습 모델 레지스트리의 가시성을 설정합니다.
monitor_access_level 문자열 아니오 애플리케이션 성능 모니터링의 가시성을 설정합니다.
pages_access_level 문자열 아니오 GitLab Pages의 가시성을 설정합니다.
releases_access_level 문자열 아니오 릴리스의 가시성을 설정합니다.
repository_access_level 문자열 아니오 리포지토리의 가시성을 설정합니다.
requirements_access_level 문자열 아니오 요구사항 관리의 가시성을 설정합니다.
security_and_compliance_access_level 문자열 아니오 보안 및 컴플라이언스의 가시성을 설정합니다.
snippets_access_level 문자열 아니오 스니펫의 가시성을 설정합니다.
wiki_access_level 문자열 아니오 위키의 가시성을 설정합니다.

예시 요청:

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/"

사용자를 위한 프로젝트 생성

  • operations_access_level 삭제됨 GitLab 16.0에서.
  • model_registry_access_level 도입됨 GitLab 16.7에서.

사용자를 위한 프로젝트를 생성하세요.

사전 요구 사항:

  • 관리자가 되어야 합니다.

HTTP 리포지토리가 공개적으로 접근할 수 없는 경우, URL에 인증 정보를 추가하세요. 예를 들어, https://username:password@gitlab.company.com/group/project.git에서 passwordapi 스코프가 활성화된 공개 액세스 키입니다.

POST /projects/user/:user_id

지원되는 일반 프로젝트 속성:

속성 유형 필수 설명
name 문자열 새로운 프로젝트의 이름.
user_id 정수 프로젝트 소유자의 사용자 ID.
allow_merge_on_skipped_pipeline 불리언 아니오 건너뛴 작업으로 병합 요청을 병합할 수 있는지 여부를 설정합니다.
approvals_before_merge 정수 아니오 기본적으로 몇 명의 승인자가 병합 요청을 승인해야 하는지. 사용중단 GitLab 16.0에서. 승인 규칙 구성에 대한 내용은 병합 요청 승인 API를 참조하세요. Premium 및 Ultimate 전용.
auto_cancel_pending_pipelines 문자열 아니오 대기 중인 파이프라인을 자동 취소합니다. 이 작업은 활성 상태와 비활성 상태 간에 전환됩니다; 불리언이 아닙니다.
auto_devops_deploy_strategy 문자열 아니오 자동 배포 전략(continuous, manual 또는 timed_incremental).
auto_devops_enabled 불리언 아니오 이 프로젝트에 대해 Auto DevOps를 활성화합니다.
autoclose_referenced_issues 불리언 아니오 기본 브랜치에서 참조된 문제를 자동으로 닫을 수 있는지 여부를 설정합니다.
avatar 혼합 아니오 프로젝트의 아바타에 대한 이미지 파일.
build_git_strategy 문자열 아니오 Git 전략. 기본적으로 fetch입니다.
build_timeout 정수 아니오 작업이 실행될 수 있는 최대 시간(초).
ci_config_path 문자열 아니오 CI 구성 파일의 경로.
container_registry_enabled 불리언 아니오 (사용중단) 이 프로젝트에 대한 컨테이너 레지스트리를 활성화합니다. 대신 container_registry_access_level을 사용하세요.
default_branch 문자열 아니오 기본 브랜치 이름. initialize_with_readmetrue여야 합니다.
description 문자열 아니오 짧은 프로젝트 설명.
emails_disabled 불리언 아니오 (사용중단) 이메일 알림을 비활성화합니다. 대신 emails_enabled를 사용하세요.
emails_enabled 불리언 아니오 이메일 알림을 활성화합니다.
enforce_auth_checks_on_uploads 불리언 아니오 업로드 시 인증 검사를 시행합니다.
external_authorization_classification_label 문자열 아니오 프로젝트의 분류 레이블. Premium 및 Ultimate 전용.
group_runners_enabled 불리언 아니오 이 프로젝트에 대해 그룹 러너를 활성화합니다.
group_with_project_templates_id 정수 아니오 그룹 수준의 사용자 정의 템플릿에서 모든 사용자 정의 프로젝트 템플릿이 소싱되는 그룹의 ID를 지정합니다. 인스턴스 수준 템플릿에 대해 빈 값으로 둡니다. use_custom_template가 true여야 합니다. Premium 및 Ultimate 전용.
import_url 문자열 아니오 리포지토리를 가져올 URL.
initialize_with_readme 불리언 아니오 기본값은 false입니다.
issue_branch_template 문자열 아니오 문제로부터 생성된 브랜치의 이름을 제안하는 데 사용되는 템플릿. (도입됨 GitLab 15.6에서.)
issues_enabled 불리언 아니오 (사용중단) 이 프로젝트에 대한 문제를 활성화합니다. 대신 issues_access_level을 사용하세요.
jobs_enabled 불리언 아니오 (사용중단) 이 프로젝트에 대한 작업을 활성화합니다. 대신 builds_access_level을 사용하세요.
lfs_enabled 불리언 아니오 LFS를 활성화합니다.
merge_commit_template 문자열 아니오 병합 요청에서 병합 커밋 메시지를 생성하는 데 사용되는 템플릿.
merge_method 문자열 아니오 프로젝트의 병합 방법을 설정합니다. merge(병합 커밋), rebase_merge(준선형 히스토리로 병합 커밋), 또는 ff(빠른 병합) 중 하나일 수 있습니다.
merge_requests_enabled 불리언 아니오 (사용중단) 이 프로젝트에 대한 병합 요청을 활성화합니다. 대신 merge_requests_access_level을 사용하세요.
mirror_trigger_builds 불리언 아니오 풀 미러링이 빌드 트리거를 유발합니다. Premium 및 Ultimate 전용.
mirror 불리언 아니오 프로젝트에서 풀 미러링을 활성화합니다. Premium 및 Ultimate 전용.
namespace_id 정수 아니오 새로운 프로젝트의 네임스페이스(기본적으로 현재 사용자의 네임스페이스).
only_allow_merge_if_all_discussions_are_resolved 불리언 아니오 모든 논의가 해결된 경우에만 병합 요청을 병합할 수 있는지 여부를 설정합니다.
only_allow_merge_if_all_status_checks_passed 불리언 아니오 모든 상태 검사가 통과하지 않는 한 병합 요청의 병합이 차단되어야 함을 나타냅니다. 기본값은 false입니다. 도입됨 GitLab 15.5에서 기능 플래그 only_allow_merge_if_all_status_checks_passed가 기본적으로 비활성화되어 있습니다. Ultimate 전용.
only_allow_merge_if_pipeline_succeeds 불리언 아니오 병합 요청이 성공적인 작업과만 병합될 수 있는지 여부를 설정합니다.
packages_enabled 불리언 아니오 패키지 리포지토리 기능을 활성화하거나 비활성화합니다.
path 문자열 아니오 새로운 프로젝트의 사용자 지정 리포지토리 이름. 기본적으로 이름을 기반으로 생성됩니다.
printing_merge_request_link_enabled 불리언 아니오 커맨드 라인에서 푸시할 때 병합 요청을 생성하거나 보기 위한 링크를 표시합니다.
public_builds 불리언 아니오 (사용중단) true이면, 작업은 비프로젝트 멤버가 볼 수 있습니다. 대신 public_jobs를 사용하세요.
public_jobs 불리언 아니오 true이면, 작업은 비프로젝트 멤버가 볼 수 있습니다.
repository_object_format 문자열 아니오 리포지토리 객체 형식. 기본값은 sha1입니다. 도입됨 GitLab 16.9에서.
remove_source_branch_after_merge 불리언 아니오 모든 새로운 병합 요청에 대해 기본적으로 소스 브랜치 삭제 옵션을 활성화합니다.
repository_storage 문자열 아니오 리포지토리가 있는 저장소 분할. (관리자만 해당)
request_access_enabled 불리언 아니오 사용자가 멤버 액세스를 요청할 수 있도록 허용합니다.
resolve_outdated_diff_discussions 불리언 아니오 푸시된 변경 내용에 대해 병합 요청 차이 논의를 자동으로 해결합니다.
shared_runners_enabled 불리언 아니오 이 프로젝트에 대해 공유 러너를 활성화합니다.
show_default_award_emojis 불리언 아니오 기본 이모지 반응을 표시합니다.
snippets_enabled 불리언 아니오 (사용중단) 이 프로젝트에 대한 스니펫을 활성화합니다. 대신 snippets_access_level을 사용하세요.
squash_commit_template 문자열 아니오 병합 요청에서 스쿼시 커밋 메시지를 생성하는 데 사용되는 템플릿.
squash_option 문자열 아니오 never, always, default_on, 또는 default_off 중 하나.
suggestion_commit_message 문자열 아니오 병합 요청 제안을 적용하는 데 사용되는 커밋 메시지.
tag_list 배열 아니오 (사용중단 GitLab 14.0에서) 프로젝트에 대한 태그의 리스트; 프로젝트에 최종적으로 할당될 태그 배열을 넣으세요. 대신 topics를 사용하세요.
template_name 문자열 아니오 use_custom_template 없이 사용되는 경우, 내장 프로젝트 템플릿의 이름. use_custom_template와 함께 사용되는 경우, 사용자 정의 프로젝트 템플릿의 이름.
topics 배열 아니오 프로젝트의 주제 리스트.
use_custom_template 불리언 아니오 사용자 정의 인스턴스 또는 그룹 프로젝트 템플릿을 사용합니다. Premium 및 Ultimate 전용.
visibility 문자열 아니오 프로젝트 가시성 수준을 참조하세요.
warn_about_potentially_unwanted_characters 불리언 아니오 이 프로젝트에서 잠재적으로 원치 않는 문자의 사용에 대한 경고를 활성화합니다.
wiki_enabled 불리언 아니오 (사용중단) 이 프로젝트에 대한 위키를 활성화합니다. 대신 wiki_access_level을 사용하세요.

프로젝트 기능 가시성 액세스 제어 옵션이 있는 설정은 다음 중 하나일 수 있습니다:

  • disabled: 기능 비활성화.
  • private: 기능을 활성화하고 오직 프로젝트 구성원만 접근할 수 있도록 설정합니다.
  • enabled: 기능을 활성화하고 모든 접근자가 사용할 수 있도록 설정합니다.
속성 유형 필수 설명
analytics_access_level 문자열 아니오 분석의 가시성을 설정합니다.
builds_access_level 문자열 아니오 파이프라인의 가시성을 설정합니다.
container_registry_access_level 문자열 아니오 컨테이너 레지스트리의 가시성을 설정합니다.
environments_access_level 문자열 아니오 환경의 가시성을 설정합니다.
feature_flags_access_level 문자열 아니오 기능 플래그의 가시성을 설정합니다.
forking_access_level 문자열 아니오 포크의 가시성을 설정합니다.
infrastructure_access_level 문자열 아니오 인프라 관리의 가시성을 설정합니다.
issues_access_level 문자열 아니오 문제의 가시성을 설정합니다.
merge_requests_access_level 문자열 아니오 병합 요청의 가시성을 설정합니다.
model_experiments_access_level 문자열 아니오 기계 학습 모델 실험의 가시성을 설정합니다.
model_registry_access_level 문자열 아니오 기계 학습 모델 레지스트리의 가시성을 설정합니다.
monitor_access_level 문자열 아니오 애플리케이션 성능 모니터링의 가시성을 설정합니다.
pages_access_level 문자열 아니오 GitLab Pages의 가시성을 설정합니다.
releases_access_level 문자열 아니오 릴리스의 가시성을 설정합니다.
repository_access_level 문자열 아니오 리포지토리의 가시성을 설정합니다.
requirements_access_level 문자열 아니오 요구 사항 관리의 가시성을 설정합니다.
security_and_compliance_access_level 문자열 아니오 보안 및 컴플라이언스의 가시성을 설정합니다.
snippets_access_level 문자열 아니오 스니펫의 가시성을 설정합니다.
wiki_access_level 문자열 아니오 위키의 가시성을 설정합니다.

프로젝트 편집

  • operations_access_level 제거됨 GitLab 16.0에서.
  • model_registry_access_level 도입됨 GitLab 16.7에서.

기존 프로젝트 업데이트.

HTTP 리포지토리가 공개 액세스 가능하지 않은 경우 URL에 인증 정보를 추가하십시오 https://username:password@gitlab.company.com/group/project.git, 여기서 passwordapi 범위가 활성화된 공개 액세스 키입니다.

PUT /projects/:id

지원되는 일반 프로젝트 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.
allow_merge_on_skipped_pipeline 불리언 아니오 건너뛴 작업이 있는 병합 요청을 병합할 수 있는지 여부 설정.
allow_pipeline_trigger_approve_deployment 불리언 아니오 파이프라인 트리거가 배포 승인을 허용할 수 있는지 여부 설정. 프리미엄 및 얼티밋만.
only_allow_merge_if_all_status_checks_passed 불리언 아니오 모든 상태 확인이 통과하지 않는 한 병합 요청의 병합을 차단해야 함을 나타냅니다. 기본값은 false.

도입됨 GitLab 15.5에서 only_allow_merge_if_all_status_checks_passed 기능 플래그가 기본적으로 비활성화됨. GitLab 15.9에서 기능 플래그가 기본적으로 활성화됨. 얼티밋만.
approvals_before_merge 정수 아니오 병합 요청을 기본적으로 승인할 승인자의 수. 사용 중단됨 GitLab 16.0에서. 승인 규정을 구성하려면 Merge request approvals API를 참조하세요. 프리미엄 및 얼티밋만.
auto_cancel_pending_pipelines 문자열 아니오 대기 중인 파이프라인을 자동 취소합니다. 이 작업은 활성 상태와 비활성 상태 사이를 전환합니다; 불리언이 아닙니다.
auto_devops_deploy_strategy 문자열 아니오 자동 배포 전략(continuous, manual, 또는 timed_incremental).
auto_devops_enabled 불리언 아니오 이 프로젝트에 대해 자동 DevOps를 활성화합니다.
autoclose_referenced_issues 불리언 아니오 기본 브랜치에서 참조된 문제를 자동으로 닫을 것인지 여부 설정.
avatar 혼합 아니오 프로젝트의 아바타 이미지 파일.
build_git_strategy 문자열 아니오 Git 전략. 기본값은 fetch.
build_timeout 정수 아니오 작업이 실행될 수 있는 최대 시간(초로 측정).
ci_config_path 문자열 아니오 CI 구성 파일의 경로.
ci_default_git_depth 정수 아니오 얕은 클론에 대한 기본 수정 번호.
ci_forward_deployment_enabled 불리언 아니오 구식 배포 작업 방지를 활성화하거나 비활성화합니다.
ci_forward_deployment_rollback_allowed 불리언 아니오 롤백 배포에 대한 작업 재시도 허용을 활성화하거나 비활성화합니다.
ci_allow_fork_pipelines_to_run_in_parent_project 불리언 아니오 포크에서 온 병합 요청을 위해 부모 프로젝트에서 파이프라인을 실행하는 것을 활성화 또는 비활성화합니다.. (도입됨 GitLab 15.3에서.)
ci_separated_caches 불리언 아니오 캐시가 브랜치 보호 상태별로 분리되어야 하는지 설정.
ci_restrict_pipeline_cancellation_role 문자열 아니오 파이프라인이나 작업을 취소할 수 있는 역할을 설정합니다. developer, maintainer, 또는 no_one 중 하나. 도입됨 GitLab 16.8에서. 프리미엄 및 얼티밋만.
ci_pipeline_variables_minimum_override_role 문자열 아니오 restrict_user_defined_variables가 활성화된 경우, 변수를 재정의할 수 있는 역할을 지정할 수 있습니다. owner, maintainer, developer 또는 no_one_allowed 중 하나. 도입됨 GitLab 17.1에서.
ci_push_repository_for_job_token_allowed 불리언 아니오 작업 토큰을 사용하여 프로젝트 리포지토리에 푸시할 수 있는 기능을 활성화 또는 비활성화합니다. 도입됨 GitLab 17.2에서.
container_expiration_policy_attributes 해시 아니오 이 프로젝트에 대한 이미지 정리 정책을 업데이트합니다. 허용값: cadence(문자열), keep_n(정수), older_than(문자열), name_regex(문자열), name_regex_delete(문자열), name_regex_keep(문자열), enabled(불리언).
container_registry_enabled 불리언 아니오 (사용 중단됨) 이 프로젝트에 대한 컨테이너 레지스트리를 활성화합니다. 대신 container_registry_access_level을 사용하세요.
default_branch 문자열 아니오 기본 브랜치 이름.
description 문자열 아니오 짧은 프로젝트 설명.
emails_disabled 불리언 아니오 (사용 중단됨) 이메일 알림을 비활성화합니다. 대신 emails_enabled를 사용하세요.
emails_enabled 불리언 아니오 이메일 알림을 활성화합니다.
enforce_auth_checks_on_uploads 불리언 아니오 업로드에 대한 인증 체크를 강제합니다.
external_authorization_classification_label 문자열 아니오 프로젝트의 분류 레이블. 프리미엄 및 얼티밋만.
group_runners_enabled 불리언 아니오 이 프로젝트에 대해 그룹 러너를 활성화합니다.
import_url 문자열 아니오 리포지토리가 가져온 URL.
issues_enabled 불리언 아니오 (사용 중단됨) 이 프로젝트에 대한 이슈를 활성화합니다. 대신 issues_access_level을 사용하세요.
issues_template 문자열 아니오 이슈에 대한 기본 설명. 설명은 GitLab Flavored Markdown으로 구문 분석됩니다. 이슈 및 병합 요청을 위한 템플릿을 참조하세요. 프리미엄 및 얼티밋만.
jobs_enabled 불리언 아니오 (사용 중단됨) 이 프로젝트에 대한 작업을 활성화합니다. 대신 builds_access_level을 사용하세요.
keep_latest_artifact 불리언 아니오 이 프로젝트에 대한 최신 아티팩트를 유지할 수 있는 기능을 비활성화하거나 활성화합니다.
lfs_enabled 불리언 아니오 LFS를 활성화합니다.
merge_commit_template 문자열 아니오 병합 요청에서 병합 커밋 메시지를 생성하는 데 사용되는 템플릿.
merge_method 문자열 아니오 프로젝트의 병합 방법을 설정합니다. merge(병합 커밋), rebase_merge(준선형 역사로 병합 커밋), 또는 ff(패스트 포워드 병합) 중 하나일 수 있습니다.
merge_pipelines_enabled 불리언 아니오 병합된 결과 파이프라인을 활성화하거나 비활성화합니다.
merge_requests_enabled 불리언 아니오 (사용 중단됨) 이 프로젝트에 대해 병합 요청을 활성화합니다. 대신 merge_requests_access_level을 사용하세요.
merge_requests_template 문자열 아니오 병합 요청에 대한 기본 설명. 설명은 GitLab Flavored Markdown으로 구문 분석됩니다. 이슈 및 병합 요청을 위한 템플릿을 참조하세요. 프리미엄 및 얼티밋만.
merge_trains_enabled 불리언 아니오 병합 기차를 활성화하거나 비활성화합니다.
merge_trains_skip_train_allowed 불리언 아니오 병합 기차의 병합 요청이 파이프라인이 완료될 때까지 기다리지 않고 병합될 수 있도록 허용합니다.
mirror_overwrites_diverged_branches 불리언 아니오 풀 미러가 분기된 브랜치를 덮어쓰게 합니다.프리미엄 및 얼티밋만.
mirror_trigger_builds 불리언 아니오 풀 미러링이 빌드를 트리거합니다. 프리미엄 및 얼티밋만.
mirror_user_id 정수 아니오 풀 미러 이벤트 주변의 모든 활동에 대한 책임이 있는 사용자. (관리자 전용) 프리미엄 및 얼티밋만.
mirror 불리언 아니오 프로젝트에서 풀 미러링을 활성화합니다. 프리미엄 및 얼티밋만.
mr_default_target_self 불리언 아니오 포크된 프로젝트의 경우, 병합 요청의 대상은 이 프로젝트입니다. false이면 대상은 상위 프로젝트입니다.
name 문자열 아니오 프로젝트의 이름입니다.
only_allow_merge_if_all_discussions_are_resolved 불리언 아니오 모든 토론이 해결된 경우에만 병합 요청을 병합할 수 있는지 여부를 설정합니다.
only_allow_merge_if_pipeline_succeeds 불리언 아니오 병합 요청이 성공적인 작업과 함께 병합될 수 있는지 여부를 설정합니다.
only_mirror_protected_branches 불리언 아니오 보호된 브랜치만 미러링합니다. 프리미엄 및 얼티밋만.
packages_enabled 불리언 아니오 패키지 리포지토리 기능을 활성화하거나 비활성화합니다.
path 문자열 아니오 프로젝트에 대한 사용자 지정 리포지토리 이름. 기본적으로 이름을 기반으로 생성됩니다.
prevent_merge_without_jira_issue 불리언 아니오 병합 요청이 Jira의 관련 문제를 요구하는지 여부를 설정합니다. 프리미엄 및 얼티밋만.
printing_merge_request_link_enabled 불리언 아니오 명령 줄에서 푸시할 때 병합 요청을 생성/보기 위한 링크를 표시합니다.
public_builds 불리언 아니오 (사용 중단됨) true일 경우 작업을 비프로젝트 구성원도 볼 수 있습니다. 대신 public_jobs를 사용하세요.
public_jobs 불리언 아니오 true일 경우 작업을 비프로젝트 구성원도 볼 수 있습니다.
remove_source_branch_after_merge 불리언 아니오 모든 새로운 병합 요청에 대해 기본적으로 소스 브랜치 삭제 옵션을 활성화합니다.
repository_storage 문자열 아니오 리포지토리가 위치한 저장소 샤드입니다. (관리자 전용)
request_access_enabled 불리언 아니오 사용자가 구성원 액세스를 요청할 수 있도록 허용합니다.
resolve_outdated_diff_discussions 불리언 아니오 푸시된 변경 사항에 대해 병합 요청 diff 토론을 자동으로 해결합니다.
restrict_user_defined_variables 불리언 아니오 유지 관리 역할을 가진 사용자만 파이프라인을 트리거할 때 사용자 정의 변수를 전달할 수 있도록 허용합니다. 예를 들어 UI, API 또는 트리거 토큰에서 파이프라인을 트리거할 때 말입니다.
service_desk_enabled 불리언 아니오 서비스 데스크 기능을 활성화하거나 비활성화합니다.
shared_runners_enabled 불리언 아니오 이 프로젝트에 대해 공유 러너를 활성화합니다.
show_default_award_emojis 불리언 아니오 기본 이모지 반응을 표시합니다.
snippets_enabled 불리언 아니오 (사용 중단됨) 이 프로젝트에 대해 스니펫을 활성화합니다. 대신 snippets_access_level을 사용하세요.
issue_branch_template 문자열 아니오 문제에서 생성된 브랜치를 위한 이름을 제안하는 템플릿. (도입됨 GitLab 15.6에서.)
squash_commit_template 문자열 아니오 병합 요청에서 스쿼시 커밋 메시지를 생성하는 데 사용되는 템플릿.
squash_option 문자열 아니오 never, always, default_on, 또는 default_off 중 하나입니다.
suggestion_commit_message 문자열 아니오 병합 요청 제안을 적용하는 데 사용되는 커밋 메시지입니다.
tag_list 배열 아니오 (사용 중단됨 GitLab 14.0에서) 프로젝트의 태그 목록; 배열의 태그를 입력하여 프로젝트에 최종적으로 할당할 태그를 지정합니다. 대신 topics를 사용하세요.
topics 배열 아니오 프로젝트의 주제 목록입니다. 이는 이전에 프로젝트에 추가된 기존 주제를 대체합니다.
visibility 문자열 아니오 프로젝트 가시성 수준 참고.
warn_about_potentially_unwanted_characters 불리언 아니오 이 프로젝트에서 잠재적으로 원치 않는 문자의 사용에 대한 경고를 활성화합니다.
wiki_enabled 불리언 아니오 (사용 중단됨) 이 프로젝트에 대해 위키를 활성화합니다. 대신 wiki_access_level을 사용하세요.

예를 들어, 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" # 비활성화하려면: "shared_runners_enabled=false"

프로젝트 기능 가시성 설정은 액세스 제어 옵션 중 다음 중 하나일 수 있습니다:

  • disabled: 기능 비활성화.
  • private: 기능을 활성화하고 오직 프로젝트 구성원만 설정.
  • enabled: 기능을 활성화하고 액세스가 있는 모든 사용자 설정.

지원되는 프로젝트 가시성 속성:

속성 유형 필수 설명
analytics_access_level 문자열 아니오 분석의 가시성을 설정합니다.
builds_access_level 문자열 아니오 파이프라인의 가시성을 설정합니다.
container_registry_access_level 문자열 아니오 컨테이너 레지스트리의 가시성을 설정합니다.
environments_access_level 문자열 아니오 환경의 가시성을 설정합니다.
feature_flags_access_level 문자열 아니오 기능 플래그의 가시성을 설정합니다.
forking_access_level 문자열 아니오 포크의 가시성을 설정합니다.
infrastructure_access_level 문자열 아니오 인프라 관리의 가시성을 설정합니다.
issues_access_level 문자열 아니오 이슈의 가시성을 설정합니다.
merge_requests_access_level 문자열 아니오 병합 요청의 가시성을 설정합니다.
model_experiments_access_level 문자열 아니오 기계 학습 모델 실험의 가시성을 설정합니다.
model_registry_access_level 문자열 아니오 기계 학습 모델 레지스트리의 가시성을 설정합니다.
monitor_access_level 문자열 아니오 애플리케이션 성능 모니터링의 가시성을 설정합니다.
pages_access_level 문자열 아니오 GitLab Pages의 가시성을 설정합니다.
releases_access_level 문자열 아니오 릴리스의 가시성을 설정합니다.
repository_access_level 문자열 아니오 리포지토리의 가시성을 설정합니다.
requirements_access_level 문자열 아니오 요구 사항 관리의 가시성을 설정합니다.
security_and_compliance_access_level 문자열 아니오 보안 및 규정 준수의 가시성을 설정합니다.
snippets_access_level 문자열 아니오 스니펫의 가시성을 설정합니다.
wiki_access_level 문자열 아니오 위키의 가시성을 설정합니다.

프로젝트에 초대된 그룹 목록

프로젝트에 초대된 그룹의 목록을 가져옵니다. 인증 없이 접근할 경우, 공개 초대 그룹만 반환됩니다.

이 엔드포인트는 사용자 당 분당 60개의 요청으로 제한됩니다:

  • 인증된 사용자에 대한 사용자.
  • 인증되지 않은 사용자에 대한 IP 주소.

기본적으로 이 요청은 API 결과가 페이지 매김 처리 되기 때문에 한 번에 20개의 결과를 반환합니다.

GET /projects/:id/invited_groups

지원되는 속성:

속성 유형 필수 설명
id 정수/문자열 그룹의 ID 또는 URL 인코딩된 경로
search 문자열 아니오 검색 기준에 맞는 권한이 있는 그룹 목록을 반환합니다.
min_access_level 정수 아니오 현재 사용자가 최소한 지정된 역할(access_level)을 가지고 있는 그룹으로 제한합니다.
relation 문자열 배열 아니오 관계에 따라 그룹을 필터링합니다(직접 또는 상속).
with_custom_attributes 불리언 아니오 응답에 사용자 정의 속성을 포함합니다(관리자만 해당).

예시 응답:

[
  {
    "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

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.

예시 요청:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/languages"

예시 응답:

{
  "Ruby": 66.69,
  "JavaScript": 22.98,
  "HTML": 7.91,
  "CoffeeScript": 2.42
}

프로젝트 아카이브

프로젝트를 아카이브합니다.

전제 조건:

  • 관리자가 아니거나 프로젝트에 대해 소유자 역할이 할당되어 있어야 합니다.

이 엔드포인트는 멱등성(idempotent)입니다. 이미 아카이브된 프로젝트를 아카이브해도 프로젝트는 변경되지 않습니다.

POST /projects/:id/archive

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.

예시 요청:

curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "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_separated_caches": true,
  "ci_restrict_pipeline_cancellation_role": "developer",
  "ci_pipeline_variables_minimum_override_role": "maintainer",
  "ci_push_repository_for_job_token_allowed": false,
  "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",
  "_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"
  }
}

프로젝트 보관 해제

프로젝트의 보관을 해제합니다.

전제 조건:

  • 관리자이거나 프로젝트의 소유자 역할이 부여되어야 합니다.

이 엔드포인트는 멱등입니다. 보관되지 않은 프로젝트의 보관 해제는 프로젝트를 변경하지 않습니다.

POST /projects/:id/unarchive

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로입니다.

예제 요청:

curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "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_separated_caches": true,
  "ci_restrict_pipeline_cancellation_role": "developer",
  "ci_pipeline_variables_minimum_override_role": "maintainer",
  "ci_push_repository_for_job_token_allowed": false,
  "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",
  "_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"
  }
}

프로젝트 삭제

프로젝트를 삭제합니다. 이 엔드포인트는:

  • 이슈 및 병합 요청을 포함하여 모든 관련 리소스와 함께 프로젝트를 삭제합니다.
  • 프리미엄 또는 궁극적 티어에서는, 지연된 프로젝트 삭제가 활성화된 경우 적용됩니다.
  • GitLab 15.11부터 프리미엄 또는 궁극적 티어에서는, 다음과 같은 경우 즉시 프로젝트를 삭제합니다:
    • 프로젝트가 이미 삭제를 위해 표시된 경우.
    • permanently_removefull_path 매개변수가 전달된 경우.
  • GitLab 16.0부터 프리미엄 또는 궁극적 티어에서는, 지연된 프로젝트 삭제가 기본적으로 활성화됩니다. 삭제는 기본 삭제 지연에서 지정된 일 수 후에 발생합니다.

경고: 관리자 영역의 삭제 보호 설정에서 프로젝트를 즉시 삭제하는 옵션은 더 이상 지원되지 않음이며 GitLab 15.9에서 삭제되었으며 GitLab 16.0에서는 제거되었습니다.

DELETE /projects/:id

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL-인코딩된 경로입니다.
full_path 문자열 아니오 permanently_remove와 함께 사용할 프로젝트의 전체 경로입니다. 소개됨 (GitLab 15.11). 프로젝트 경로를 찾으려면 단일 프로젝트 가져오기path_with_namespace를 사용하세요. 프리미엄 및 궁극적 전용입니다.
permanently_remove 불리언/문자열 아니오 삭제를 위해 표시된 경우 즉시 프로젝트를 삭제합니다. 소개됨 (GitLab 15.11). 프리미엄 및 궁극적 전용입니다.

삭제로 표시된 프로젝트 복원

상세 정보:

Tier: Premium, Ultimate

Offering: GitLab.com, Self-managed, GitLab Dedicated

삭제로 표시된 프로젝트를 복원합니다.

POST /projects/:id/restore

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL-인코딩된 경로입니다.

프로젝트 아바타 업로드

지정된 프로젝트에 아바타를 업로드합니다.

PUT /projects/:id

지원되는 속성:

속성 유형 필수 설명
avatar 문자열 업로드할 파일입니다.
id 정수 또는 문자열 프로젝트의 ID 또는 URL-인코딩된 경로입니다.

파일 시스템에서 아바타를 업로드하려면 --form 인수를 사용하세요. 이렇게 하면 cURL이 Content-Type: multipart/form-data 헤더를 사용하여 데이터를 게시합니다. file= 매개변수는 파일 시스템의 이미지 파일을 가리켜야 하며 @로 시작해야 합니다. 예를 들어:

예제 요청:

curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
     --form "avatar=@dk.png" "https://gitlab.example.com/api/v4/projects/5"

예제 응답:

{
  "avatar_url": "https://gitlab.example.com/uploads/-/system/project/avatar/2/dk.png"
}

프로젝트 아바타 다운로드

프로젝트 아바타를 다운로드합니다. 프로젝트가 공개적으로 접근 가능하면 인증 없이 이 엔드포인트에 접근할 수 있습니다.

GET /projects/:id/avatar

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩 경로입니다.

예제 요청:

curl --header "PRIVATE-TOKEN: <your_access_token>" "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

지원되는 속성:

속성 유형 필수 설명
group_access 정수 그룹에 부여할 역할 (access_level)입니다.
group_id 정수 공유할 그룹의 ID입니다.
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩 경로입니다.
expires_at 문자열 아니오 ISO 8601 형식의 공유 만료 날짜입니다. 예: 2016-09-26.

그룹 내 공유된 프로젝트 링크 삭제

그룹에서 프로젝트의 공유를 해제합니다. 성공 시 204와 콘텐츠 없음이 반환됩니다.

DELETE /projects/:id/share/:group_id

지원되는 속성:

속성 유형 필수 설명
group_id 정수 그룹의 ID입니다.
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩 경로입니다.

예제 요청:

curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/share/17"

사용자가 프로젝트를 전송할 수 있는 그룹 가져오기

사용자가 프로젝트를 전송할 수 있는 그룹 목록을 가져옵니다.

GET /projects/:id/transfer_locations

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩 경로입니다.
search 문자열 아니오 검색할 그룹 이름입니다.

예제 요청:

curl --request GET "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/transfer

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로입니다.
namespace 정수 또는 문자열 프로젝트를 이전할 네임스페이스의 ID 또는 경로입니다.

예제 요청:

curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "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": [], // 사용 중단, 대신 `topics` 사용
  "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,
  "empty_repo": false,
  "archived": false,
  "visibility": "private",
  "resolve_outdated_diff_discussions": false,
  "container_registry_enabled": true, // 사용 중단, 대신 container_registry_access_level 사용
  "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, // 사용 중단. 대신 merge request approvals API를 사용
  "mirror": false,
  "compliance_frameworks": [],
  "warn_about_potentially_unwanted_characters": true
}

프로젝트 멤버 가져오기

다른 프로젝트에서 멤버를 가져옵니다.

가져오는 멤버의 대상 프로젝트에서의 역할이 다음과 같으면:

  • Maintainer인 경우, 소스 프로젝트에서 Owner 역할을 가진 멤버는 Maintainer 역할로 가져옵니다.

  • Owner인 경우, 소스 프로젝트에서 Owner 역할을 가진 멤버는 Owner 역할로 가져옵니다.

POST /projects/:id/import_project_members/:project_id

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 멤버를 수신할 대상 프로젝트의 ID 또는 URL 인코딩된 경로입니다.
project_id 정수 또는 문자열 멤버를 가져올 소스 프로젝트의 ID 또는 URL 인코딩된 경로입니다.

예제 요청:

curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "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": "특정 오류 메시지",
                   "jane_smith": "특정 오류 메시지"
                 },
      "total_members_count": 3
    }
    
  • 시스템 오류가 발생한 경우 (404422 HTTP 상태 코드):

{  "message":  "가져오기가 실패했습니다"  }

프로젝트의 유지 관리 작업 시작

프로젝트에 대해 유지 관리 작업을 시작합니다.

POST /projects/:id/housekeeping

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로입니다.
task 문자열 아니요 prune은 도달할 수 없는 객체의 수동 정리를 트리거하고, eager는 적극적 유지 관리를 트리거합니다.

실시간 보안 스캔

Tier: Ultimate Offering: GitLab.com
Status: Experiment
History

실시간으로 단일 파일의 SAST 스캔 결과를 반환합니다.

POST /projects/:id/security_scans/sast/scan

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 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

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.
wiki 불리언 아니오 프로젝트가 아닌 위키 저장소를 다운로드할지 여부입니다.

저장소 저장소 경로 가져오기

Gitaly 클러스터가 사용되지 않는 경우 지정된 프로젝트에 대한 저장소 저장 경로를 가져옵니다. Gitaly 클러스터가 사용되고 있는 경우, Praefect 생성된 복제 경로를 참조하세요.

관리자에게만 제공됩니다.

GET /projects/:id/storage

지원되는 속성:

속성 유형 필수 설명
id 정수 또는 문자열 프로젝트의 ID 또는 URL 인코딩된 경로.
[
  {
    "project_id": 1,
    "disk_path": "@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b",
    "created_at": "2012-10-12T17:04:47Z",
    "repository_storage": "default"
  }
]