public class ProjectApi extends AbstractApi implements 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
gitLabApi
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor and Description |
---|
ProjectApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
Badge |
addBadge(Object projectIdOrPath,
String linkUrl,
String imageUrl)
Add a badge to a project.
|
ProjectHook |
addHook(Object projectIdOrPath,
String url,
boolean doPushEvents,
boolean doIssuesEvents,
boolean doMergeRequestsEvents)
Adds a hook to project.
|
ProjectHook |
addHook(Object projectIdOrPath,
String url,
ProjectHook enabledHooks,
boolean enableSslVerification,
String secretToken)
Adds a hook to project.
|
Member |
addMember(Object projectIdOrPath,
Long userId,
AccessLevel accessLevel)
Adds a user to a project team.
|
Member |
addMember(Object projectIdOrPath,
Long userId,
AccessLevel accessLevel,
Date expiresAt)
Adds a user to a project team.
|
Member |
addMember(Object projectIdOrPath,
Long userId,
Integer accessLevel)
Adds a user to a project team.
|
Member |
addMember(Object projectIdOrPath,
Long userId,
Integer accessLevel,
Date expiresAt)
Adds a user to a project team.
|
AccessRequest |
approveAccessRequest(Object projectIdOrPath,
Long userId,
AccessLevel accessLevel)
Approve access for the specified user to the specified project.
|
Project |
archiveProject(Object projectIdOrPath)
Archive a project
GitLab Endpoint: POST /projects/:id/archive |
ApprovalRule |
createApprovalRule(Object projectIdOrPath,
ApprovalRuleParams params)
Create a project-level approval rule.
|
Project |
createForkedFromRelationship(Object projectIdOrPath,
Long forkedFromId)
Create a forked from/to relation between existing projects.
|
Project |
createProject(Long namespaceId,
Project project)
Create a new project belonging to the namespace ID and project configuration.
|
Project |
createProject(Long namespaceId,
String projectName)
Create a new project belonging to the namespace ID.
|
Project |
createProject(Project project)
Creates new project owned by the current user.
|
Project |
createProject(Project project,
String importUrl)
Creates new project owned by the current user.
|
Project |
createProject(String projectName)
Create a new project with the current user's namespace.
|
Project |
createProject(String name,
Long namespaceId,
String description,
Boolean issuesEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Boolean isPublic,
Integer visibilityLevel,
String importUrl)
Deprecated.
As of release 4.2.0, replaced by
createProject(String, Long, String, Boolean, Boolean,
Boolean, Boolean, Visibility, Integer, String) |
Project |
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 Project
|
Project |
createProject(String name,
Long namespaceId,
String description,
Boolean issuesEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Visibility visibility,
Integer visibilityLevel,
String importUrl)
Creates a Project
|
Project |
createProject(String name,
String path)
Creates a new project owned by the authenticated user.
|
Project |
createProjectFromTemplate(Integer namespaceId,
String projectName,
Integer groupWithProjectTemplatesId,
String templateName,
Visibility visibility)
Create a new project from a template, belonging to the namespace ID.
|
PushRules |
createPushRules(Object projectIdOrPath,
PushRules pushRule)
Adds a push rule to a specified project.
|
RemoteMirror |
createRemoteMirror(Object projectIdOrPath,
String url,
Boolean enabled,
Boolean onlyProtectedBranches,
Boolean keepDivergentRefs)
Create a remote mirror for a project.
|
Snippet |
createSnippet(Object projectIdOrPath,
String title,
String filename,
String description,
String content,
Visibility visibility)
Creates a new project snippet.
|
Variable |
createVariable(Object projectIdOrPath,
String key,
String value,
Boolean isProtected)
Create a new project variable.
|
Variable |
createVariable(Object projectIdOrPath,
String key,
String value,
Boolean isProtected,
String environmentScope)
Create a new project variable.
|
Variable |
createVariable(Object projectIdOrPath,
String key,
String value,
Variable.Type variableType,
Boolean isProtected,
Boolean isMasked)
Create a new project variable.
|
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 by
IssuesApi.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.
|
Badge |
editBadge(Object projectIdOrPath,
Long badgeId,
String linkUrl,
String imageUrl)
Edit a badge of a project.
|
Project |
forkProject(Object projectIdOrPath,
Long namespaceId)
Forks a project into the user namespace of the authenticated user or the one provided.
|
Project |
forkProject(Object projectIdOrPath,
String namespace)
Forks a project into the user namespace of the authenticated user or the one provided.
|
Project |
forkProject(Object projectIdOrPath,
String namespace,
String path,
String name)
Forks a project into the user namespace of the authenticated user or the one provided.
|
Optional<CustomAttribute> |
geOptionalCustomAttribute(Object projectIdOrPath,
String key)
Get an Optional instance with the value for a single custom attribute for the specified project.
|
List<AccessRequest> |
getAccessRequests(Object projectIdOrPath)
Get a List of the project access requests viewable by the authenticated user.
|
Pager<AccessRequest> |
getAccessRequests(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of the project access requests viewable by the authenticated user.
|
Stream<AccessRequest> |
getAccessRequestsStream(Object projectIdOrPath)
Get a Stream of the project access requests viewable by the authenticated user.
|
List<Member> |
getAllMembers(Object projectIdOrPath)
Gets a list of project members viewable by the authenticated user,
including inherited members through ancestor groups.
|
Pager<Member> |
getAllMembers(Object projectIdOrPath,
int itemsPerPage)
Gets a Pager of project members viewable by the authenticated user,
including inherited members through ancestor groups.
|
List<Member> |
getAllMembers(Object projectIdOrPath,
int page,
int perPage)
Deprecated.
Will be removed in version 6.0
|
List<Member> |
getAllMembers(Object projectIdOrPath,
String query,
List<Long> userIds)
Gets a list of project members viewable by the authenticated user,
including inherited members through ancestor groups.
|
Pager<Member> |
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.
|
Stream<Member> |
getAllMembersStream(Object projectIdOrPath)
Gets a Stream of project members viewable by the authenticated user,
including inherited members through ancestor groups.
|
Stream<Member> |
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.
|
List<ApprovalRule> |
getApprovalRules(Object projectIdOrPath)
Get a list of the project-level approval rules.
|
Pager<ApprovalRule> |
getApprovalRules(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of the project-level approval rules.
|
Stream<ApprovalRule> |
getApprovalRulesStream(Object projectIdOrPath)
Get a Stream of the project-level approval rules.
|
ProjectApprovalsConfig |
getApprovalsConfiguration(Object projectIdOrPath)
Get the project's approval information.
|
AuditEvent |
getAuditEvent(Object projectIdOrPath,
Long auditEventId)
Get a specific audit event of a project.
|
List<AuditEvent> |
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.
|
Pager<AuditEvent> |
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.
|
Stream<AuditEvent> |
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.
|
Badge |
getBadge(Object projectIdOrPath,
Long badgeId)
Gets a badge of a project.
|
List<Badge> |
getBadges(Object projectIdOrPath)
Gets a list of a project’s badges and its group badges.
|
CustomAttribute |
getCustomAttribute(Object projectIdOrPath,
String key)
Get a single custom attribute for the specified project.
|
List<CustomAttribute> |
getCustomAttributes(Object projectIdOrPath)
Get all custom attributes for the specified project.
|
Pager<CustomAttribute> |
getCustomAttributes(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of custom attributes for the specified project.
|
Stream<CustomAttribute> |
getCustomAttributesStream(Object projectIdOrPath)
Get a Stream of all custom attributes for the specified project.
|
List<Project> |
getForks(Object projectIdOrPath)
Get a list of projects that were forked from the specified project.
|
Pager<Project> |
getForks(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of projects that were forked from the specified project.
|
List<Project> |
getForks(Object projectIdOrPath,
int page,
int perPage)
Get a list of projects that were forked from the specified project and in the specified page range.
|
Stream<Project> |
getForksStream(Object projectIdOrPath)
Get a Stream of projects that were forked from the specified project.
|
ProjectHook |
getHook(Object projectIdOrPath,
Long hookId)
Get a specific hook for project.
|
List<ProjectHook> |
getHooks(Object projectIdOrPath)
Get a list of the project hooks for the specified project.
|
Pager<ProjectHook> |
getHooks(Object projectIdOrPath,
int itemsPerPage)
Get Pager of project hooks.
|
List<ProjectHook> |
getHooks(Object projectIdOrPath,
int page,
int perPage)
Get list of project hooks in the specified page range.
|
Stream<ProjectHook> |
getHooksStream(Object projectIdOrPath)
Get a Stream of the project hooks for the specified project.
|
Issue |
getIssue(Object projectIdOrPath,
Long issueId)
Deprecated.
Will be removed in version 6.0, replaced by
IssuesApi.getIssue(Object, Long) |
List<Issue> |
getIssues(Object projectIdOrPath)
Deprecated.
Will be removed in version 6.0, replaced by
IssuesApi.getIssues(Object) |
Pager<Issue> |
getIssues(Object projectIdOrPath,
int itemsPerPage)
Deprecated.
Will be removed in version 6.0, replaced by
IssuesApi.getIssues(Object, int) |
List<Issue> |
getIssues(Object projectIdOrPath,
int page,
int perPage)
Deprecated.
Will be removed in version 6.0, replaced by
IssuesApi.getIssues(Object, int, int) |
Stream<Issue> |
getIssuesStream(Object projectIdOrPath)
Deprecated.
Will be removed in version 6.0, replaced by
IssuesApi.getIssues(Object) |
Member |
getMember(Object projectIdOrPath,
Long userId)
Gets a project team member.
|
Member |
getMember(Object projectIdOrPath,
Long userId,
Boolean includeInherited)
Gets a project team member, optionally including inherited member.
|
List<Project> |
getMemberProjects()
Get a list of projects that the authenticated user is a member of.
|
Pager<Project> |
getMemberProjects(int itemsPerPage)
Get a Pager of projects that the authenticated user is a member of.
|
List<Project> |
getMemberProjects(int page,
int perPage)
Get a list of projects that the authenticated user is a member of in the specified page range.
|
Stream<Project> |
getMemberProjectsStream()
Get a Stream of projects that the authenticated user is a member of.
|
List<Member> |
getMembers(Object projectIdOrPath)
Get a list of project team members.
|
Pager<Member> |
getMembers(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of project team members.
|
List<Member> |
getMembers(Object projectIdOrPath,
int page,
int perPage)
Get a list of project team members in the specified page range.
|
Stream<Member> |
getMembersStream(Object projectIdOrPath)
Get a Stream of project team members.
|
Optional<Badge> |
getOptionalBadge(Object projectIdOrPath,
Long badgeId)
Get an Optional instance with the value for the specified badge.
|
Optional<ProjectHook> |
getOptionalHook(Object projectIdOrPath,
Long hookId)
Get a specific hook for project as an Optional instance.
|
Optional<Member> |
getOptionalMember(Object projectIdOrPath,
Long userId)
Gets a project team member.
|
Optional<Member> |
getOptionalMember(Object projectIdOrPath,
Long userId,
Boolean includeInherited)
Gets a project team member, optionally including inherited member.
|
Optional<Project> |
getOptionalProject(Object projectIdOrPath)
Get an Optional instance with the value for the specific project, which is owned by the authentication user.
|
Optional<Project> |
getOptionalProject(Object projectIdOrPath,
Boolean includeStatistics)
Get an Optional instance with the value for the specific project, which is owned by the authentication user.
|
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.
|
Optional<Project> |
getOptionalProject(String namespace,
String project)
Get an Optional instance with the value for the specific project, which is owned by the authentication user.
|
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.
|
Optional<ProjectFetches> |
getOptionalProjectStatistics(Object projectIdOrPath)
Get an Optional instance with the value for the project fetch statistics for the last 30 days.
|
Optional<String> |
getOptionalRawSnippetContent(Object projectIdOrPath,
Long snippetId)
Get the raw project snippet plain text as an Optional instance.
|
Optional<Snippet> |
getOptionalSnippet(Object projectIdOrPath,
Long snippetId)
Get a single of project snippet as an Optional instance.
|
Optional<Variable> |
getOptionalVariable(Object projectIdOrPath,
String key)
Get the details of a variable as an Optional instance.
|
List<Project> |
getOwnedProjects()
Get a list of projects owned by the authenticated user.
|
Pager<Project> |
getOwnedProjects(int itemsPerPage)
Get a Pager of projects owned by the authenticated user.
|
List<Project> |
getOwnedProjects(int page,
int perPage)
Get a list of projects owned by the authenticated user in the specified page range.
|
Stream<Project> |
getOwnedProjectsStream()
Get a Stream of projects owned by the authenticated user.
|
Project |
getProject(Object projectIdOrPath)
Get a specific project, which is owned by the authentication user.
|
Project |
getProject(Object projectIdOrPath,
Boolean includeStatistics)
Get a specific project, which is owned by the authentication user.
|
Project |
getProject(Object projectIdOrPath,
Boolean includeStatistics,
Boolean includeLicense,
Boolean withCustomAttributes)
Get a specific project, which is owned by the authentication user.
|
Project |
getProject(String namespace,
String project)
Get a specific project, which is owned by the authentication user.
|
Project |
getProject(String namespace,
String project,
Boolean includeStatistics)
Get a specific project, which is owned by the authentication user.
|
List<Event> |
getProjectEvents(Object projectIdOrPath)
Get the project events for specific project.
|
Pager<Event> |
getProjectEvents(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of project events for specific project.
|
List<Event> |
getProjectEvents(Object projectIdOrPath,
int page,
int perPage)
Get the project events for specific project.
|
Stream<Event> |
getProjectEventsStream(Object projectIdOrPath)
Get a Stream of the project events for specific project.
|
Map<String,Float> |
getProjectLanguages(Object projectIdOrPath)
Get languages used in a project with percentage value.
|
List<Project> |
getProjects()
Get a list of projects accessible by the authenticated user.
|
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)
Get a list of projects accessible by the authenticated user and matching the supplied filter parameters.
|
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)
Get a Pager of projects accessible by the authenticated user and matching the supplied filter parameters.
|
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)
Get a list of projects accessible by the authenticated user and matching the supplied filter parameters.
|
List<Project> |
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 by
getProjects(Boolean, Visibility,
Constants.ProjectOrderBy, Constants.SortOrder, String, Boolean, Boolean, Boolean, Boolean, Boolean) |
Pager<Project> |
getProjects(int itemsPerPage)
Get a Pager instance of projects accessible by the authenticated user.
|
List<Project> |
getProjects(int page,
int perPage)
Get a list of projects accessible by the authenticated user and in the specified page range.
|
List<Project> |
getProjects(ProjectFilter filter)
Get a list of all visible projects across GitLab for the authenticated user using the provided filter.
|
Pager<Project> |
getProjects(ProjectFilter filter,
int itemsPerPage)
Get a Pager of all visible projects across GitLab for the authenticated user using the provided filter.
|
List<Project> |
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.
|
List<Project> |
getProjects(String search)
Get a list of projects accessible by the authenticated user that match the provided search string.
|
Pager<Project> |
getProjects(String search,
int itemsPerPage)
Get a Pager of projects accessible by the authenticated user that match the provided search string.
|
List<Project> |
getProjects(String search,
int page,
int perPage)
Get a list of projects accessible by the authenticated user that match the provided search string.
|
Stream<Project> |
getProjectsStream()
Get a Stream of projects accessible by the authenticated user.
|
Stream<Project> |
getProjectsStream(ProjectFilter filter)
Get a Stream of all visible projects across GitLab for the authenticated user using the provided filter.
|
Stream<Project> |
getProjectsStream(String search)
Get a Stream of projects accessible by the authenticated user that match the provided search string.
|
ProjectFetches |
getProjectStatistics(Object projectIdOrPath)
Get the project fetch statistics for the last 30 days.
|
List<ProjectUser> |
getProjectUsers(Object projectIdOrPath)
Get a list of project users.
|
Pager<ProjectUser> |
getProjectUsers(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of project users.
|
List<ProjectUser> |
getProjectUsers(Object projectIdOrPath,
String search)
Get a list of project users matching the specified search string.
|
Pager<ProjectUser> |
getProjectUsers(Object projectIdOrPath,
String search,
int itemsPerPage)
Get a Pager of project users matching the specified search string.
|
Stream<ProjectUser> |
getProjectUsersStream(Object projectIdOrPath)
Get a Stream of project users.
|
Stream<ProjectUser> |
getProjectUsersStream(Object projectIdOrPath,
String search)
Get a Stream of project users matching the specified search string.
|
PushRules |
getPushRules(Object projectIdOrPath)
Get the project's push rules.
|
String |
getRawSnippetContent(Object projectIdOrPath,
Long snippetId)
Get the raw project snippet as plain text.
|
List<RemoteMirror> |
getRemoteMirrors(Object projectIdOrPath)
Get all remote mirrors and their statuses for the specified project.
|
Pager<RemoteMirror> |
getRemoteMirrors(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of remote mirrors and their statuses for the specified project.
|
Stream<RemoteMirror> |
getRemoteMirrorsStream(Object projectIdOrPath)
Get a Stream of all remote mirrors and their statuses for the specified project.
|
Snippet |
getSnippet(Object projectIdOrPath,
Long snippetId)
Get a single of project snippet.
|
List<Snippet> |
getSnippets(Object projectIdOrPath)
Get a list of the project snippets.
|
Pager<Snippet> |
getSnippets(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of project's snippets.
|
List<Snippet> |
getSnippets(Object projectIdOrPath,
int page,
int perPage)
Get a list of project snippets.
|
Stream<Snippet> |
getSnippetsStream(Object projectIdOrPath)
Get a Stream of the project snippets.
|
List<Project> |
getStarredProjects()
Get a list of projects starred by the authenticated user.
|
Pager<Project> |
getStarredProjects(int itemsPerPage)
Get a Pager of projects starred by the authenticated user.
|
List<Project> |
getStarredProjects(int page,
int perPage)
Get a list of projects starred by the authenticated user in the specified page range.
|
Stream<Project> |
getStarredProjectsStream()
Get a Stream of projects starred by the authenticated user.
|
List<Project> |
getUserProjects(Object userIdOrUsername,
ProjectFilter filter)
Get a list of visible projects owned by the given user.
|
Pager<Project> |
getUserProjects(Object userIdOrUsername,
ProjectFilter filter,
int itemsPerPage)
Get a Pager of visible projects owned by the given user.
|
List<Project> |
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.
|
Stream<Project> |
getUserProjectsStream(Object userIdOrUsername,
ProjectFilter filter)
Get a Stream of visible projects owned by the given user.
|
Variable |
getVariable(Object projectIdOrPath,
String key)
Get the details of a project variable.
|
List<Variable> |
getVariables(Object projectIdOrPath)
Get list of a project's variables.
|
Pager<Variable> |
getVariables(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of variables belonging to the specified project.
|
List<Variable> |
getVariables(Object projectIdOrPath,
int page,
int perPage)
Get a list of variables for the specified project in the specified page range.
|
Stream<Variable> |
getVariablesStream(Object projectIdOrPath)
Get a Stream of variables belonging to the specified project.
|
ProjectHook |
modifyHook(ProjectHook hook)
Modifies a hook for project.
|
Badge |
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.
|
AccessRequest |
requestAccess(Object projectIdOrPath)
Requests access for the authenticated user to the specified project.
|
ProjectApprovalsConfig |
setApprovalsConfiguration(Object projectIdOrPath,
ProjectApprovalsConfig config)
Set the project's approvals configuration.
|
CustomAttribute |
setCustomAttribute(Object projectIdOrPath,
String key,
String value)
Set a custom attribute for the specified project.
|
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.
|
Project |
starProject(Object projectIdOrPath)
Star a project.
|
Project |
transferProject(Object projectIdOrPath,
String namespace)
Transfer a project to a new namespace.
|
void |
triggerHousekeeping(Object projectIdOrPath)
Start the Housekeeping task for a project.
|
Project |
unarchiveProject(Object projectIdOrPath)
Unarchive a project
GitLab Endpoint: POST /projects/:id/unarchive |
void |
unshareProject(Object projectIdOrPath,
Long groupId)
Unshare the project from the group.
|
Project |
unstarProject(Object projectIdOrPath)
Unstar a project.
|
ApprovalRule |
updateApprovalRule(Object projectIdOrPath,
Long approvalRuleId,
ApprovalRuleParams params)
Update the specified the project-level approval rule.
|
Member |
updateMember(Object projectIdOrPath,
Long userId,
AccessLevel accessLevel)
Updates a member of a project.
|
Member |
updateMember(Object projectIdOrPath,
Long userId,
AccessLevel accessLevel,
Date expiresAt)
Updates a member of a project.
|
Member |
updateMember(Object projectIdOrPath,
Long userId,
Integer accessLevel)
Updates a member of a project.
|
Member |
updateMember(Object projectIdOrPath,
Long userId,
Integer accessLevel,
Date expiresAt)
Updates a member of a project.
|
Project |
updateProject(Project project)
Updates a project.
|
PushRules |
updatePushRules(Object projectIdOrPath,
PushRules pushRule)
Updates a push rule for the specified project.
|
RemoteMirror |
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.
|
Snippet |
updateSnippet(Object projectIdOrPath,
Long snippetId,
String title,
String filename,
String description,
String code,
Visibility visibility)
Updates an existing project snippet.
|
Variable |
updateVariable(Object projectIdOrPath,
String key,
String value,
Boolean isProtected)
Update a project variable.
|
Variable |
updateVariable(Object projectIdOrPath,
String key,
String value,
Boolean isProtected,
String environmentScope)
Update a project variable.
|
Variable |
updateVariable(Object projectIdOrPath,
String key,
String value,
Variable.Type variableType,
Boolean isProtected,
Boolean masked)
Update a project variable.
|
Variable |
updateVariable(Object projectIdOrPath,
String key,
String value,
Variable.Type variableType,
Boolean isProtected,
Boolean masked,
String environmentScope)
Update a project variable.
|
FileUpload |
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.
|
FileUpload |
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.
|
FileUpload |
uploadFile(Object projectIdOrPath,
InputStream inputStream,
String filename,
String mediaType)
Uploads some data in an
InputStream to the specified project,
to be used in an issue or merge request description, or a comment. |
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
public ProjectApi(GitLabApi gitLabApi)
public ProjectFetches getProjectStatistics(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /project/:id/statistics
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurs during executionpublic Optional<ProjectFetches> getOptionalProjectStatistics(Object projectIdOrPath)
GitLab Endpoint: GET /project/:id/statistics
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredpublic List<Project> getProjects() throws GitLabApiException
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
GitLabApiException
- if any exception occurspublic List<Project> getProjects(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getProjects(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<Project> getProjectsStream() throws GitLabApiException
GitLab Endpoint: GET /projects
GitLabApiException
- if any exception occurs@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
getProjects(Boolean, Visibility,
Constants.ProjectOrderBy, Constants.SortOrder, String, Boolean, Boolean, Boolean, Boolean, Boolean)
GitLab Endpoint: GET /projects
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 statisticsGitLabApiException
- if any exception occurspublic 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
GitLab Endpoint: GET /projects
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 statisticsGitLabApiException
- if any exception occurspublic 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
GitLab Endpoint: GET /projects
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 pageGitLabApiException
- if any exception occurspublic 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
GitLab Endpoint: GET /projects
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 pageGitLabApiException
- if any exception occurspublic List<Project> getProjects(String search) throws GitLabApiException
GitLab Endpoint: GET /projects?search=search
search
- the project name search criteriaGitLabApiException
- if any exception occurspublic List<Project> getProjects(String search, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects?search=search
search
- the project name search criteriapage
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getProjects(String search, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects?search=search
search
- the project name search criteriaitemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<Project> getProjectsStream(String search) throws GitLabApiException
GitLab Endpoint: GET /projects?search=search
search
- the project name search criteriaGitLabApiException
- if any exception occurspublic List<Project> getMemberProjects() throws GitLabApiException
GitLab Endpoint: GET /projects?membership=true
GitLabApiException
- if any exception occurspublic List<Project> getMemberProjects(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects?membership=true
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getMemberProjects(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects?membership=true
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<Project> getMemberProjectsStream() throws GitLabApiException
GitLab Endpoint: GET /projects?membership=true
GitLabApiException
- if any exception occurspublic List<Project> getOwnedProjects() throws GitLabApiException
GitLab Endpoint: GET /projects?owned=true
GitLabApiException
- if any exception occurspublic List<Project> getOwnedProjects(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects?owned=true
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getOwnedProjects(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects?owned=true
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<Project> getOwnedProjectsStream() throws GitLabApiException
GitLab Endpoint: GET /projects?owned=true
GitLabApiException
- if any exception occurspublic List<Project> getStarredProjects() throws GitLabApiException
GitLab Endpoint: GET /projects?starred=true
GitLabApiException
- if any exception occurspublic List<Project> getStarredProjects(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects?starred=true
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getStarredProjects(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects?starred=true
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<Project> getStarredProjectsStream() throws GitLabApiException
GitLab Endpoint: GET /projects?starred=true
GitLabApiException
- if any exception occurspublic List<Project> getProjects(ProjectFilter filter) throws GitLabApiException
GitLab Endpoint: GET /projects
filter
- the ProjectFilter instance holding the filter values for the queryGitLabApiException
- if any exception occurspublic List<Project> getProjects(ProjectFilter filter, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects
filter
- the ProjectFilter instance holding the filter values for the querypage
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getProjects(ProjectFilter filter, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects
filter
- the ProjectFilter instance holding the filter values for the queryitemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<Project> getProjectsStream(ProjectFilter filter) throws GitLabApiException
GitLab Endpoint: GET /projects
filter
- the ProjectFilter instance holding the filter values for the queryGitLabApiException
- if any exception occurspublic List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException
GitLab Endpoint: GET /users/:user_id/projects
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 queryGitLabApiException
- if any exception occurspublic List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /users/:user_id/projects
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 pageGitLabApiException
- if any exception occurspublic Pager<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /users/:user_id/projects
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 pageGitLabApiException
- if any exception occurspublic Stream<Project> getUserProjectsStream(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException
GitLab Endpoint: GET /users/:user_id/projects
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 queryGitLabApiException
- if any exception occurspublic Project getProject(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(Object projectIdOrPath)
GitLab Endpoint: GET /projects/:id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepublic Project getProject(Object projectIdOrPath, Boolean includeStatistics) throws GitLabApiException
GitLab Endpoint: GET /projects/:id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceincludeStatistics
- include project statisticsGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(Object projectIdOrPath, Boolean includeStatistics)
GitLab Endpoint: GET /projects/:id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceincludeStatistics
- include project statisticspublic Project getProject(Object projectIdOrPath, Boolean includeStatistics, Boolean includeLicense, Boolean withCustomAttributes) throws GitLabApiException
GitLab Endpoint: GET /projects/:id
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)GitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(Object projectIdOrPath, Boolean includeStatistics, Boolean includeLicense, Boolean withCustomAttributes)
GitLab Endpoint: GET /projects/:id
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)public Project getProject(String namespace, String project) throws GitLabApiException
GitLab Endpoint: GET /projects/:id
namespace
- the name of the project namespace or groupproject
- the name of the project to getGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(String namespace, String project)
GitLab Endpoint: GET /projects/:id
namespace
- the name of the project namespace or groupproject
- the name of the projectpublic Project getProject(String namespace, String project, Boolean includeStatistics) throws GitLabApiException
GitLab Endpoint: GET /projects/:id
namespace
- the name of the project namespace or groupproject
- the name of the project to getincludeStatistics
- include project statisticsGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(String namespace, String project, Boolean includeStatistics)
GitLab Endpoint: GET /projects/:id
namespace
- the name of the project namespace or groupproject
- the name of the projectincludeStatistics
- include project statisticspublic Project createProject(Long namespaceId, String projectName) throws GitLabApiException
namespaceId
- the namespace ID to create the project underprojectName
- the name of the project top createGitLabApiException
- if any exception occurspublic Project createProject(Long namespaceId, Project project) throws GitLabApiException
namespaceId
- the namespace ID to create the project underproject
- the Project instance holding the new project configurationGitLabApiException
- if any exception occurspublic Project createProject(String projectName) throws GitLabApiException
projectName
- the name of the project top createGitLabApiException
- if any exception occurspublic Project createProject(String name, String path) throws GitLabApiException
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).GitLabApiException
- if any exception occurspublic Project createProject(Project project) throws GitLabApiException
project
- the Project instance with the configuration for the new projectGitLabApiException
- if any exception occurspublic Project createProject(Project project, String importUrl) throws GitLabApiException
project
- the Project instance with the configuration for the new projectimportUrl
- the URL to import the repository fromGitLabApiException
- if any exception occurspublic Project createProject(String name, Long namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) throws GitLabApiException
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 nullGitLabApiException
- if any exception occurspublic 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
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 nullGitLabApiException
- if any exception occurs@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
createProject(String, Long, String, Boolean, Boolean,
Boolean, Boolean, Visibility, Integer, String)
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 nullGitLabApiException
- if any exception occurspublic Project createProjectFromTemplate(Integer namespaceId, String projectName, Integer groupWithProjectTemplatesId, String templateName, Visibility visibility) throws GitLabApiException
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 projectGitLabApiException
- if any exception occurspublic Project updateProject(Project project) throws GitLabApiException
project
- the Project instance with the configuration for the new projectGitLabApiException
- if any exception occurspublic void deleteProject(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Project forkProject(Object projectIdOrPath, String namespace) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/fork
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 toGitLabApiException
- if any exception occurspublic Project forkProject(Object projectIdOrPath, Long namespaceId) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/fork
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 toGitLabApiException
- if any exception occurspublic Project forkProject(Object projectIdOrPath, String namespace, String path, String name) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/fork
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 forkingGitLabApiException
- if any exception occurspublic Project createForkedFromRelationship(Object projectIdOrPath, Long forkedFromId) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/fork/:forkFromId
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceforkedFromId
- the ID of the project that was forked fromGitLabApiException
- if any exception occurspublic void deleteForkedFromRelationship(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/fork
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getMembers(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members
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 pageGitLabApiException
- if any exception occurspublic Pager<Member> getMembers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members
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 pageGitLabApiException
- if any exception occurspublic Stream<Member> getMembersStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getAllMembers(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/all
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurs@Deprecated public List<Member> getAllMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members
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 pageGitLabApiException
- if any exception occurspublic Pager<Member> getAllMembers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/all
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 pageGitLabApiException
- if any exception occurspublic Stream<Member> getAllMembersStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/all
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getAllMembers(Object projectIdOrPath, String query, List<Long> userIds) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/all
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 IDsGitLabApiException
- if any exception occurspublic Pager<Member> getAllMembers(Object projectIdOrPath, String query, List<Long> userIds, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/all
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 pageGitLabApiException
- if any exception occurspublic Stream<Member> getAllMembersStream(Object projectIdOrPath, String query, List<Long> userIds) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/all
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 IDsGitLabApiException
- if any exception occurspublic Member getMember(Object projectIdOrPath, Long userId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/:user_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the memberGitLabApiException
- if any exception occurspublic Optional<Member> getOptionalMember(Object projectIdOrPath, Long userId)
GitLab Endpoint: GET /projects/:id/members/:user_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID of the memberpublic Member getMember(Object projectIdOrPath, Long userId, Boolean includeInherited) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/members/all/:user_id
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 groupGitLabApiException
- if any exception occurspublic Optional<Member> getOptionalMember(Object projectIdOrPath, Long userId, Boolean includeInherited)
GitLab Endpoint: GET /projects/:id/members/all/:user_id
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 grouppublic Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/members
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, requiredGitLabApiException
- if any exception occurspublic Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/members
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, requiredGitLabApiException
- if any exception occurspublic Member addMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/members
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 expireGitLabApiException
- if any exception occurspublic Member addMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/members
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 expireGitLabApiException
- if any exception occurspublic Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel) throws GitLabApiException
GitLab Endpoint: PUT /projects/:projectId/members/:userId
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, requiredGitLabApiException
- if any exception occurspublic Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException
GitLab Endpoint: PUT /projects/:projectId/members/:userId
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, requiredGitLabApiException
- if any exception occurspublic Member updateMember(Object projectIdOrPath, Long userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
GitLab Endpoint: PUT /projects/:projectId/members/:userId
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, optionalGitLabApiException
- if any exception occurspublic Member updateMember(Object projectIdOrPath, Long userId, Integer accessLevel, Date expiresAt) throws GitLabApiException
GitLab Endpoint: PUT /projects/:projectId/members/:userId
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, optionalGitLabApiException
- if any exception occurspublic void removeMember(Object projectIdOrPath, Long userId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/members/:user_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireduserId
- the user ID of the member to removeGitLabApiException
- if any exception occurspublic List<ProjectUser> getProjectUsers(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/users
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/users
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 pageGitLabApiException
- if any exception occurspublic Stream<ProjectUser> getProjectUsersStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/users
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<ProjectUser> getProjectUsers(Object projectIdOrPath, String search) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/users
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsearch
- the string to match specific usersGitLabApiException
- if any exception occurspublic Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, String search, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/users
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 pageGitLabApiException
- if any exception occurspublic Stream<ProjectUser> getProjectUsersStream(Object projectIdOrPath, String search) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/users
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsearch
- the string to match specific usersGitLabApiException
- if any exception occurspublic List<Event> getProjectEvents(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/events
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Event> getProjectEvents(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/events
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 pageGitLabApiException
- if any exception occurspublic Pager<Event> getProjectEvents(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/events
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 pageGitLabApiException
- if any exception occurspublic Stream<Event> getProjectEventsStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/events
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<ProjectHook> getHooks(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/hooks
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<ProjectHook> getHooks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/hooks
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 pageGitLabApiException
- if any exception occurspublic Pager<ProjectHook> getHooks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/hooks
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 pageGitLabApiException
- if any exception occurspublic Stream<ProjectHook> getHooksStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/hooks
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic ProjectHook getHook(Object projectIdOrPath, Long hookId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/hooks/:hook_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredhookId
- the ID of the hook to getGitLabApiException
- if any exception occurspublic Optional<ProjectHook> getOptionalHook(Object projectIdOrPath, Long hookId)
GitLab Endpoint: GET /projects/:id/hooks/:hook_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredhookId
- the ID of the hook to getpublic ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabledHooks, boolean enableSslVerification, String secretToken) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/hooks
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 hookGitLabApiException
- if any exception occurspublic ProjectHook addHook(Object projectIdOrPath, String url, boolean doPushEvents, boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/hooks
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 eventsGitLabApiException
- if any exception occurspublic void deleteHook(Object projectIdOrPath, Long hookId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/hooks/:hook_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredhookId
- the project hook ID to deleteGitLabApiException
- if any exception occurspublic void deleteHook(ProjectHook hook) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/hooks/:hook_id
hook
- the ProjectHook instance to removeGitLabApiException
- if any exception occurspublic ProjectHook modifyHook(ProjectHook hook) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/hooks/:hook_id
hook
- the ProjectHook instance that contains the project hook info to modifyGitLabApiException
- if any exception occurs@Deprecated public List<Issue> getIssues(Object projectIdOrPath) throws GitLabApiException
IssuesApi.getIssues(Object)
GitLab Endpoint: GET /projects/:id/issues
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurs@Deprecated public List<Issue> getIssues(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
IssuesApi.getIssues(Object, int, int)
GitLab Endpoint: GET /projects/:id/issues
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 pageGitLabApiException
- if any exception occurs@Deprecated public Pager<Issue> getIssues(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
IssuesApi.getIssues(Object, int)
GitLab Endpoint: GET /projects/:id/issues
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of issues per pageGitLabApiException
- if any exception occurs@Deprecated public Stream<Issue> getIssuesStream(Object projectIdOrPath) throws GitLabApiException
IssuesApi.getIssues(Object)
GitLab Endpoint: GET /projects/:id/issues
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurs@Deprecated public Issue getIssue(Object projectIdOrPath, Long issueId) throws GitLabApiException
IssuesApi.getIssue(Object, Long)
GitLab Endpoint: GET /projects/:id/issues/:issue_iid
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredissueId
- the internal ID of a project's issueGitLabApiException
- if any exception occurs@Deprecated public void deleteIssue(Object projectIdOrPath, Long issueId) throws GitLabApiException
IssuesApi.deleteIssue(Object, Long)
GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredissueId
- the internal ID of a project's issueGitLabApiException
- if any exception occurspublic List<Snippet> getSnippets(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/snippets
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Snippet> getSnippets(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/snippets
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 pageGitLabApiException
- if any exception occurspublic Pager<Snippet> getSnippets(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/snippets
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requireditemsPerPage
- the number of snippets per pageGitLabApiException
- if any exception occurspublic Stream<Snippet> getSnippetsStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/snippets
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Snippet getSnippet(Object projectIdOrPath, Long snippetId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippetGitLabApiException
- if any exception occurspublic Optional<Snippet> getOptionalSnippet(Object projectIdOrPath, Long snippetId)
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippetpublic Snippet createSnippet(Object projectIdOrPath, String title, String filename, String description, String content, Visibility visibility) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/snippets
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, requiredGitLabApiException
- if any exception occurspublic Snippet updateSnippet(Object projectIdOrPath, Long snippetId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/snippets/:snippet_id
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, reqoptionaluiredGitLabApiException
- if any exception occurspublic void deleteSnippet(Object projectIdOrPath, Long snippetId) throws GitLabApiException
GitLabApiException
public String getRawSnippetContent(Object projectIdOrPath, Long snippetId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippetGitLabApiException
- if any exception occurspublic Optional<String> getOptionalRawSnippetContent(Object projectIdOrPath, Long snippetId)
GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/raw
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippetpublic void shareProject(Object projectIdOrPath, Long groupId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/share
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredgroupId
- the ID of the group to share with, requiredaccessLevel
- the permissions level to grant the group, requiredexpiresAt
- the share expiration date, optionalGitLabApiException
- if any exception occurspublic void unshareProject(Object projectIdOrPath, Long groupId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/share/:group_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredgroupId
- the ID of the group to unshare, requiredGitLabApiException
- if any exception occurspublic Project archiveProject(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/archive
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Project unarchiveProject(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/unarchive
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic FileUpload uploadFile(Object projectIdOrPath, File fileToUpload) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/uploads
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredfileToUpload
- the File instance of the file to upload, requiredGitLabApiException
- if any exception occurspublic FileUpload uploadFile(Object projectIdOrPath, File fileToUpload, String mediaType) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/uploads
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 versionGitLabApiException
- if any exception occurspublic FileUpload uploadFile(Object projectIdOrPath, InputStream inputStream, String filename, String mediaType) throws GitLabApiException
InputStream
to the specified project,
to be used in an issue or merge request description, or a comment.
GitLab Endpoint: POST /projects/:id/uploads
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 versionGitLabApiException
- if any exception occurspublic PushRules getPushRules(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/push_rule
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic PushRules createPushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/push_rule
The following properties on the PushRules instance are utilized in the creation of the 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
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 addGitLabApiException
- if any exception occurspublic PushRules updatePushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/push_rule/:push_rule_id
The following properties on the PushRules instance are utilized when updating the 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
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 updateGitLabApiException
- if any exception occurspublic void deletePushRules(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/push_rule
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Project> getForks(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/forks
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Project> getForks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/forks
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 pageGitLabApiException
- if any exception occurspublic Pager<Project> getForks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/forks
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 pageGitLabApiException
- if any exception occurspublic Stream<Project> getForksStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/forks
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Project starProject(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/star
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic Project unstarProject(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/unstar
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic Map<String,Float> getProjectLanguages(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/languages
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Project transferProject(Object projectIdOrPath, String namespace) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/transfer.
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requirednamespace
- the namespace to transfer the project toGitLabApiException
- if any exception occurspublic Project setProjectAvatar(Object projectIdOrPath, File avatarFile) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredavatarFile
- the File instance of the avatar file to uploadGitLabApiException
- if any exception occurspublic List<AuditEvent> getAuditEvents(Object projectIdOrPath, Date created_after, Date created_before) throws GitLabApiException
GET /projects/:id/audit_events
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.GitLabApiException
- if any exception occurspublic Pager<AuditEvent> getAuditEvents(Object projectIdOrPath, Date created_after, Date created_before, int itemsPerPage) throws GitLabApiException
GET /projects/:id/audit_events
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 pageGitLabApiException
- if any exception occurspublic Stream<AuditEvent> getAuditEventsStream(Object projectIdOrPath, Date created_after, Date created_before) throws GitLabApiException
GET /projects/:id/audit_events
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.GitLabApiException
- if any exception occurspublic AuditEvent getAuditEvent(Object projectIdOrPath, Long auditEventId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/audit_events/:id_audit_event
projectIdOrPath
- the project ID, path of the project, or a Project instance holding the project ID or pathauditEventId
- the auditEventId, requiredGitLabApiException
- if any exception occurspublic List<Variable> getVariables(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/variables
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Variable> getVariables(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/variables
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 pageGitLabApiException
- if any exception occurspublic Pager<Variable> getVariables(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/variables
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 pageGitLabApiException
- if any exception occurspublic Stream<Variable> getVariablesStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/variables
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Variable getVariable(Object projectIdOrPath, String key) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/variables/:key
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, requiredGitLabApiException
- if any exception occurspublic Optional<Variable> getOptionalVariable(Object projectIdOrPath, String key)
GitLab Endpoint: GET /projects/:id/variables/:key
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, requiredpublic Variable createVariable(Object projectIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/variables
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, optionalGitLabApiException
- if any exception occurs during executionpublic Variable createVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException
NOTE: Setting the environmentScope is only available on GitLab EE.
GitLab Endpoint: POST /projects/:id/variables
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, optionalGitLabApiException
- if any exception occurs during executionpublic Variable createVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean isMasked) throws GitLabApiException
NOTE: Setting the environmentScope is only available on GitLab EE.
GitLab Endpoint: POST /projects/:id/variables
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, optionalGitLabApiException
- if any exception occurs during executionpublic Variable createVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean isMasked, String environmentScope) throws GitLabApiException
NOTE: Setting the environmentScope is only available on GitLab EE.
GitLab Endpoint: POST /projects/:id/variables
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, optionalGitLabApiException
- if any exception occurs during executionpublic Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/variables/:key
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, optionalGitLabApiException
- if any exception occurs during executionpublic Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException
NOTE: Updating the environmentScope is only available on GitLab EE.
GitLab Endpoint: PUT /projects/:id/variables/:key
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.GitLabApiException
- if any exception occurs during executionpublic Variable updateVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean masked) throws GitLabApiException
NOTE: Updating the environmentScope is only available on GitLab EE.
GitLab Endpoint: PUT /projects/:id/variables/:key
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, optionalGitLabApiException
- if any exception occurs during executionpublic Variable updateVariable(Object projectIdOrPath, String key, String value, Variable.Type variableType, Boolean isProtected, Boolean masked, String environmentScope) throws GitLabApiException
NOTE: Updating the environmentScope is only available on GitLab EE.
GitLab Endpoint: PUT /projects/:id/variables/:key
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.GitLabApiException
- if any exception occurs during executionpublic void deleteVariable(Object projectIdOrPath, String key) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/variables/:key
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key of an existing variable, requiredGitLabApiException
- if any exception occurspublic List<AccessRequest> getAccessRequests(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/access_requests
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<AccessRequest> getAccessRequests(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/access_requests
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 pageGitLabApiException
- if any exception occurspublic Stream<AccessRequest> getAccessRequestsStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/access_requests
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic AccessRequest requestAccess(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/access_requests
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic AccessRequest approveAccessRequest(Object projectIdOrPath, Long userId, AccessLevel accessLevel) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/access_requests/:user_id/approve
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)GitLabApiException
- if any exception occurspublic void denyAccessRequest(Object projectIdOrPath, Long userId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/access_requests/:user_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceuserId
- the user ID to deny access forGitLabApiException
- if any exception occurspublic void triggerHousekeeping(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/housekeeping
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Badge> getBadges(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/badges
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Badge getBadge(Object projectIdOrPath, Long badgeId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/badges/:badge_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to getGitLabApiException
- if any exception occurspublic Optional<Badge> getOptionalBadge(Object projectIdOrPath, Long badgeId)
GitLab Endpoint: GET /projects/:id/badges/:badge_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to getpublic Badge addBadge(Object projectIdOrPath, String linkUrl, String imageUrl) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/badges
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 linkGitLabApiException
- if any exception occurspublic Badge editBadge(Object projectIdOrPath, Long badgeId, String linkUrl, String imageUrl) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/badges
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 linkGitLabApiException
- if any exception occurspublic void removeBadge(Object projectIdOrPath, Long badgeId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/badges/:badge_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancebadgeId
- the ID of the badge to removeGitLabApiException
- if any exception occurspublic Badge previewBadge(Object projectIdOrPath, String linkUrl, String imageUrl) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/badges/render
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 linkGitLabApiException
- if any exception occurspublic ProjectApprovalsConfig getApprovalsConfiguration(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/approvals
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic ProjectApprovalsConfig setApprovalsConfiguration(Object projectIdOrPath, ProjectApprovalsConfig config) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/approvals
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceconfig
- a ProjectApprovalsConfig instance with the approval configurationGitLabApiException
- if any exception occurspublic List<ApprovalRule> getApprovalRules(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/approval_rules
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<ApprovalRule> getApprovalRules(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/approval_rules
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 pageGitLabApiException
- if any exception occurspublic Stream<ApprovalRule> getApprovalRulesStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/approval_rules
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic ApprovalRule createApprovalRule(Object projectIdOrPath, ApprovalRuleParams params) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/approval_rules
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceparams
- the ApprovalRuleParams instance holding the parameters for the approval ruleGitLabApiException
- if any exception occurspublic ApprovalRule updateApprovalRule(Object projectIdOrPath, Long approvalRuleId, ApprovalRuleParams params) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/approval_rules/:approval_rule_id
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 updateGitLabApiException
- if any exception occurspublic void deleteApprovalRule(Object projectIdOrPath, Long approvalRuleId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/approval_rules/:approval_rule_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceapprovalRuleId
- the ID of the approval ruleGitLabApiException
- if any exception occurspublic List<CustomAttribute> getCustomAttributes(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/custom_attributes
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<CustomAttribute> getCustomAttributes(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/custom_attributes
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of items per pageGitLabApiException
- if any exception occurspublic Stream<CustomAttribute> getCustomAttributesStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/custom_attributes
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic CustomAttribute getCustomAttribute(Object projectIdOrPath, String key) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/custom_attributes/:key
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancekey
- the key for the custom attributeGitLabApiException
- if any exception occurspublic Optional<CustomAttribute> geOptionalCustomAttribute(Object projectIdOrPath, String key)
GitLab Endpoint: GET /projects/:id/custom_attributes/:key
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredkey
- the key for the custom attribute, requiredpublic CustomAttribute setCustomAttribute(Object projectIdOrPath, String key, String value) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/custom_attributes/:key
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 customAttributeGitLabApiException
- if any exception occurspublic void deleteCustomAttribute(Object projectIdOrPath, String key) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/custom_attributes/:key
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancekey
- the key of the custom attribute to deleteGitLabApiException
- if any exception occurspublic List<RemoteMirror> getRemoteMirrors(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/remote_mirrors
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<RemoteMirror> getRemoteMirrors(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/remote_mirrors
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of items per pageGitLabApiException
- if any exception occurspublic Stream<RemoteMirror> getRemoteMirrorsStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/remote_mirrors
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic RemoteMirror createRemoteMirror(Object projectIdOrPath, String url, Boolean enabled, Boolean onlyProtectedBranches, Boolean keepDivergentRefs) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/remote_mirrors
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 skippedGitLabApiException
- if any exception occurspublic RemoteMirror updateRemoteMirror(Object projectIdOrPath, Long mirrorId, Boolean enabled, Boolean onlyProtectedBranches, Boolean keepDivergentRefs) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/remote_mirrors/:mirror_id
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 skippedGitLabApiException
- if any exception occursCopyright © 2022. All rights reserved.