public class ProjectApi extends AbstractApi implements Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
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 |
---|---|
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,
Integer userId,
AccessLevel accessLevel)
Adds a user to a project team.
|
Member |
addMember(Object projectIdOrPath,
Integer userId,
AccessLevel accessLevel,
Date expiresAt)
Adds a user to a project team.
|
Member |
addMember(Object projectIdOrPath,
Integer userId,
Integer accessLevel)
Adds a user to a project team.
|
Member |
addMember(Object projectIdOrPath,
Integer userId,
Integer accessLevel,
Date expiresAt)
Adds a user to a project team.
|
AccessRequest |
approveAccessRequest(Object projectIdOrPath,
Integer userId,
AccessLevel accessLevel)
Approve access for the specified user to the specified project.
|
Project |
archiveProject(Object projectIdOrPath)
Archive a project
|
Project |
createForkedFromRelationship(Object projectIdOrPath,
Integer forkedFromId)
Create a forked from/to relation between existing projects.
|
Project |
createProject(Integer namespaceId,
Project project)
Create a new project belonging to the namespace ID and project configuration.
|
Project |
createProject(Integer 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,
Integer 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, Integer, String, Boolean, Boolean,
Boolean, Boolean, Visibility, Integer, String) |
Project |
createProject(String name,
Integer 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,
Integer namespaceId,
String description,
Boolean issuesEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Visibility visibility,
Integer visibilityLevel,
String importUrl)
Creates a Project
|
PushRules |
createPushRules(Object projectIdOrPath,
PushRules pushRule)
Adds a push rule to a specified project.
|
Snippet |
createSnippet(Object projectIdOrPath,
String title,
String filename,
String description,
String code,
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 |
deleteForkedFromRelationship(Object projectIdOrPath)
Delete an existing forked from relationship.
|
void |
deleteHook(Object projectIdOrPath,
Integer hookId)
Deletes a hook from the project.
|
void |
deleteHook(ProjectHook hook)
Deletes a hook from the project.
|
void |
deleteIssue(Object projectIdOrPath,
Integer issueId)
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.deleteIssue(Object, Integer) |
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,
Integer snippetId) |
void |
deleteVariable(Object projectIdOrPath,
String key)
Deletes a project variable.
|
void |
denyAccessRequest(Object projectIdOrPath,
Integer userId)
Deny access for the specified user to the specified project.
|
Project |
forkProject(Object projectIdOrPath,
Integer 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.
|
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)
Gets a list 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.
|
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,
Integer 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,
Integer issueId)
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssue(Object, Integer) |
List<Issue> |
getIssues(Object projectIdOrPath)
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssues(Object) |
Pager<Issue> |
getIssues(Object projectIdOrPath,
int itemsPerPage)
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssues(Object, int) |
List<Issue> |
getIssues(Object projectIdOrPath,
int page,
int perPage)
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssues(Object, int, int) |
Stream<Issue> |
getIssuesStream(Object projectIdOrPath)
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssues(Object) |
Member |
getMember(Object projectIdOrPath,
Integer userId)
Gets a project team 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<ProjectHook> |
getOptionalHook(Object projectIdOrPath,
Integer hookId)
Get a specific hook for project as an Optional instance.
|
Optional<Member> |
getOptionalMember(Object projectIdOrPath,
Integer userId)
Gets a project team 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(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<String> |
getOptionalRawSnippetContent(Object projectIdOrPath,
Integer snippetId)
Get the raw project snippet plain text as an Optional instance.
|
Optional<Snippet> |
getOptionalSnippet(Object projectIdOrPath,
Integer 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(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 5.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.
|
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,
Integer snippetId)
Get the raw project snippet as plain text.
|
Snippet |
getSnippet(Object projectIdOrPath,
Integer 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.
|
void |
removeMember(Object projectIdOrPath,
Integer userId)
Removes user from project team.
|
AccessRequest |
requestAccess(Object projectIdOrPath)
Requests access for the authenticated user to the specified project.
|
Project |
setProjectAvatar(Object projectIdOrPath,
File avatarFile)
Uploads and sets the project avatar for the specified project.
|
void |
shareProject(Object projectIdOrPath,
Integer 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.
|
Project |
unarchiveProject(Object projectIdOrPath)
Unarchive a project
|
void |
unshareProject(Object projectIdOrPath,
Integer groupId)
Unshare the project from the group.
|
Project |
unstarProject(Object projectIdOrPath)
Unstar a project.
|
Member |
updateMember(Object projectIdOrPath,
Integer userId,
AccessLevel accessLevel)
Updates a member of a project.
|
Member |
updateMember(Object projectIdOrPath,
Integer userId,
AccessLevel accessLevel,
Date expiresAt)
Updates a member of a project.
|
Member |
updateMember(Object projectIdOrPath,
Integer userId,
Integer accessLevel)
Updates a member of a project.
|
Member |
updateMember(Object projectIdOrPath,
Integer 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.
|
Snippet |
updateSnippet(Object projectIdOrPath,
Integer 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.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public ProjectApi(GitLabApi gitLabApi)
public List<Project> getProjects() throws GitLabApiException
GET /projects
GitLabApiException
- if any exception occurspublic List<Project> getProjects(int page, int perPage) throws GitLabApiException
GET /projects
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getProjects(int itemsPerPage) throws GitLabApiException
GET /projects
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Stream<Project> getProjectsStream() throws GitLabApiException
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)
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
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
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
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
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
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
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
GET /projects?search=search
search
- the project name search criteriaGitLabApiException
- if any exception occurspublic List<Project> getMemberProjects() throws GitLabApiException
GET /projects?membership=true
GitLabApiException
- if any exception occurspublic List<Project> getMemberProjects(int page, int perPage) throws GitLabApiException
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
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
GET /projects?membership=true
GitLabApiException
- if any exception occurspublic List<Project> getOwnedProjects() throws GitLabApiException
GET /projects?owned=true
GitLabApiException
- if any exception occurspublic List<Project> getOwnedProjects(int page, int perPage) throws GitLabApiException
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
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
GET /projects?owned=true
GitLabApiException
- if any exception occurspublic List<Project> getStarredProjects() throws GitLabApiException
GET /projects?starred=true
GitLabApiException
- if any exception occurspublic List<Project> getStarredProjects(int page, int perPage) throws GitLabApiException
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
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
GET /projects?starred=true
GitLabApiException
- if any exception occurspublic List<Project> getProjects(ProjectFilter filter) throws GitLabApiException
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
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
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
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
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
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
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
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
GET /projects/:id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(Object projectIdOrPath)
GET /projects/:id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepublic Project getProject(Object projectIdOrPath, Boolean includeStatistics) throws GitLabApiException
GET /projects/:id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceincludeStatistics
- include project statisticsGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(Object projectIdOrPath, Boolean includeStatistics)
GET /projects/:id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceincludeStatistics
- include project statisticspublic Project getProject(String namespace, String project) throws GitLabApiException
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)
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
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)
GET /projects/:id
namespace
- the name of the project namespace or groupproject
- the name of the projectincludeStatistics
- include project statisticspublic Project createProject(Integer 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(Integer 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(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, Integer 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, Integer 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, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean isPublic, Integer visibilityLevel, String importUrl) throws GitLabApiException
createProject(String, Integer, 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 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
DELETE /projects/:id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Project forkProject(Object projectIdOrPath, String namespace) throws GitLabApiException
POST /projects/:id/fork
projectIdOrPath
- the project in the form of an Integer(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, Integer namespaceId) throws GitLabApiException
POST /projects/:id/fork
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancenamespaceId
- ID of the namespace that the project will be forked toGitLabApiException
- if any exception occurspublic Project createForkedFromRelationship(Object projectIdOrPath, Integer forkedFromId) throws GitLabApiException
POST /projects/:id/fork/:forkFromId
projectIdOrPath
- the project in the form of an Integer(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
DELETE /projects/:id/fork
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getMembers(Object projectIdOrPath) throws GitLabApiException
GET /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GET /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getAllMembers(Object projectIdOrPath) throws GitLabApiException
GET /projects/:id/members/all
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic List<Member> getAllMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GET /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/members/all
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/members/all
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Member getMember(Object projectIdOrPath, Integer userId) throws GitLabApiException
GET /projects/:id/members/:user_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceuserId
- the user ID of the memberGitLabApiException
- if any exception occurspublic Optional<Member> getOptionalMember(Object projectIdOrPath, Integer userId)
GET /projects/:id/members/:user_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceuserId
- the user ID of the memberpublic Member addMember(Object projectIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException
POST /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(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, Integer userId, AccessLevel accessLevel) throws GitLabApiException
POST /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(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, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
POST /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(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, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException
POST /projects/:id/members
projectIdOrPath
- the project in the form of an Integer(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, Integer userId, Integer accessLevel) throws GitLabApiException
PUT /projects/:projectId/members/:userId
projectIdOrPath
- the project in the form of an Integer(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, Integer userId, AccessLevel accessLevel) throws GitLabApiException
PUT /projects/:projectId/members/:userId
projectIdOrPath
- the project in the form of an Integer(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, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
PUT /projects/:projectId/members/:userId
projectIdOrPath
- the project in the form of an Integer(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, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException
PUT /projects/:projectId/members/:userId
projectIdOrPath
- the project in the form of an Integer(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, Integer userId) throws GitLabApiException
DELETE /projects/:id/members/:user_id
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/users
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GET /projects/:id/users
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/users
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<ProjectUser> getProjectUsers(Object projectIdOrPath, String search) throws GitLabApiException
GET /projects/:id/users
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/users
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/users
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredsearch
- the string to match specific usersGitLabApiException
- if any exception occurspublic List<Event> getProjectEvents(Object projectIdOrPath) throws GitLabApiException
GET /projects/:id/events
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Event> getProjectEvents(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GET /projects/:id/events
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/events
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/events
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<ProjectHook> getHooks(Object projectIdOrPath) throws GitLabApiException
GET /projects/:id/hooks
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<ProjectHook> getHooks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GET /projects/:id/hooks
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/hooks
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/hooks
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic ProjectHook getHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException
GET /projects/:id/hooks/:hook_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredhookId
- the ID of the hook to getGitLabApiException
- if any exception occurspublic Optional<ProjectHook> getOptionalHook(Object projectIdOrPath, Integer hookId)
GET /projects/:id/hooks/:hook_id
projectIdOrPath
- the project in the form of an Integer(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
POST /projects/:id/hooks
projectIdOrPath
- the project in the form of an Integer(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
POST /projects/:id/hooks
projectIdOrPath
- the project in the form of an Integer(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, Integer hookId) throws GitLabApiException
DELETE /projects/:id/hooks/:hook_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredhookId
- the project hook ID to deleteGitLabApiException
- if any exception occurspublic void deleteHook(ProjectHook hook) throws GitLabApiException
DELETE /projects/:id/hooks/:hook_id
hook
- the ProjectHook instance to removeGitLabApiException
- if any exception occurspublic ProjectHook modifyHook(ProjectHook hook) throws GitLabApiException
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)
GET /projects/:id/issues
projectIdOrPath
- the project in the form of an Integer(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)
GET /projects/:id/issues
projectIdOrPath
- the project in the form of an Integer(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)
GET /projects/:id/issues
projectIdOrPath
- the project in the form of an Integer(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)
GET /projects/:id/issues
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurs@Deprecated public Issue getIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException
IssuesApi.getIssue(Object, Integer)
GET /projects/:id/issues/:issue_iid
projectIdOrPath
- the project in the form of an Integer(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, Integer issueId) throws GitLabApiException
IssuesApi.deleteIssue(Object, Integer)
DELETE /projects/:id/issues/:issue_iid
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/snippets
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Snippet> getSnippets(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GET /projects/:id/snippets
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/snippets
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requireditemsPerPage
- the number of snippets per pageGitLabApiException
- if any exception occurspublic Stream<Snippet> getSnippetsStream(Object projectIdOrPath) throws GitLabApiException
GET /projects/:id/snippets
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Snippet getSnippet(Object projectIdOrPath, Integer snippetId) throws GitLabApiException
GET /projects/:id/snippets/:snippet_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippetGitLabApiException
- if any exception occurspublic Optional<Snippet> getOptionalSnippet(Object projectIdOrPath, Integer snippetId)
GET /projects/:id/snippets/:snippet_id
projectIdOrPath
- the project in the form of an Integer(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 code, Visibility visibility) throws GitLabApiException
POST /projects/:id/snippets
projectIdOrPath
- the project in the form of an Integer(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, optionalcode
- the content of a snippet, requiredvisibility
- the snippet's visibility, requiredGitLabApiException
- if any exception occurspublic Snippet updateSnippet(Object projectIdOrPath, Integer snippetId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException
PUT /projects/:id/snippets/:snippet_id
projectIdOrPath
- the project in the form of an Integer(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, Integer snippetId) throws GitLabApiException
GitLabApiException
public String getRawSnippetContent(Object projectIdOrPath, Integer snippetId) throws GitLabApiException
GET /projects/:id/snippets/:snippet_id/raw
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippetGitLabApiException
- if any exception occurspublic Optional<String> getOptionalRawSnippetContent(Object projectIdOrPath, Integer snippetId)
GET /projects/:id/snippets/:snippet_id/raw
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredsnippetId
- the ID of the project's snippetpublic void shareProject(Object projectIdOrPath, Integer groupId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
POST /projects/:id/share
projectIdOrPath
- the project in the form of an Integer(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, Integer groupId) throws GitLabApiException
DELETE /projects/:id/share/:group_id
projectIdOrPath
- the project in the form of an Integer(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
POST /projects/:id/archive
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Project unarchiveProject(Object projectIdOrPath) throws GitLabApiException
POST /projects/:id/unarchive
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic FileUpload uploadFile(Object projectIdOrPath, File fileToUpload) throws GitLabApiException
POST /projects/:id/uploads
projectIdOrPath
- the project in the form of an Integer(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
POST /projects/:id/uploads
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredfileToUpload
- the File instance of the file to upload, requiredmediaType
- the media type of the file to upload, optionalGitLabApiException
- if any exception occurspublic PushRules getPushRules(Object projectIdOrPath) throws GitLabApiException
GET /projects/:id/push_rule
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic PushRules createPushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException
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+\..*
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
projectIdOrPath
- the project in the form of an Integer(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
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+\..*
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
projectIdOrPath
- the project in the form of an Integer(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
DELETE /projects/:id/push_rule
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Project> getForks(Object projectIdOrPath) throws GitLabApiException
GET /projects/:id/forks
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic List<Project> getForks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GET /projects/:id/forks
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/forks
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/forks
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Project starProject(Object projectIdOrPath) throws GitLabApiException
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
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
GET /projects/:id/languages
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredGitLabApiException
- if any exception occurspublic Project transferProject(Object projectIdOrPath, String namespace) throws GitLabApiException
PUT /projects/:id/transfer.
projectIdOrPath
- the project in the form of an Integer(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
PUT /projects/:id/uploads
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, requiredavatarFile
- the File instance of the avatar file to uploadGitLabApiException
- 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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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 Integer(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
DELETE /projects/:id/variables/:key
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/access_requests
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<AccessRequest> getAccessRequests(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GET /projects/:id/access_requests
projectIdOrPath
- the project in the form of an Integer(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
GET /projects/:id/access_requests
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic AccessRequest requestAccess(Object projectIdOrPath) throws GitLabApiException
POST /projects/:id/access_requests
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic AccessRequest approveAccessRequest(Object projectIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiException
PUT /projects/:id/access_requests/:user_id/approve
projectIdOrPath
- the project in the form of an Integer(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, Integer userId) throws GitLabApiException
DELETE /projects/:id/access_requests/:user_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceuserId
- the user ID to deny access forGitLabApiException
- if any exception occursCopyright © 2019. All rights reserved.