Skip to content
Snippets Groups Projects
Select Git revision
  • ag-test
  • rs-test
  • master default protected
  • test-me-pa
  • mksionek-master-patch-52381
  • new-branch-10
  • test-conflicts
  • test-suggestions
  • alejandro-test
  • patch-25
  • winh-test-image-doscussion
  • stg-lfs-image-test-2
  • stg-lfs-image-test
  • test42016
  • issue_42016
  • issue-32709
  • add-codeowners
  • ClemMakesApps-master-patch-62759
  • bvl-staging-test
  • bvl-merge-base-api
  • v9.2.0-rc6 protected
  • v9.2.0-rc5 protected
  • v9.2.0-rc4 protected
  • v9.2.0-rc3 protected
  • v9.1.4 protected
  • v9.2.0-rc2 protected
  • v9.2.0-rc1 protected
  • v9.1.3 protected
  • v8.17.6 protected
  • v9.0.7 protected
  • v9.1.2 protected
  • v9.1.1 protected
  • v9.2.0.pre protected
  • v9.1.0 protected
  • v9.1.0-rc7 protected
  • v9.1.0-rc6 protected
  • v9.0.6 protected
  • v9.1.0-rc5 protected
  • v9.1.0-rc4 protected
  • v9.1.0-rc3 protected
40 results

projects.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    projects.md 40.44 KiB

    Projects

    Project visibility level

    Project in GitLab has be either private, internal or public. You can determine it by visibility_level field in project.

    Constants for project visibility levels are next:

    • Private. visibility_level is 0. Project access must be granted explicitly for each user.

    • Internal. visibility_level is 10. The project can be cloned by any logged in user.

    • Public. visibility_level is 20. The project can be cloned without any authentication.

    List projects

    Get a list of projects for which the authenticated user is a member.

    GET /projects

    Parameters:

    Attribute Type Required Description
    archived boolean no Limit by archived status
    visibility string no Limit by visibility public, internal, or private
    order_by string no Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at
    sort string no Return projects sorted in asc or desc order. Default is desc
    search string no Return list of authorized projects matching the search criteria
    simple boolean no Return only the ID, URL, name, and path of each project
    [
      {
        "id": 4,
        "description": null,
        "default_branch": "master",
        "public": false,
        "visibility_level": 0,
        "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",
        "tag_list": [
          "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,
        "builds_enabled": true,
        "wiki_enabled": true,
        "snippets_enabled": false,
        "container_registry_enabled": false,
        "created_at": "2013-09-30T13:46:02Z",
        "last_activity_at": "2013-09-30T13:46:02Z",
        "creator_id": 3,
        "namespace": {
          "created_at": "2013-09-30T13:46:02Z",
          "description": "",
          "id": 3,
          "name": "Diaspora",
          "owner_id": 1,
          "path": "diaspora",
          "updated_at": "2013-09-30T13:46:02Z"
        },
        "archived": false,
        "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png",
        "shared_runners_enabled": true,
        "forks_count": 0,
        "star_count": 0,
        "runners_token": "b8547b1dc37721d05889db52fa2f02",
        "public_builds": true,
        "shared_with_groups": [],
        "only_allow_merge_if_build_succeeds": false,
        "request_access_enabled": false
      },
      {
        "id": 6,
        "description": null,
        "default_branch": "master",
        "public": false,
        "visibility_level": 0,
        "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",
        "tag_list": [
          "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,
        "builds_enabled": true,
        "wiki_enabled": true,
        "snippets_enabled": false,
        "container_registry_enabled": false,
        "created_at": "2013-09-30T13:46:02Z",
        "last_activity_at": "2013-09-30T13:46:02Z",
        "creator_id": 3,
        "namespace": {
          "created_at": "2013-09-30T13:46:02Z",
          "description": "",
          "id": 4,
          "name": "Brightbox",
          "owner_id": 1,
          "path": "brightbox",
          "updated_at": "2013-09-30T13:46:02Z"
        },
        "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,
        "forks_count": 0,
        "star_count": 0,
        "runners_token": "b8547b1dc37721d05889db52fa2f02",
        "public_builds": true,
        "shared_with_groups": [],
        "only_allow_merge_if_build_succeeds": false,
        "request_access_enabled": false
      }
    ]

    Get a list of projects which the authenticated user can see.

    GET /projects/visible

    Parameters:

    Attribute Type Required Description
    archived boolean no Limit by archived status
    visibility string no Limit by visibility public, internal, or private
    order_by string no Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at
    sort string no Return projects sorted in asc or desc order. Default is desc
    search string no Return list of authorized projects matching the search criteria
    simple boolean no Return only the ID, URL, name, and path of each project
    [
      {
        "id": 4,
        "description": null,
        "default_branch": "master",
        "public": false,
        "visibility_level": 0,
        "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",
        "tag_list": [
          "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,
        "builds_enabled": true,
        "wiki_enabled": true,
        "snippets_enabled": false,
        "container_registry_enabled": false,
        "created_at": "2013-09-30T13:46:02Z",
        "last_activity_at": "2013-09-30T13:46:02Z",
        "creator_id": 3,
        "namespace": {
          "created_at": "2013-09-30T13:46:02Z",
          "description": "",
          "id": 3,
          "name": "Diaspora",
          "owner_id": 1,
          "path": "diaspora",
          "updated_at": "2013-09-30T13:46:02Z"
        },
        "archived": false,
        "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png",
        "shared_runners_enabled": true,
        "forks_count": 0,
        "star_count": 0,
        "runners_token": "b8547b1dc37721d05889db52fa2f02",
        "public_builds": true,
        "shared_with_groups": []
      },
      {
        "id": 6,
        "description": null,
        "default_branch": "master",
        "public": false,
        "visibility_level": 0,
        "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",
        "tag_list": [
          "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,
        "builds_enabled": true,
        "wiki_enabled": true,
        "snippets_enabled": false,
        "container_registry_enabled": false,
        "created_at": "2013-09-30T13:46:02Z",
        "last_activity_at": "2013-09-30T13:46:02Z",
        "creator_id": 3,
        "namespace": {
          "created_at": "2013-09-30T13:46:02Z",
          "description": "",
          "id": 4,
          "name": "Brightbox",
          "owner_id": 1,
          "path": "brightbox",
          "updated_at": "2013-09-30T13:46:02Z"
        },
        "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,
        "forks_count": 0,
        "star_count": 0,
        "runners_token": "b8547b1dc37721d05889db52fa2f02",
        "public_builds": true,
        "shared_with_groups": []
      }
    ]

    List owned projects

    Get a list of projects which are owned by the authenticated user.

    GET /projects/owned

    Parameters: