Package org.gitlab4j.api
Class ProjectApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.ProjectApi
- All Implemented Interfaces:
Constants
This class provides an entry point to all the GitLab API project calls.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a badge to a project.Add a badge to a project.addHook
(Object projectIdOrPath, String url, boolean doPushEvents, boolean doIssuesEvents, boolean doMergeRequestsEvents) Adds a hook to project.addHook
(Object projectIdOrPath, String url, ProjectHook enabledHooks, boolean enableSslVerification, String secretToken) Adds a hook to project.Adds a user to a project team.Adds a user to a project team.addMember
(Object projectIdOrPath, Long userId, AccessLevel accessLevel) Adds a user to a project team.addMember
(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) Adds a user to a project team.approveAccessRequest
(Object projectIdOrPath, Long userId, AccessLevel accessLevel) Approve access for the specified user to the specified project.archiveProject
(Object projectIdOrPath) Archive a projectcreateApprovalRule
(Object projectIdOrPath, ApprovalRuleParams params) Create a project-level approval rule.createForkedFromRelationship
(Object projectIdOrPath, Long forkedFromId) Create a forked from/to relation between existing projects.createProject
(Long namespaceId, String projectName) Create a new project belonging to the namespace ID.createProject
(Long namespaceId, Project project) Create a new project belonging to the namespace ID and project configuration.createProject
(String projectName) Create a new project with the current user's namespace.createProject
(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean isPublic, Integer visibilityLevel, String importUrl) Deprecated.createProject
(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, Boolean printingMergeRequestLinkEnabled, String importUrl) Creates a ProjectcreateProject
(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) Creates a ProjectcreateProject
(String name, String path) Creates a new project owned by the authenticated user.createProject
(Project project) Creates new project owned by the current user.createProject
(Project project, String importUrl) Creates new project owned by the current user.createProjectFromTemplate
(Integer namespaceId, String projectName, Integer groupWithProjectTemplatesId, String templateName, Visibility visibility) Create a new project from a template, belonging to the namespace ID.createPushRules
(Object projectIdOrPath, PushRules pushRule) Adds a push rule to a specified project.createRemoteMirror
(Object projectIdOrPath, String url, Boolean enabled, Boolean onlyProtectedBranches, Boolean keepDivergentRefs) Create a remote mirror for a project.createSnippet
(Object projectIdOrPath, String title, String filename, String description, String content, Visibility visibility) Creates a new project snippet.createVariable
(Object projectIdOrPath, String key, String value, Boolean isProtected) Create a new project variable.createVariable
(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) Create a new project variable.createVariable
(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean isMasked) Create a new project variable.createVariable
(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean isMasked, String environmentScope) Create a new project variable.void
deleteApprovalRule
(Object projectIdOrPath, Long approvalRuleId) Delete the specified the project-level approval rule.void
deleteCustomAttribute
(Object projectIdOrPath, String key) Delete a custom attribute for the specified project.void
deleteForkedFromRelationship
(Object projectIdOrPath) Delete an existing forked from relationship.void
deleteHook
(Object projectIdOrPath, Long hookId) Deletes a hook from the project.void
deleteHook
(ProjectHook hook) Deletes a hook from the project.void
deleteIssue
(Object projectIdOrPath, Long issueId) Deprecated.Will be removed in version 6.0, replaced byIssuesApi.deleteIssue(Object, Long)
void
deleteProject
(Object projectIdOrPath) Removes project with all resources(issues, merge requests etc).void
deletePushRules
(Object projectIdOrPath) Removes a push rule from a project.void
deleteSnippet
(Object projectIdOrPath, Long snippetId) void
deleteVariable
(Object projectIdOrPath, String key) Deletes a project variable.void
denyAccessRequest
(Object projectIdOrPath, Long userId) Deny access for the specified user to the specified project.Edit a badge of a project.Edit a badge of a project.forkProject
(Object projectIdOrPath, Long namespaceId) Forks a project into the user namespace of the authenticated user or the one provided.forkProject
(Object projectIdOrPath, String namespace) Forks a project into the user namespace of the authenticated user or the one provided.forkProject
(Object projectIdOrPath, String namespace, String path, String name) Forks a project into the user namespace of the authenticated user or the one provided.geOptionalCustomAttribute
(Object projectIdOrPath, String key) Get an Optional instance with the value for a single custom attribute for the specified project.getAccessRequests
(Object projectIdOrPath) Get a List of the project access requests viewable by the authenticated user.getAccessRequests
(Object projectIdOrPath, int itemsPerPage) Get a Pager of the project access requests viewable by the authenticated user.getAccessRequestsStream
(Object projectIdOrPath) Get a Stream of the project access requests viewable by the authenticated user.getAllMembers
(Object projectIdOrPath) Gets a list of project members viewable by the authenticated user, including inherited members through ancestor groups.getAllMembers
(Object projectIdOrPath, int itemsPerPage) Gets a Pager of project members viewable by the authenticated user, including inherited members through ancestor groups.getAllMembers
(Object projectIdOrPath, int page, int perPage) Deprecated.Will be removed in version 6.0getAllMembers
(Object projectIdOrPath, String query, List<Long> userIds) Gets a list of project members viewable by the authenticated user, including inherited members through ancestor groups.getAllMembers
(Object projectIdOrPath, String query, List<Long> userIds, int itemsPerPage) Gets a Pager of project members viewable by the authenticated user, including inherited members through ancestor groups.getAllMembersStream
(Object projectIdOrPath) Gets a Stream of project members viewable by the authenticated user, including inherited members through ancestor groups.getAllMembersStream
(Object projectIdOrPath, String query, List<Long> userIds) Gets a Stream of project members viewable by the authenticated user, including inherited members through ancestor groups.getApprovalRules
(Object projectIdOrPath) Get a list of the project-level approval rules.getApprovalRules
(Object projectIdOrPath, int itemsPerPage) Get a Pager of the project-level approval rules.getApprovalRulesStream
(Object projectIdOrPath) Get a Stream of the project-level approval rules.getApprovalsConfiguration
(Object projectIdOrPath) Get the project's approval information.getAuditEvent
(Object projectIdOrPath, Long auditEventId) Get a specific audit event of a project.getAuditEvents
(Object projectIdOrPath, Date created_after, Date created_before) Get a List of the project audit events viewable by Maintainer or an Owner of the group.getAuditEvents
(Object projectIdOrPath, Date created_after, Date created_before, int itemsPerPage) Get a Pager of the group audit events viewable by Maintainer or an Owner of the group.getAuditEventsStream
(Object projectIdOrPath, Date created_after, Date created_before) Get a Stream of the group audit events viewable by Maintainer or an Owner of the group.Gets a badge of a project.Gets a list of a project’s badges and its group badges.Gets a list of a project’s badges and its group badges, case-sensitively filtered on bagdeName if non-null.getCustomAttribute
(Object projectIdOrPath, String key) Get a single custom attribute for the specified project.getCustomAttributes
(Object projectIdOrPath) Get all custom attributes for the specified project.getCustomAttributes
(Object projectIdOrPath, int itemsPerPage) Get a Pager of custom attributes for the specified project.getCustomAttributesStream
(Object projectIdOrPath) Get a Stream of all custom attributes for the specified project.Get a list of projects that were forked from the specified project.Get a Pager of projects that were forked from the specified project.Get a list of projects that were forked from the specified project and in the specified page range.getForksStream
(Object projectIdOrPath) Get a Stream of projects that were forked from the specified project.Get a specific hook for project.Get a list of the project hooks for the specified project.Get Pager of project hooks.Get list of project hooks in the specified page range.getHooksStream
(Object projectIdOrPath) Get a Stream of the project hooks for the specified project.Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssue(Object, Long)
Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object)
Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object, int)
Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object, int, int)
getIssuesStream
(Object projectIdOrPath) Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object)
Gets a project team member.Gets a project team member, optionally including inherited member.Get a list of projects that the authenticated user is a member of.getMemberProjects
(int itemsPerPage) Get a Pager of projects that the authenticated user is a member of.getMemberProjects
(int page, int perPage) Get a list of projects that the authenticated user is a member of in the specified page range.Get a Stream of projects that the authenticated user is a member of.getMembers
(Object projectIdOrPath) Get a list of project team members.getMembers
(Object projectIdOrPath, int itemsPerPage) Get a Pager of project team members.getMembers
(Object projectIdOrPath, int page, int perPage) Get a list of project team members in the specified page range.getMembersStream
(Object projectIdOrPath) Get a Stream of project team members.getOptionalBadge
(Object projectIdOrPath, Long badgeId) Get an Optional instance with the value for the specified badge.getOptionalHook
(Object projectIdOrPath, Long hookId) Get a specific hook for project as an Optional instance.getOptionalMember
(Object projectIdOrPath, Long userId) Gets a project team member.getOptionalMember
(Object projectIdOrPath, Long userId, Boolean includeInherited) Gets a project team member, optionally including inherited member.getOptionalProject
(Object projectIdOrPath) Get an Optional instance with the value for the specific project, which is owned by the authentication user.getOptionalProject
(Object projectIdOrPath, Boolean includeStatistics) Get an Optional instance with the value for the specific project, which is owned by the authentication user.getOptionalProject
(Object projectIdOrPath, Boolean includeStatistics, Boolean includeLicense, Boolean withCustomAttributes) Get an Optional instance with the value for the specific project, which is owned by the authentication user.getOptionalProject
(String namespace, String project) Get an Optional instance with the value for the specific project, which is owned by the authentication user.getOptionalProject
(String namespace, String project, Boolean includeStatistics) Get an Optional instance with the value for the specific project, which is owned by the authentication user.getOptionalProjectStatistics
(Object projectIdOrPath) Get an Optional instance with the value for the project fetch statistics for the last 30 days.getOptionalRawSnippetContent
(Object projectIdOrPath, Long snippetId) Get the raw project snippet plain text as an Optional instance.getOptionalSnippet
(Object projectIdOrPath, Long snippetId) Get a single of project snippet as an Optional instance.getOptionalVariable
(Object projectIdOrPath, String key) Get the details of a variable as an Optional instance.Get a list of projects owned by the authenticated user.getOwnedProjects
(int itemsPerPage) Get a Pager of projects owned by the authenticated user.getOwnedProjects
(int page, int perPage) Get a list of projects owned by the authenticated user in the specified page range.Get a Stream of projects owned by the authenticated user.getProject
(Object projectIdOrPath) Get a specific project, which is owned by the authentication user.getProject
(Object projectIdOrPath, Boolean includeStatistics) Get a specific project, which is owned by the authentication user.getProject
(Object projectIdOrPath, Boolean includeStatistics, Boolean includeLicense, Boolean withCustomAttributes) Get a specific project, which is owned by the authentication user.getProject
(String namespace, String project) Get a specific project, which is owned by the authentication user.getProject
(String namespace, String project, Boolean includeStatistics) Get a specific project, which is owned by the authentication user.getProjectEvents
(Object projectIdOrPath) Get the project events for specific project.getProjectEvents
(Object projectIdOrPath, int itemsPerPage) Get a Pager of project events for specific project.getProjectEvents
(Object projectIdOrPath, int page, int perPage) Get the project events for specific project.getProjectEventsStream
(Object projectIdOrPath) Get a Stream of the project events for specific project.getProjectGroups
(Object projectIdOrPath) Get a list of the ancestor groups for a given project.getProjectGroups
(Object projectIdOrPath, int itemsPerPage) Get a Pager of the ancestor groups for a given project.getProjectGroups
(Object projectIdOrPath, ProjectGroupsFilter filter) Get a list of the ancestor groups for a given project matching the specified filter.getProjectGroups
(Object projectIdOrPath, ProjectGroupsFilter filter, int itemsPerPage) Get a Pager of the ancestor groups for a given project matching the specified filter.getProjectGroupsStream
(Object projectIdOrPath) Get a Stream of the ancestor groups for a given project.getProjectGroupsStream
(Object projectIdOrPath, ProjectGroupsFilter filter) Get a Stream of the ancestor groups for a given project matching the specified filter.getProjectLanguages
(Object projectIdOrPath) Get languages used in a project with percentage value.Get a list of projects accessible by the authenticated user.getProjects
(int itemsPerPage) Get a Pager instance of projects accessible by the authenticated user.getProjects
(int page, int perPage) Get a list of projects accessible by the authenticated user and in the specified page range.getProjects
(Boolean archived, Visibility visibility, String orderBy, String sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics) Deprecated.Will be removed in version 6.0, replaced bygetProjects(Boolean, Visibility, Constants.ProjectOrderBy, Constants.SortOrder, String, Boolean, Boolean, Boolean, Boolean, Boolean)
getProjects
(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics) Get a list of projects accessible by the authenticated user and matching the supplied filter parameters.getProjects
(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int itemsPerPage) Get a Pager of projects accessible by the authenticated user and matching the supplied filter parameters.getProjects
(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int page, int perPage) Get a list of projects accessible by the authenticated user and matching the supplied filter parameters.getProjects
(String search) Get a list of projects accessible by the authenticated user that match the provided search string.getProjects
(String search, int itemsPerPage) Get a Pager of projects accessible by the authenticated user that match the provided search string.getProjects
(String search, int page, int perPage) Get a list of projects accessible by the authenticated user that match the provided search string.getProjects
(ProjectFilter filter) Get a list of all visible projects across GitLab for the authenticated user using the provided filter.getProjects
(ProjectFilter filter, int itemsPerPage) Get a Pager of all visible projects across GitLab for the authenticated user using the provided filter.getProjects
(ProjectFilter filter, int page, int perPage) Get a list of all visible projects across GitLab for the authenticated user in the specified page range using the provided filter.Get a Stream of projects accessible by the authenticated user.getProjectsStream
(String search) Get a Stream of projects accessible by the authenticated user that match the provided search string.getProjectsStream
(ProjectFilter filter) Get a Stream of all visible projects across GitLab for the authenticated user using the provided filter.getProjectStatistics
(Object projectIdOrPath) Get the project fetch statistics for the last 30 days.getProjectUsers
(Object projectIdOrPath) Get a list of project users.getProjectUsers
(Object projectIdOrPath, int itemsPerPage) Get a Pager of project users.getProjectUsers
(Object projectIdOrPath, String search) Get a list of project users matching the specified search string.getProjectUsers
(Object projectIdOrPath, String search, int itemsPerPage) Get a Pager of project users matching the specified search string.getProjectUsersStream
(Object projectIdOrPath) Get a Stream of project users.getProjectUsersStream
(Object projectIdOrPath, String search) Get a Stream of project users matching the specified search string.getPushRules
(Object projectIdOrPath) Get the project's push rules.getRawSnippetContent
(Object projectIdOrPath, Long snippetId) Get the raw project snippet as plain text.getRemoteMirrors
(Object projectIdOrPath) Get all remote mirrors and their statuses for the specified project.getRemoteMirrors
(Object projectIdOrPath, int itemsPerPage) Get a Pager of remote mirrors and their statuses for the specified project.getRemoteMirrorsStream
(Object projectIdOrPath) Get a Stream of all remote mirrors and their statuses for the specified project.getSnippet
(Object projectIdOrPath, Long snippetId) Get a single of project snippet.getSnippets
(Object projectIdOrPath) Get a list of the project snippets.getSnippets
(Object projectIdOrPath, int itemsPerPage) Get a Pager of project's snippets.getSnippets
(Object projectIdOrPath, int page, int perPage) Get a list of project snippets.getSnippetsStream
(Object projectIdOrPath) Get a Stream of the project snippets.Get a list of projects starred by the authenticated user.getStarredProjects
(int itemsPerPage) Get a Pager of projects starred by the authenticated user.getStarredProjects
(int page, int perPage) Get a list of projects starred by the authenticated user in the specified page range.Get a Stream of projects starred by the authenticated user.getUserProjects
(Object userIdOrUsername, ProjectFilter filter) Get a list of visible projects owned by the given user.getUserProjects
(Object userIdOrUsername, ProjectFilter filter, int itemsPerPage) Get a Pager of visible projects owned by the given user.getUserProjects
(Object userIdOrUsername, ProjectFilter filter, int page, int perPage) Get a list of visible projects owned by the given user in the specified page range.getUserProjectsStream
(Object userIdOrUsername, ProjectFilter filter) Get a Stream of visible projects owned by the given user.getVariable
(Object projectIdOrPath, String key) Get the details of a project variable.getVariables
(Object projectIdOrPath) Get list of a project's variables.getVariables
(Object projectIdOrPath, int itemsPerPage) Get a Pager of variables belonging to the specified project.getVariables
(Object projectIdOrPath, int page, int perPage) Get a list of variables for the specified project in the specified page range.getVariablesStream
(Object projectIdOrPath) Get a Stream of variables belonging to the specified project.modifyHook
(ProjectHook hook) Modifies a hook for project.previewBadge
(Object projectIdOrPath, String linkUrl, String imageUrl) Returns how the link_url and image_url final URLs would be after resolving the placeholder interpolation.void
removeBadge
(Object projectIdOrPath, Long badgeId) Remove a badge from a project.void
removeMember
(Object projectIdOrPath, Long userId) Removes user from project team.requestAccess
(Object projectIdOrPath) Requests access for the authenticated user to the specified project.setApprovalsConfiguration
(Object projectIdOrPath, ProjectApprovalsConfig config) Set the project's approvals configuration.setCustomAttribute
(Object projectIdOrPath, String key, String value) Set a custom attribute for the specified project.setProjectAvatar
(Object projectIdOrPath, File avatarFile) Uploads and sets the project avatar for the specified project.void
shareProject
(Object projectIdOrPath, Long groupId, AccessLevel accessLevel, Date expiresAt) Share a project with the specified group.starProject
(Object projectIdOrPath) Star a project.transferProject
(Object projectIdOrPath, String namespace) Transfer a project to a new namespace.void
triggerHousekeeping
(Object projectIdOrPath) Start the Housekeeping task for a project.unarchiveProject
(Object projectIdOrPath) Unarchive a projectvoid
unshareProject
(Object projectIdOrPath, Long groupId) Unshare the project from the group.unstarProject
(Object projectIdOrPath) Unstar a project.updateApprovalRule
(Object projectIdOrPath, Long approvalRuleId, ApprovalRuleParams params) Update the specified the project-level approval rule.updateMember
(Object projectIdOrPath, Long userId, Integer accessLevel) Updates a member of a project.updateMember
(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) Updates a member of a project.updateMember
(Object projectIdOrPath, Long userId, AccessLevel accessLevel) Updates a member of a project.updateMember
(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) Updates a member of a project.updateProject
(Project project) Updates a project.updatePushRules
(Object projectIdOrPath, PushRules pushRule) Updates a push rule for the specified project.updateRemoteMirror
(Object projectIdOrPath, Long mirrorId, Boolean enabled, Boolean onlyProtectedBranches, Boolean keepDivergentRefs) Toggle a remote mirror on or off, or change which types of branches are mirrored.updateSnippet
(Object projectIdOrPath, Long snippetId, String title, String filename, String description, String code, Visibility visibility) Updates an existing project snippet.updateVariable
(Object projectIdOrPath, String key, String value, Boolean isProtected) Update a project variable.updateVariable
(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) Update a project variable.updateVariable
(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean masked) Update a project variable.updateVariable
(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean masked, String environmentScope) Update a project variable.uploadFile
(Object projectIdOrPath, File fileToUpload) Uploads a file to the specified project to be used in an issue or merge request description, or a comment.uploadFile
(Object projectIdOrPath, File fileToUpload, String mediaType) Uploads a file to the specified project to be used in an issue or merge request description, or a comment.uploadFile
(Object projectIdOrPath, InputStream inputStream, String filename, String mediaType) Uploads some data in anInputStream
to the specified project, to be used in an issue or merge request description, or a comment.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
ProjectApi
-
-
Method Details
-
getProjectStatistics
Get the project fetch statistics for the last 30 days. Retrieving the statistics requires write access to the repository. Currently only HTTP fetches statistics are returned. Fetches statistics includes both clones and pulls count and are HTTP only, SSH fetches are not included.GitLab Endpoint: GET /project/:id/statistics
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a ProjectFetches instance with the project fetch statistics for the last 30 days
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getOptionalProjectStatistics
Get an Optional instance with the value for the project fetch statistics for the last 30 days.GitLab Endpoint: GET /project/:id/statistics
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- an Optional instance with the value for the project fetch statistics for the last 30 day
-
getProjects
Get a list of projects accessible by the authenticated user.
WARNING: Do not use this method to fetch projects from https://gitlab.com, gitlab.com has many 100,000's of public projects and it will take hours to fetch all of them. Instead usegetProjects(int itemsPerPage)
which will return a Pager of Project instances.GitLab Endpoint: GET /projects
- Returns:
- a list of projects accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a list of projects accessible by the authenticated user and in the specified page range.GitLab Endpoint: GET /projects
- Parameters:
page
- the page to getperPage
- the number of projects per page- Returns:
- a list of projects accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a Pager instance of projects accessible by the authenticated user.GitLab Endpoint: GET /projects
- Parameters:
itemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager instance of projects accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectsStream
Get a Stream of projects accessible by the authenticated user.GitLab Endpoint: GET /projects
- Returns:
- a Stream of projects accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
@Deprecated public List<Project> getProjects(Boolean archived, Visibility visibility, String orderBy, String sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics) throws GitLabApiException Deprecated.Will be removed in version 6.0, replaced bygetProjects(Boolean, Visibility, Constants.ProjectOrderBy, Constants.SortOrder, String, Boolean, Boolean, Boolean, Boolean, Boolean)
Get a list of projects accessible by the authenticated user and matching the supplied filter parameters. All filter parameters are optional.GitLab Endpoint: GET /projects
- Parameters:
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields, default is created_atsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statistics- Returns:
- a list of projects accessible by the authenticated user and matching the supplied parameters
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
public List<Project> getProjects(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics) throws GitLabApiException Get a list of projects accessible by the authenticated user and matching the supplied filter parameters. All filter parameters are optional.GitLab Endpoint: GET /projects
- Parameters:
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by ID, NAME, PATH, CREATED_AT, UPDATED_AT, or LAST_ACTIVITY_AT fields, default is CREATED_ATsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statistics- Returns:
- a list of projects accessible by the authenticated user and matching the supplied parameters
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
public List<Project> getProjects(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int page, int perPage) throws GitLabApiException Get a list of projects accessible by the authenticated user and matching the supplied filter parameters. All filter parameters are optional.GitLab Endpoint: GET /projects
- Parameters:
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by ID, NAME, PATH, CREATED_AT, UPDATED_AT, or LAST_ACTIVITY_AT fields, default is CREATED_ATsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statisticspage
- the page to getperPage
- the number of projects per page- Returns:
- a list of projects accessible by the authenticated user and matching the supplied parameters
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
public Pager<Project> getProjects(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int itemsPerPage) throws GitLabApiException Get a Pager of projects accessible by the authenticated user and matching the supplied filter parameters. All filter parameters are optional.GitLab Endpoint: GET /projects
- Parameters:
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by ID, NAME, PATH, CREATED_AT, UPDATED_AT, or LAST_ACTIVITY_AT fields, default is CREATED_ATsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statisticsitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of projects accessible by the authenticated user and matching the supplied parameters
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a list of projects accessible by the authenticated user that match the provided search string.GitLab Endpoint: GET /projects?search=search
- Parameters:
search
- the project name search criteria- Returns:
- a list of projects accessible by the authenticated user that match the provided search string
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a list of projects accessible by the authenticated user that match the provided search string.GitLab Endpoint: GET /projects?search=search
- Parameters:
search
- the project name search criteriapage
- the page to getperPage
- the number of projects per page- Returns:
- a list of projects accessible by the authenticated user that match the provided search string
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a Pager of projects accessible by the authenticated user that match the provided search string.GitLab Endpoint: GET /projects?search=search
- Parameters:
search
- the project name search criteriaitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of projects accessible by the authenticated user that match the provided search string
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectsStream
Get a Stream of projects accessible by the authenticated user that match the provided search string.GitLab Endpoint: GET /projects?search=search
- Parameters:
search
- the project name search criteria- Returns:
- a Stream of projects accessible by the authenticated user that match the provided search string
- Throws:
GitLabApiException
- if any exception occurs
-
getMemberProjects
Get a list of projects that the authenticated user is a member of.GitLab Endpoint: GET /projects?membership=true
- Returns:
- a list of projects that the authenticated user is a member of
- Throws:
GitLabApiException
- if any exception occurs
-
getMemberProjects
Get a list of projects that the authenticated user is a member of in the specified page range.GitLab Endpoint: GET /projects?membership=true
- Parameters:
page
- the page to getperPage
- the number of projects per page- Returns:
- a list of projects that the authenticated user is a member of
- Throws:
GitLabApiException
- if any exception occurs
-
getMemberProjects
Get a Pager of projects that the authenticated user is a member of.GitLab Endpoint: GET /projects?membership=true
- Parameters:
itemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager o Project instances that the authenticated user is a member of
- Throws:
GitLabApiException
- if any exception occurs
-
getMemberProjectsStream
Get a Stream of projects that the authenticated user is a member of.GitLab Endpoint: GET /projects?membership=true
- Returns:
- a list of projects that the authenticated user is a member of
- Throws:
GitLabApiException
- if any exception occurs
-
getOwnedProjects
Get a list of projects owned by the authenticated user.GitLab Endpoint: GET /projects?owned=true
- Returns:
- a list of projects owned by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getOwnedProjects
Get a list of projects owned by the authenticated user in the specified page range.GitLab Endpoint: GET /projects?owned=true
- Parameters:
page
- the page to getperPage
- the number of projects per page- Returns:
- a list of projects owned by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getOwnedProjects
Get a Pager of projects owned by the authenticated user.GitLab Endpoint: GET /projects?owned=true
- Parameters:
itemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a list of projects owned by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getOwnedProjectsStream
Get a Stream of projects owned by the authenticated user.GitLab Endpoint: GET /projects?owned=true
- Returns:
- a Stream of projects owned by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getStarredProjects
Get a list of projects starred by the authenticated user.GitLab Endpoint: GET /projects?starred=true
- Returns:
- a list of projects starred by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getStarredProjects
Get a list of projects starred by the authenticated user in the specified page range.GitLab Endpoint: GET /projects?starred=true
- Parameters:
page
- the page to getperPage
- the number of projects per page- Returns:
- a list of projects starred by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getStarredProjects
Get a Pager of projects starred by the authenticated user.GitLab Endpoint: GET /projects?starred=true
- Parameters:
itemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of projects starred by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getStarredProjectsStream
Get a Stream of projects starred by the authenticated user.GitLab Endpoint: GET /projects?starred=true
- Returns:
- a Stream of projects starred by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a list of all visible projects across GitLab for the authenticated user using the provided filter.GitLab Endpoint: GET /projects
- Parameters:
filter
- the ProjectFilter instance holding the filter values for the query- Returns:
- a list of all visible projects across GitLab for the authenticated use
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
public List<Project> getProjects(ProjectFilter filter, int page, int perPage) throws GitLabApiException Get a list of all visible projects across GitLab for the authenticated user in the specified page range using the provided filter.GitLab Endpoint: GET /projects
- Parameters:
filter
- the ProjectFilter instance holding the filter values for the querypage
- the page to getperPage
- the number of projects per page- Returns:
- a list of all visible projects across GitLab for the authenticated use
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a Pager of all visible projects across GitLab for the authenticated user using the provided filter.GitLab Endpoint: GET /projects
- Parameters:
filter
- the ProjectFilter instance holding the filter values for the queryitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of all visible projects across GitLab for the authenticated use
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectsStream
Get a Stream of all visible projects across GitLab for the authenticated user using the provided filter.GitLab Endpoint: GET /projects
- Parameters:
filter
- the ProjectFilter instance holding the filter values for the query- Returns:
- a Stream of all visible projects across GitLab for the authenticated use
- Throws:
GitLabApiException
- if any exception occurs
-
getUserProjects
public List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException Get a list of visible projects owned by the given user.GitLab Endpoint: GET /users/:user_id/projects
- Parameters:
userIdOrUsername
- the user ID, username of the user, or a User instance holding the user ID or usernamefilter
- the ProjectFilter instance holding the filter values for the query- Returns:
- a list of visible projects owned by the given user
- Throws:
GitLabApiException
- if any exception occurs
-
getUserProjects
public List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int page, int perPage) throws GitLabApiException Get a list of visible projects owned by the given user in the specified page range.GitLab Endpoint: GET /users/:user_id/projects
- Parameters:
userIdOrUsername
- the user ID, username of the user, or a User instance holding the user ID or usernamefilter
- the ProjectFilter instance holding the filter values for the querypage
- the page to getperPage
- the number of projects per page- Returns:
- a list of visible projects owned by the given user
- Throws:
GitLabApiException
- if any exception occurs
-
getUserProjects
public Pager<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int itemsPerPage) throws GitLabApiException Get a Pager of visible projects owned by the given user.GitLab Endpoint: GET /users/:user_id/projects
- Parameters:
userIdOrUsername
- the user ID, username of the user, or a User instance holding the user ID or usernamefilter
- the ProjectFilter instance holding the filter values for the queryitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of visible projects owned by the given user
- Throws:
GitLabApiException
- if any exception occurs
-
getUserProjectsStream
public Stream<Project> getUserProjectsStream(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException Get a Stream of visible projects owned by the given user.GitLab Endpoint: GET /users/:user_id/projects
- Parameters:
userIdOrUsername
- the user ID, username of the user, or a User instance holding the user ID or usernamefilter
- the ProjectFilter instance holding the filter values for the query- Returns:
- a Stream of visible projects owned by the given user
- Throws:
GitLabApiException
- if any exception occurs
-
getProject
Get a specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalProject
Get an Optional instance with the value for the specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- an Optional instance with the specified project as a value
-
getProject
public Project getProject(Object projectIdOrPath, Boolean includeStatistics) throws GitLabApiException Get a specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceincludeStatistics
- include project statistics- Returns:
- the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalProject
Get an Optional instance with the value for the specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceincludeStatistics
- include project statistics- Returns:
- an Optional instance with the specified project as a value
-
getProject
public Project getProject(Object projectIdOrPath, Boolean includeStatistics, Boolean includeLicense, Boolean withCustomAttributes) throws GitLabApiException Get a specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceincludeStatistics
- include project statisticsincludeLicense
- include project license datawithCustomAttributes
- include custom attributes in response (admins only)- Returns:
- the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalProject
public Optional<Project> getOptionalProject(Object projectIdOrPath, Boolean includeStatistics, Boolean includeLicense, Boolean withCustomAttributes) Get an Optional instance with the value for the specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceincludeStatistics
- include project statisticsincludeLicense
- include project license datawithCustomAttributes
- include custom attributes in response (admins only)- Returns:
- an Optional instance with the specified project as a value
-
getProject
Get a specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
namespace
- the name of the project namespace or groupproject
- the name of the project to get- Returns:
- the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalProject
Get an Optional instance with the value for the specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
namespace
- the name of the project namespace or groupproject
- the name of the project- Returns:
- an Optional instance with the specified project as a value
-
getProject
public Project getProject(String namespace, String project, Boolean includeStatistics) throws GitLabApiException Get a specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
namespace
- the name of the project namespace or groupproject
- the name of the project to getincludeStatistics
- include project statistics- Returns:
- the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalProject
public Optional<Project> getOptionalProject(String namespace, String project, Boolean includeStatistics) Get an Optional instance with the value for the specific project, which is owned by the authentication user.GitLab Endpoint: GET /projects/:id
- Parameters:
namespace
- the name of the project namespace or groupproject
- the name of the projectincludeStatistics
- include project statistics- Returns:
- an Optional instance with the specified project as a value
-
createProject
Create a new project belonging to the namespace ID. A namespace ID is either a user or group ID.- Parameters:
namespaceId
- the namespace ID to create the project underprojectName
- the name of the project top create- Returns:
- the created project
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
Create a new project belonging to the namespace ID and project configuration. A namespace ID is either a user or group ID.- Parameters:
namespaceId
- the namespace ID to create the project underproject
- the Project instance holding the new project configuration- Returns:
- the created project
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
Create a new project with the current user's namespace.- Parameters:
projectName
- the name of the project top create- Returns:
- the created project
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
Creates a new project owned by the authenticated user.- Parameters:
name
- the name of the project top create. Equals path if not provided.path
- repository name for new project. Generated based on name if not provided (generated lowercased with dashes).- Returns:
- the created project
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
Creates new project owned by the current user.- Parameters:
project
- the Project instance with the configuration for the new project- Returns:
- a Project instance with the newly created project info
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
Creates new project owned by the current user. The following properties on the Project instance are utilized in the creation of the project: name (name or path are required) - new project name path (name or path are required) - new project path defaultBranch (optional) - master by default description (optional) - short project description visibility (optional) - Limit by visibility public, internal, or private visibilityLevel (optional) issuesEnabled (optional) - Enable issues for this project mergeMethod (optional) - Set the merge method used mergeRequestsEnabled (optional) - Enable merge requests for this project wikiEnabled (optional) - Enable wiki for this project snippetsEnabled (optional) - Enable snippets for this project jobsEnabled (optional) - Enable jobs for this project containerRegistryEnabled (optional) - Enable container registry for this project sharedRunnersEnabled (optional) - Enable shared runners for this project publicJobs (optional) - If true, jobs can be viewed by non-project-members onlyAllowMergeIfPipelineSucceeds (optional) - Set whether merge requests can only be merged with successful jobs onlyAllowMergeIfAllDiscussionsAreResolved (optional) - Set whether merge requests can only be merged when all the discussions are resolved lfsEnabled (optional) - Enable LFS requestAccessEnabled (optional) - Allow users to request member access repositoryStorage (optional) - Which storage shard the repository is on. Available only to admins approvalsBeforeMerge (optional) - How many approvers should approve merge request by default printingMergeRequestLinkEnabled (optional) - Show link to create/view merge request when pushing from the command line resolveOutdatedDiffDiscussions (optional) - Automatically resolve merge request diffs discussions on lines changed with a push initialize_with_readme (optional) - Initialize project with README file packagesEnabled (optional) - Enable or disable mvn packages repository feature buildGitStrategy (optional) - set the build git strategy buildCoverageRegex (optional) - set build coverage regex ciConfigPath (optional) - Set path to CI configuration file squashOption (optional) - set squash option for merge requests- Parameters:
project
- the Project instance with the configuration for the new projectimportUrl
- the URL to import the repository from- Returns:
- a Project instance with the newly created project info
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) throws GitLabApiException Creates a Project- Parameters:
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultvisibility
- The visibility of the project, otherwise null indicates to use GitLab defaultvisibilityLevel
- The visibility level of the project, otherwise null indicates to use GitLab defaultimportUrl
- The Import URL for the project, otherwise null- Returns:
- the GitLab Project
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, Boolean printingMergeRequestLinkEnabled, String importUrl) throws GitLabApiException Creates a Project- Parameters:
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultvisibility
- The visibility of the project, otherwise null indicates to use GitLab defaultvisibilityLevel
- The visibility level of the project, otherwise null indicates to use GitLab defaultprintingMergeRequestLinkEnabled
- Show link to create/view merge request when pushing from the command lineimportUrl
- The Import URL for the project, otherwise null- Returns:
- the GitLab Project
- Throws:
GitLabApiException
- if any exception occurs
-
createProject
@Deprecated public Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean isPublic, Integer visibilityLevel, String importUrl) throws GitLabApiException Deprecated.As of release 4.2.0, replaced bycreateProject(String, Long, String, Boolean, Boolean, Boolean, Boolean, Visibility, Integer, String)
Creates a Project- Parameters:
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultisPublic
- Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab defaultvisibilityLevel
- The visibility level of the project, otherwise null indicates to use GitLab defaultimportUrl
- The Import URL for the project, otherwise null- Returns:
- the GitLab Project
- Throws:
GitLabApiException
- if any exception occurs
-
createProjectFromTemplate
public Project createProjectFromTemplate(Integer namespaceId, String projectName, Integer groupWithProjectTemplatesId, String templateName, Visibility visibility) throws GitLabApiException Create a new project from a template, belonging to the namespace ID. A namespace ID is either a user or group ID.- Parameters:
namespaceId
- the namespace ID to create the project underprojectName
- the name of the project top creategroupWithProjectTemplatesId
- Id of the Gitlab Group, which contains the relevant templates.templateName
- name of the template to usevisibility
- Visibility of the new create project- Returns:
- the created project
- Throws:
GitLabApiException
- if any exception occurs
-
updateProject
Updates a project. The following properties on the Project instance are utilized in the edit of the project, null values are not updated: id (required) - existing project id, either id or path must be provided name (optional) - project name path (optional) - project path, either id or path must be provided defaultBranch (optional) - master by default description (optional) - short project description visibility (optional) - Limit by visibility public, internal, or private issuesEnabled (optional) - Enable issues for this project mergeMethod (optional) - Set the merge method used mergeRequestsEnabled (optional) - Enable merge requests for this project wikiEnabled (optional) - Enable wiki for this project snippetsEnabled (optional) - Enable snippets for this project jobsEnabled (optional) - Enable jobs for this project containerRegistryEnabled (optional) - Enable container registry for this project sharedRunnersEnabled (optional) - Enable shared runners for this project publicJobs (optional) - If true, jobs can be viewed by non-project-members onlyAllowMergeIfPipelineSucceeds (optional) - Set whether merge requests can only be merged with successful jobs onlyAllowMergeIfAllDiscussionsAreResolved (optional) - Set whether merge requests can only be merged when all the discussions are resolved lfsEnabled (optional) - Enable LFS requestAccessEnabled (optional) - Allow users to request member access repositoryStorage (optional) - Which storage shard the repository is on. Available only to admins approvalsBeforeMerge (optional) - How many approvers should approve merge request by default printingMergeRequestLinkEnabled (optional) - Show link to create/view merge request when pushing from the command line resolveOutdatedDiffDiscussions (optional) - Automatically resolve merge request diffs discussions on lines changed with a push packagesEnabled (optional) - Enable or disable mvn packages repository feature buildGitStrategy (optional) - set the build git strategy buildCoverageRegex (optional) - set build coverage regex ciConfigPath (optional) - Set path to CI configuration file ciForwardDeploymentEnabled (optional) - When a new deployment job starts, skip older deployment jobs that are still pending squashOption (optional) - set squash option for merge requests NOTE: The following parameters specified by the GitLab API edit project are not supported: import_url tag_list array avatar initialize_with_readme- Parameters:
project
- the Project instance with the configuration for the new project- Returns:
- a Project instance with the newly updated project info
- Throws:
GitLabApiException
- if any exception occurs
-
deleteProject
Removes project with all resources(issues, merge requests etc).GitLab Endpoint: DELETE /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Throws:
GitLabApiException
- if any exception occurs
-
forkProject
Forks a project into the user namespace of the authenticated user or the one provided. The forking operation for a project is asynchronous and is completed in a background job. The request will return immediately.GitLab Endpoint: POST /projects/:id/fork
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancenamespace
- path of the namespace that the project will be forked to- Returns:
- the newly forked Project instance
- Throws:
GitLabApiException
- if any exception occurs
-
forkProject
Forks a project into the user namespace of the authenticated user or the one provided. The forking operation for a project is asynchronous and is completed in a background job. The request will return immediately.GitLab Endpoint: POST /projects/:id/fork
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancenamespaceId
- ID of the namespace that the project will be forked to- Returns:
- the newly forked Project instance
- Throws:
GitLabApiException
- if any exception occurs
-
forkProject
public Project forkProject(Object projectIdOrPath, String namespace, String path, String name) throws GitLabApiException Forks a project into the user namespace of the authenticated user or the one provided. The forking operation for a project is asynchronous and is completed in a background job. The request will return immediately.GitLab Endpoint: POST /projects/:id/fork
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancenamespace
- path of the namespace that the project will be forked topath
- the path that will be assigned to the resultant project after forkingname
- the name that will be assigned to the resultant project after forking- Returns:
- the newly forked Project instance
- Throws:
GitLabApiException
- if any exception occurs
-
createForkedFromRelationship
public Project createForkedFromRelationship(Object projectIdOrPath, Long forkedFromId) throws GitLabApiException Create a forked from/to relation between existing projects.GitLab Endpoint: POST /projects/:id/fork/:forkFromId
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceforkedFromId
- the ID of the project that was forked from- Returns:
- the updated Project instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteForkedFromRelationship
Delete an existing forked from relationship.GitLab Endpoint: DELETE /projects/:id/fork
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Throws:
GitLabApiException
- if any exception occurs
-
getMembers
Get a list of project team members.GitLab Endpoint: GET /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- the members belonging to the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMembers
public List<Member> getMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Get a list of project team members in the specified page range.GitLab Endpoint: GET /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepage
- the page to getperPage
- the number of Member instances per page- Returns:
- the members belonging to the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMembers
Get a Pager of project team members.GitLab Endpoint: GET /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- the members belonging to the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMembersStream
Get a Stream of project team members.GitLab Endpoint: GET /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of the members belonging to the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
Gets a list of project members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the project/group and of one or more ancestor group.GitLab Endpoint: GET /projects/:id/members/all
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- the project members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
@Deprecated public List<Member> getAllMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Deprecated.Will be removed in version 6.0Gets a list of project members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the project/group and of one or more ancestor group.GitLab Endpoint: GET /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepage
- the page to getperPage
- the number of Member instances per page- Returns:
- the project members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
public Pager<Member> getAllMembers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Gets a Pager of project members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the project/group and of one or more ancestor group.GitLab Endpoint: GET /projects/:id/members/all
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of the project members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembersStream
Gets a Stream of project members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the project/group and of one or more ancestor group.GitLab Endpoint: GET /projects/:id/members/all
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of the project members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
public List<Member> getAllMembers(Object projectIdOrPath, String query, List<Long> userIds) throws GitLabApiException Gets a list of project members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the project/group and of one or more ancestor group.GitLab Endpoint: GET /projects/:id/members/all
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancequery
- a query string to search for membersuserIds
- filter the results on the given user IDs- Returns:
- the project members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
public Pager<Member> getAllMembers(Object projectIdOrPath, String query, List<Long> userIds, int itemsPerPage) throws GitLabApiException Gets a Pager of project members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the project/group and of one or more ancestor group.GitLab Endpoint: GET /projects/:id/members/all
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancequery
- a query string to search for membersuserIds
- filter the results on the given user IDsitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of the project members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembersStream
public Stream<Member> getAllMembersStream(Object projectIdOrPath, String query, List<Long> userIds) throws GitLabApiException Gets a Stream of project members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the project/group and of one or more ancestor group.GitLab Endpoint: GET /projects/:id/members/all
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancequery
- a query string to search for membersuserIds
- filter the results on the given user IDs- Returns:
- a Stream of the project members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getMember
Gets a project team member.GitLab Endpoint: GET /projects/:id/members/:user_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member- Returns:
- the member specified by the project ID/user ID pair
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalMember
Gets a project team member.GitLab Endpoint: GET /projects/:id/members/:user_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member- Returns:
- the member specified by the project ID/user ID pair
-
getMember
public Member getMember(Object projectIdOrPath, Long userId, Boolean includeInherited) throws GitLabApiException Gets a project team member, optionally including inherited member.GitLab Endpoint: GET /projects/:id/members/all/:user_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the memberincludeInherited
- if true will the member even if inherited thru an ancestor group- Returns:
- the member specified by the project ID/user ID pair
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalMember
public Optional<Member> getOptionalMember(Object projectIdOrPath, Long userId, Boolean includeInherited) Gets a project team member, optionally including inherited member.GitLab Endpoint: GET /projects/:id/members/all/:user_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the memberincludeInherited
- if true will the member even if inherited thru an ancestor group- Returns:
- the member specified by the project ID/user ID pair as the value of an Optional
-
addMember
public Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException Adds a user to a project team. This is an idempotent method and can be called multiple times with the same parameters. Adding team membership to a user that is already a member does not affect the existing membership.GitLab Endpoint: POST /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, required- Returns:
- the added member
- Throws:
GitLabApiException
- if any exception occurs
-
addMember
public Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException Adds a user to a project team. This is an idempotent method and can be called multiple times with the same parameters. Adding team membership to a user that is already a member does not affect the existing membership.GitLab Endpoint: POST /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, required- Returns:
- the added member
- Throws:
GitLabApiException
- if any exception occurs
-
addMember
public Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException Adds a user to a project team. This is an idempotent method and can be called multiple times with the same parameters. Adding team membership to a user that is already a member does not affect the existing membership.GitLab Endpoint: POST /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member to addaccessLevel
- the access level for the new memberexpiresAt
- the date the membership in the group will expire- Returns:
- the added member
- Throws:
GitLabApiException
- if any exception occurs
-
addMember
public Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException Adds a user to a project team. This is an idempotent method and can be called multiple times with the same parameters. Adding team membership to a user that is already a member does not affect the existing membership.GitLab Endpoint: POST /projects/:id/members
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member to addaccessLevel
- the access level for the new memberexpiresAt
- the date the membership in the group will expire- Returns:
- the added member
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException Updates a member of a project.GitLab Endpoint: PUT /projects/:projectId/members/:userId
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, required- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException Updates a member of a project.GitLab Endpoint: PUT /projects/:projectId/members/:userId
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, required- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException Updates a member of a project.GitLab Endpoint: PUT /projects/:projectId/members/:userId
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredexpiresAt
- the date the membership in the group will expire, optional- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException Updates a member of a project.GitLab Endpoint: PUT /projects/:projectId/members/:userId
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredexpiresAt
- the date the membership in the group will expire, optional- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
removeMember
Removes user from project team.GitLab Endpoint: DELETE /projects/:id/members/:user_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireduserId
- the user ID of the member to remove- Throws:
GitLabApiException
- if any exception occurs
-
getProjectUsers
Get a list of project users. This list includes all project members and all users assigned to project parent groups.GitLab Endpoint: GET /projects/:id/users
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- the users belonging to the specified project and its parent groups
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectUsers
public Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of project users. This Pager includes all project members and all users assigned to project parent groups.GitLab Endpoint: GET /projects/:id/users
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of the users matching the search string and belonging to the specified project and its parent groups
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectUsersStream
Get a Stream of project users. This Stream includes all project members and all users assigned to project parent groups.GitLab Endpoint: GET /projects/:id/users
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of the users belonging to the specified project and its parent groups
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectUsers
public List<ProjectUser> getProjectUsers(Object projectIdOrPath, String search) throws GitLabApiException Get a list of project users matching the specified search string. This list includes all project members and all users assigned to project parent groups.GitLab Endpoint: GET /projects/:id/users
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsearch
- the string to match specific users- Returns:
- the users matching the search string and belonging to the specified project and its parent groups
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectUsers
public Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, String search, int itemsPerPage) throws GitLabApiException Get a Pager of project users matching the specified search string. This Pager includes all project members and all users assigned to project parent groups.GitLab Endpoint: GET /projects/:id/users
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancesearch
- the string to match specific usersitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of the users matching the search string and belonging to the specified project and its parent groups
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectUsersStream
public Stream<ProjectUser> getProjectUsersStream(Object projectIdOrPath, String search) throws GitLabApiException Get a Stream of project users matching the specified search string. This Stream includes all project members and all users assigned to project parent groups.GitLab Endpoint: GET /projects/:id/users
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsearch
- the string to match specific users- Returns:
- a Stream of the users matching the search string and belonging to the specified project and its parent groups
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectGroups
Get a list of the ancestor groups for a given project.GitLab Endpoint: GET /projects/:id/groups
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- the ancestor groups for a given project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectGroups
public Pager<ProjectGroup> getProjectGroups(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of the ancestor groups for a given project.GitLab Endpoint: GET /projects/:id/groups
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of the ancestor groups for a given project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectGroupsStream
public Stream<ProjectGroup> getProjectGroupsStream(Object projectIdOrPath) throws GitLabApiException Get a Stream of the ancestor groups for a given project.GitLab Endpoint: GET /projects/:id/groups
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of the ancestor groups for a given project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectGroups
public List<ProjectGroup> getProjectGroups(Object projectIdOrPath, ProjectGroupsFilter filter) throws GitLabApiException Get a list of the ancestor groups for a given project matching the specified filter.GitLab Endpoint: GET /projects/:id/groups
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredfilter
- the ProjectGroupsFilter to match against- Returns:
- the ancestor groups for a given project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectGroups
public Pager<ProjectGroup> getProjectGroups(Object projectIdOrPath, ProjectGroupsFilter filter, int itemsPerPage) throws GitLabApiException Get a Pager of the ancestor groups for a given project matching the specified filter.GitLab Endpoint: GET /projects/:id/groups
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancefilter
- the ProjectGroupsFilter to match againstitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of the ancestor groups for a given project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectGroupsStream
public Stream<ProjectGroup> getProjectGroupsStream(Object projectIdOrPath, ProjectGroupsFilter filter) throws GitLabApiException Get a Stream of the ancestor groups for a given project matching the specified filter.GitLab Endpoint: GET /projects/:id/groups
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredfilter
- the ProjectGroupsFilter to match against- Returns:
- a Stream of the ancestor groups for a given project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectEvents
Get the project events for specific project. Sorted from newest to latest.GitLab Endpoint: GET /projects/:id/events
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- the project events for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectEvents
public List<Event> getProjectEvents(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Get the project events for specific project. Sorted from newest to latest in the specified page range.GitLab Endpoint: GET /projects/:id/events
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of Event instances per page- Returns:
- the project events for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectEvents
public Pager<Event> getProjectEvents(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of project events for specific project. Sorted from newest to latest.GitLab Endpoint: GET /projects/:id/events
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of project events for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectEventsStream
Get a Stream of the project events for specific project. Sorted from newest to latest.GitLab Endpoint: GET /projects/:id/events
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of the project events for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getHooks
Get a list of the project hooks for the specified project.GitLab Endpoint: GET /projects/:id/hooks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a list of project hooks for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getHooks
public List<ProjectHook> getHooks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Get list of project hooks in the specified page range.GitLab Endpoint: GET /projects/:id/hooks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of ProjectHook instances per page- Returns:
- a list of project hooks for the specified project in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getHooks
public Pager<ProjectHook> getHooks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get Pager of project hooks.GitLab Endpoint: GET /projects/:id/hooks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of project hooks for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getHooksStream
Get a Stream of the project hooks for the specified project.GitLab Endpoint: GET /projects/:id/hooks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of project hooks for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getHook
Get a specific hook for project.GitLab Endpoint: GET /projects/:id/hooks/:hook_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredhookId
- the ID of the hook to get- Returns:
- the project hook for the specified project ID/hook ID pair
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalHook
Get a specific hook for project as an Optional instance.GitLab Endpoint: GET /projects/:id/hooks/:hook_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredhookId
- the ID of the hook to get- Returns:
- the project hook for the specified project ID/hook ID pair as an Optional instance
-
addHook
public ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabledHooks, boolean enableSslVerification, String secretToken) throws GitLabApiException Adds a hook to project.GitLab Endpoint: POST /projects/:id/hooks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredurl
- the callback URL for the hookenabledHooks
- a ProjectHook instance specifying which hooks to enableenableSslVerification
- enable SSL verificationsecretToken
- the secret token to pass back to the hook- Returns:
- the added ProjectHook instance
- Throws:
GitLabApiException
- if any exception occurs
-
addHook
public ProjectHook addHook(Object projectIdOrPath, String url, boolean doPushEvents, boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException Adds a hook to project.GitLab Endpoint: POST /projects/:id/hooks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredurl
- the callback URL for the hookdoPushEvents
- flag specifying whether to do push eventsdoIssuesEvents
- flag specifying whether to do issues eventsdoMergeRequestsEvents
- flag specifying whether to do merge requests events- Returns:
- the added ProjectHook instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteHook
Deletes a hook from the project.GitLab Endpoint: DELETE /projects/:id/hooks/:hook_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredhookId
- the project hook ID to delete- Throws:
GitLabApiException
- if any exception occurs
-
deleteHook
Deletes a hook from the project.GitLab Endpoint: DELETE /projects/:id/hooks/:hook_id
- Parameters:
hook
- the ProjectHook instance to remove- Throws:
GitLabApiException
- if any exception occurs
-
modifyHook
Modifies a hook for project.GitLab Endpoint: PUT /projects/:id/hooks/:hook_id
- Parameters:
hook
- the ProjectHook instance that contains the project hook info to modify- Returns:
- the modified project hook
- Throws:
GitLabApiException
- if any exception occurs
-
getIssues
Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object)
Get a list of the project's issues.GitLab Endpoint: GET /projects/:id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a list of project's issues
- Throws:
GitLabApiException
- if any exception occurs
-
getIssues
@Deprecated public List<Issue> getIssues(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object, int, int)
Get a list of project's issues using the specified page and per page settings.GitLab Endpoint: GET /projects/:id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of issues per page- Returns:
- the list of issues in the specified range
- Throws:
GitLabApiException
- if any exception occurs
-
getIssues
@Deprecated public Pager<Issue> getIssues(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object, int)
Get a Pager of project's issues.GitLab Endpoint: GET /projects/:id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of issues per page- Returns:
- the list of issues in the specified range
- Throws:
GitLabApiException
- if any exception occurs
-
getIssuesStream
Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssues(Object)
Get a Stream of the project's issues.GitLab Endpoint: GET /projects/:id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of the project's issues
- Throws:
GitLabApiException
- if any exception occurs
-
getIssue
Deprecated.Will be removed in version 6.0, replaced byIssuesApi.getIssue(Object, Long)
Get a single project issue.GitLab Endpoint: GET /projects/:id/issues/:issue_iid
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredissueId
- the internal ID of a project's issue- Returns:
- the specified Issue instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteIssue
Deprecated.Will be removed in version 6.0, replaced byIssuesApi.deleteIssue(Object, Long)
Delete a project issue.GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredissueId
- the internal ID of a project's issue- Throws:
GitLabApiException
- if any exception occurs
-
getSnippets
Get a list of the project snippets.GitLab Endpoint: GET /projects/:id/snippets
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a list of the project's snippets
- Throws:
GitLabApiException
- if any exception occurs
-
getSnippets
public List<Snippet> getSnippets(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Get a list of project snippets.GitLab Endpoint: GET /projects/:id/snippets
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of snippets per page- Returns:
- a list of project's snippets for the specified range
- Throws:
GitLabApiException
- if any exception occurs
-
getSnippets
public Pager<Snippet> getSnippets(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of project's snippets.GitLab Endpoint: GET /projects/:id/snippets
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of snippets per page- Returns:
- the Pager of snippets
- Throws:
GitLabApiException
- if any exception occurs
-
getSnippetsStream
Get a Stream of the project snippets.GitLab Endpoint: GET /projects/:id/snippets
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of the project's snippets
- Throws:
GitLabApiException
- if any exception occurs
-
getSnippet
Get a single of project snippet.GitLab Endpoint: GET /projects/:id/snippets/:snippet_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippet- Returns:
- the specified project Snippet
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalSnippet
Get a single of project snippet as an Optional instance.GitLab Endpoint: GET /projects/:id/snippets/:snippet_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippet- Returns:
- the specified project Snippet as an Optional instance
-
createSnippet
public Snippet createSnippet(Object projectIdOrPath, String title, String filename, String description, String content, Visibility visibility) throws GitLabApiException Creates a new project snippet. The user must have permission to create new snippets.GitLab Endpoint: POST /projects/:id/snippets
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredtitle
- the title of a snippet, requiredfilename
- the name of a snippet file, requireddescription
- the description of a snippet, optionalcontent
- the content of a snippet, requiredvisibility
- the snippet's visibility, required- Returns:
- a Snippet instance with info on the created snippet
- Throws:
GitLabApiException
- if any exception occurs
-
updateSnippet
public Snippet updateSnippet(Object projectIdOrPath, Long snippetId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException Updates an existing project snippet. The user must have permission to change an existing snippet.GitLab Endpoint: PUT /projects/:id/snippets/:snippet_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of a project's snippet, requiredtitle
- the title of a snippet, optionalfilename
- the name of a snippet file, optionaldescription
- the description of a snippet, optioptionalonalcode
- the content of a snippet, optionalvisibility
- the snippet's visibility, reqoptionaluired- Returns:
- a Snippet instance with info on the updated snippet
- Throws:
GitLabApiException
- if any exception occurs
-
deleteSnippet
- Throws:
GitLabApiException
-
getRawSnippetContent
public String getRawSnippetContent(Object projectIdOrPath, Long snippetId) throws GitLabApiException Get the raw project snippet as plain text.GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippet- Returns:
- the raw project snippet plain text as an Optional instance
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalRawSnippetContent
Get the raw project snippet plain text as an Optional instance.GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippet- Returns:
- the raw project snippet plain text as an Optional instance
-
archiveProject
Archive a projectGitLab Endpoint: POST /projects/:id/archive
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- the archived GitLab Project
- Throws:
GitLabApiException
- if any exception occurs
-
unarchiveProject
Unarchive a projectGitLab Endpoint: POST /projects/:id/unarchive
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- the unarchived GitLab Project
- Throws:
GitLabApiException
- if any exception occurs
-
uploadFile
Uploads a file to the specified project to be used in an issue or merge request description, or a comment.GitLab Endpoint: POST /projects/:id/uploads
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredfileToUpload
- the File instance of the file to upload, required- Returns:
- a FileUpload instance with information on the just uploaded file
- Throws:
GitLabApiException
- if any exception occurs
-
uploadFile
public FileUpload uploadFile(Object projectIdOrPath, File fileToUpload, String mediaType) throws GitLabApiException Uploads a file to the specified project to be used in an issue or merge request description, or a comment.GitLab Endpoint: POST /projects/:id/uploads
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredfileToUpload
- the File instance of the file to upload, requiredmediaType
- unused; will be removed in the next major version- Returns:
- a FileUpload instance with information on the just uploaded file
- Throws:
GitLabApiException
- if any exception occurs
-
uploadFile
public FileUpload uploadFile(Object projectIdOrPath, InputStream inputStream, String filename, String mediaType) throws GitLabApiException Uploads some data in anInputStream
to the specified project, to be used in an issue or merge request description, or a comment.GitLab Endpoint: POST /projects/:id/uploads
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredinputStream
- the data to upload, requiredfilename
- The filename of the file to uploadmediaType
- unused; will be removed in the next major version- Returns:
- a FileUpload instance with information on the just uploaded file
- Throws:
GitLabApiException
- if any exception occurs
-
getPushRules
Get the project's push rules.GitLab Endpoint: GET /projects/:id/push_rule
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- the push rules for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
createPushRules
public PushRules createPushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException Adds a push rule to a specified project.
The following properties on the PushRules instance are utilized in the creation of the push rule:GitLab Endpoint: POST /projects/:id/push_rule
denyDeleteTag (optional) - Deny deleting a tag memberCheck (optional) - Restrict commits by author (email) to existing GitLab users preventSecrets (optional) - GitLab will reject any files that are likely to contain secrets commitMessageRegex (optional) - All commit messages must match this, e.g. Fixed \d+\..* commitMessageNegativeRegex (optional) - No commit message is allowed to match this, e.g. ssh\:\/\/ branchNameRegex (optional) - All branch names must match this, e.g. `(feature authorEmailRegex (optional) - All commit author emails must match this, e.g. @my-company.com$ fileNameRegex (optional) - All committed filenames must not match this, e.g. `(jar maxFileSize (optional) - Maximum file size (MB) commitCommitterCheck (optional) - Users can only push commits to this repository that were committed with one of their own verified emails. rejectUnsignedCommits (optional) - Reject commit when it is not signed through GPG
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpushRule
- the PushRule instance containing the push rule configuration to add- Returns:
- a PushRules instance with the newly created push rule info
- Throws:
GitLabApiException
- if any exception occurs
-
updatePushRules
public PushRules updatePushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException Updates a push rule for the specified project.
The following properties on the PushRules instance are utilized when updating the push rule:GitLab Endpoint: PUT /projects/:id/push_rule/:push_rule_id
denyDeleteTag (optional) - Deny deleting a tag memberCheck (optional) - Restrict commits by author (email) to existing GitLab users preventSecrets (optional) - GitLab will reject any files that are likely to contain secrets commitMessageRegex (optional) - All commit messages must match this, e.g. Fixed \d+\..* commitMessageNegativeRegex (optional) - No commit message is allowed to match this, e.g. ssh\:\/\/ branchNameRegex (optional) - All branch names must match this, e.g. `(feature authorEmailRegex (optional) - All commit author emails must match this, e.g. @my-company.com$ fileNameRegex (optional) - All committed filenames must not match this, e.g. `(jar maxFileSize (optional) - Maximum file size (MB) commitCommitterCheck (optional) - Users can only push commits to this repository that were committed with one of their own verified emails. rejectUnsignedCommits (optional) - Reject commit when it is not signed through GPG
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpushRule
- the PushRules instance containing the push rule configuration to update- Returns:
- a PushRules instance with the newly created push rule info
- Throws:
GitLabApiException
- if any exception occurs
-
deletePushRules
Removes a push rule from a project. This is an idempotent method and can be called multiple times. Either the push rule is available or not.GitLab Endpoint: DELETE /projects/:id/push_rule
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Throws:
GitLabApiException
- if any exception occurs
-
getForks
Get a list of projects that were forked from the specified project.GitLab Endpoint: GET /projects/:id/forks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a List of forked projects
- Throws:
GitLabApiException
- if any exception occurs
-
getForks
public List<Project> getForks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Get a list of projects that were forked from the specified project and in the specified page range.GitLab Endpoint: GET /projects/:id/forks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of projects per page- Returns:
- a List of forked projects
- Throws:
GitLabApiException
- if any exception occurs
-
getForks
Get a Pager of projects that were forked from the specified project.GitLab Endpoint: GET /projects/:id/forks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of projects
- Throws:
GitLabApiException
- if any exception occurs
-
getForksStream
Get a Stream of projects that were forked from the specified project.GitLab Endpoint: GET /projects/:id/forks
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of forked projects
- Throws:
GitLabApiException
- if any exception occurs
-
starProject
Star a project.GitLab Endpoint: POST /projects/:id/star
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a Project instance with the new project info
- Throws:
GitLabApiException
- if any exception occurs
-
unstarProject
Unstar a project.GitLab Endpoint: POST /projects/:id/unstar
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a Project instance with the new project info
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectLanguages
Get languages used in a project with percentage value.GitLab Endpoint: GET /projects/:id/languages
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Map instance with the language as the key and the percentage as the value
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.8
-
transferProject
Transfer a project to a new namespace. This was added in GitLab 11.1GitLab Endpoint: PUT /projects/:id/transfer.
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requirednamespace
- the namespace to transfer the project to- Returns:
- the updated Project
- Throws:
GitLabApiException
- if any exception occurs
-
setProjectAvatar
Uploads and sets the project avatar for the specified project.GitLab Endpoint: PUT /projects/:id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredavatarFile
- the File instance of the avatar file to upload- Returns:
- the updated Project instance
- Throws:
GitLabApiException
- if any exception occurs
-
getAuditEvents
public List<AuditEvent> getAuditEvents(Object projectIdOrPath, Date created_after, Date created_before) throws GitLabApiException Get a List of the project audit events viewable by Maintainer or an Owner of the group.GET /projects/:id/audit_events
- Parameters:
projectIdOrPath
- the project ID, path of the project, or a project instance holding the project ID or pathcreated_after
- Project audit events created on or after the given time.created_before
- Project audit events created on or before the given time.- Returns:
- a List of project Audit events
- Throws:
GitLabApiException
- if any exception occurs
-
getAuditEvents
public Pager<AuditEvent> getAuditEvents(Object projectIdOrPath, Date created_after, Date created_before, int itemsPerPage) throws GitLabApiException Get a Pager of the group audit events viewable by Maintainer or an Owner of the group.GET /projects/:id/audit_events
- Parameters:
projectIdOrPath
- the project ID, path of the project, or a Project instance holding the project ID or pathcreated_after
- Project audit events created on or after the given time.created_before
- Project audit events created on or before the given time.itemsPerPage
- the number of Audit Event instances that will be fetched per page- Returns:
- a Pager of project Audit events
- Throws:
GitLabApiException
- if any exception occurs
-
getAuditEventsStream
public Stream<AuditEvent> getAuditEventsStream(Object projectIdOrPath, Date created_after, Date created_before) throws GitLabApiException Get a Stream of the group audit events viewable by Maintainer or an Owner of the group.GET /projects/:id/audit_events
- Parameters:
projectIdOrPath
- the project ID, path of the project, or a Project instance holding the project ID or pathcreated_after
- Project audit events created on or after the given time.created_before
- Project audit events created on or before the given time.- Returns:
- a Stream of project Audit events
- Throws:
GitLabApiException
- if any exception occurs
-
getAuditEvent
public AuditEvent getAuditEvent(Object projectIdOrPath, Long auditEventId) throws GitLabApiException Get a specific audit event of a project.GitLab Endpoint: GET /projects/:id/audit_events/:id_audit_event
- Parameters:
projectIdOrPath
- the project ID, path of the project, or a Project instance holding the project ID or pathauditEventId
- the auditEventId, required- Returns:
- the project Audit event
- Throws:
GitLabApiException
- if any exception occurs
-
getVariables
Get list of a project's variables.GitLab Endpoint: GET /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a list of variables belonging to the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getVariables
public List<Variable> getVariables(Object projectIdOrPath, int page, int perPage) throws GitLabApiException Get a list of variables for the specified project in the specified page range.GitLab Endpoint: GET /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpage
- the page to getperPage
- the number of Variable instances per page- Returns:
- a list of variables belonging to the specified project in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getVariables
public Pager<Variable> getVariables(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of variables belonging to the specified project.GitLab Endpoint: GET /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of Variable instances that will be fetched per page- Returns:
- a Pager of variables belonging to the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getVariablesStream
Get a Stream of variables belonging to the specified project.GitLab Endpoint: GET /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, required- Returns:
- a Stream of variables belonging to the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getVariable
Get the details of a project variable.GitLab Endpoint: GET /projects/:id/variables/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, required- Returns:
- the Variable instance for the specified variable
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalVariable
Get the details of a variable as an Optional instance.GitLab Endpoint: GET /projects/:id/variables/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, required- Returns:
- the Variable for the specified variable as an Optional instance
-
createVariable
public Variable createVariable(Object projectIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException Create a new project variable.GitLab Endpoint: POST /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, requiredvalue
- the value for the variable, requiredisProtected
- whether the variable is protected, optional- Returns:
- a Variable instance with the newly created variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
createVariable
public Variable createVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException Create a new project variable.NOTE: Setting the environmentScope is only available on GitLab EE.
GitLab Endpoint: POST /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, requiredvalue
- the value for the variable, requiredisProtected
- whether the variable is protected, optionalenvironmentScope
- the environment_scope of the variable, optional- Returns:
- a Variable instance with the newly created variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
createVariable
public Variable createVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean isMasked) throws GitLabApiException Create a new project variable.NOTE: Setting the environmentScope is only available on GitLab EE.
GitLab Endpoint: POST /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, requiredvalue
- the value for the variable, requiredvariableType
- the type of variable. Available types are: env_var (default) and fileisProtected
- whether the variable is protected, optionalisMasked
- whether the variable is masked, optional- Returns:
- a Variable instance with the newly created variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
createVariable
public Variable createVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean isMasked, String environmentScope) throws GitLabApiException Create a new project variable.NOTE: Setting the environmentScope is only available on GitLab EE.
GitLab Endpoint: POST /projects/:id/variables
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, requiredvalue
- the value for the variable, requiredvariableType
- the type of variable. Available types are: env_var (default) and fileisProtected
- whether the variable is protected, optionalisMasked
- whether the variable is masked, optionalenvironmentScope
- the environment_scope of the variable, optional- Returns:
- a Variable instance with the newly created variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
updateVariable
public Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException Update a project variable.GitLab Endpoint: PUT /projects/:id/variables/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, requiredvalue
- the value for the variable, requiredisProtected
- whether the variable is protected, optional- Returns:
- a Variable instance with the updated variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
updateVariable
public Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException Update a project variable.NOTE: Updating the environmentScope is only available on GitLab EE.
GitLab Endpoint: PUT /projects/:id/variables/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, requiredvalue
- the value for the variable, requiredisProtected
- whether the variable is protected, optionalenvironmentScope
- the environment_scope of the variable, optional.- Returns:
- a Variable instance with the updated variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
updateVariable
public Variable updateVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean masked) throws GitLabApiException Update a project variable.NOTE: Updating the environmentScope is only available on GitLab EE.
GitLab Endpoint: PUT /projects/:id/variables/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, requiredvalue
- the value for the variable, requiredvariableType
- the type of variable. Available types are: env_var (default) and fileisProtected
- whether the variable is protected, optionalmasked
- whether the variable is masked, optional- Returns:
- a Variable instance with the updated variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
updateVariable
public Variable updateVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean masked, String environmentScope) throws GitLabApiException Update a project variable.NOTE: Updating the environmentScope is only available on GitLab EE.
GitLab Endpoint: PUT /projects/:id/variables/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, requiredvalue
- the value for the variable, requiredvariableType
- the type of variable. Available types are: env_var (default) and fileisProtected
- whether the variable is protected, optionalmasked
- whether the variable is masked, optionalenvironmentScope
- the environment_scope of the variable, optional.- Returns:
- a Variable instance with the updated variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
deleteVariable
Deletes a project variable.GitLab Endpoint: DELETE /projects/:id/variables/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, required- Throws:
GitLabApiException
- if any exception occurs
-
getAccessRequests
Get a List of the project access requests viewable by the authenticated user.GitLab Endpoint: GET /projects/:id/access_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a List of project AccessRequest instances accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getAccessRequests
public Pager<AccessRequest> getAccessRequests(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of the project access requests viewable by the authenticated user.GitLab Endpoint: GET /projects/:id/access_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of AccessRequest instances that will be fetched per page- Returns:
- a Pager of project AccessRequest instances accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getAccessRequestsStream
public Stream<AccessRequest> getAccessRequestsStream(Object projectIdOrPath) throws GitLabApiException Get a Stream of the project access requests viewable by the authenticated user.GitLab Endpoint: GET /projects/:id/access_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of project AccessRequest instances accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
requestAccess
Requests access for the authenticated user to the specified project.GitLab Endpoint: POST /projects/:id/access_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- the created AccessRequest instance
- Throws:
GitLabApiException
- if any exception occurs
-
approveAccessRequest
public AccessRequest approveAccessRequest(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException Approve access for the specified user to the specified project.GitLab Endpoint: PUT /projects/:id/access_requests/:user_id/approve
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID to approve access foraccessLevel
- the access level the user is approved for, if null will be developer (30)- Returns:
- the approved AccessRequest instance
- Throws:
GitLabApiException
- if any exception occurs
-
denyAccessRequest
Deny access for the specified user to the specified project.GitLab Endpoint: DELETE /projects/:id/access_requests/:user_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID to deny access for- Throws:
GitLabApiException
- if any exception occurs
-
triggerHousekeeping
Start the Housekeeping task for a project.GitLab Endpoint: POST /projects/:id/housekeeping
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Throws:
GitLabApiException
- if any exception occurs
-
getBadges
Gets a list of a project’s badges and its group badges.GitLab Endpoint: GET /projects/:id/badges
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a List of Badge instances for the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getBadges
Gets a list of a project’s badges and its group badges, case-sensitively filtered on bagdeName if non-null.GitLab Endpoint: GET /projects/:id/badges?name=:name
- Parameters:
projectIdOrPath
- the project in the form of a Long(ID), String(path), or Project instancebagdeName
- The name to filter on (case-sensitive), ignored if null.- Returns:
- All badges of the GitLab item, case insensitively filtered on name.
- Throws:
GitLabApiException
- If any problem is encountered
-
getBadge
Gets a badge of a project.GitLab Endpoint: GET /projects/:id/badges/:badge_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to get- Returns:
- a Badge instance for the specified project/badge ID pair
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalBadge
Get an Optional instance with the value for the specified badge.GitLab Endpoint: GET /projects/:id/badges/:badge_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to get- Returns:
- an Optional instance with the specified badge as the value
-
addBadge
public Badge addBadge(Object projectIdOrPath, String linkUrl, String imageUrl) throws GitLabApiException Add a badge to a project.GitLab Endpoint: POST /projects/:id/badges
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancelinkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- a Badge instance for the added badge
- Throws:
GitLabApiException
- if any exception occurs
-
addBadge
public Badge addBadge(Object projectIdOrPath, String name, String linkUrl, String imageUrl) throws GitLabApiException Add a badge to a project.GitLab Endpoint: POST /projects/:id/badges
- Parameters:
projectIdOrPath
- the project in the form of a Long(ID), String(path), or Project instancename
- The name to give the badge (may be null)linkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- A Badge instance for the added badge
- Throws:
GitLabApiException
- if any exception occurs
-
editBadge
public Badge editBadge(Object projectIdOrPath, Long badgeId, String linkUrl, String imageUrl) throws GitLabApiException Edit a badge of a project.GitLab Endpoint: PUT /projects/:id/badges
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to getlinkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- a Badge instance for the editted badge
- Throws:
GitLabApiException
- if any exception occurs
-
editBadge
public Badge editBadge(Object projectIdOrPath, Long badgeId, String name, String linkUrl, String imageUrl) throws GitLabApiException Edit a badge of a project.GitLab Endpoint: PUT /projects/:id/badges
- Parameters:
projectIdOrPath
- the project in the form of a Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to editname
- The name of the badge to edit (may be null)linkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- a Badge instance for the editted badge
- Throws:
GitLabApiException
- if any exception occurs
-
removeBadge
Remove a badge from a project.GitLab Endpoint: DELETE /projects/:id/badges/:badge_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to remove- Throws:
GitLabApiException
- if any exception occurs
-
previewBadge
public Badge previewBadge(Object projectIdOrPath, String linkUrl, String imageUrl) throws GitLabApiException Returns how the link_url and image_url final URLs would be after resolving the placeholder interpolation.GitLab Endpoint: GET /projects/:id/badges/render
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancelinkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- a Badge instance for the rendered badge
- Throws:
GitLabApiException
- if any exception occurs
-
getApprovalsConfiguration
public ProjectApprovalsConfig getApprovalsConfiguration(Object projectIdOrPath) throws GitLabApiException Get the project's approval information. Note: This API endpoint is only available on 10.6 Starter and above.GitLab Endpoint: GET /projects/:id/approvals
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a ProjectApprovalsConfig instance with the project's approvals configuration
- Throws:
GitLabApiException
- if any exception occurs
-
setApprovalsConfiguration
public ProjectApprovalsConfig setApprovalsConfiguration(Object projectIdOrPath, ProjectApprovalsConfig config) throws GitLabApiException Set the project's approvals configuration. Note: This API endpoint is only available on 10.6 Starter and above.GitLab Endpoint: POST /projects/:id/approvals
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceconfig
- a ProjectApprovalsConfig instance with the approval configuration- Returns:
- a ProjectApprovalsConfig instance with the project's approvals configuration
- Throws:
GitLabApiException
- if any exception occurs
-
getApprovalRules
Get a list of the project-level approval rules. Note: This API endpoint is only available on 12.3 Starter and above.GitLab Endpoint: GET /projects/:id/approval_rules
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a List of ApprovalRuke instances for the specified project.
- Throws:
GitLabApiException
- if any exception occurs
-
getApprovalRules
public Pager<ApprovalRule> getApprovalRules(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of the project-level approval rules. Note: This API endpoint is only available on 12.3 Starter and above.GitLab Endpoint: GET /projects/:id/approval_rules
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of ApprovalRule instances that will be fetched per page- Returns:
- a Pager of ApprovalRuke instances for the specified project.
- Throws:
GitLabApiException
- if any exception occurs
-
getApprovalRulesStream
public Stream<ApprovalRule> getApprovalRulesStream(Object projectIdOrPath) throws GitLabApiException Get a Stream of the project-level approval rules. Note: This API endpoint is only available on 12.3 Starter and above.GitLab Endpoint: GET /projects/:id/approval_rules
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of ApprovalRule instances for the specified project.
- Throws:
GitLabApiException
- if any exception occurs
-
createApprovalRule
public ApprovalRule createApprovalRule(Object projectIdOrPath, ApprovalRuleParams params) throws GitLabApiException Create a project-level approval rule. Note: This API endpoint is only available on 12.3 Starter and above.GitLab Endpoint: POST /projects/:id/approval_rules
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceparams
- the ApprovalRuleParams instance holding the parameters for the approval rule- Returns:
- a ApprovalRule instance with approval configuration
- Throws:
GitLabApiException
- if any exception occurs
-
updateApprovalRule
public ApprovalRule updateApprovalRule(Object projectIdOrPath, Long approvalRuleId, ApprovalRuleParams params) throws GitLabApiException Update the specified the project-level approval rule. Note: This API endpoint is only available on 12.3 Starter and above.GitLab Endpoint: PUT /projects/:id/approval_rules/:approval_rule_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceapprovalRuleId
- the ID of the approval ruleparams
- the ApprovalRuleParams instance holding the parameters for the approval rule update- Returns:
- a ApprovalRule instance with approval configuration
- Throws:
GitLabApiException
- if any exception occurs
-
deleteApprovalRule
public void deleteApprovalRule(Object projectIdOrPath, Long approvalRuleId) throws GitLabApiException Delete the specified the project-level approval rule. Note: This API endpoint is only available on 12.3 Starter and above.GitLab Endpoint: DELETE /projects/:id/approval_rules/:approval_rule_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceapprovalRuleId
- the ID of the approval rule- Throws:
GitLabApiException
- if any exception occurs
-
getCustomAttributes
Get all custom attributes for the specified project.GitLab Endpoint: GET /projects/:id/custom_attributes
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a list of project's CustomAttributes
- Throws:
GitLabApiException
- if any exception occurs
-
getCustomAttributes
public Pager<CustomAttribute> getCustomAttributes(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of custom attributes for the specified project.GitLab Endpoint: GET /projects/:id/custom_attributes
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of items per page- Returns:
- a Pager of project's custom attributes
- Throws:
GitLabApiException
- if any exception occurs
-
getCustomAttributesStream
public Stream<CustomAttribute> getCustomAttributesStream(Object projectIdOrPath) throws GitLabApiException Get a Stream of all custom attributes for the specified project.GitLab Endpoint: GET /projects/:id/custom_attributes
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of project's custom attributes
- Throws:
GitLabApiException
- if any exception occurs
-
getCustomAttribute
public CustomAttribute getCustomAttribute(Object projectIdOrPath, String key) throws GitLabApiException Get a single custom attribute for the specified project.GitLab Endpoint: GET /projects/:id/custom_attributes/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancekey
- the key for the custom attribute- Returns:
- a CustomAttribute instance for the specified key
- Throws:
GitLabApiException
- if any exception occurs
-
geOptionalCustomAttribute
Get an Optional instance with the value for a single custom attribute for the specified project.GitLab Endpoint: GET /projects/:id/custom_attributes/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key for the custom attribute, required- Returns:
- an Optional instance with the value for a single custom attribute for the specified project
-
setCustomAttribute
public CustomAttribute setCustomAttribute(Object projectIdOrPath, String key, String value) throws GitLabApiException Set a custom attribute for the specified project. The attribute will be updated if it already exists, or newly created otherwise.GitLab Endpoint: PUT /projects/:id/custom_attributes/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancekey
- the key for the custom attributevalue
- the value for the customAttribute- Returns:
- a CustomAttribute instance for the updated or created custom attribute
- Throws:
GitLabApiException
- if any exception occurs
-
deleteCustomAttribute
Delete a custom attribute for the specified project.GitLab Endpoint: DELETE /projects/:id/custom_attributes/:key
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancekey
- the key of the custom attribute to delete- Throws:
GitLabApiException
- if any exception occurs
-
getRemoteMirrors
Get all remote mirrors and their statuses for the specified project.GitLab Endpoint: GET /projects/:id/remote_mirrors
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a list of project's remote mirrors
- Throws:
GitLabApiException
- if any exception occurs
-
getRemoteMirrors
public Pager<RemoteMirror> getRemoteMirrors(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException Get a Pager of remote mirrors and their statuses for the specified project.GitLab Endpoint: GET /projects/:id/remote_mirrors
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of items per page- Returns:
- a Pager of project's remote mirrors
- Throws:
GitLabApiException
- if any exception occurs
-
getRemoteMirrorsStream
public Stream<RemoteMirror> getRemoteMirrorsStream(Object projectIdOrPath) throws GitLabApiException Get a Stream of all remote mirrors and their statuses for the specified project.GitLab Endpoint: GET /projects/:id/remote_mirrors
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of project's remote mirrors
- Throws:
GitLabApiException
- if any exception occurs
-
createRemoteMirror
public RemoteMirror createRemoteMirror(Object projectIdOrPath, String url, Boolean enabled, Boolean onlyProtectedBranches, Boolean keepDivergentRefs) throws GitLabApiException Create a remote mirror for a project.GitLab Endpoint: POST /projects/:id/remote_mirrors
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceurl
- the URL of the remote repository to be mirroredenabled
- determines if the mirror is enabledonlyProtectedBranches
- determines if only protected branches are mirroredkeepDivergentRefs
- determines if divergent refs are skipped- Returns:
- a RemoteMirror instance with remote mirror configuration
- Throws:
GitLabApiException
- if any exception occurs
-
updateRemoteMirror
public RemoteMirror updateRemoteMirror(Object projectIdOrPath, Long mirrorId, Boolean enabled, Boolean onlyProtectedBranches, Boolean keepDivergentRefs) throws GitLabApiException Toggle a remote mirror on or off, or change which types of branches are mirrored.GitLab Endpoint: PUT /projects/:id/remote_mirrors/:mirror_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemirrorId
- the ID of the remote mirrorenabled
- determines if the mirror is enabledonlyProtectedBranches
- determines if only protected branches are mirroredkeepDivergentRefs
- determines if divergent refs are skipped- Returns:
- a RemoteMirror instance with the updated remote mirror configuration
- Throws:
GitLabApiException
- if any exception occurs
-
createProject(String, Long, String, Boolean, Boolean, Boolean, Boolean, Visibility, Integer, String)