projects

Source:

Methods

(static) addProject(payload)

Create project

Source:
See:

POST /projects

Parameters:
Name Type Description
payload object

-

Properties
Name Type Description
name

(required) - new project name

path

(optional) - custom repository name for new project. By default generated based on name

namespace_id

(optional) - namespace for the new project (defaults to user)

description

(optional) - short project description

issues_enabled

(optional)

merge_requests_enabled

(optional)

builds_enabled

(optional)

wiki_enabled

(optional)

snippets_enabled

(optional)

public

(optional) - if

visibility_level

(optional)

import_url

(optional)

public_builds

(optional)

(static) addProjectFork(id, forked_from_id, payload)

Create a forked from/to relation between existing projects.

Source:
See:

POST /projects/:id/fork/:forked_from_id

Parameters:
Name Type Description
id

(required) - The ID of the project

forked_from_id undefined

forked_from_id

payload object

-

Properties
Name Type Description
forked_from_id:

(required) - The ID of the project that was forked from

(static) addProjectHook(id, payload)

Add project hook

Source:
See:

POST /projects/:id/hooks

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

payload object

-

Properties
Name Type Description
url

(required) - The hook URL

push_events
  • Trigger hook on push events
issues_events
  • Trigger hook on issues events
merge_requests_events
  • Trigger hook on merge_requests events
tag_push_events
  • Trigger hook on push_tag events
note_events
  • Trigger hook on note events
enable_ssl_verification
  • Do SSL verification when triggering the hook

(static) addProjectMember(id, payload)

Add project team member

Source:
See:

POST /projects/:id/members

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

payload object

-

Properties
Name Type Description
user_id

(required) - The ID of a user to add

access_level

(required) - Project access level

(static) addProjectsFork(id)

Fork project

Source:
See:

POST /projects/fork/:id

Parameters:
Name Type Description
id

(required) - The ID of the project to be forked

(static) addProjectShare(id, payload)

Share project with group

Source:
See:

POST /projects/:id/share

Parameters:
Name Type Description
id

(required) - The ID of a project

payload object

-

Properties
Name Type Description
group_id

(required) - The ID of a group

group_access

(required) - Level of permissions for sharing

(static) addProjectsUser(user_id, payload)

Create project for user

Source:
See:

POST /projects/user/:user_id

Parameters:
Name Type Description
user_id

(required) - user_id of owner

payload object

-

Properties
Name Type Description
name

(required) - new project name

description

(optional) - short project description

issues_enabled

(optional)

merge_requests_enabled

(optional)

builds_enabled

(optional)

wiki_enabled

(optional)

snippets_enabled

(optional)

public

(optional) - if

visibility_level

(optional)

import_url

(optional)

public_builds

(optional)

(static) addProjectUpload(id, payload)

Upload a file

Source:
See:

POST /projects/:id/uploads

Parameters:
Name Type Description
id

(required) - The ID of the project

payload object

-

Properties
Name Type Description
file

(required) - The file to be uploaded

(static) deleteProject(id)

Remove project

Source:
See:

DELETE /projects/:id

Parameters:
Name Type Description
id

(required) - The ID of a project

(static) deleteProjectFork(id)

Delete an existing forked from relationship

Source:
See:

DELETE /projects/:id/fork

Parameters:
Name Type Description
id

(required) - The ID of the project

(static) deleteProjectHook(id, hook_id)

Delete project hook

Source:
See:

DELETE /projects/:id/hooks/:hook_id

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

hook_id

(required) - The ID of hook to delete

(static) deleteProjectMember(id, user_id)

Remove project team member

Source:
See:

DELETE /projects/:id/members/:user_id

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

user_id

(required) - The ID of a team member

(static) getProject(id)

Get single project

Source:
See:

GET /projects/:id

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

(static) getProjectEvents(id)

Get project events

Source:
See:

GET /projects/:id/events

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

(static) getProjectHook(id, hook_id)

Get project hook

Source:
See:

GET /projects/:id/hooks/:hook_id

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

hook_id

(required) - The ID of a project hook

(static) getProjectHooks(id)

List project hooks

Source:
See:

GET /projects/:id/hooks

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

(static) getProjectMember(id, user_id)

Get project team member

Source:
See:

GET /projects/:id/members/:user_id

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

user_id

(required) - The ID of a user

(static) getProjectMembers(id)

List project team members

Source:
See:

GET /projects/:id/members

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

(static) getProjectRepositoryBranch(id, branch)

List single branch

Source:
See:

GET /projects/:id/repository/branches/:branch

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

branch

(required) - The name of the branch.

(static) getProjectRepositoryBranches(id)

List branches

Source:
See:

GET /projects/:id/repository/branches

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

(static) getProjects()

List projects

Source:
See:

GET /projects

(static) getProjectsAll()

List ALL projects

Source:
See:

GET /projects/all

(static) getProjectsOwned()

List owned projects

Source:
See:

GET /projects/owned

(static) getProjectsSearch(query)

Search for projects by name

Source:
See:

GET /projects/search/:query

Parameters:
Name Type Description
query

(required) - A string contained in the project name

(static) getProjectsStarred()

List starred projects

Source:
See:

GET /projects/starred

(static) updateProject(id, payload)

Edit project

Source:
See:

PUT /projects/:id

Parameters:
Name Type Description
id

(required) - The ID of a project

payload object

-

Properties
Name Type Description
name

(optional) - project name

path

(optional) - repository name for project

description

(optional) - short project description

default_branch

(optional)

issues_enabled

(optional)

merge_requests_enabled

(optional)

builds_enabled

(optional)

wiki_enabled

(optional)

snippets_enabled

(optional)

public

(optional) - if

visibility_level

(optional)

public_builds

(optional)

(static) updateProjectHook(id, hook_id, payload)

Edit project hook

Source:
See:

PUT /projects/:id/hooks/:hook_id

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

hook_id

(required) - The ID of a project hook

payload object

-

Properties
Name Type Description
url

(required) - The hook URL

push_events
  • Trigger hook on push events
issues_events
  • Trigger hook on issues events
merge_requests_events
  • Trigger hook on merge_requests events
tag_push_events
  • Trigger hook on push_tag events
note_events
  • Trigger hook on note events
enable_ssl_verification
  • Do SSL verification when triggering the hook

(static) updateProjectMember(id, user_id, payload)

Edit project team member

Source:
See:

PUT /projects/:id/members/:user_id

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

user_id

(required) - The ID of a team member

payload object

-

Properties
Name Type Description
access_level

(required) - Project access level

(static) updateProjectRepositoryBranchProtect(id, branch)

Protect single branch

Source:
See:

PUT /projects/:id/repository/branches/:branch/protect

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

branch

(required) - The name of the branch.

(static) updateProjectRepositoryBranchUnprotect(id, branch)

Unprotect single branch

Source:
See:

PUT /projects/:id/repository/branches/:branch/unprotect

Parameters:
Name Type Description
id

(required) - The ID or NAMESPACE/PROJECT_NAME of a project

branch

(required) - The name of the branch.