public class SystemHooksApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.DeploymentStatus, 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.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenTypegitLabApiNEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER| Constructor and Description |
|---|
SystemHooksApi(GitLabApi gitLabApi) |
| Modifier and Type | Method and Description |
|---|---|
SystemHook |
addSystemHook(String url,
String token,
Boolean pushEvents,
Boolean tagPushEvents,
Boolean enablSsslVerification)
Add a new system hook.
|
void |
deleteSystemHook(Integer hookId)
Deletes a system hook.
|
void |
deleteSystemHook(SystemHook hook)
Deletes a system hook.
|
List<SystemHook> |
getSystemHooks()
Get a list of all system hooks.
|
Pager<SystemHook> |
getSystemHooks(int itemsPerPage)
Get a Pager of all system hooks.
|
List<SystemHook> |
getSystemHooks(int page,
int perPage)
Get a list of all system hooks using the specified page and per page settings.
|
Stream<SystemHook> |
getSystemHookStream()
Get a Stream of all system hooks.
|
void |
testSystemHook(Integer hookId)
Test a system hook.
|
void |
testSystemHook(SystemHook hook)
Test a system hook.
|
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, validatepublic SystemHooksApi(GitLabApi gitLabApi)
public List<SystemHook> getSystemHooks() throws GitLabApiException
GitLab Endpoint: GET /hooksGitLabApiException - if any exception occurspublic List<SystemHook> getSystemHooks(int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /hookspage - the page to getperPage - the number of deploy keys per pageGitLabApiException - if any exception occurspublic Pager<SystemHook> getSystemHooks(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /hooksitemsPerPage - the number of SystemHookEvent instances that will be fetched per pageGitLabApiException - if any exception occurspublic Stream<SystemHook> getSystemHookStream() throws GitLabApiException
GitLab Endpoint: GET /hooksGitLabApiException - if any exception occurspublic SystemHook addSystemHook(String url, String token, Boolean pushEvents, Boolean tagPushEvents, Boolean enablSsslVerification) throws GitLabApiException
GitLab Endpoint: POST /hooksurl - the hook URL, requiredtoken - secret token to validate received payloads, optionalpushEvents - when true, the hook will fire on push events, optionaltagPushEvents - when true, the hook will fire on new tags being pushed, optionalenablSsslVerification - do SSL verification when triggering the hook, optionalGitLabApiException - if any exception occurspublic void deleteSystemHook(SystemHook hook) throws GitLabApiException
GitLab Endpoint: DELETE /hooks/:hook_idhook - the SystemHook instance to deleteGitLabApiException - if any exception occurspublic void deleteSystemHook(Integer hookId) throws GitLabApiException
GitLab Endpoint: DELETE /hooks/:hook_idhookId - the ID of the system hook to deleteGitLabApiException - if any exception occurspublic void testSystemHook(SystemHook hook) throws GitLabApiException
GitLab Endpoint: GET /hooks/:hook_idhook - the SystemHookEvent instance to testGitLabApiException - if any exception occurspublic void testSystemHook(Integer hookId) throws GitLabApiException
GitLab Endpoint: GET /hooks/:hook_idhookId - the ID of the system hook to testGitLabApiException - if any exception occursCopyright © 2019. All rights reserved.