- プロジェクトの可視性レベル
- API v5での削除
- プロジェクトマージ方法
- すべてのプロジェクトの一覧
- ユーザープロジェクトのリスト
- ユーザーが貢献したプロジェクトの一覧
- ユーザーがスターを付けたプロジェクトのリスト
- 単一プロジェクトの取得
- プロジェクトユーザーの取得
- プロジェクトのグループ一覧
- プロジェクトの共有グループ一覧
- プロジェクトイベントを取得
- プロジェクトの作成
- ユーザーのプロジェクトを作成
- プロジェクトの編集
- プロジェクトをフォーク
- プロジェクトのフォーク一覧
- プロジェクトのスター
- プロジェクトのスター解除
- プロジェクトのスターラーのリスト
- 言語
- プロジェクトをアーカイブ
- プロジェクトのアーカイブ解除
- プロジェクトの削除
- 削除されたプロジェクトの復元
- ファイルのアップロード
- プロジェクトアバターのアップロード
- プロジェクトアバターの削除
- プロジェクトをグループで共有したい
- グループ内の共有プロジェクトリンクの削除
- プロジェクトメンバーのインポート
- フック
- フォーク関係
- プロジェクトの名前で検索
- プロジェクトのハウスキーピングタスクの開始
- プッシュルール
- ユーザーがプロジェクトを転送できるグループの取得
- プロジェクトを新しいネームスペースに転送します。
- ブランチ
- プロジェクトのインポート/エクスポート
- プロジェクトメンバー
- プロジェクトの脆弱性
- プロジェクトのプルミラーの詳細を取得
- プロジェクトのプルミラーリングの設定
- プロジェクトのプルミラーリングを開始します。
- プロジェクトのバッジ
- Git リポジトリのスナップショットをダウンロード
- リポジトリストレージへのパスを取得します。
プロジェクトAPI
REST API を使用してプロジェクトと対話します。
プロジェクトの可視性レベル
GitLabのプロジェクトは非公開、内部、公開にすることができます。可視性のレベルはプロジェクトのvisibility フィールドによって決まります。
詳しくはプロジェクトの可視性をご覧ください。
応答で返されるフィールドは、認証ユーザーの権限によって異なります。
API v5での削除
これらの属性は非推奨であり、API v5で削除される予定です:
- 
tag_list:代わりにtopics属性を使用してください。
- 
marked_for_deletion_at:代わりにmarked_for_deletion_on属性を使用してください。GitLabプレミアムまたはアルティメットでのみ利用可能です。
- 
approvals_before_merge:代わりにマージリクエスト承認者APIを使用してください。GitLab Premium または Ultimateのみ利用可能です。
プロジェクトマージ方法
merge_method では、以下のオプションを使用できます:
- 
mergeマージごとにマージコミットが作成され、競合がなければマージが許可されます。
- 
rebase_merge: マージコミットはマージごとに作成されますが、マージは早送りマージが可能な場合にのみ許可されます。このマージリクエストがビルドされ、マージされた後にターゲットブランチがビルドされることを確認できます。
- 
ff: マージコミットは作成されず、すべてのマージは fast-forward されます。マージは、ブランチを早送りできる場合にのみ許可されます。
すべてのプロジェクトの一覧
レスポンスの
_links.cluster_agents属性は GitLab 15.0 で導入されました。
認証されたユーザーの GitLab 全体で表示されているすべてのプロジェクトのリストを取得します。認証なしでアクセスした場合は、_単純な_フィールドを持つ公開プロジェクトのみが返されます。
GET /projects
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| archived | boolean | {点線円}いいえ | アーカイブ状態による制限 | 
| id_after | 整数。 | {点線円}いいえ | 指定したIDより大きいIDを持つプロジェクトに結果を限定します。 | 
| id_before | 整数。 | {点線円}いいえ | 指定したID未満のIDを持つプロジェクトに結果を限定します。 | 
| imported | 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 | 整数。 | {点線円}いいえ | 現在のユーザーによる制限 最小ロール ( access_level). | 
| order_by | 文字列です。 | {点線円}いいえ | id、name、path、created_at、updated_at、last_activity_at、similarityフィールドの順にプロジェクトを返します。repository_sizestorage_size,packages_sizeまたはwiki_sizeフィールドは管理者のみに許可されます。similarity(GitLab 14.1 で導入) は検索時のみ有効で、現在のユーザーがメンバーであるプロジェクトに限定されます。デフォルトはcreated_at。 | 
| owned | boolean | {点線円}いいえ | 現在のユーザーが明示的に所有するプロジェクトで制限します。 | 
| repository_checksum_failed | boolean | {点線円}いいえ | リポジトリのチェックサム計算に失敗したプロジェクトを制限します。 | 
| repository_storage | 文字列です。 | {点線円}いいえ | repository_storageに保存されているプロジェクトに結果を限定_します_。 | 
| search_namespaces | boolean | {点線円}いいえ | 検索条件に一致するときに祖先ネームスペースを含めます。デフォルトは falseです。 | 
| search | 文字列です。 | {点線円}いいえ | 検索条件に一致するプロジェクトのリストを返します。 | 
| simple | boolean | {点線円}いいえ | 各プロジェクトの限定されたフィールドのみを返します。このオペレーションは、単純なフィールドのみが返される認証なしには実行できません。 | 
| sort | 文字列です。 | {点線円}いいえ | ascまたはdesc順序でdescソートされたプロジェクトを返します。descデフォルトは .desc | 
| starred | boolean | {点線円}いいえ | 現在のユーザーがスターを付けたプロジェクトで制限します。 | 
| statistics | boolean | {点線円}いいえ | プロジェクト統計を含めます。少なくともレポーター・ロールを持つユーザーのみが利用できます。 | 
| topic | 文字列です。 | {点線円}いいえ | カンマ区切りのトピック名。指定したトピックのすべてに一致するプロジェクトに結果を限定します。 topics属性を参照してください。 | 
| topic_id | 整数。 | {点線円}いいえ | トピック ID で指定された割り当てトピックを持つプロジェクトに結果を限定します。 | 
| visibility | 文字列です。 | {点線円}いいえ | 可視性による制限 public,internal, またはprivate. | 
| wiki_checksum_failed | boolean | {点線円}いいえ | Wikiチェックサム計算に失敗したプロジェクトを制限します。 | 
| with_custom_attributes | boolean | {点線円}いいえ | レスポンスにカスタム属性を含めます。(管理者のみ) | 
| with_issues_enabled | boolean | {点線円}いいえ | 有効なイシュー機能による制限。 | 
| with_merge_requests_enabled | boolean | {点線円}いいえ | 有効なマージリクエスト機能による制限。 | 
| with_programming_language | 文字列です。 | {点線円}いいえ | 指定されたプログラミング言語を使用するプロジェクトによって制限されます。 | 
| updated_before | datetime | {点線円}いいえ | 指定した時間以前に最終更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入されました。このフィルターを有効にするには、order_by属性としてupdated_atも指定する必要があります。 | 
| updated_after | datetime | {点線円}いいえ | 指定した時間以降に更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入されました。このフィルターを有効にするには、order_by属性としてupdated_atも指定する必要があります。 | 
このエンドポイントは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": [ //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/master/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,
    "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,
    "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": [],
    "permissions": {
      "project_access": null,
      "group_access": null
    }
  },
  {
    ...
  }
]
カスタム属性でフィルタリングできます:
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"
ページネーションの制限
GitLab 13.0以降では、オフセットベースのページネーションは50,000レコードまでに制限されています。この制限を超えてプロジェクトを検索するには、キーセットのページネーションが必要です。
キーセットのページネーションはorder_by=id のみをサポートしています。他のソートオプションは利用できません。
ユーザープロジェクトのリスト
GitLab 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
指定したユーザーが所有する可視プロジェクトの一覧を取得します。認証なしでアクセスした場合は、公開プロジェクトのみが返されます。
前提条件
- 特定の属性を表示するには、管理者であるか、プロジェクトのオーナーロールを持っている必要があります。
user_id で指定)のネームスペース内のプロジェクトのみが返されます。ユーザーが所有するグループやサブグループのプロジェクトは返されません。プロファイルが非公開に設定されている場合は、空のリストが返されます。このエンドポイントは、選択したorder_by オプションのキーセットのページ分割をサポートしています。
GET /users/:user_id/projects
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| user_id | 文字列です。 | {チェックサークル}はい | ユーザーのIDまたはユーザー名。 | 
| archived | boolean | {点線円}いいえ | アーカイブ状態による制限 | 
| id_after | 整数。 | {点線円}いいえ | 指定したIDより大きいIDを持つプロジェクトに結果を限定します。 | 
| id_before | 整数。 | {点線円}いいえ | 指定したID未満のIDを持つプロジェクトに結果を限定します。 | 
| membership | boolean | {点線円}いいえ | 現在のユーザーが所属しているプロジェクトで制限します。 | 
| min_access_level | 整数。 | {点線円}いいえ | 現在のユーザーによる制限 最小ロール ( access_level). | 
| order_by | 文字列です。 | {点線円}いいえ | id、name、path、created_at、updated_at、last_activity_atのフィールド順にプロジェクトを返します。デフォルトはcreated_atです。 | 
| owned | boolean | {点線円}いいえ | 現在のユーザーが明示的に所有するプロジェクトで制限します。 | 
| search | 文字列です。 | {点線円}いいえ | 検索条件に一致するプロジェクトのリストを返します。 | 
| simple | boolean | {点線円}いいえ | 各プロジェクトの限定されたフィールドのみを返します。認証がない場合、このオペレーションは無効で、単純なフィールドのみが返されます。 | 
| sort | 文字列です。 | {点線円}いいえ | ascまたはdesc順序でdescソートされたプロジェクトを返します。descデフォルトは .desc | 
| starred | boolean | {点線円}いいえ | 現在のユーザーがスターを付けたプロジェクトで制限します。 | 
| statistics | boolean | {点線円}いいえ | プロジェクト統計を含めます。少なくともレポーター・ロールを持つユーザーのみが利用できます。 | 
| visibility | 文字列です。 | {点線円}いいえ | 可視性による制限 public,internal, またはprivate. | 
| with_custom_attributes | boolean | {点線円}いいえ | レスポンスにカスタム属性を含めます。(管理者のみ) | 
| with_issues_enabled | boolean | {点線円}いいえ | 有効なイシュー機能による制限。 | 
| with_merge_requests_enabled | boolean | {点線円}いいえ | 有効なマージリクエスト機能による制限。 | 
| with_programming_language | 文字列です。 | {点線円}いいえ | 指定されたプログラミング言語を使用するプロジェクトによって制限されます。 | 
| updated_before | datetime | {点線円}いいえ | 指定した時間以前に最終更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入。 | 
| updated_after | datetime | {点線円}いいえ | 指定した時間以降に更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入。 | 
[
  {
    "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": "master",
    "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/master/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,
    "public_jobs": true,
    "shared_with_groups": [],
    "only_allow_merge_if_pipeline_succeeds": false,
    "allow_merge_on_skipped_pipeline": 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 and will be removed in API v5 in favor of marked_for_deletion_on
    "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_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": "master",
    "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/master/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,
    "public_jobs": true,
    "shared_with_groups": [],
    "only_allow_merge_if_pipeline_succeeds": false,
    "allow_merge_on_skipped_pipeline": 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_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 | 文字列です。 | {チェックサークル}はい | ユーザーのIDまたはユーザー名。 | 
| order_by | 文字列です。 | {点線円}いいえ | id、name、path、created_at、updated_at、last_activity_atのフィールド順にプロジェクトを返します。デフォルトはcreated_atです。 | 
| simple | boolean | {点線円}いいえ | 各プロジェクトの限定されたフィールドのみを返します。認証がない場合、このオペレーションは無効で、単純なフィールドのみが返されます。 | 
| sort | 文字列です。 | {点線円}いいえ | ascまたはdesc順序でdescソートされたプロジェクトを返します。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": "master",
    "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/master/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,
    "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_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": "master",
    "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/master/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,
    "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_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"
    }
  }
]
ユーザーがスターを付けたプロジェクトのリスト
GitLab 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
指定したユーザーがスターをつけたプロジェクトの一覧を取得します。認証なしでアクセスした場合は、公開プロジェクトのみが返されます。
GET /users/:user_id/starred_projects
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| user_id | 文字列です。 | {チェックサークル}はい | ユーザーのIDまたはユーザー名。 | 
| archived | boolean | {点線円}いいえ | アーカイブ状態による制限 | 
| membership | boolean | {点線円}いいえ | 現在のユーザーが所属しているプロジェクトで制限します。 | 
| min_access_level | 整数。 | {点線円}いいえ | 現在のユーザーによる制限 最小ロール ( access_level). | 
| order_by | 文字列です。 | {点線円}いいえ | id、name、path、created_at、updated_at、last_activity_atのフィールド順にプロジェクトを返します。デフォルトはcreated_atです。 | 
| owned | boolean | {点線円}いいえ | 現在のユーザーが明示的に所有するプロジェクトで制限します。 | 
| search | 文字列です。 | {点線円}いいえ | 検索条件に一致するプロジェクトのリストを返します。 | 
| simple | boolean | {点線円}いいえ | 各プロジェクトの限定されたフィールドのみを返します。認証がない場合、このオペレーションは無効で、単純なフィールドのみが返されます。 | 
| sort | 文字列です。 | {点線円}いいえ | ascまたはdesc順序でdescソートされたプロジェクトを返します。descデフォルトは .desc | 
| starred | boolean | {点線円}いいえ | 現在のユーザーがスターを付けたプロジェクトで制限します。 | 
| statistics | boolean | {点線円}いいえ | プロジェクト統計を含めます。少なくともレポーター・ロールを持つユーザーのみが利用できます。 | 
| visibility | 文字列です。 | {点線円}いいえ | 可視性による制限 public,internal, またはprivate. | 
| with_custom_attributes | boolean | {点線円}いいえ | レスポンスにカスタム属性を含めます。(管理者のみ) | 
| with_issues_enabled | boolean | {点線円}いいえ | 有効なイシュー機能による制限。 | 
| with_merge_requests_enabled | boolean | {点線円}いいえ | 有効なマージリクエスト機能による制限。 | 
| updated_before | datetime | {点線円}いいえ | 指定した時間以前に最終更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入。 | 
| updated_after | datetime | {点線円}いいえ | 指定した時間以降に更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入。 | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/5/starred_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": "master",
    "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/master/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,
    "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_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": "master",
    "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/master/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,
    "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_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"
    }
  }
]
単一プロジェクトの取得
GitLab 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
特定のプロジェクトを取得します。プロジェクトが公開されている場合、このエンドポイントは認証なしでアクセスできます。
GET /projects/:id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| license | boolean | {点線円}いいえ | プロジェクトのライセンスデータを含めます。 | 
| statistics | boolean | {点線円}いいえ | プロジェクト統計を含めます。少なくともレポーター・ロールを持つユーザーのみが利用できます。 | 
| 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": "master",
  "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/master/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/master/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,
  "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,
  "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 and will be removed in API v5 in favor of marked_for_deletion_on
  "marked_for_deletion_on": "2020-04-03",
  "compliance_frameworks": [ "sox" ],
  "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_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":"master",
      "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/master/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
      }
   }
   ...
}
イシューとマージリクエストのテンプレート
GitLab 13.10で導入されました。
GitLab Premium または Ultimateのユーザーは、イシューとマージリクエストの説明テンプレートを管理するためのissues_template とmerge_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 | boolean | {点線円}いいえ | ユーザーがアクセスできる共有グループを制限します。 | 
| skip_groups | 整数の配列 | {点線円}いいえ | 渡されたグループIDをスキップします。 | 
| with_shared | boolean | {点線円}いいえ | このグループで共有されているプロジェクトを含めます。デフォルトは 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"
  }
]
プロジェクトイベントを取得
Events API ドキュメントを参照してください。
プロジェクトの作成
operations_access_levelGitLab 16.0で削除されました。
認証されたユーザーが所有する新しいプロジェクトを作成します。
HTTP リポジトリに内部からアクセスできない場合は、認証情報を URLhttps://username:password@gitlab.company.com/group/project.git に追加します。password はapi スコープを有効にした公開アクセスキーです。
POST /projects
リクエストの例
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/"
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| name | 文字列です。 | {チェック・サークル}はい( pathが指定されていない場合) | 新 し いプ ロ ジ ェ ク ト の名前。指定 し ない と パス と 同 じ です。 | 
| path | 文字列です。 | {チェック・サークル}はい( nameが指定されていない場合) | 新規プロジェクトのリポジトリ名。提供されていない場合、名前に基づいて生成されます(ダッシュ付きの小文字として生成されます)。GitLab 14.9から、パスは特殊文字で始まったり終わったりしてはならず、連続した特殊文字を含んではなりません。 | 
| allow_merge_on_skipped_pipeline | boolean | {点線円}いいえ | マージリクエストをスキップしたジョブでマージできるかどうかを設定します。 | 
| only_allow_merge_if_all_status_checks_passed | boolean | {点線円}いいえ | すべてのステータスチェックが通らない限りマージリクエストのマージがブロックされることを示します。デフォルトはfalseです。GitLab 15.5 で導入され、機能フラグ only_allow_merge_if_all_status_checks_passedはデフォルトで無効です。 | 
| analytics_access_level | 文字列です。 | {点線円}いいえ | disabled,privateまたはenabled | 
| approvals_before_merge | 整数。 | {点線円}いいえ | デフォルトで何人の承認者がマージリクエストを承認すべきかを指定します。承認ルールを設定するには、マージリクエスト承認APIを参照してください。GitLab 16.0 で非推奨。 | 
| auto_cancel_pending_pipelines | 文字列です。 | {点線円}いいえ | 保留中のパイプラインを自動キャンセルします。このアクションは有効な状態と無効な状態を切り替えます。 | 
| auto_devops_deploy_strategy | 文字列です。 | {点線円}いいえ | 自動デプロイ戦略 ( continuous,manualまたはtimed_incremental)。 | 
| auto_devops_enabled | boolean | {点線円}いいえ | このプロジェクトのAuto DevOpsを有効にします。 | 
| autoclose_referenced_issues | boolean | {点線円}いいえ | デフォルトブランチで参照されているイシューを自動クローズするかどうかを設定します。 | 
| avatar | 混合 | {点線円}いいえ | プロジェクトのアバター用画像ファイル。 | 
| build_git_strategy | 文字列です。 | {点線円}いいえ | Git 戦略。デフォルトは fetch。 | 
| build_timeout | 整数。 | {点線円}いいえ | ジョブが実行できる最大時間(秒)。 | 
| builds_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| ci_config_path | 文字列です。 | {点線円}いいえ | CI設定ファイルへのパス。 | 
| container_expiration_policy_attributes | ハッシュ | {点線円}いいえ | このプロジェクトの画像クリーンアップポリシーを更新します。 cadence(文字列)、keep_n(整数)、older_than(文字列)、name_regex(文字列)、name_regex_delete(文字列)、name_regex_keep(文字列)、enabled(論理値)。cadence、keep_n、older_thanの値の詳細については、コンテナレジストリのドキュメント を参照ください。 | 
| container_registry_access_level | 文字列です。 | {点線円}いいえ | このプロジェクトのコンテナレジストリの可視性を、 disabled、private、enabledのいずれかに設定します。 | 
| container_registry_enabled | boolean | {点線円}いいえ | _(非推奨)_こ のプ ロ ジ ェ ク ト で コ ン テナ レ ジ ス ト リ を有効に し ます。代わりに container_registry_access_levelを使用してください。 | 
| default_branch | 文字列です。 | {点線円}いいえ | デフォルトのブランチ名。 initialize_with_readmeがtrueである必要があります。 | 
| description | 文字列です。 | {点線円}いいえ | プロジェクトの簡単な説明 | 
| emails_disabled | boolean | {点線円}いいえ | _(非推奨)_電子メール通知を無効にします。代わりに emails_enabledを使用してください。 | 
| emails_enabled | boolean | {点線円}いいえ | 電子メール通知を有効にします。 | 
| external_authorization_classification_label | 文字列です。 | {点線円}いいえ | プロジェクトの分類ラベル。 | 
| forking_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| group_runners_enabled | boolean | {点線円}いいえ | このプロジェクトのグループ Runner を有効にします。 | 
| group_with_project_templates_id | 整数。 | {点線円}いいえ | グループ・レベルのカスタム・テンプレートの場合、すべてのカスタム・プロジェクト・テンプレートのソースとなるグループの ID を指定します。インスタンスレベルのテンプレートの場合は空白にします。 use_custom_templateが true である必要があります。 | 
| import_url | 文字列です。 | {点線円}いいえ | リポジトリをインポートする URL。URL の値が空でない場合、 initialize_with_readmeをtrueに設定してはいけません。そうすると次のエラーが発生する可能性があります:not a git repository. | 
| initialize_with_readme | boolean | {点線円}いいえ | Git リポジトリを README.mdファイルだけで作成するかどうか。デフォルトはfalseです。このブール値が true の場合は、リポジトリの代替コンテンツを指定するimport_urlやその他の属性をこのエンドポイントに渡してはいけません。そうすると、次のようなエラーが発生する可能性があります:not a git repository. | 
| issues_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| issues_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのイシューを有効にします。代わりに issues_access_levelを使用してください。 | 
| jobs_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのジョブを有効にします。代わりに builds_access_levelを使用してください。 | 
| lfs_enabled | boolean | {点線円}いいえ | LFSを有効にします。 | 
| merge_method | 文字列です。 | {点線円}いいえ | マージ方法を設定します。 | 
| merge_pipelines_enabled | boolean | {点線円}いいえ | マージパイプラインを有効または無効にします。 | 
| merge_requests_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| merge_requests_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのマージリクエストを有効にします。代わりに merge_requests_access_levelを使用してください。 | 
| merge_trains_enabled | boolean | {点線円}いいえ | マージ列車を有効または無効にします。 | 
| mirror_trigger_builds | boolean | {点線円}いいえ | プルミラーリングはビルドをトリガーします。 | 
| mirror | boolean | {点線円}いいえ | プロジェクトでプルミラーリングを有効にします。 | 
| namespace_id | 整数。 | {点線円}いいえ | 新しいプロジェクトのネームスペース(デフォルトは現在のユーザーのネームスペース)。 | 
| only_allow_merge_if_all_discussions_are_resolved | boolean | {点線円}いいえ | すべての議論が解決されたときにのみマージリクエストをマージするかどうかを設定します。 | 
| only_allow_merge_if_pipeline_succeeds | boolean | {点線円}いいえ | マージリクエストを成功したパイプラインにのみマージするかどうかを設定します。この設定は パイプラインが成功する必要があります。と名付けられます。 | 
| packages_enabled | boolean | {点線円}いいえ | パッケージリポジトリ機能を有効または無効にします。 | 
| pages_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabled,publicのいずれか。 | 
| printing_merge_request_link_enabled | boolean | {点線円}いいえ | コマンドラインからのプッシュ時にマージリクエストを作成/表示するリンクを表示します。 | 
| public_builds | boolean | {点線円}いいえ | trueの場合、プロジェクトメンバー以外もジョブを閲覧できます。 | 
| releases_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| environments_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| feature_flags_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| infrastructure_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| monitor_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| remove_source_branch_after_merge | boolean | {点線円}いいえ | すべての新しいマージリクエストに対して Delete source branchオプションをデフォルトで有効にします。 | 
| repository_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| repository_storage | 文字列です。 | {点線円}いいえ | リポジトリがどのストレージシャードにあるか。(管理者のみ) | 
| request_access_enabled | boolean | {点線円}いいえ | ユーザーによるメンバーへのアクセス要求を許可します。 | 
| requirements_access_level | 文字列です。 | {点線円}いいえ | disabled,privateまたはenabled | 
| resolve_outdated_diff_discussions | boolean | {点線円}いいえ | プッシュで変更された行のマージリクエストの差分の議論を自動的に解決します。 | 
| security_and_compliance_access_level | 文字列です。 | {点線円}いいえ | (GitLab 14.9 以降) セキュリティとコンプライアンスのアクセスレベル。 disabled,private,enabledのいずれか。 | 
| shared_runners_enabled | boolean | {点線円}いいえ | このプロジェクトの共有 Runner を有効にします。 | 
| show_default_award_emojis | boolean | {点線円}いいえ | デフォルトの受賞絵文字を表示します。 | 
| snippets_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| snippets_enabled | boolean | {点線円}いいえ | _(非推奨)_こ のプ ロ ジ ェ ク ト で ス ニペ ッ ト を有効に し ます。代わりに snippets_access_levelを使用してください。 | 
| squash_option | 文字列です。 | {点線円}いいえ | never,always,default_on,default_offのいずれか。 | 
| tag_list | アレイ | {点線円}いいえ | _(Deprecatedin GitLab 14.0)_プロジェクトのタグのリスト; 最終的にプロジェクトに割り当てられるべきタグの配列を入れます。代わりに topics。 | 
| template_name | 文字列です。 | {点線円}いいえ | なしで使用する場合は use_custom_template、組み込みプロジェクト・use_custom_templateテンプレートの名前。use_custom_templateと共に使用use_custom_templateする場合は、カスタム・プロジェクト・テンプレートの名前。 | 
| template_project_id | 整数。 | {点線円}いいえ | use_custom_templateと共に使用する場合は、カスタム・プロジェクト・テンプレートのプロジェクトID。曖昧になる可能性があるtemplate_nameためtemplate_name、プロジェクト ID を使用する方が望ましいです。 | 
| topics | アレイ | {点線円}いいえ | プロジェクトに最終的に割り当てられるトピックの配列。(GitLab 14.0から導入されました)。 | 
| use_custom_template | boolean | {点線円}いいえ | カスタム・インスタンスまたはグループ( group_with_project_templates_id)プロジェクト・テンプレートのいずれかを使用します。 | 
| visibility | 文字列です。 | {点線円}いいえ | プロジェクトの可視レベルを参照してください。 | 
| wiki_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| wiki_enabled | boolean | {点線円}いいえ | (非推奨) このプロジェクトの Wiki を有効にします。代わりに wiki_access_levelを使用してください。 | 
ユーザーのプロジェクトを作成
operations_access_levelGitLab 16.0で削除されました。
指定したユーザーが所有する新しいプロジェクトを作成します。管理者のみ利用可能。
HTTP リポジトリに内部からアクセスできない場合は、認証情報を URLhttps://username:password@gitlab.company.com/group/project.git に追加します。password はapi スコープを有効にした公開アクセスキーです。
POST /projects/user/:user_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| user_id | 整数。 | {チェックサークル}はい | プロジェクトオーナーのユーザーID。 | 
| name | 文字列です。 | {チェックサークル}はい | 新しいプロジェクトの名前。 | 
| allow_merge_on_skipped_pipeline | boolean | {点線円}いいえ | マージリクエストをスキップしたジョブでマージできるかどうかを設定します。 | 
| only_allow_merge_if_all_status_checks_passed | boolean | {点線円}いいえ | すべてのステータスチェックが通らない限りマージリクエストのマージがブロックされることを示します。デフォルトはfalseです。GitLab 15.5 で導入され、機能フラグ only_allow_merge_if_all_status_checks_passedはデフォルトで無効です。 | 
| analytics_access_level | 文字列です。 | {点線円}いいえ | disabled,privateまたはenabled | 
| approvals_before_merge | 整数。 | {点線円}いいえ | デフォルトで何人の承認者がマージリクエストを承認するか。GitLab 16.0では非推奨。承認ルールを設定するには、マージリクエスト承認 APIをご覧ください。 | 
| auto_cancel_pending_pipelines | 文字列です。 | {点線円}いいえ | 保留中のパイプラインを自動キャンセルします。このアクションは有効な状態と無効な状態を切り替えます。 | 
| auto_devops_deploy_strategy | 文字列です。 | {点線円}いいえ | 自動デプロイ戦略 ( continuous,manualまたはtimed_incremental)。 | 
| auto_devops_enabled | boolean | {点線円}いいえ | このプロジェクトのAuto DevOpsを有効にします。 | 
| autoclose_referenced_issues | boolean | {点線円}いいえ | デフォルトブランチで参照されているイシューを自動クローズするかどうかを設定します。 | 
| avatar | 混合 | {点線円}いいえ | プロジェクトのアバター用画像ファイル。 | 
| build_git_strategy | 文字列です。 | {点線円}いいえ | Git 戦略。デフォルトは fetch。 | 
| build_timeout | 整数。 | {点線円}いいえ | ジョブが実行できる最大時間(秒)。 | 
| builds_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| ci_config_path | 文字列です。 | {点線円}いいえ | CI設定ファイルへのパス。 | 
| container_registry_access_level | 文字列です。 | {点線円}いいえ | このプロジェクトのコンテナレジストリの可視性を、 disabled、private、enabledのいずれかに設定します。 | 
| container_registry_enabled | boolean | {点線円}いいえ | _(非推奨)_こ のプ ロ ジ ェ ク ト で コ ン テナ レ ジ ス ト リ を有効に し ます。代わりに container_registry_access_levelを使用してください。 | 
| default_branch | 文字列です。 | {点線円}いいえ | デフォルトのブランチ名。 initialize_with_readmeがtrueである必要があります。 | 
| description | 文字列です。 | {点線円}いいえ | プロジェクトの簡単な説明 | 
| emails_disabled | boolean | {点線円}いいえ | _(非推奨)_電子メール通知を無効にします。代わりに emails_enabledを使用してください。 | 
| emails_enabled | boolean | {点線円}いいえ | 電子メール通知を有効にします。 | 
| enforce_auth_checks_on_uploads | boolean | {点線円}いいえ | アップロード時の認証チェックを強制します。 | 
| external_authorization_classification_label | 文字列です。 | {点線円}いいえ | プロジェクトの分類ラベル。 | 
| forking_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| group_runners_enabled | boolean | {点線円}いいえ | このプロジェクトのグループ Runner を有効にします。 | 
| group_with_project_templates_id | 整数。 | {点線円}いいえ | グループ・レベルのカスタム・テンプレートの場合、すべてのカスタム・プロジェクト・テンプレートのソースとなるグループの ID を指定します。インスタンスレベルのテンプレートの場合は空白にします。 use_custom_templateが true である必要があります。 | 
| import_url | 文字列です。 | {点線円}いいえ | リポジトリをインポートするURL。 | 
| initialize_with_readme | boolean | {点線円}いいえ | falseデフォルトでは | 
| issues_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| issues_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのイシューを有効にします。代わりに issues_access_levelを使用してください。 | 
| jobs_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのジョブを有効にします。代わりに builds_access_levelを使用してください。 | 
| lfs_enabled | boolean | {点線円}いいえ | LFSを有効にします。 | 
| merge_commit_template | 文字列です。 | {点線円}いいえ | マージリクエストでマージコミットメッセージを作成するためのテンプレート。(GitLab 14.5 で導入されました)。 | 
| merge_method | 文字列です。 | {点線円}いいえ | マージ方法を設定します。 | 
| merge_requests_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| merge_requests_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのマージリクエストを有効にします。代わりに merge_requests_access_levelを使用してください。 | 
| mirror_trigger_builds | boolean | {点線円}いいえ | プルミラーリングはビルドをトリガーします。 | 
| mirror | boolean | {点線円}いいえ | プロジェクトでプルミラーリングを有効にします。 | 
| namespace_id | 整数。 | {点線円}いいえ | 新しいプロジェクトのネームスペース(デフォルトは現在のユーザーのネームスペース)。 | 
| only_allow_merge_if_all_discussions_are_resolved | boolean | {点線円}いいえ | すべての議論が解決されたときにのみマージリクエストをマージするかどうかを設定します。 | 
| only_allow_merge_if_pipeline_succeeds | boolean | {点線円}いいえ | マージ・リクエストを成功したジョブにのみマージするかどうかを設定します。 | 
| packages_enabled | boolean | {点線円}いいえ | パッケージリポジトリ機能を有効または無効にします。 | 
| pages_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabled,publicのいずれか。 | 
| path | 文字列です。 | {点線円}いいえ | 新しいプロジェクトのカスタムリポジトリ名。デフォルトでは名前に基づいて生成されます。 | 
| printing_merge_request_link_enabled | boolean | {点線円}いいえ | コマンドラインからのプッシュ時にマージリクエストを作成/表示するリンクを表示します。 | 
| public_builds | boolean | {点線円}いいえ | trueの場合、プロジェクトメンバー以外でもジョブを閲覧することができます。 | 
| releases_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| environments_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| feature_flags_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| infrastructure_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| monitor_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| remove_source_branch_after_merge | boolean | {点線円}いいえ | すべての新しいマージリクエストに対して Delete source branchオプションをデフォルトで有効にします。 | 
| repository_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| repository_storage | 文字列です。 | {点線円}いいえ | リポジトリがどのストレージシャードにあるか。(管理者のみ) | 
| request_access_enabled | boolean | {点線円}いいえ | ユーザーによるメンバーへのアクセス要求を許可します。 | 
| requirements_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledまたはpublic | 
| resolve_outdated_diff_discussions | boolean | {点線円}いいえ | プッシュで変更された行のマージリクエストの差分の議論を自動的に解決します。 | 
| security_and_compliance_access_level | 文字列です。 | {点線円}いいえ | (GitLab 14.9 以降) セキュリティとコンプライアンスのアクセスレベル。 disabled,private,enabledのいずれか。 | 
| shared_runners_enabled | boolean | {点線円}いいえ | このプロジェクトの共有 Runner を有効にします。 | 
| show_default_award_emojis | boolean | {点線円}いいえ | デフォルトの受賞絵文字を表示します。 | 
| snippets_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| snippets_enabled | boolean | {点線円}いいえ | _(非推奨)_こ のプ ロ ジ ェ ク ト で ス ニペ ッ ト を有効に し ます。代わりに snippets_access_levelを使用してください。 | 
| issue_branch_template | 文字列です。 | {点線円}いいえ | イシューから作成されたブランチの名前を提案するためのテンプレートです。(GitLab 15.6 で導入されました)。 | 
| squash_commit_template | 文字列です。 | {点線円}いいえ | マージリクエストでスカッシュコミットメッセージを作成するために使用されるテンプレート。(GitLab 14.6 で導入されました)。 | 
| squash_option | 文字列です。 | {点線円}いいえ | never,always,default_on,default_offのいずれか。 | 
| suggestion_commit_message | 文字列です。 | {点線円}いいえ | マージリクエストの提案を適用するために使用されるコミットメッセージです。 | 
| tag_list | アレイ | {点線円}いいえ | _(Deprecatedin GitLab 14.0)_プロジェクトのタグのリスト; 最終的にプロジェクトに割り当てられるべきタグの配列を入れます。代わりに topics。 | 
| template_name | 文字列です。 | {点線円}いいえ | なしで使用する場合は use_custom_template、組み込みプロジェクト・use_custom_templateテンプレートの名前。use_custom_templateと共に使用use_custom_templateする場合は、カスタム・プロジェクト・テンプレートの名前。 | 
| topics | アレイ | {点線円}いいえ | プロジェクトのトピックリスト。(GitLab 14.0で導入されました)。 | 
| use_custom_template | boolean | {点線円}いいえ | カスタム・インスタンスまたはグループ( group_with_project_templates_id)プロジェクト・テンプレートのいずれかを使用します。 | 
| visibility | 文字列です。 | {点線円}いいえ | プロジェクトの可視レベルを参照してください。 | 
| wiki_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| wiki_enabled | boolean | {点線円}いいえ | (非推奨) このプロジェクトの Wiki を有効にします。代わりに wiki_access_levelを使用してください。 | 
プロジェクトの編集
operations_access_levelGitLab 16.0で削除されました。
既存のプロジェクトを更新します。
HTTP リポジトリに内部からアクセスできない場合は、認証情報を URLhttps://username:password@gitlab.company.com/group/project.git に追加します。password はapi スコープを有効にした公開アクセスキーです。
PUT /projects/:id
例えば、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"
サポートされる属性:
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| allow_merge_on_skipped_pipeline | boolean | {点線円}いいえ | マージリクエストをスキップしたジョブでマージできるかどうかを設定します。 | 
| allow_pipeline_trigger_approve_deployment | boolean | {点線円}いいえ | パイプライントリガ者がデプロイを承認することを許可するかどうかを設定します。 | 
| only_allow_merge_if_all_status_checks_passed | boolean | {点線円}いいえ | すべてのステータスチェックが通らない限りマージリクエストのマージがブロックされることを示します。デフォルトは false。 GitLab 15.5 で導入され、機能フラグ](https://gitlab.com/gitlab-org/gitlab/-/issues/369859) はデフォルトで無効。機能フラグはGitLab 15.9でデフォルトで有効になりました。 | 
| analytics_access_level | 文字列です。 | {点線円}いいえ | disabled,privateまたはenabled | 
| approvals_before_merge | 整数。 | {点線円}いいえ | デフォルトで何人の承認者がマージリクエストを承認するか。GitLab 16.0では非推奨。承認ルールを設定するには、マージリクエスト承認 APIをご覧ください。 | 
| auto_cancel_pending_pipelines | 文字列です。 | {点線円}いいえ | 保留中のパイプラインを自動キャンセルします。このアクションは有効な状態と無効な状態を切り替えます。 | 
| auto_devops_deploy_strategy | 文字列です。 | {点線円}いいえ | 自動デプロイ戦略 ( continuous,manual, またはtimed_incremental)。 | 
| auto_devops_enabled | boolean | {点線円}いいえ | このプロジェクトのAuto DevOpsを有効にします。 | 
| autoclose_referenced_issues | boolean | {点線円}いいえ | デフォルトブランチで参照されているイシューを自動クローズするかどうかを設定します。 | 
| avatar | 混合 | {点線円}いいえ | プロジェクトのアバター用画像ファイル。 | 
| build_git_strategy | 文字列です。 | {点線円}いいえ | Git 戦略。デフォルトは fetch。 | 
| build_timeout | 整数。 | {点線円}いいえ | ジョブが実行できる最大時間(秒)。 | 
| builds_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| ci_config_path | 文字列です。 | {点線円}いいえ | CI設定ファイルへのパス。 | 
| ci_default_git_depth | 整数。 | {点線円}いいえ | 浅いクローニングのデフォルトのリビジョン数。 | 
| ci_forward_deployment_enabled | boolean | {点線円}いいえ | 古いデプロイジョブの防止を有効または無効にします。 | 
| ci_forward_deployment_rollback_allowed | boolean | {点線円}いいえ | ロールバック・デプロイに対してジョブの再試行を許可するかどうかを設定します。 | 
| ci_allow_fork_pipelines_to_run_in_parent_project | boolean | {点線円}いいえ | フォークからのマージリクエストに対して親プロジェクトでパイプラインを実行するかどうかを設定します。(GitLab 15.3 で導入されました)。 | 
| ci_separated_caches | boolean | {点線円}いいえ | ブランチ保護ステータスでキャッシュを区切るかどうかを設定します。 | 
| container_expiration_policy_attributes | ハッシュ | {点線円}いいえ | このプロジェクトの画像クリーンアップポリシーを更新します。指定できる値: cadence(文字列)、keep_n(整数)、older_than(文字列)、name_regex(文字列)、name_regex_delete(文字列)、name_regex_keep(文字列)、enabled(ブーリアン)。 | 
| container_registry_access_level | 文字列です。 | {点線円}いいえ | このプロジェクトのコンテナレジストリの可視性を、 disabled、private、enabledのいずれかに設定します。 | 
| container_registry_enabled | boolean | {点線円}いいえ | _(非推奨)_こ のプ ロ ジ ェ ク ト で コ ン テナ レ ジ ス ト リ を有効に し ます。代わりに container_registry_access_levelを使用してください。 | 
| default_branch | 文字列です。 | {点線円}いいえ | デフォルトのブランチ名。 | 
| description | 文字列です。 | {点線円}いいえ | プロジェクトの簡単な説明 | 
| emails_disabled | boolean | {点線円}いいえ | _(非推奨)_電子メール通知を無効にします。代わりに emails_enabledを使用してください。 | 
| emails_enabled | boolean | {点線円}いいえ | 電子メール通知を有効にします。 | 
| enforce_auth_checks_on_uploads | boolean | {点線円}いいえ | アップロード時の認証チェックを強制します。 | 
| external_authorization_classification_label | 文字列です。 | {点線円}いいえ | プロジェクトの分類ラベル。 | 
| forking_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| group_runners_enabled | boolean | {点線円}いいえ | このプロジェクトのグループ Runner を有効にします。 | 
| import_url | 文字列です。 | {点線円}いいえ | リポジトリがインポートされた URL。 | 
| issues_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| issues_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのイシューを有効にします。代わりに issues_access_levelを使用してください。 | 
| issues_template | 文字列です。 | {点線円}いいえ | イシューのデフォルト説明。説明はGitLab Flavored Markdownで解析されます。イシューとマージリクエストのテンプレートを参照してください。 | 
| jobs_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのジョブを有効にします。代わりに builds_access_levelを使用してください。 | 
| keep_latest_artifact | boolean | {点線円}いいえ | このプロジェクトの最新のアーティファクトを保持する機能を無効または有効にします。 | 
| lfs_enabled | boolean | {点線円}いいえ | LFSを有効にします。 | 
| merge_commit_template | 文字列です。 | {点線円}いいえ | マージリクエストでマージコミットメッセージを作成するためのテンプレート。(GitLab 14.5 で導入されました)。 | 
| merge_method | 文字列です。 | {点線円}いいえ | マージ方法を設定します。 | 
| merge_pipelines_enabled | boolean | {点線円}いいえ | マージパイプラインを有効または無効にします。 | 
| merge_requests_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| merge_requests_enabled | boolean | {点線円}いいえ | _(非推奨)_このプロジェクトのマージリクエストを有効にします。代わりに merge_requests_access_levelを使用してください。 | 
| merge_requests_template | 文字列です。 | {点線円}いいえ | マージリクエストのデフォルトの説明。説明は GitLab Flavored Markdown で解析されます。イシューとマージリクエストのテンプレートを参照してください。 | 
| merge_trains_enabled | boolean | {点線円}いいえ | マージ列車を有効または無効にします。 | 
| mirror_overwrites_diverged_branches | boolean | {点線円}いいえ | プルミラーは分岐したブランチを上書きします。 | 
| mirror_trigger_builds | boolean | {点線円}いいえ | プルミラーリングはビルドをトリガーします。 | 
| mirror_user_id | 整数。 | {点線円}いいえ | プルミラーイベントのすべてのアクティビティを担当するユーザー。(管理者のみ) | 
| mirror | boolean | {点線円}いいえ | プロジェクトでプルミラーリングを有効にします。 | 
| mr_default_target_self | boolean | {点線円}いいえ | フォークされたプロジェクトの場合、マージリクエストのターゲットはこのプロジェクトになります。 falseの場合、ターゲットはアップストリームプロジェクトです。 | 
| name | 文字列です。 | {点線円}いいえ | プロジェクトの名前。 | 
| only_allow_merge_if_all_discussions_are_resolved | boolean | {点線円}いいえ | すべての議論が解決されたときにのみマージリクエストをマージするかどうかを設定します。 | 
| only_allow_merge_if_pipeline_succeeds | boolean | {点線円}いいえ | マージ・リクエストを成功したジョブにのみマージするかどうかを設定します。 | 
| only_mirror_protected_branches | boolean | {点線円}いいえ | 保護されたブランチのみをミラーします。 | 
| packages_enabled | boolean | {点線円}いいえ | パッケージリポジトリ機能を有効または無効にします。 | 
| pages_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabled,publicのいずれか。 | 
| path | 文字列です。 | {点線円}いいえ | プロジェクトのカスタムリポジトリ名。デフォルトでは名前に基づいて生成されます。 | 
| printing_merge_request_link_enabled | boolean | {点線円}いいえ | コマンドラインからのプッシュ時にマージリクエストを作成/表示するリンクを表示します。 | 
| public_builds | boolean | {点線円}いいえ | trueの場合、プロジェクトメンバー以外もジョブを閲覧できます。 | 
| releases_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| environments_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| feature_flags_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| infrastructure_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| monitor_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| remove_source_branch_after_merge | boolean | {点線円}いいえ | すべての新しいマージリクエストに対して Delete source branchオプションをデフォルトで有効にします。 | 
| repository_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| repository_storage | 文字列です。 | {点線円}いいえ | リポジトリがどのストレージシャードにあるか。(管理者のみ) | 
| request_access_enabled | boolean | {点線円}いいえ | ユーザーによるメンバーへのアクセス要求を許可します。 | 
| requirements_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledまたはpublic | 
| resolve_outdated_diff_discussions | boolean | {点線円}いいえ | プッシュで変更された行のマージリクエストの差分の議論を自動的に解決します。 | 
| restrict_user_defined_variables | boolean | {点線円}いいえ | パイプラインのトリガー時に、メンテナーのロールを持つユーザーだけがユーザー定義の変数を渡せるようにします。例えば、パイプラインが UI、API、またはトリガートークンでトリガされた場合などです。 | 
| security_and_compliance_access_level | 文字列です。 | {点線円}いいえ | (GitLab 14.9 以降) セキュリティとコンプライアンスのアクセスレベル。 disabled,private,enabledのいずれか。 | 
| service_desk_enabled | boolean | {点線円}いいえ | サービスデスク機能を有効または無効にします。 | 
| shared_runners_enabled | boolean | {点線円}いいえ | このプロジェクトの共有 Runner を有効にします。 | 
| show_default_award_emojis | boolean | {点線円}いいえ | デフォルトの受賞絵文字を表示します。 | 
| snippets_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| snippets_enabled | boolean | {点線円}いいえ | _(非推奨)_こ のプ ロ ジ ェ ク ト で ス ニペ ッ ト を有効に し ます。代わりに snippets_access_levelを使用してください。 | 
| issue_branch_template | 文字列です。 | {点線円}いいえ | イシューから作成されたブランチの名前を提案するためのテンプレートです。(GitLab 15.6 で導入されました)。 | 
| squash_commit_template | 文字列です。 | {点線円}いいえ | マージリクエストでスカッシュコミットメッセージを作成するために使用されるテンプレート。(GitLab 14.6 で導入されました)。 | 
| squash_option | 文字列です。 | {点線円}いいえ | never,always,default_on,default_offのいずれか。 | 
| suggestion_commit_message | 文字列です。 | {点線円}いいえ | マージリクエストの提案を適用するために使用されるコミットメッセージです。 | 
| tag_list | アレイ | {点線円}いいえ | _(Deprecatedin GitLab 14.0)_プロジェクトのタグのリスト; 最終的にプロジェクトに割り当てられるべきタグの配列を入れます。代わりに topics。 | 
| topics | アレイ | {点線円}いいえ | プロジェクトのトピックのリスト。すでにプロジェクトに追加されている既存のトピックを置き換えます。(GitLab 14.0 で導入されました)。 | 
| visibility | 文字列です。 | {点線円}いいえ | プロジェクトの可視レベルを参照してください。 | 
| wiki_access_level | 文字列です。 | {点線円}いいえ | disabled,private,enabledのいずれか。 | 
| wiki_enabled | boolean | {点線円}いいえ | (非推奨) このプロジェクトの Wiki を有効にします。代わりに wiki_access_levelを使用してください。 | 
プロジェクトをフォーク
プロジェクトを、認証されたユーザーまたは指定されたユーザーのネームスペースにフォークします。
プロジェクトのフォークオペレーションは非同期で、バックグラウンドジョブで完了します。リクエストはすぐに返されます。プロジェクトのフォークが完了したかどうかを調べるには、新しいプロジェクトのimport_status をクエリします。
POST /projects/:id/fork
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| description | 文字列です。 | {点線円}いいえ | フォーク後のプロジェクトに割り当てられる説明。 | 
| mr_default_target_self | boolean | {点線円}いいえ | フォークされたプロジェクトの場合、マージリクエストのターゲットはこのプロジェクトになります。 falseの場合、ターゲットはアップストリームプロジェクトです。 | 
| name | 文字列です。 | {点線円}いいえ | フォーク後のプロジェクトに割り当てられる名前。 | 
| namespace_id | 整数。 | {点線円}いいえ | プロジェクトがフォークされるネームスペースのID。 | 
| namespace_path | 文字列です。 | {点線円}いいえ | プロジェクトがフォークされるネームスペースのパス。 | 
| namespace | 整数または文字列。 | {点線円}いいえ | _(非推奨)_プ ロ ジ ェ ク ト が フ ォ ー ク さ れる名前空間の ID またはパス。 | 
| path | 文字列です。 | {点線円}いいえ | フォーク後の結果プロジェクトに割り当てられるパス。 | 
| visibility | 文字列です。 | {点線円}いいえ | フォーク後の結果プロジェクトに割り当てられる可視レベル。 | 
プロジェクトのフォーク一覧
GitLab 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
指定されたプロジェクトとフォークされた関係を確立している、呼び出し元のユーザーがアクセス可能なプロジェクトをリストアップします。
GET /projects/:id/forks
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| archived | boolean | {点線円}いいえ | アーカイブ状態による制限 | 
| membership | boolean | {点線円}いいえ | 現在のユーザーが所属しているプロジェクトで制限します。 | 
| min_access_level | 整数。 | {点線円}いいえ | 現在のユーザーによる制限 最小ロール ( access_level). | 
| order_by | 文字列です。 | {点線円}いいえ | id、name、path、created_at、updated_at、last_activity_atのフィールド順にプロジェクトを返します。デフォルトはcreated_atです。 | 
| owned | boolean | {点線円}いいえ | 現在のユーザーが明示的に所有するプロジェクトで制限します。 | 
| search | 文字列です。 | {点線円}いいえ | 検索条件に一致するプロジェクトのリストを返します。 | 
| simple | boolean | {点線円}いいえ | 各プロジェクトの限定されたフィールドのみを返します。認証がない場合、このオペレーションは無効で、単純なフィールドのみが返されます。 | 
| sort | 文字列です。 | {点線円}いいえ | ascまたはdesc順序でdescソートされたプロジェクトを返します。descデフォルトは .desc | 
| starred | boolean | {点線円}いいえ | 現在のユーザーがスターを付けたプロジェクトで制限します。 | 
| statistics | boolean | {点線円}いいえ | プロジェクト統計を含めます。少なくともレポーター・ロールを持つユーザーのみが利用できます。 | 
| visibility | 文字列です。 | {点線円}いいえ | 可視性による制限 public,internal, またはprivate. | 
| with_custom_attributes | boolean | {点線円}いいえ | レスポンスにカスタム属性を含めます。(管理者のみ) | 
| with_issues_enabled | boolean | {点線円}いいえ | 有効なイシュー機能による制限。 | 
| with_merge_requests_enabled | boolean | {点線円}いいえ | 有効なマージリクエスト機能による制限。 | 
| updated_before | datetime | {点線円}いいえ | 指定した時間以前に最終更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入。 | 
| updated_after | datetime | {点線円}いいえ | 指定した時間以降に更新されたプロジェクトに結果を限定します。フォーマット:ISO 8601 ( YYYY-MM-DDTHH:MM:SSZ).GitLab 15.10 で導入。 | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/forks"
レスポンスの例
[
  {
    "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": "master",
    "visibility": "internal",
    "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/master/README.md",
    "tag_list": [ //deprecated, use `topics` instead
      "example",
      "disapora project"
    ],
    "topics": [
      "example",
      "disapora project"
    ],
    "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",
    "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": true,
    "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
    "shared_runners_enabled": true,
    "group_runners_enabled": true,
    "forks_count": 0,
    "star_count": 1,
    "public_jobs": true,
    "shared_with_groups": [],
    "only_allow_merge_if_pipeline_succeeds": false,
    "allow_merge_on_skipped_pipeline": 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 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
指定したプロジェクトにスターを付けます。プロジェクトが既にスターを付けている場合は、ステータスコード304 を返します。
POST /projects/:id/star
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/star"
応答例
{
  "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": "master",
  "visibility": "internal",
  "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/master/README.md",
  "tag_list": [ //deprecated, use `topics` instead
    "example",
    "disapora project"
  ],
  "topics": [
    "example",
    "disapora project"
  ],
  "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",
  "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": true,
  "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
  "license_url": "http://example.com/diaspora/diaspora-client/blob/master/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": 1,
  "public_jobs": true,
  "shared_with_groups": [],
  "only_allow_merge_if_pipeline_succeeds": false,
  "allow_merge_on_skipped_pipeline": 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 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
指定されたプロジェクトのスターを解除します。プロジェクトがスター付きでない場合は、ステータスコード304 を返します。
POST /projects/:id/unstar
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/unstar"
応答例
{
  "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": "master",
  "visibility": "internal",
  "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/master/README.md",
  "tag_list": [ //deprecated, use `topics` instead
    "example",
    "disapora project"
  ],
  "topics": [
    "example",
    "disapora project"
  ],
  "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",
  "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": true,
  "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
  "license_url": "http://example.com/diaspora/diaspora-client/blob/master/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,
  "public_jobs": true,
  "shared_with_groups": [],
  "only_allow_merge_if_pipeline_succeeds": false,
  "allow_merge_on_skipped_pipeline": 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"
  }
}
プロジェクトのスターラーのリスト
指定したプロジェクトにスターを付けたユーザーを一覧表示します。
GET /projects/:id/starrers
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| search | 文字列です。 | {点線円}いいえ | 特定のユーザーを検索します。 | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/starrers"
レスポンスの例
[
  {
    "starred_since": "2019-01-28T14:47:30.642Z",
    "user": {
        "id": 1,
        "username": "jane_smith",
        "name": "Jane Smith",
        "state": "active",
        "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
        "web_url": "http://localhost:3000/jane_smith"
    }
  },
  {
    "starred_since": "2018-01-02T11:40:26.570Z",
    "user": {
      "id": 2,
      "username": "janine_smith",
      "name": "Janine Smith",
      "state": "blocked",
      "avatar_url": "http://gravatar.com/../e32131cd8.jpeg",
      "web_url": "http://localhost:3000/janine_smith"
    }
  }
]
言語
プロジェクトで使用されている言語をパーセンテージで取得します。
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
}
プロジェクトをアーカイブ
GitLab 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
ユーザーがこのプロジェクトの管理者かオーナーである場合、プロジェクトをアーカイブします。このアクションは冪等なので、すでにアーカイブされているプロジェクトをアーカイブしてもプロジェクトは変更されません。
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": "master",
  "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/master/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",
  "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/master/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,
  "public_jobs": true,
  "shared_with_groups": [],
  "only_allow_merge_if_pipeline_succeeds": false,
  "allow_merge_on_skipped_pipeline": 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 14.10 で導入されたレスポンスの
_links.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": "master",
  "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/master/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",
  "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/master/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,
  "public_jobs": true,
  "shared_with_groups": [],
  "only_allow_merge_if_pipeline_succeeds": false,
  "allow_merge_on_skipped_pipeline": 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 12.6のデフォルトのプロジェクト削除遅延の動作は、GitLab 13.2では即時削除に変更されました。
このエンドポイントは
- すべての関連リソース(イシューやマージリクエストを含む)を含むプロジェクトを削除します。
- GitLab 12.6以降のPremiumまたはUltimate階層では、有効になっている場合、遅延プロジェクト削除が適用されます。
- 
GitLab 15.11以降、PremiumまたはUltimate階層では、プロジェクトがすでに削除マークがついていて、permanently_removeとfull_pathパラメータが渡された場合、プロジェクトを即座に削除します。
- GitLab16.0のPremiumまたはUltimateから、遅延プロジェクト削除がデフォルトで有効になりました。削除は、デフォルトの削除遅延で指定された日数後に行われます。
DELETE /projects/:id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| permanently_remove | 論理値/文字列 | いいえ | プロジェクトに削除マークがついている場合、即座に削除します。GitLab 15.11 で導入。 | 
| full_path | 文字列です。 | いいえ | permanently_removeで使用するプロジェクトのフルパス。 GitLab 15.11 で導入。プロジェクトのパスを見つけるには、単一プロジェクトの取得からpath_with_namespace。 | 
削除されたプロジェクトの復元
GitLab 12.6 で導入されました。
削除されたプロジェクトを復元します。
POST /projects/:id/restore
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
ファイルのアップロード
イシューやマージリクエストの説明やコメントで使うファイルを指定したプロジェクトにアップロードします。
POST /projects/:id/uploads
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| file | 文字列です。 | {チェックサークル}はい | アップロードするファイル。 | 
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
ファイルシステムからファイルをアップロードするには、--form 引数を使用します。これにより、cURL はヘッダContent-Type: multipart/form-data を使用してデータをポストします。file= パラメータはファイルシステム上のファイルを指し、その前に@ を付ける必要があります。例えば
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
     --form "file=@dk.png" "https://gitlab.example.com/api/v4/projects/5/uploads"
返されるオブジェクト:
{
  "alt": "dk",
  "url": "/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png",
  "full_path": "/namespace1/project1/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png",
  "markdown": ""
}
返されるurl は、プロジェクト・パスからの相対パスです。返されるfull_path はファイルへの絶対パスです。Markdownコンテキストでは、markdown の形式が使用されるとリンクが展開されます。
プロジェクトアバターのアップロード
指定したプロジェクトにアバターをアップロードします。
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"
}
プロジェクトアバターの削除
GitLab 15.4で導入されました。
プロジェクトアバターを削除するには、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"
プロジェクトメンバーのインポート
別のプロジェクトからメンバーをインポートします。
インポートするメンバーのプロジェクトでのロールが以下の場合:
- ターゲット・プロジェクトのインポート先のメンバのロールが「メンテナー」である場合、ソース・ プロジェクトでオーナー・ロールを持つメンバは、メンテナー・ロールでインポートされます。
- 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": "Some individual error message",
               "jane_smith": "Some individual error message"
             },
  "total_members_count": 3
}
システムエラーが発生した場合 (404 および422 HTTP ステータスコード):
{  "message":  "Import failed"  }
フック
プロジェクトフックやWebhookとも呼ばれます。これらは、システム全体に適用されるシステムフックとは異なります。
プロジェクトフック一覧
プロジェクトフックの一覧を取得します。
GET /projects/:id/hooks
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
プロジェクトフックの取得
プロジェクトの特定のフックを取得します。
GET /projects/:id/hooks/:hook_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| hook_id | 整数。 | {チェックサークル}はい | プロジェクトフックのID。 | 
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
{
  "id": 1,
  "url": "http://example.com/hook",
  "project_id": 3,
  "push_events": true,
  "push_events_branch_filter": "",
  "issues_events": true,
  "confidential_issues_events": true,
  "merge_requests_events": true,
  "tag_push_events": true,
  "note_events": true,
  "confidential_note_events": true,
  "job_events": true,
  "pipeline_events": true,
  "wiki_page_events": true,
  "deployment_events": true,
  "releases_events": true,
  "enable_ssl_verification": true,
  "repository_update_events": false,
  "alert_status": "executable",
  "disabled_until": null,
  "url_variables": [ ],
  "created_at": "2012-10-12T17:04:47Z"
}
プロジェクトフックの追加
指定したプロジェクトにフックを追加します。
POST /projects/:id/hooks
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| url | 文字列です。 | {チェックサークル}はい | フックのURL。 | 
| confidential_issues_events | boolean | {点線円}いいえ | 機密イシューイベントのトリガーフック。 | 
| confidential_note_events | boolean | {点線円}いいえ | 秘匿音符イベントのトリガーフック。 | 
| deployment_events | boolean | {点線円}いいえ | デプロイイベントのトリガーフック。 | 
| enable_ssl_verification | boolean | {点線円}いいえ | フック起動時にSSL検証を行います。 | 
| issues_events | boolean | {点線円}いいえ | イシューイベントのトリガーフック。 | 
| job_events | boolean | {点線円}いいえ | ジョブイベントのトリガーフック。 | 
| merge_requests_events | boolean | {点線円}いいえ | マージリクエストイベントのトリガーフック。 | 
| note_events | boolean | {点線円}いいえ | ノートイベントのトリガーフック。 | 
| pipeline_events | boolean | {点線円}いいえ | パイプラインイベントのトリガーフック。 | 
| push_events_branch_filter | 文字列です。 | {点線円}いいえ | ブランチが一致した場合のみ、プッシュイベントをトリガーします。 | 
| push_events | boolean | {点線円}いいえ | プッシュイベントのトリガーフック。 | 
| releases_events | boolean | {点線円}いいえ | リリースイベントのトリガーフック。 | 
| tag_push_events | boolean | {点線円}いいえ | タグプッシュイベントのトリガーフック。 | 
| token | 文字列です。 | {点線円}いいえ | 受信したペイロードを検証するためのシークレットトークン。トークンはレスポンスでは返されません。 | 
| wiki_page_events | boolean | {点線円}いいえ | Wikiイベントのトリガーフック。 | 
プロジェクトフックの編集
指定したプロジェクトのフックを編集します。
PUT /projects/:id/hooks/:hook_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| hook_id | 整数。 | {チェックサークル}はい | プロジェクトフックのID。 | 
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| url | 文字列です。 | {チェックサークル}はい | フックのURL。 | 
| confidential_issues_events | boolean | {点線円}いいえ | 機密イシューイベントのトリガーフック。 | 
| confidential_note_events | boolean | {点線円}いいえ | 秘匿音符イベントのトリガーフック。 | 
| deployment_events | boolean | {点線円}いいえ | デプロイイベントのトリガーフック。 | 
| enable_ssl_verification | boolean | {点線円}いいえ | フック起動時にSSL検証を行います。 | 
| issues_events | boolean | {点線円}いいえ | イシューイベントのトリガーフック。 | 
| job_events | boolean | {点線円}いいえ | ジョブイベントのトリガーフック。 | 
| merge_requests_events | boolean | {点線円}いいえ | マージリクエストイベントのトリガーフック。 | 
| note_events | boolean | {点線円}いいえ | ノートイベントのトリガーフック。 | 
| pipeline_events | boolean | {点線円}いいえ | パイプラインイベントのトリガーフック。 | 
| push_events_branch_filter | 文字列です。 | {点線円}いいえ | ブランチが一致した場合のみ、プッシュイベントをトリガーします。 | 
| push_events | boolean | {点線円}いいえ | プッシュイベントのトリガーフック。 | 
| releases_events | boolean | {点線円}いいえ | リリースイベントのトリガーフック。 | 
| tag_push_events | boolean | {点線円}いいえ | タグプッシュイベントのトリガーフック。 | 
| token | 文字列です。 | {点線円}いいえ | 受信したペイロードを検証するためのシークレットトークン。レスポンスでは返されません。Webhook URL を変更すると、シークレットトークンはリセットされ、保持されません。 | 
| wiki_page_events | boolean | {点線円}いいえ | Wikiページイベントのトリガーフック。 | 
プロジェクト削除フック
プロジェクトからフックを削除します。このメソッドは冪等であり、複数回呼び出すことができます。フックが使用可能であるか、使用可能でないかのどちらかです。
DELETE /projects/:id/hooks/:hook_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| hook_id | 整数。 | {チェックサークル}はい | プロジェクトフックのID。 | 
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
フックが利用可能かどうかで、JSONレスポンスが異なることに注意してください。プロジェクトフックが利用可能な場合は、JSONレスポンスで返されるか、空のレスポンスが返されます。
フォーク関係
既存のプロジェクト間のフォーク関係の変更を許可します。プロジェクトオーナーと管理者のみが利用できます。
既存プロジェクト間のforkされたfrom/to関係の作成
POST /projects/:id/fork/:forked_from_id
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| forked_from_id | ID | {チェックサークル}はい | フォーク元のプロジェクトのID。 | 
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
フォークされた既存のリレーションシップを削除します。
DELETE /projects/:id/fork
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
プロジェクトの名前で検索
認証ユーザーがアクセス可能なプロジェクトを名前で検索します。プロジェクトが公開されている場合、このエンドポイントは認証なしでアクセスできます。
GET /projects
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| search | 文字列です。 | {チェックサークル}はい | プロジェクト名に含まれる文字列。 | 
| order_by | 文字列です。 | {点線円}いいえ | id,name,created_atまたはlast_activity_atフィールドで並べ替えられたリクエストを返します。 | 
| sort | 文字列です。 | {点線円}いいえ | ascまたはdesc順に並べ替えられたリクエストを返します。 | 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects?search=test"
プロジェクトのハウスキーピングタスクの開始
POST /projects/:id/housekeeping
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| task | 文字列です。 | {点線円}いいえ | pruneを指定すると到達不可能なオブジェクトの手動刈り込みを、eagerを指定すると熱心なハウスキーピングを行います。 | 
プッシュルール
プロジェクトプッシュルールの取得
プロジェクトのプッシュルールを取得します。
GET /projects/:id/push_rule
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス | 
{
  "id": 1,
  "project_id": 3,
  "commit_message_regex": "Fixes \\d+\\..*",
  "commit_message_negative_regex": "ssh\\:\\/\\/",
  "branch_name_regex": "",
  "deny_delete_tag": false,
  "created_at": "2012-10-12T17:04:47Z",
  "member_check": false,
  "prevent_secrets": false,
  "author_email_regex": "",
  "file_name_regex": "",
  "max_file_size": 5,
  "commit_committer_check": false,
  "reject_unsigned_commits": false
}
プロジェクトプッシュルールの追加
指定したプロジェクトにプッシュルールを追加します。
POST /projects/:id/push_rule
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| author_email_regex | 文字列です。 | {点線円}いいえ | すべてのコミット作成者の電子メールはこれに一致しなければなりません。たとえば、 @my-company.com$。 | 
| branch_name_regex | 文字列です。 | {点線円}いいえ | すべてのブランチ名がこれに一致する必要があります(例: (feature|hotfix)\/*. | 
| commit_committer_check | boolean | {点線円}いいえ | ユーザーがこのリポジトリにコミットをプッシュできるのは、コミッターのメールアドレスが自分の認証済みのメールアドレスである場合のみです。 | 
| commit_message_negative_regex | 文字列です。 | {点線円}いいえ | これにマッチするコミットメッセージは許されません。例えば、 ssh\:\/\/。 | 
| commit_message_regex | 文字列です。 | {点線円}いいえ | すべてのコミットメッセージはこれに一致しなければなりません。例えば、 Fixed \d+\..*。 | 
| deny_delete_tag | boolean | {点線円}いいえ | タグの削除を拒否します。 | 
| file_name_regex | 文字列です。 | {点線円}いいえ | すべてのコミットされたファイル名はこれにマッチしてはなりません。例えば、 (jar|exe)$。 | 
| max_file_size | 整数。 | {点線円}いいえ | 最大ファイルサイズ(MB). | 
| member_check | boolean | {点線円}いいえ | 作成者(メール)によるコミットを既存のGitLabユーザーに制限します。 | 
| prevent_secrets | boolean | {点線円}いいえ | GitLabはシークレットを含む可能性のあるファイルを拒否します。 | 
| reject_unsigned_commits | boolean | {点線円}いいえ | GPGで署名されていないコミットを拒否します。 | 
プロジェクトプッシュルールの編集
指定したプロジェクトのプッシュルールを編集します。
PUT /projects/:id/push_rule
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| author_email_regex | 文字列です。 | {点線円}いいえ | すべてのコミット作成者の電子メールはこれに一致しなければなりません。たとえば、 @my-company.com$。 | 
| branch_name_regex | 文字列です。 | {点線円}いいえ | すべてのブランチ名がこれに一致する必要があります(例: (feature|hotfix)\/*. | 
| commit_committer_check | boolean | {点線円}いいえ | ユーザーがこのリポジトリにコミットをプッシュできるのは、コミッターのメールアドレスが自分の認証済みのメールアドレスである場合のみです。 | 
| commit_message_negative_regex | 文字列です。 | {点線円}いいえ | これにマッチするコミットメッセージは許されません。例えば、 ssh\:\/\/。 | 
| commit_message_regex | 文字列です。 | {点線円}いいえ | すべてのコミットメッセージはこれに一致しなければなりません。例えば、 Fixed \d+\..*。 | 
| deny_delete_tag | boolean | {点線円}いいえ | タグの削除を拒否します。 | 
| file_name_regex | 文字列です。 | {点線円}いいえ | すべてのコミットされたファイル名はこれにマッチしてはなりません。例えば、 (jar|exe)$。 | 
| max_file_size | 整数。 | {点線円}いいえ | 最大ファイルサイズ(MB). | 
| member_check | boolean | {点線円}いいえ | 作成者(メール)によるコミットを既存のGitLabユーザーに制限します。 | 
| prevent_secrets | boolean | {点線円}いいえ | GitLabはシークレットを含む可能性のあるファイルを拒否します。 | 
| reject_unsigned_commits | boolean | {点線円}いいえ | GPG署名されていないコミットを拒否します。 | 
プロジェクトプッシュルールの削除
13.9でGitLab Premiumに移行しました。
プロジェクトからプッシュルールを削除します。このメソッドは冪等であり、複数回呼び出すことができます。プッシュルールが利用可能かどうかのどちらかです。
DELETE /projects/:id/push_rule
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
ユーザーがプロジェクトを転送できるグループの取得
GitLab 15.4 で導入されました。
ユーザーがプロジェクトを転送できるグループのリストを取得します。
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"
  }
]
プロジェクトを新しいネームスペースに転送します。
GitLab 14.10 で導入されたレスポンスの
_links.cluster_agents属性。
プロジェクトを転送するための前提条件については、プロジェクトのドキュメントを参照してください。
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": "master",
  "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/master/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, // 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,
  "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": []
}
ブランチ
詳しくはブランチのドキュメントをご覧ください。
プロジェクトのインポート/エクスポート
詳しくはプロジェクトのインポート/エクスポートをご覧ください。
プロジェクトメンバー
詳しくはプロジェクトメンバーのドキュメントをご覧ください。
プロジェクトの脆弱性
詳しくはプロジェクトの脆弱性に関するドキュメントをご覧ください。
プロジェクトのプルミラーの詳細を取得
GitLab 15.6で導入されました。
プロジェクトのプルミラーの詳細を返します。
GET /projects/:id/mirror/pull
サポートされる属性:
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
リクエストの例
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:id/mirror/pull"
応答例
{
  "id": 101486,
  "last_error": null,
  "last_successful_update_at": "2020-01-06T17:32:02.823Z",
  "last_update_at": "2020-01-06T17:32:02.823Z",
  "last_update_started_at": "2020-01-06T17:31:55.864Z",
  "update_status": "finished",
  "url": "https://*****:*****@gitlab.com/gitlab-org/security/gitlab.git"
}
プロジェクトのプルミラーリングの設定
リモートリポジトリが公開されているか、username:token 認証を使用している場合、新規プロジェクトの作成や既存プロジェクトの更新時に API を使用してプルミラーリングを設定します。HTTP リポジトリが公開されていない場合は、URLに認証情報を追加できます:https://username:token@gitlab.company.com/group/project.gittoken は API スコープを有効にした個人アクセストークンです。
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| import_url | 文字列です。 | {チェックサークル}はい | ミラーリングされるリモートリポジトリの URL (必要であれば user:tokenを含む)。 | 
| mirror | boolean | {チェックサークル}はい | trueに設定する と 、 プ ロ ジ ェ ク ト でのプル ミラーリングを有効にします。 | 
| mirror_trigger_builds | boolean | {点線円}いいえ | trueに設定すると、ミラー更新のパイプラインをトリガします。 | 
| only_mirror_protected_branches | boolean | {点線円}いいえ | trueに設定すると、ミラーリングを保護ブランチのみに制限します。 | 
| mirror_branch_regex | 文字列 | {点線円}いいえ | 正規表現を含みます。正規表現に一致する名前のブランチのみがミラーされます。 only_mirror_protected_branchesが無効になっている必要があります。 | 
プロジェクトのプルミラーリングを開始します。
13.9でGitLab Premiumに移行しました。
POST /projects/:id/mirror/pull
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:id/mirror/pull"
プロジェクトのバッジ
詳しくはプロジェクトバッジのドキュメントをご覧ください。
Git リポジトリのスナップショットをダウンロード
このエンドポイントには管理ユーザーしかアクセスできません。
Git リポジトリのスナップショットをダウンロードします。このスナップショットは常に圧縮されていないtar形式です。
リポジトリが破損していてgit clone が動かない場合、スナップショットによってデータの一部を取り出すことができるかもしれません。
GET /projects/:id/snapshot
| 属性 | 種類 | 必須 | 説明 | 
|---|---|---|---|
| id | 整数または文字列。 | {チェックサークル}はい | プロジェクトのIDまたはURLエンコードされたパス。 | 
| wiki | boolean | {点線円}いいえ | プロジェクトのリポジトリではなくWikiのリポジトリをダウンロードするかどうか。 | 
リポジトリストレージへのパスを取得します。
GitLab 14.0 で導入されました。
Gitaly Clusterが使用されていない場合、指定したプロジェクトのリポジトリストレージへのパスを取得します。Gitaly Clusterを使用している場合は、Praefect-generated replica paths (GitLab 15.0以降)を参照してください。
管理者のみ利用可能です。
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"
  }
]
