Class ServicesApi
- All Implemented Interfaces:
Constants
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteBugzillaService
(Object projectIdOrPath) Deletes the Bugzilla service for a project.void
deleteCustomIssueTrackerService
(Object projectIdOrPath) Deletes the Custom Issue Tracker service for a project.void
deleteEmailonPushService
(Object projectIdOrPath) Deletes the Emails on push service for a project.void
deleteExternalWikiService
(Object projectIdOrPath) Deletes the ExternalWiki service for a project.void
deleteGitLabCI
(Object projectIdOrPath) Deprecated.No longer supportedvoid
deleteHipChat
(Object projectIdOrPath) Deprecated.replaced withupdateHipChat
methodvoid
deleteHipChatService
(Object projectIdOrPath) Deletes the HipChatService service for a project.void
deleteJiraService
(Object projectIdOrPath) Deletes the JIRA service for a project.void
deleteMattermostService
(Object projectIdOrPath) Deletes the Mattermost service for a project.void
deleteSlackService
(Object projectIdOrPath) Deletes the Slack notifications service for a project.getBugzillaService
(Object projectIdOrPath) Get the Bugzilla service settings for a project.getCustomIssueTrackerService
(Object projectIdOrPath) Get the Custom Issue Tracker service settings for a project.getEmailOnPushService
(Object projectIdOrPath) Get Emails on push service settings for a project.getExternalWikiService
(Object projectIdOrPath) Get the ExternalWiki service settings for a project.getHipChatService
(Object projectIdOrPath) Get the HipChatService notification configuration for a project.getJiraService
(Object projectIdOrPath) Get the JIRA service settings for a project.getMattermostService
(Object projectIdOrPath) Get the Mattermost service settings for a project.getSlackService
(Object projectIdOrPath) Get the Slack notification settings for a project.void
setGitLabCI
(Object projectIdOrPath, String token, String projectCIUrl) Deprecated.No longer supportedvoid
setHipChat
(Object projectIdOrPath, String token, String room, String server) Deprecated.replaced withupdateHipChat
methodupdateBugzillaService
(Object projectIdOrPath, BugzillaService bugzillaService) Updates the Bugzilla service settings for a project.updateCustomIssueTrackerService
(Object projectIdOrPath, CustomIssueTrackerService customIssueTracker) Updates the Custom Issue Tracker service settings for a project.updateEmailOnPushService
(Object projectIdOrPath, EmailOnPushService emailsOnPush) Updates the EmailsOnPush service settings for a project.updateExternalWikiService
(Object projectIdOrPath, ExternalWikiService externalWiki) Updates the ExternalWikiService service settings for a project.updateHipChatService
(Object projectIdOrPath, HipChatService hipChat) Updates the HipChatService notification settings for a project.updateJiraService
(Object projectIdOrPath, JiraService jira) Updates the JIRA service settings for a project.updateMattermostService
(Object projectIdOrPath, MattermostService mattermostNotifications) Updates the Mattermost service settings for a project.updateSlackService
(Object projectIdOrPath, SlackService slackNotifications) Updates the Slack notification settings for a project.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
ServicesApi
-
-
Method Details
-
setGitLabCI
public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUrl) throws GitLabApiException Deprecated.No longer supportedActivates the gitlab-ci service for a project.GitLab Endpoint: PUT /projects/:id/services/gitlab-ci
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtoken
- for authenticationprojectCIUrl
- URL of the GitLab-CI project- Throws:
GitLabApiException
- if any exception occurs
-
deleteGitLabCI
Deprecated.No longer supportedDeletes the gitlab-ci service for a project.GitLab Endpoint: DELETE /projects/:id/services/gitlab-ci
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getHipChatService
Get the HipChatService notification configuration for a project.GitLab Endpoint: GET /projects/:id/services/hipchat
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a HipChatService instance holding the HipChatService notification settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateHipChatService
public HipChatService updateHipChatService(Object projectIdOrPath, HipChatService hipChat) throws GitLabApiException Updates the HipChatService notification settings for a project.
The following properties on the HipChatService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/hipchat
pushEvents (optional) - Enable notifications for push events issuesEvents (optional) - Enable notifications for issue events confidentialIssuesEvents (optional) - Enable notifications for confidential issue events MergeRequestsEvents (optional) - Enable notifications for merge request events tagPushEvents (optional) - Enable notifications for tag push events noteEvents (optional) - Enable notifications for note events confidentialNoteEvents (optional) - Enable notifications for confidential note events pipelineEvents (optional) - Enable notifications for pipeline events token (required) - The room token color (optional) - The room color notify (optional) - Enable notifications room (optional) - Room name or ID apiVersion (optional) - Leave blank for default (v2) server (false) - Leave blank for default. https://hipchat.example.com notifyOnlyBrokenPipelines (optional) - Send notifications for broken pipelines
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathhipChat
- the HipChatService instance holding the settings- Returns:
- a HipChatService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
setHipChat
public void setHipChat(Object projectIdOrPath, String token, String room, String server) throws GitLabApiException Deprecated.replaced withupdateHipChat
methodActivates HipChatService notifications.GitLab Endpoint: PUT /projects/:id/services/hipchat
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtoken
- for authenticationroom
- HipChatService Roomserver
- HipChatService Server URL- Throws:
GitLabApiException
- if any exception occurs
-
deleteHipChat
Deprecated.replaced withupdateHipChat
methodDeletes the HipChatService service for a project.GitLab Endpoint: DELETE /projects/:id/services/hipchat
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
deleteHipChatService
Deletes the HipChatService service for a project.GitLab Endpoint: DELETE /projects/:id/services/hipchat
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getSlackService
Get the Slack notification settings for a project.GitLab Endpoint: GET /projects/:id/services/slack
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a SlackService instance holding the Slack notification settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateSlackService
public SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications) throws GitLabApiException Updates the Slack notification settings for a project.
The following properties on the SlackService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/slack
webhook (required) - https://hooks.slack.com/services/... username (optional) - username defaultChannel (optional) - Default channel to use if others are not configured notifyOnlyBrokenPipelines (optional) - Send notifications for broken pipelines notifyOnlyDefault_branch (optional) - Send notifications only for the default branch pushEvents (optional) - Enable notifications for push events issuesEvents (optional) - Enable notifications for issue events confidentialIssuesEvents (optional) - Enable notifications for confidential issue events mergeRequestsEvents (optional) - Enable notifications for merge request events tagPushEvents (optional) - Enable notifications for tag push events noteEvents (optional) - Enable notifications for note events confidentialNoteEvents (optional) - Enable notifications for confidential note events pipelineEvents (optional) - Enable notifications for pipeline events wikiPageEvents (optional) - Enable notifications for wiki page events pushChannel (optional) - The name of the channel to receive push events notifications issueChannel (optional) - The name of the channel to receive issues events notifications confidentialIssueChannel (optional) - The name of the channel to receive confidential issues events notifications mergeRequestChannel (optional) - The name of the channel to receive merge request events notifications noteChannel (optional) - The name of the channel to receive note events notifications confidentialNoteChannel (optional) - The name of the channel to receive confidential note events notifications tagPushChannel (optional) - The name of the channel to receive tag push events notifications pipelineChannel (optional) - The name of the channel to receive pipeline events notifications wikiPageChannel (optional) - The name of the channel to receive wiki page events notifications
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathslackNotifications
- the SlackService instance holding the settings- Returns:
- a SlackService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
deleteSlackService
Deletes the Slack notifications service for a project.GitLab Endpoint: DELETE /projects/:id/services/slack
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getJiraService
Get the JIRA service settings for a project.GitLab Endpoint: GET /projects/:id/services/jira
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a JiraService instance holding the JIRA service settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateJiraService
public JiraService updateJiraService(Object projectIdOrPath, JiraService jira) throws GitLabApiException Updates the JIRA service settings for a project.
The following properties on the JiraService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/jira
mergeRequestsEvents (optional) - Enable notifications for merge request events commitEvents (optional) - Enable notifications for commit events url (required) - The URL to the JIRA project which is being linked to this GitLab project, e.g., https://jira.example.com. apiUrl (optional) - The JIRA API url if different than url projectKey (optional) - The short identifier for your JIRA project, all uppercase, e.g., PROJ. username (required) - The username of the user created to be used with GitLab/JIRA. password (required) - The password of the user created to be used with GitLab/JIRA. jiraIssueTransitionId (optional) - The ID of a transition that moves issues to a closed state.
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathjira
- the JiraService instance holding the settings- Returns:
- a JiraService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
deleteJiraService
Deletes the JIRA service for a project.GitLab Endpoint: DELETE /projects/:id/services/jira
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getExternalWikiService
Get the ExternalWiki service settings for a project.GitLab Endpoint: GET /projects/:id/services/external-wiki
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a ExternalWikiService instance holding the External Wiki service settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateExternalWikiService
public ExternalWikiService updateExternalWikiService(Object projectIdOrPath, ExternalWikiService externalWiki) throws GitLabApiException Updates the ExternalWikiService service settings for a project.
The following properties on the JiraService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/external-wiki
external_wiki_url (required) - The URL to the External Wiki project which is being linked to this GitLab project, e.g., http://www.wikidot.com/
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathexternalWiki
- the ExternalWikiService instance holding the settings- Returns:
- a ExternalWikiService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
deleteExternalWikiService
Deletes the ExternalWiki service for a project.GitLab Endpoint: DELETE /projects/:id/services/external-wiki
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getMattermostService
Get the Mattermost service settings for a project.GitLab Endpoint: GET /projects/:id/services/mattermost
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a MattermostService instance holding the Mattermost service settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateMattermostService
public MattermostService updateMattermostService(Object projectIdOrPath, MattermostService mattermostNotifications) throws GitLabApiException Updates the Mattermost service settings for a project.
The following properties on the MattermostService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/mattermost
webhook (required) - https://hooks.slack.com/services/... username (optional) - username defaultChannel (optional) - Default channel to use if others are not configured notifyOnlyBrokenPipelines (optional) - Send notifications for broken pipelines notifyOnlyDefault_branch (optional) - Send notifications only for the default branch pushEvents (optional) - Enable notifications for push events issuesEvents (optional) - Enable notifications for issue events confidentialIssuesEvents (optional) - Enable notifications for confidential issue events mergeRequestsEvents (optional) - Enable notifications for merge request events tagPushEvents (optional) - Enable notifications for tag push events noteEvents (optional) - Enable notifications for note events confidentialNoteEvents (optional) - Enable notifications for confidential note events pipelineEvents (optional) - Enable notifications for pipeline events wikiPageEvents (optional) - Enable notifications for wiki page events pushChannel (optional) - The name of the channel to receive push events notifications issueChannel (optional) - The name of the channel to receive issues events notifications confidentialIssueChannel (optional) - The name of the channel to receive confidential issues events notifications mergeRequestChannel (optional) - The name of the channel to receive merge request events notifications noteChannel (optional) - The name of the channel to receive note events notifications confidentialNoteChannel (optional) - The name of the channel to receive confidential note events notifications tagPushChannel (optional) - The name of the channel to receive tag push events notifications pipelineChannel (optional) - The name of the channel to receive pipeline events notifications wikiPageChannel (optional) - The name of the channel to receive wiki page events notifications
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathmattermostNotifications
- the MattermostService instance holding the settings- Returns:
- a MattermostService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
deleteMattermostService
Deletes the Mattermost service for a project.GitLab Endpoint: DELETE /projects/:id/services/external-wiki
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getBugzillaService
Get the Bugzilla service settings for a project.GitLab Endpoint: GET /projects/:id/services/bugzilla
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a BugzillaService instance holding the External Wiki service settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateBugzillaService
public BugzillaService updateBugzillaService(Object projectIdOrPath, BugzillaService bugzillaService) throws GitLabApiException Updates the Bugzilla service settings for a project.
The following properties on the BugzillaService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/bugzilla
description (optional), description issuesUrl (required), issue url newIssueUrl (required), new Issue url projectUrl (required), project url pushEvents (optional) - Enable notifications for push events title (optional), the title for the custom issue tracker
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathbugzillaService
- the BugzillaService instance holding the settings- Returns:
- a BugzillaService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
deleteBugzillaService
Deletes the Bugzilla service for a project.GitLab Endpoint: DELETE /projects/:id/services/bugzilla
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getCustomIssueTrackerService
public CustomIssueTrackerService getCustomIssueTrackerService(Object projectIdOrPath) throws GitLabApiException Get the Custom Issue Tracker service settings for a project.GitLab Endpoint: GET /projects/:id/services/custom_issue_tracker
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a ExternalWikiService instance holding the External Wiki service settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateCustomIssueTrackerService
public CustomIssueTrackerService updateCustomIssueTrackerService(Object projectIdOrPath, CustomIssueTrackerService customIssueTracker) throws GitLabApiException Updates the Custom Issue Tracker service settings for a project.
The following properties on the CustomIssueTrackerService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/custom_issue_tracker
description (optional), description issuesUrl (required), issue url newIssueUrl (required), new Issue url projectUrl (required), project url pushEvents (optional) - Enable notifications for push events title (optional), the title for the custom issue tracker
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathcustomIssueTracker
- the CustomIssueTrackerService instance holding the settings- Returns:
- a CustomIssueTrackerService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
deleteCustomIssueTrackerService
Deletes the Custom Issue Tracker service for a project.GitLab Endpoint: DELETE /projects/:id/services/custom_issue_tracker
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-
getEmailOnPushService
Get Emails on push service settings for a project.GitLab Endpoint: GET /projects/:id/services/emails-on-push
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Returns:
- a EmailOnPushService instance holding the Email on push settings
- Throws:
GitLabApiException
- if any exception occurs
-
updateEmailOnPushService
public EmailOnPushService updateEmailOnPushService(Object projectIdOrPath, EmailOnPushService emailsOnPush) throws GitLabApiException Updates the EmailsOnPush service settings for a project.
The following properties on the EmailOnPushService instance are utilized in the update of the settings:GitLab Endpoint: PUT /projects/:id/services/emails-on-push
recipients (required), Emails separated by whitespace disable_diffs (optional), Disable code diffs send_from_committer_email (optional), Send from committer push_events (optional), Enable notifications for push events tag_push_events(optional), Enable notifications for tag push events branches_to_be_notified (optional), Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". Notifications are always fired for tag pushes. The default value is "all"
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathemailsOnPush
- the EmailOnPushService instance holding the settings- Returns:
- a EmailOnPushService instance holding the newly updated settings
- Throws:
GitLabApiException
- if any exception occurs
-
deleteEmailonPushService
Deletes the Emails on push service for a project.GitLab Endpoint: DELETE /projects/:id/services/emails-on-push
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or path- Throws:
GitLabApiException
- if any exception occurs
-