public class ServicesApi extends AbstractApi
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.TagOrderBy, Constants.TargetType, Constants.TokenType
gitLabApi
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor and Description |
---|
ServicesApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
void |
deleteBugzillaService(Object projectIdOrPath)
Deletes the Bugzilla service for a project.
|
void |
deleteCustomIssueTrackerService(Object projectIdOrPath)
Deletes the Custom Issue Tracker service for a project.
|
void |
deleteExternalWikiService(Object projectIdOrPath)
Deletes the ExternalWiki service for a project.
|
void |
deleteGitLabCI(Object projectIdOrPath)
Deprecated.
No longer supported
|
void |
deleteHipChat(Object projectIdOrPath)
Deprecated.
replaced with
updateHipChat method |
void |
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.
|
BugzillaService |
getBugzillaService(Object projectIdOrPath)
Get the Bugzilla service settings for a project.
|
CustomIssueTrackerService |
getCustomIssueTrackerService(Object projectIdOrPath)
Get the Custom Issue Tracker service settings for a project.
|
ExternalWikiService |
getExternalWikiService(Object projectIdOrPath)
Get the ExternalWiki service settings for a project.
|
HipChatService |
getHipChatService(Object projectIdOrPath)
Get the HipChatService notification configuration for a project.
|
JiraService |
getJiraService(Object projectIdOrPath)
Get the JIRA service settings for a project.
|
MattermostService |
getMattermostService(Object projectIdOrPath)
Get the Mattermost service settings for a project.
|
SlackService |
getSlackService(Object projectIdOrPath)
Get the Slack notification settings for a project.
|
void |
setGitLabCI(Object projectIdOrPath,
String token,
String projectCIUrl)
Deprecated.
No longer supported
|
void |
setHipChat(Object projectIdOrPath,
String token,
String room,
String server)
Deprecated.
replaced with
updateHipChat method |
BugzillaService |
updateBugzillaService(Object projectIdOrPath,
BugzillaService bugzillaService)
Updates the Bugzilla service settings for a project.
|
CustomIssueTrackerService |
updateCustomIssueTrackerService(Object projectIdOrPath,
CustomIssueTrackerService customIssueTracker)
Updates the Custom Issue Tracker service settings for a project.
|
ExternalWikiService |
updateExternalWikiService(Object projectIdOrPath,
ExternalWikiService externalWiki)
Updates the ExternalWikiService service settings for a project.
|
HipChatService |
updateHipChatService(Object projectIdOrPath,
HipChatService hipChat)
Updates the HipChatService notification settings for a project.
|
JiraService |
updateJiraService(Object projectIdOrPath,
JiraService jira)
Updates the JIRA service settings for a project.
|
MattermostService |
updateMattermostService(Object projectIdOrPath,
MattermostService mattermostNotifications)
Updates the Mattermost service settings for a project.
|
SlackService |
updateSlackService(Object projectIdOrPath,
SlackService slackNotifications)
Updates the Slack notification settings for a project.
|
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 ServicesApi(GitLabApi gitLabApi)
public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUrl) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/gitlab-ci
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtoken
- for authenticationprojectCIUrl
- URL of the GitLab-CI projectGitLabApiException
- if any exception occurspublic void deleteGitLabCI(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/gitlab-ci
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic HipChatService getHipChatService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/services/hipchat
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic HipChatService updateHipChatService(Object projectIdOrPath, HipChatService hipChat) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/hipchat
The following properties on the HipChatService instance are utilized in the update of the settings:
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
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathhipChat
- the HipChatService instance holding the settingsGitLabApiException
- if any exception occurspublic void setHipChat(Object projectIdOrPath, String token, String room, String server) throws GitLabApiException
updateHipChat
methodGitLab Endpoint: PUT /projects/:id/services/hipchat
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtoken
- for authenticationroom
- HipChatService Roomserver
- HipChatService Server URLGitLabApiException
- if any exception occurspublic void deleteHipChat(Object projectIdOrPath) throws GitLabApiException
updateHipChat
methodGitLab Endpoint: DELETE /projects/:id/services/hipchat
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic void deleteHipChatService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/hipchat
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic SlackService getSlackService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/services/slack
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/slack
The following properties on the SlackService instance are utilized in the update of the settings:
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
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathslackNotifications
- the SlackService instance holding the settingsGitLabApiException
- if any exception occurspublic void deleteSlackService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/slack
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic JiraService getJiraService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/services/jira
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic JiraService updateJiraService(Object projectIdOrPath, JiraService jira) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/jira
The following properties on the JiraService instance are utilized in the update of the settings:
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.
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathjira
- the JiraService instance holding the settingsGitLabApiException
- if any exception occurspublic void deleteJiraService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/jira
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic ExternalWikiService getExternalWikiService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/services/external-wiki
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic ExternalWikiService updateExternalWikiService(Object projectIdOrPath, ExternalWikiService externalWiki) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/external-wiki
The following properties on the JiraService instance are utilized in the update of the settings:
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/
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathexternalWiki
- the ExternalWikiService instance holding the settingsGitLabApiException
- if any exception occurspublic void deleteExternalWikiService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/external-wiki
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic MattermostService getMattermostService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/services/mattermost
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic MattermostService updateMattermostService(Object projectIdOrPath, MattermostService mattermostNotifications) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/mattermost
The following properties on the MattermostService instance are utilized in the update of the settings:
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
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathmattermostNotifications
- the MattermostService instance holding the settingsGitLabApiException
- if any exception occurspublic void deleteMattermostService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/external-wiki
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic BugzillaService getBugzillaService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/services/bugzilla
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic BugzillaService updateBugzillaService(Object projectIdOrPath, BugzillaService bugzillaService) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/bugzilla
The following properties on the BugzillaService instance are utilized in the update of the settings:
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
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathbugzillaService
- the BugzillaService instance holding the settingsGitLabApiException
- if any exception occurspublic void deleteBugzillaService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/bugzilla
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic CustomIssueTrackerService getCustomIssueTrackerService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/services/custom_issue_tracker
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occurspublic CustomIssueTrackerService updateCustomIssueTrackerService(Object projectIdOrPath, CustomIssueTrackerService customIssueTracker) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/services/custom_issue_tracker
The following properties on the CustomIssueTrackerService instance are utilized in the update of the settings:
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
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathcustomIssueTracker
- the CustomIssueTrackerService instance holding the settingsGitLabApiException
- if any exception occurspublic void deleteCustomIssueTrackerService(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/services/custom_issue_tracker
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathGitLabApiException
- if any exception occursCopyright © 2019. All rights reserved.