Package org.gitlab4j.api
Class GroupApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.GroupApi
- All Implemented Interfaces:
Constants
public class GroupApi extends AbstractApi
This class implements the client side API for the GitLab groups calls.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, 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.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Badge
addBadge(Object groupIdOrPath, String linkUrl, String imageUrl)
Add a badge to a group.Group
addGroup(String name, String path)
Creates a new project group.Group
addGroup(String name, String path, String description, Boolean membershipLock, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId, Integer sharedRunnersMinutesLimit)
Deprecated.Group
addGroup(String name, String path, String description, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId)
Creates a new project group.Group
addGroup(Group group)
void
addLdapGroupLink(Object groupIdOrPath, String cn, Integer groupAccess, String provider)
Adds an LDAP group link.void
addLdapGroupLink(Object groupIdOrPath, String cn, AccessLevel groupAccess, String provider)
Adds an LDAP group link.Member
addMember(Object groupIdOrPath, Integer userId, Integer accessLevel)
Adds a user to the list of group members.Member
addMember(Object groupIdOrPath, Integer userId, Integer accessLevel, Date expiresAt)
Adds a user to the list of group members.Member
addMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel)
Adds a user to the list of group members.Member
addMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt)
Adds a user to the list of group members.AccessRequest
approveAccessRequest(Object groupIdOrPath, Integer userId, AccessLevel accessLevel)
Approve access for the specified user to the specified group.Group
createGroup(GroupParams params)
Creates a new project group.Variable
createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected)
Create a new group variable.Variable
createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected, Boolean masked)
Create a new group variable.void
deleteGroup(Object groupIdOrPath)
Removes group with all projects inside.void
deleteLdapGroupLink(Object groupIdOrPath, String cn)
Deletes an LDAP group link.void
deleteLdapGroupLink(Object groupIdOrPath, String cn, String provider)
Deletes an LDAP group link for a specific LDAP provider.void
deleteVariable(Object groupIdOrPath, String key)
Deletes a group variable.void
denyAccessRequest(Object groupIdOrPath, Integer userId)
Deny access for the specified user to the specified group.Badge
editBadge(Object groupIdOrPath, Integer badgeId, String linkUrl, String imageUrl)
Edit a badge of a group.List<AccessRequest>
getAccessRequests(Object groupIdOrPath)
Get a List of the group access requests viewable by the authenticated user.Pager<AccessRequest>
getAccessRequests(Object groupIdOrPath, int itemsPerPage)
Get a Pager of the group access requests viewable by the authenticated user.Stream<AccessRequest>
getAccessRequestsStream(Object groupIdOrPath)
Get a Stream of the group access requests viewable by the authenticated user.List<Member>
getAllMembers(Object groupIdOrPath)
Gets a list of group members viewable by the authenticated user, including inherited members through ancestor groups.Pager<Member>
getAllMembers(Object groupIdOrPath, int itemsPerPage)
Gets a Pager of group members viewable by the authenticated user, including inherited members through ancestor groups.List<Member>
getAllMembers(Object groupIdOrPath, int page, int perPage)
Deprecated.Will be removed in version 5.0List<Member>
getAllMembers(Object groupIdOrPath, String query, List<Integer> userIds)
Gets a list of group members viewable by the authenticated user, including inherited members through ancestor groups.Pager<Member>
getAllMembers(Object groupIdOrPath, String query, List<Integer> userIds, int itemsPerPage)
Gets a Pager of group members viewable by the authenticated user, including inherited members through ancestor groups.Stream<Member>
getAllMembersStream(Object groupIdOrPath)
Gets a Stream of group members viewable by the authenticated user, including inherited members through ancestor groups.Stream<Member>
getAllMembersStream(Object groupIdOrPath, String query, List<Integer> userIds)
Gets a Stream of group members viewable by the authenticated user, including inherited members through ancestor groups.AuditEvent
getAuditEvent(Object groupIdOrPath, Integer auditEventId)
Get a specific audit event of a group.List<AuditEvent>
getAuditEvents(Object groupIdOrPath, Date created_after, Date created_before)
Get a List of the group audit events viewable by Maintainer or an Owner of the group.Pager<AuditEvent>
getAuditEvents(Object groupIdOrPath, 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 groupIdOrPath, 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 groupIdOrPath, Integer badgeId)
Gets a badge of a group.List<Badge>
getBadges(Object groupIdOrPath)
Gets a list of a group’s badges and its group badges.Group
getGroup(Object groupIdOrPath)
Get all details of a group.List<Group>
getGroups()
Get a list of groups.Pager<Group>
getGroups(int itemsPerPage)
Get a Pager of groups.List<Group>
getGroups(int page, int perPage)
Get a list of groups (As user: my groups, as admin: all groups) and in the specified page range.List<Group>
getGroups(String search)
Get all groups that match your string in their name or path.Pager<Group>
getGroups(String search, int itemsPerPage)
Get all groups that match your string in their name or path.List<Group>
getGroups(String search, int page, int perPage)
Get all groups that match your string in their name or path.List<Group>
getGroups(GroupFilter filter)
Get a list of visible groups for the authenticated user using the provided filter.Pager<Group>
getGroups(GroupFilter filter, int itemsPerPage)
Get a Pager of visible groups for the authenticated user using the provided filter.Stream<Group>
getGroupsStream()
Get a Stream of groups.Stream<Group>
getGroupsStream(String search)
Get all groups that match your string in their name or path as a Stream.Stream<Group>
getGroupsStream(GroupFilter filter)
Get a Stream of visible groups for the authenticated user using the provided filter.Member
getMember(Object groupIdOrPath, int userId)
Get a group member viewable by the authenticated user.Member
getMember(Object groupIdOrPath, Integer userId, Boolean includeInherited)
Gets a group team member, optionally including inherited member.List<Member>
getMembers(Object groupIdOrPath)
Get a list of group members viewable by the authenticated user.Pager<Member>
getMembers(Object groupIdOrPath, int itemsPerPage)
Get a Pager of group members viewable by the authenticated user.List<Member>
getMembers(Object groupIdOrPath, int page, int perPage)
Get a list of group members viewable by the authenticated user in the specified page range.Stream<Member>
getMembersStream(Object groupIdOrPath)
Get a Stream of group members viewable by the authenticated user.Optional<Badge>
getOptionalBadge(Object groupIdOrPath, Integer badgeId)
Get an Optional instance with the value for the specified badge.Optional<Group>
getOptionalGroup(Object groupIdOrPath)
Get all details of a group as an Optional instance.Optional<Member>
getOptionalMember(Object groupIdOrPath, int userId)
Get a group member viewable by the authenticated user as an Optional instance.Optional<Member>
getOptionalMember(Object groupIdOrPath, Integer userId, Boolean includeInherited)
Gets a group team member, optionally including inherited member.Optional<Variable>
getOptionalVariable(Object groupIdOrPath, String key)
Get the details of a group variable as an Optional instance.List<Project>
getProjects(Object groupIdOrPath)
Get a list of projects belonging to the specified group ID.Pager<Project>
getProjects(Object groupIdOrPath, int itemsPerPage)
Get a Pager of projects belonging to the specified group ID.List<Project>
getProjects(Object groupIdOrPath, int page, int perPage)
Get a list of projects belonging to the specified group ID in the specified page range.List<Project>
getProjects(Object groupIdOrPath, GroupProjectsFilter filter)
Get a list of projects belonging to the specified group ID and filter.Pager<Project>
getProjects(Object groupIdOrPath, GroupProjectsFilter filter, int itemsPerPage)
Get a Pager of projects belonging to the specified group ID and filter.Stream<Project>
getProjectsStream(Object groupIdOrPath)
Get a Stream of projects belonging to the specified group ID.Stream<Project>
getProjectsStream(Object groupIdOrPath, GroupProjectsFilter filter)
Get a Stream of projects belonging to the specified group ID and filter.List<Group>
getSubGroups(Object groupIdOrPath)
Get a list of visible direct subgroups in this group.Pager<Group>
getSubGroups(Object groupIdOrPath, int itemsPerPage)
Get a Pager of visible direct subgroups in this group.List<Group>
getSubGroups(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned)
Get a list of visible direct subgroups in this group.Pager<Group>
getSubGroups(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned, int itemsPerPage)
Get a Pager of visible direct subgroups in this group.List<Group>
getSubGroups(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned, int page, int perPage)
Get a list of visible direct subgroups in this group.Stream<Group>
getSubGroupsStream(Object groupIdOrPath)
Get a Stream of visible direct subgroups in this group.Stream<Group>
getSubGroupsStream(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned)
Get a Stream of visible direct subgroups in this group.Variable
getVariable(Object groupIdOrPath, String key)
Get the details of a group variable.List<Variable>
getVariables(Object groupIdOrPath)
Get list of a group’s variables.Pager<Variable>
getVariables(Object groupIdOrPath, int itemsPerPage)
Get a Pager of variables belonging to the specified group.List<Variable>
getVariables(Object groupIdOrPath, int page, int perPage)
Get a list of variables for the specified group in the specified page range.Stream<Variable>
getVariablesStream(Object groupIdOrPath)
Get a Stream of variables belonging to the specified group.void
ldapSync(Object groupIdOrPath)
Syncs the group with its linked LDAP group.Badge
previewBadge(Object groupIdOrPath, String linkUrl, String imageUrl)
Returns how the link_url and image_url final URLs would be after resolving the placeholder interpolation.void
removeBadge(Object groupIdOrPath, Integer badgeId)
Remove a badge from a group.void
removeMember(Object groupIdOrPath, Integer userId)
Removes member from the group.AccessRequest
requestAccess(Object groupIdOrPath)
Requests access for the authenticated user to the specified group.Group
setGroupAvatar(Object groupIdOrPath, File avatarFile)
Uploads and sets the project avatar for the specified group.Group
shareGroup(Object groupIdOrPath, Integer shareWithGroupId, AccessLevel groupAccess, Date expiresAt)
Share group with another group.Project
transferProject(Object groupIdOrPath, Object projectIdOrPath)
Transfer a project to the Group namespace.void
unshareGroup(Object groupIdOrPath, Integer sharedWithGroupId)
Unshare the group from another group.Group
updateGroup(Object groupIdOrPath, String name, String path, String description, Boolean membershipLock, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId, Integer sharedRunnersMinutesLimit)
Deprecated.Will be removed in version 5.0, replaced byupdateGroup(Object, String, String, String, Visibility, Boolean, Boolean, Integer)
Group
updateGroup(Object groupIdOrPath, String name, String path, String description, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId)
Updates a project group.Group
updateGroup(Object groupIdOrPath, GroupParams params)
Updates the project group.Group
updateGroup(Group group)
Updates a project group.Member
updateMember(Object groupIdOrPath, Integer userId, Integer accessLevel)
Updates a member of a group.Member
updateMember(Object groupIdOrPath, Integer userId, Integer accessLevel, Date expiresAt)
Updates a member of a group.Member
updateMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel)
Updates a member of a group.Member
updateMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt)
Updates a member of a group.Variable
updateVariable(Object groupIdOrPath, String key, String value, Boolean isProtected)
Update a group variable.Variable
updateVariable(Object groupIdOrPath, String key, String value, Boolean isProtected, Boolean masked)
Update a group variable.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
GroupApi
-
-
Method Details
-
getGroups
Get a list of groups. (As user: my groups, as admin: all groups)
WARNING: Do not use this method to fetch groups from https://gitlab.com, gitlab.com has many 1,000's of public groups and it will a long time to fetch all of them. Instead usegetGroups(int itemsPerPage)
which will return a Pager of Group instances.GitLab Endpoint: GET /groups
- Returns:
- the list of groups viewable by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getGroups
Get a list of groups (As user: my groups, as admin: all groups) and in the specified page range.GitLab Endpoint: GET /groups
- Parameters:
page
- the page to getperPage
- the number of Group instances per page- Returns:
- the list of groups viewable by the authenticated userin the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getGroups
Get a Pager of groups. (As user: my groups, as admin: all groups)GitLab Endpoint: GET /groups
- Parameters:
itemsPerPage
- the number of Group instances that will be fetched per page- Returns:
- the list of groups viewable by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupsStream
Get a Stream of groups. (As user: my groups, as admin: all groups)GitLab Endpoint: GET /groups
- Returns:
- a Stream of groups viewable by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getGroups
Get all groups that match your string in their name or path.- Parameters:
search
- the group name or path search criteria- Returns:
- a List containing matching Group instances
- Throws:
GitLabApiException
- if any exception occurs
-
getGroups
Get all groups that match your string in their name or path.- Parameters:
search
- the group name or path search criteriapage
- the page to getperPage
- the number of Group instances per page- Returns:
- a List containing matching Group instances
- Throws:
GitLabApiException
- if any exception occurs
-
getGroups
Get all groups that match your string in their name or path.- Parameters:
search
- the group name or path search criteriaitemsPerPage
- the number of Group instances that will be fetched per page- Returns:
- a Pager containing matching Group instances
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupsStream
Get all groups that match your string in their name or path as a Stream.- Parameters:
search
- the group name or path search criteria- Returns:
- a Stream containing matching Group instances
- Throws:
GitLabApiException
- if any exception occurs
-
getGroups
Get a list of visible groups for the authenticated user using the provided filter.GitLab Endpoint: GET /groups
- Parameters:
filter
- the GroupFilter to match against- Returns:
- a List<Group> of the matching groups
- Throws:
GitLabApiException
- if any exception occurs
-
getGroups
Get a Pager of visible groups for the authenticated user using the provided filter.GitLab Endpoint: GET /groups
- Parameters:
filter
- the GroupFilter to match againstitemsPerPage
- the number of Group instances that will be fetched per page- Returns:
- a Pager containing matching Group instances
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupsStream
Get a Stream of visible groups for the authenticated user using the provided filter.GitLab Endpoint: GET /groups
- Parameters:
filter
- the GroupFilter to match against- Returns:
- a Stream<Group> of the matching groups
- Throws:
GitLabApiException
- if any exception occurs
-
getSubGroups
Get a list of visible direct subgroups in this group.GitLab Endpoint: GET /groups/:id/subgroups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, required- Returns:
- a List<Group> containing the group's sub-groups
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.3.0
-
getSubGroups
Get a Pager of visible direct subgroups in this group.GitLab Endpoint: GET /groups/:id/subgroups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireditemsPerPage
- the number of Group instances that will be fetched per page- Returns:
- a Pager containing matching Group instances
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.3.0
-
getSubGroupsStream
Get a Stream of visible direct subgroups in this group.GitLab Endpoint: GET /groups/:id/subgroups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, required- Returns:
- a Stream<Group> containing the group's sub-groups
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.3.0
-
getSubGroups
public List<Group> getSubGroups(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned) throws GitLabApiExceptionGet a list of visible direct subgroups in this group.GitLab Endpoint: GET /groups/:id/subgroups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredskipGroups
- skip the group IDs passedallAvailable
- show all the groups you have access to (defaults to false for authenticated users)search
- return the list of authorized groups matching the search criteriaorderBy
- order groups by NAME or PATH. Default is NAMEsortOrder
- order groups in ASC or DESC order. Default is ASCstatistics
- include group statistics (admins only)owned
- limit to groups owned by the current user- Returns:
- a List<Group> of the matching subgroups
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.3.0
-
getSubGroups
public List<Group> getSubGroups(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned, int page, int perPage) throws GitLabApiExceptionGet a list of visible direct subgroups in this group.GitLab Endpoint: GET /groups/:id/subgroups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredskipGroups
- skip the group IDs passedallAvailable
- show all the groups you have access to (defaults to false for authenticated users)search
- return the list of authorized groups matching the search criteriaorderBy
- order groups by NAME or PATH. Default is NAMEsortOrder
- order groups in ASC or DESC order. Default is ASCstatistics
- include group statistics (admins only)owned
- limit to groups owned by the current userpage
- the page to getperPage
- the number of Group instances per page- Returns:
- a List<Group> of the matching subgroups
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.3.0
-
getSubGroups
public Pager<Group> getSubGroups(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned, int itemsPerPage) throws GitLabApiExceptionGet a Pager of visible direct subgroups in this group.GitLab Endpoint: GET /groups/:id/subgroups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredskipGroups
- skip the group IDs passedallAvailable
- show all the groups you have access to (defaults to false for authenticated users)search
- return the list of authorized groups matching the search criteriaorderBy
- order groups by NAME or PATH. Default is NAMEsortOrder
- order groups in ASC or DESC order. Default is ASCstatistics
- include group statistics (admins only)owned
- limit to groups owned by the current useritemsPerPage
- the number of Group instances that will be fetched per page- Returns:
- a Pager containing matching Group instances
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.3.0
-
getSubGroupsStream
public Stream<Group> getSubGroupsStream(Object groupIdOrPath, List<Integer> skipGroups, Boolean allAvailable, String search, Constants.GroupOrderBy orderBy, Constants.SortOrder sortOrder, Boolean statistics, Boolean owned) throws GitLabApiExceptionGet a Stream of visible direct subgroups in this group.GitLab Endpoint: GET /groups/:id/subgroups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredskipGroups
- skip the group IDs passedallAvailable
- show all the groups you have access to (defaults to false for authenticated users)search
- return the list of authorized groups matching the search criteriaorderBy
- order groups by NAME or PATH. Default is NAMEsortOrder
- order groups in ASC or DESC order. Default is ASCstatistics
- include group statistics (admins only)owned
- limit to groups owned by the current user- Returns:
- a Stream<Group> of the matching subgroups
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.3.0
-
getProjects
public List<Project> getProjects(Object groupIdOrPath, GroupProjectsFilter filter) throws GitLabApiExceptionGet a list of projects belonging to the specified group ID and filter.GitLab Endpoint: GET /groups/:id/projects
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathfilter
- the GroupProjectsFilter instance holding the filter values for the query- Returns:
- a List containing Project instances that belong to the group and match the provided filter
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
public Pager<Project> getProjects(Object groupIdOrPath, GroupProjectsFilter filter, int itemsPerPage) throws GitLabApiExceptionGet a Pager of projects belonging to the specified group ID and filter.GitLab Endpoint: GET /groups/:id/projects
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathfilter
- the GroupProjectsFilter instance holding the filter values for the queryitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager containing Project instances that belong to the group and match the provided filter
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectsStream
public Stream<Project> getProjectsStream(Object groupIdOrPath, GroupProjectsFilter filter) throws GitLabApiExceptionGet a Stream of projects belonging to the specified group ID and filter.GitLab Endpoint: GET /groups/:id/projects
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathfilter
- the GroupProjectsFilter instance holding the filter values for the query- Returns:
- a Stream containing Project instances that belong to the group and match the provided filter
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
Get a list of projects belonging to the specified group ID.GitLab Endpoint: GET /groups/:id/projects
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a list of projects belonging to the specified group ID
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
public List<Project> getProjects(Object groupIdOrPath, int page, int perPage) throws GitLabApiExceptionGet a list of projects belonging to the specified group ID in the specified page range.GitLab Endpoint: GET /groups/:id/projects
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathpage
- the page to getperPage
- the number of Project instances per page- Returns:
- a list of projects belonging to the specified group ID in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getProjects
public Pager<Project> getProjects(Object groupIdOrPath, int itemsPerPage) throws GitLabApiExceptionGet a Pager of projects belonging to the specified group ID.GitLab Endpoint: GET /groups/:id/projects
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of projects belonging to the specified group ID
- Throws:
GitLabApiException
- if any exception occurs
-
getProjectsStream
Get a Stream of projects belonging to the specified group ID.GitLab Endpoint: GET /groups/:id/projects
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a Stream of projects belonging to the specified group ID
- Throws:
GitLabApiException
- if any exception occurs
-
getGroup
Get all details of a group.GitLab Endpoint: GET /groups/:id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- the Group instance for the specified group path
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalGroup
Get all details of a group as an Optional instance.GitLab Endpoint: GET /groups/:id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- the Group for the specified group path as an Optional instance
-
createGroup
Creates a new project group. Available only for users who can create groups.GitLab Endpoint: POST /groups
- Parameters:
params
- a GroupParams instance holding the parameters for the group creation- Returns:
- the created Group instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateGroup
Updates the project group. Only available to group owners and administrators.GitLab Endpoint: PUT /groups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathparams
- the GroupParams instance holding the properties to update- Returns:
- updated Group instance
- Throws:
GitLabApiException
- at any exception
-
addGroup
Creates a new project group. Available only for users who can create groups.GitLab Endpoint: POST /groups
- Parameters:
name
- the name of the group to addpath
- the path for the group- Returns:
- the created Group instance
- Throws:
GitLabApiException
- if any exception occurs
-
addGroup
- Throws:
GitLabApiException
-
addGroup
public Group addGroup(String name, String path, String description, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId) throws GitLabApiExceptionCreates a new project group. Available only for users who can create groups.GitLab Endpoint: POST /groups
- Parameters:
name
- the name of the group to addpath
- the path for the groupdescription
- (optional) - The group's descriptionvisibility
- (optional) - The group's visibility. Can be private, internal, or public.lfsEnabled
- (optional) - Enable/disable Large File Storage (LFS) for the projects in this grouprequestAccessEnabled
- (optional) - Allow users to request member accessparentId
- (optional) - The parent group id for creating nested group- Returns:
- the created Group instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateGroup
Updates a project group. Available only for users who can create groups.GitLab Endpoint: PUT /groups
- Parameters:
group
- to update- Returns:
- updated group instance
- Throws:
GitLabApiException
- at any exception
-
updateGroup
public Group updateGroup(Object groupIdOrPath, String name, String path, String description, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId) throws GitLabApiExceptionUpdates a project group. Available only for users who can create groups.GitLab Endpoint: PUT /groups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathname
- the name of the group to addpath
- the path for the groupdescription
- (optional) - The group's descriptionvisibility
- (optional) - The group's visibility. Can be private, internal, or public.lfsEnabled
- (optional) - Enable/disable Large File Storage (LFS) for the projects in this grouprequestAccessEnabled
- (optional) - Allow users to request member accessparentId
- (optional) - The parent group id for creating nested group- Returns:
- the updated Group instance
- Throws:
GitLabApiException
- if any exception occurs
-
addGroup
public Group addGroup(String name, String path, String description, Boolean membershipLock, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiExceptionDeprecated.Will be removed in version 5.0, replaced byaddGroup(String, String, String, Visibility, Boolean, Boolean, Integer)
Creates a new project group. Available only for users who can create groups.GitLab Endpoint: POST /groups
- Parameters:
name
- the name of the group to addpath
- the path for the groupdescription
- (optional) - The group's descriptionmembershipLock
- (optional, boolean) - Prevent adding new members to project membership within this groupshareWithGroupLock
- (optional, boolean) - Prevent sharing a project with another group within this groupvisibility
- (optional) - The group's visibility. Can be private, internal, or public.lfsEnabled
- (optional) - Enable/disable Large File Storage (LFS) for the projects in this grouprequestAccessEnabled
- (optional) - Allow users to request member access.parentId
- (optional) - The parent group id for creating nested group.sharedRunnersMinutesLimit
- (optional) - (admin-only) Pipeline minutes quota for this group- Returns:
- the created Group instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateGroup
public Group updateGroup(Object groupIdOrPath, String name, String path, String description, Boolean membershipLock, Boolean shareWithGroupLock, Visibility visibility, Boolean lfsEnabled, Boolean requestAccessEnabled, Integer parentId, Integer sharedRunnersMinutesLimit) throws GitLabApiExceptionDeprecated.Will be removed in version 5.0, replaced byupdateGroup(Object, String, String, String, Visibility, Boolean, Boolean, Integer)
Updates a project group. Available only for users who can create groups.GitLab Endpoint: PUT /groups
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathname
- the name of the group to addpath
- the path for the groupdescription
- (optional) - The group's descriptionmembershipLock
- (optional, boolean) - Prevent adding new members to project membership within this groupshareWithGroupLock
- (optional, boolean) - Prevent sharing a project with another group within this groupvisibility
- (optional) - The group's visibility. Can be private, internal, or public.lfsEnabled
- (optional) - Enable/disable Large File Storage (LFS) for the projects in this grouprequestAccessEnabled
- (optional) - Allow users to request member accessparentId
- (optional) - The parent group id for creating nested groupsharedRunnersMinutesLimit
- (optional) - (admin-only) Pipeline minutes quota for this group- Returns:
- the updated Group instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteGroup
Removes group with all projects inside.GitLab Endpoint: DELETE /groups/:id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getMembers
Get a list of group members viewable by the authenticated user.GitLab Endpoint: GET /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a list of group members viewable by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getMembers
public List<Member> getMembers(Object groupIdOrPath, int page, int perPage) throws GitLabApiExceptionGet a list of group members viewable by the authenticated user in the specified page range.GitLab Endpoint: GET /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathpage
- the page to getperPage
- the number of Member instances per page- Returns:
- a list of group members viewable by the authenticated user in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getMembers
Get a Pager of group members viewable by the authenticated user.GitLab Endpoint: GET /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathitemsPerPage
- the number of Member instances that will be fetched per page- Returns:
- a list of group members viewable by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getMembersStream
Get a Stream of group members viewable by the authenticated user.GitLab Endpoint: GET /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a Stream of group members viewable by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getMember
Get a group member viewable by the authenticated user.GitLab Endpoint: GET /groups/:id/members/:id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the member ID of the member to get- Returns:
- a member viewable by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalMember
Get a group member viewable by the authenticated user as an Optional instance.GitLab Endpoint: GET /groups/:id/members/:id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the member ID of the member to get- Returns:
- a member viewable by the authenticated user as an Optional instance
-
getMember
public Member getMember(Object groupIdOrPath, Integer userId, Boolean includeInherited) throws GitLabApiExceptionGets a group team member, optionally including inherited member.GitLab Endpoint: GET /groups/:id/members/all/:user_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the user ID of the memberincludeInherited
- if true will the member even if inherited thru an ancestor group- Returns:
- the member specified by the project ID/user ID pair
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalMember
public Optional<Member> getOptionalMember(Object groupIdOrPath, Integer userId, Boolean includeInherited)Gets a group team member, optionally including inherited member.GitLab Endpoint: GET /groups/:id/members/all/:user_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the user ID of the memberincludeInherited
- if true will the member even if inherited thru an ancestor group- Returns:
- the member specified by the group ID/user ID pair as the value of an Optional
-
getAllMembers
Gets a list of group members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the group and of one or more ancestor group.GitLab Endpoint: GET /groups/:id/members/all
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a list of group members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
@Deprecated public List<Member> getAllMembers(Object groupIdOrPath, int page, int perPage) throws GitLabApiExceptionDeprecated.Will be removed in version 5.0Gets a list of group members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the group and of one or more ancestor group.GitLab Endpoint: GET /groups/:id/members/all
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathpage
- the page to getperPage
- the number of Member instances per page- Returns:
- a list of group members viewable by the authenticated user, including inherited members through ancestor groups in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
public Pager<Member> getAllMembers(Object groupIdOrPath, int itemsPerPage) throws GitLabApiExceptionGets a Pager of group members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the group and of one or more ancestor group.GitLab Endpoint: GET /groups/:id/members/all
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathitemsPerPage
- the number of Member instances that will be fetched per page- Returns:
- a Pager of group members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembersStream
Gets a Stream of group members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the group and of one or more ancestor group.GitLab Endpoint: GET /groups/:id/members/all
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a Stream of group members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
public List<Member> getAllMembers(Object groupIdOrPath, String query, List<Integer> userIds) throws GitLabApiExceptionGets a list of group members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the group and of one or more ancestor group.GitLab Endpoint: GET /groups/:id/members/all
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathquery
- a query string to search for membersuserIds
- filter the results on the given user IDs- Returns:
- the group members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembers
public Pager<Member> getAllMembers(Object groupIdOrPath, String query, List<Integer> userIds, int itemsPerPage) throws GitLabApiExceptionGets a Pager of group members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the group and of one or more ancestor group.GitLab Endpoint: GET /groups/:id/members/all
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathquery
- a query string to search for membersuserIds
- filter the results on the given user IDsitemsPerPage
- the number of Project instances that will be fetched per page- Returns:
- a Pager of the group members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
getAllMembersStream
public Stream<Member> getAllMembersStream(Object groupIdOrPath, String query, List<Integer> userIds) throws GitLabApiExceptionGets a Stream of group members viewable by the authenticated user, including inherited members through ancestor groups. Returns multiple times the same user (with different member attributes) when the user is a member of the group and of one or more ancestor group.GitLab Endpoint: GET /groups/:id/members/all
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathquery
- a query string to search for membersuserIds
- filter the results on the given user IDs- Returns:
- a Stream of the group members viewable by the authenticated user, including inherited members through ancestor groups
- Throws:
GitLabApiException
- if any exception occurs
-
addMember
public Member addMember(Object groupIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiExceptionAdds a user to the list of group members.GitLab Endpoint: POST /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, required- Returns:
- a Member instance for the added user
- Throws:
GitLabApiException
- if any exception occurs
-
addMember
public Member addMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiExceptionAdds a user to the list of group members.GitLab Endpoint: POST /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, required- Returns:
- a Member instance for the added user
- Throws:
GitLabApiException
- if any exception occurs
-
addMember
public Member addMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiExceptionAdds a user to the list of group members.GitLab Endpoint: POST /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireduserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, requiredexpiresAt
- the date the membership in the group will expire, optional- Returns:
- a Member instance for the added user
- Throws:
GitLabApiException
- if any exception occurs
-
addMember
public Member addMember(Object groupIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiExceptionAdds a user to the list of group members.GitLab Endpoint: POST /groups/:id/members
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireduserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, requiredexpiresAt
- the date the membership in the group will expire, optional- Returns:
- a Member instance for the added user
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object groupIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiExceptionUpdates a member of a group.GitLab Endpoint: PUT /groups/:groupId/members/:userId
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, required- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiExceptionUpdates a member of a group.GitLab Endpoint: PUT /groups/:groupId/members/:userId
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, required- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object groupIdOrPath, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiExceptionUpdates a member of a group.GitLab Endpoint: PUT /groups/:groupId/members/:userId
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredexpiresAt
- the date the membership in the group will expire, optional- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
updateMember
public Member updateMember(Object groupIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiExceptionUpdates a member of a group.GitLab Endpoint: PUT /groups/:groupId/members/:userId
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredexpiresAt
- the date the membership in the group will expire, optional- Returns:
- the updated member
- Throws:
GitLabApiException
- if any exception occurs
-
removeMember
Removes member from the group.GitLab Endpoint: DELETE /groups/:id/members/:user_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requireduserId
- the user ID of the member to remove- Throws:
GitLabApiException
- if any exception occurs
-
ldapSync
Syncs the group with its linked LDAP group. Only available to group owners and administrators.GitLab Endpoint: POST /groups/:id/ldap_sync
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Throws:
GitLabApiException
- if any exception occurs
-
addLdapGroupLink
public void addLdapGroupLink(Object groupIdOrPath, String cn, AccessLevel groupAccess, String provider) throws GitLabApiExceptionAdds an LDAP group link.GitLab Endpoint: POST /groups/:id/ldap_group_links
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathcn
- the CN of a LDAP groupgroupAccess
- the minimum access level for members of the LDAP groupprovider
- the LDAP provider for the LDAP group- Throws:
GitLabApiException
- if any exception occurs
-
addLdapGroupLink
public void addLdapGroupLink(Object groupIdOrPath, String cn, Integer groupAccess, String provider) throws GitLabApiExceptionAdds an LDAP group link.GitLab Endpoint: POST /groups/:id/ldap_group_links
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathcn
- the CN of a LDAP groupgroupAccess
- the minimum access level for members of the LDAP groupprovider
- the LDAP provider for the LDAP group- Throws:
GitLabApiException
- if any exception occurs
-
deleteLdapGroupLink
Deletes an LDAP group link.GitLab Endpoint: DELETE /groups/:id/ldap_group_links/:cn
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathcn
- the CN of the LDAP group link to delete- Throws:
GitLabApiException
- if any exception occurs
-
deleteLdapGroupLink
public void deleteLdapGroupLink(Object groupIdOrPath, String cn, String provider) throws GitLabApiExceptionDeletes an LDAP group link for a specific LDAP provider.GitLab Endpoint: DELETE /groups/:id/ldap_group_links/:provider/:cn
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathcn
- the CN of the LDAP group link to deleteprovider
- the name of the LDAP provider- Throws:
GitLabApiException
- if any exception occurs
-
getVariables
Get list of a group’s variables.GitLab Endpoint: GET /groups/:id/variables
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a list of variables belonging to the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getVariables
public List<Variable> getVariables(Object groupIdOrPath, int page, int perPage) throws GitLabApiExceptionGet a list of variables for the specified group in the specified page range.GitLab Endpoint: GET /groups/:id/variables
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathpage
- the page to getperPage
- the number of Variable instances per page- Returns:
- a list of variables belonging to the specified group in the specified page range
- Throws:
GitLabApiException
- if any exception occurs
-
getVariables
public Pager<Variable> getVariables(Object groupIdOrPath, int itemsPerPage) throws GitLabApiExceptionGet a Pager of variables belonging to the specified group.GitLab Endpoint: GET /groups/:id/variables
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathitemsPerPage
- the number of Variable instances that will be fetched per page- Returns:
- a Pager of variables belonging to the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getVariablesStream
Get a Stream of variables belonging to the specified group.GitLab Endpoint: GET /groups/:id/variables
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a Stream of variables belonging to the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getVariable
Get the details of a group variable.GitLab Endpoint: GET /groups/:id/variables/:key
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathkey
- the key of an existing variable, required- Returns:
- the Variable instance for the specified group variable
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalVariable
Get the details of a group variable as an Optional instance.GitLab Endpoint: GET /groups/:id/variables/:key
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathkey
- the key of an existing variable, required- Returns:
- the Variable for the specified group variable as an Optional instance
-
createVariable
public Variable createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiExceptionCreate a new group variable.GitLab Endpoint: POST /groups/:id/variables
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredkey
- the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, requiredvalue
- the value for the variable, requiredisProtected
- whether the variable is protected, optional- Returns:
- a Variable instance with the newly created variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
createVariable
public Variable createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected, Boolean masked) throws GitLabApiExceptionCreate a new group variable.GitLab Endpoint: POST /groups/:id/variables
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, 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, optionalmasked
- whether the variable is masked, optional- Returns:
- a Variable instance with the newly created variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
updateVariable
public Variable updateVariable(Object groupIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiExceptionUpdate a group variable.GitLab Endpoint: PUT /groups/:id/variables/:key
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredkey
- the key of an existing variable, requiredvalue
- the value for the variable, requiredisProtected
- whether the variable is protected, optional- Returns:
- a Variable instance with the updated variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
updateVariable
public Variable updateVariable(Object groupIdOrPath, String key, String value, Boolean isProtected, Boolean masked) throws GitLabApiExceptionUpdate a group variable.GitLab Endpoint: PUT /groups/:id/variables/:key
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredkey
- the key of an existing variable, requiredvalue
- the value for the variable, requiredisProtected
- whether the variable is protected, optionalmasked
- whether the variable is masked, optional- Returns:
- a Variable instance with the updated variable
- Throws:
GitLabApiException
- if any exception occurs during execution
-
deleteVariable
Deletes a group variable.GitLab Endpoint: DELETE /groups/:id/variables/:key
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredkey
- the key of an existing variable, required- Throws:
GitLabApiException
- if any exception occurs
-
transferProject
public Project transferProject(Object groupIdOrPath, Object projectIdOrPath) throws GitLabApiExceptionTransfer a project to the Group namespace. Available only for admin users.GitLab Endpoint: POST /groups/:id/projects/:project_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredprojectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance, required- Returns:
- the transferred Project instance
- Throws:
GitLabApiException
- if any exception occurs during execution
-
getAuditEvents
public List<AuditEvent> getAuditEvents(Object groupIdOrPath, Date created_after, Date created_before) throws GitLabApiExceptionGet a List of the group audit events viewable by Maintainer or an Owner of the group.GET /groups/:id/audit_events
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathcreated_after
- Group audit events created on or after the given time.created_before
- Group audit events created on or before the given time.- Returns:
- a List of group Audit events
- Throws:
GitLabApiException
- if any exception occurs
-
getAuditEvents
public Pager<AuditEvent> getAuditEvents(Object groupIdOrPath, Date created_after, Date created_before, int itemsPerPage) throws GitLabApiExceptionGet a Pager of the group audit events viewable by Maintainer or an Owner of the group.GET /groups/:id/audit_events
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathcreated_after
- Group audit events created on or after the given time.created_before
- Group audit events created on or before the given time.itemsPerPage
- the number of Audit Event instances that will be fetched per page- Returns:
- a Pager of group Audit events
- Throws:
GitLabApiException
- if any exception occurs
-
getAuditEventsStream
public Stream<AuditEvent> getAuditEventsStream(Object groupIdOrPath, Date created_after, Date created_before) throws GitLabApiExceptionGet a Stream of the group audit events viewable by Maintainer or an Owner of the group.GET /groups/:id/audit_events
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathcreated_after
- Group audit events created on or after the given time.created_before
- Group audit events created on or before the given time.- Returns:
- a Stream of group Audit events
- Throws:
GitLabApiException
- if any exception occurs
-
getAuditEvent
public AuditEvent getAuditEvent(Object groupIdOrPath, Integer auditEventId) throws GitLabApiExceptionGet a specific audit event of a group.GitLab Endpoint: GET /groups/:id/audit_events/:id_audit_event
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathauditEventId
- the auditEventId, required- Returns:
- the group Audit event
- Throws:
GitLabApiException
- if any exception occurs
-
getAccessRequests
Get a List of the group access requests viewable by the authenticated user.GET /group/:id/access_requests
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a List of project AccessRequest instances accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getAccessRequests
public Pager<AccessRequest> getAccessRequests(Object groupIdOrPath, int itemsPerPage) throws GitLabApiExceptionGet a Pager of the group access requests viewable by the authenticated user.GET /groups/:id/access_requests
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathitemsPerPage
- the number of AccessRequest instances that will be fetched per page- Returns:
- a Pager of group AccessRequest instances accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
getAccessRequestsStream
public Stream<AccessRequest> getAccessRequestsStream(Object groupIdOrPath) throws GitLabApiExceptionGet a Stream of the group access requests viewable by the authenticated user.GET /groups/:id/access_requests
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a Stream of group AccessRequest instances accessible by the authenticated user
- Throws:
GitLabApiException
- if any exception occurs
-
requestAccess
Requests access for the authenticated user to the specified group.POST /groups/:id/access_requests
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- the created AccessRequest instance
- Throws:
GitLabApiException
- if any exception occurs
-
approveAccessRequest
public AccessRequest approveAccessRequest(Object groupIdOrPath, Integer userId, AccessLevel accessLevel) throws GitLabApiExceptionApprove access for the specified user to the specified group.PUT /groups/:id/access_requests/:user_id/approve
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the user ID to approve access foraccessLevel
- the access level the user is approved for, if null will be developer (30)- Returns:
- the approved AccessRequest instance
- Throws:
GitLabApiException
- if any exception occurs
-
denyAccessRequest
Deny access for the specified user to the specified group.DELETE /groups/:id/access_requests/:user_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathuserId
- the user ID to deny access for- Throws:
GitLabApiException
- if any exception occurs
-
getBadges
Gets a list of a group’s badges and its group badges.GitLab Endpoint: GET /groups/:id/badges
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path- Returns:
- a List of Badge instances for the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getBadge
Gets a badge of a group.GitLab Endpoint: GET /groups/:id/badges/:badge_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathbadgeId
- the ID of the badge to get- Returns:
- a Badge instance for the specified group/badge ID pair
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalBadge
Get an Optional instance with the value for the specified badge.GitLab Endpoint: GET /groups/:id/badges/:badge_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathbadgeId
- the ID of the badge to get- Returns:
- an Optional instance with the specified badge as the value
-
addBadge
public Badge addBadge(Object groupIdOrPath, String linkUrl, String imageUrl) throws GitLabApiExceptionAdd a badge to a group.GitLab Endpoint: POST /groups/:id/badges
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathlinkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- a Badge instance for the added badge
- Throws:
GitLabApiException
- if any exception occurs
-
editBadge
public Badge editBadge(Object groupIdOrPath, Integer badgeId, String linkUrl, String imageUrl) throws GitLabApiExceptionEdit a badge of a group.GitLab Endpoint: PUT /groups/:id/badges
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathbadgeId
- the ID of the badge to getlinkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- a Badge instance for the editted badge
- Throws:
GitLabApiException
- if any exception occurs
-
removeBadge
Remove a badge from a group.GitLab Endpoint: DELETE /groups/:id/badges/:badge_id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathbadgeId
- the ID of the badge to remove- Throws:
GitLabApiException
- if any exception occurs
-
previewBadge
public Badge previewBadge(Object groupIdOrPath, String linkUrl, String imageUrl) throws GitLabApiExceptionReturns how the link_url and image_url final URLs would be after resolving the placeholder interpolation.GitLab Endpoint: GET /groups/:id/badges/render
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathlinkUrl
- the URL of the badge linkimageUrl
- the URL of the image link- Returns:
- a Badge instance for the rendered badge
- Throws:
GitLabApiException
- if any exception occurs
-
setGroupAvatar
Uploads and sets the project avatar for the specified group.GitLab Endpoint: PUT /groups/:id
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or pathavatarFile
- the File instance of the avatar file to upload- Returns:
- the updated Group instance
- Throws:
GitLabApiException
- if any exception occurs
-
addGroup(String, String, String, Visibility, Boolean, Boolean, Integer)