GitLab::API::v4 - A complete GitLab API v4 client.
use GitLab::API::v4; my $api = GitLab::API::v4->new( url => $v4_api_url, private_token => $token, ); my $branches = $api->branches( $project_id );
This module provides a one-to-one interface with the GitLab API v4. Much is not documented here as it would just be duplicating GitLab's own API Documentation.
Note that this distribution also includes the gitlab-api-v4 command-line interface (CLI).
If you are upgrading from GitLab::API::v3 make sure you read:
https://docs.gitlab.com/ce/api/v3_to_v4.html
Also, review the Changes file included in the distribution as it outlines the changes made to convert the v3 module to v4:
Changes
https://github.com/bluefeet/GitLab-API-v4/blob/master/Changes
Finally, be aware that many methods were added, removed, renamed, and/or altered. If you want to review exactly what was changed you can use GitHub's compare tool:
https://github.com/bluefeet/GitLab-API-v4/compare/72e384775c9570f60f8ef68dee3a1eecd347fb69...master
Or clone the repo and run this command:
git diff 72e384775c9570f60f8ef68dee3a1eecd347fb69..HEAD -- author/sections/
Authentication credentials may be defined by setting either the "access_token" or "private_token" arguments.
If no credentials are supplied then the client will be anonymous and greatly limited in what it can do with the API.
Extra care has been taken to hide the token arguments behind closures. This way, if you dump your api object, your tokens won't accidentally leak into places you don't want them to.
The GitLab API, in rare cases, uses a numeric value to represent a state. To make life easier the GitLab::API::v4::Constants module exposes these states as named variables.
The API methods will all throw a useful exception if an unsuccessful response is received from the API. That is except for GET requests that return a 404 response - these will return undef for methods that return a value.
GET
404
undef
If you'd like to catch and handle these exceptions consider using Try::Tiny.
This module uses Log::Any and produces some debug messages here and there, but the most useful bits are the info messages produced just before each API call.
Note that many API calls require a $project_id. This can be specified as a numeric project ID or, in many cases, maybe all cases, as a NAMESPACE_PATH/PROJECT_PATH string. The GitLab documentation on this point is vague.
$project_id
ID
NAMESPACE_PATH/PROJECT_PATH
The URL to your v4 API endpoint. Typically this will be something like https://git.example.com/api/v4.
https://git.example.com/api/v4
A GitLab API OAuth2 token. If set then "private_token" may not be set.
See https://docs.gitlab.com/ce/api/#oauth2-tokens.
A GitLab API personal token. If set then "access_token" may not be set.
See https://docs.gitlab.com/ce/api/#personal-access-tokens.
The number of times the request should be retried in case it fails (5XX HTTP response code). Defaults to 0 (false), meaning that a failed request will not be retried.
0
The user to execute API calls as. You may find it more useful to use the "sudo" method instead.
See https://docs.gitlab.com/ce/api/#sudo.
An instance of GitLab::API::v4::RESTClient. Typically you will not be setting this as it defaults to a new instance and customization should not be necessary.
my $paginator = $api->paginator( $method, @method_args ); my $members = $api->paginator('group_members', $group_id); while (my $member = $members->next()) { ... } my $users_pager = $api->paginator('users'); while (my $users = $users_pager->next_page()) { ... } my $all_open_issues = $api->paginator( 'issues', $project_id, { state=>'opened' }, )->all();
Given a method who supports the page and per_page parameters, and returns an array ref, this will return a GitLab::API::v4::Paginator object that will allow you to walk the records one page or one record at a time.
page
per_page
$api->sudo('fred')->create_issue(...);
Returns a new instance of GitLab::API::v4 with the "sudo_user" argument set.
See https://docs.gitlab.com/ce/api/award_emoji.html.
my $award_emojis = $api->issue_award_emojis( $project_id, $issue_iid, \%params, );
Sends a GET request to projects/:project_id/issues/:issue_iid/award_emoji and returns the decoded response body.
projects/:project_id/issues/:issue_iid/award_emoji
my $award_emojis = $api->merge_request_award_emojis( $project_id, $merge_request_iid, \%params, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/award_emoji and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/award_emoji
my $award_emojis = $api->snippet_award_emojis( $project_id, $merge_request_id, \%params, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_id/award_emoji and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_id/award_emoji
my $award_emoji = $api->issue_award_emoji( $project_id, $issue_iid, $award_id, );
Sends a GET request to projects/:project_id/issues/:issue_iid/award_emoji/:award_id and returns the decoded response body.
projects/:project_id/issues/:issue_iid/award_emoji/:award_id
my $award_emoji = $api->merge_request_award_emoji( $project_id, $merge_request_iid, $award_id, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/award_emoji/:award_id and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/award_emoji/:award_id
my $award_emoji = $api->snippet_award_emoji( $project_id, $snippet_id, $award_id, );
Sends a GET request to projects/:project_id/snippets/:snippet_id/award_emoji/:award_id and returns the decoded response body.
projects/:project_id/snippets/:snippet_id/award_emoji/:award_id
my $award_emoji = $api->create_issue_award_emoji( $project_id, $issue_iid, \%params, );
Sends a POST request to projects/:project_id/issues/:issue_iid/award_emoji and returns the decoded response body.
POST
my $award_emoji = $api->create_merge_request_award_emoji( $project_id, $merge_request_iid, \%params, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/award_emoji and returns the decoded response body.
my $award_emoji = $api->create_snippet_award_emoji( $project_id, $snippet_id, );
Sends a POST request to projects/:project_id/snippets/:snippet_id/award_emoji and returns the decoded response body.
projects/:project_id/snippets/:snippet_id/award_emoji
my $award_emoji = $api->delete_issue_award_emoji( $project_id, $issue_id, $award_id, );
Sends a DELETE request to projects/:project_id/issues/:issue_id/award_emoji/:award_id and returns the decoded response body.
DELETE
projects/:project_id/issues/:issue_id/award_emoji/:award_id
my $award_emoji = $api->delete_merge_request_award_emoji( $project_id, $merge_request_id, $award_id, );
Sends a DELETE request to projects/:project_id/merge_requests/:merge_request_id/award_emoji/:award_id and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_id/award_emoji/:award_id
my $award_emoji = $api->delete_snippet_award_emoji( $project_id, $snippet_id, $award_id, );
Sends a DELETE request to projects/:project_id/snippets/:snippet_id/award_emoji/:award_id and returns the decoded response body.
my $award_emojis = $api->issue_note_award_emojis( $project_id, $issue_iid, $note_id, );
Sends a GET request to projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji and returns the decoded response body.
projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji
my $award_emoji = $api->issue_note_award_emoji( $project_id, $issue_iid, $note_id, $award_id, );
Sends a GET request to projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id and returns the decoded response body.
projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id
my $award_emoji = $api->create_issue_note_award_emoji( $project_id, $issue_iid, $note_id, \%params, );
Sends a POST request to projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji and returns the decoded response body.
my $award_emoji = $api->delete_issue_note_award_emoji( $project_id, $issue_iid, $note_id, $award_id, );
Sends a DELETE request to projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id and returns the decoded response body.
my $award_emojis = $api->merge_request_note_award_emojis( $project_id, $merge_request_iid, $note_id, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji
my $award_emoji = $api->merge_request_note_award_emoji( $project_id, $merge_request_iid, $note_id, $award_id, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id
my $award_emoji = $api->create_merge_request_note_award_emoji( $project_id, $merge_request_iid, $note_id, \%params, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji and returns the decoded response body.
my $award_emoji = $api->delete_merge_request_note_award_emoji( $project_id, $merge_request_iid, $note_id, $award_id, );
Sends a DELETE request to projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id and returns the decoded response body.
See https://doc.gitlab.com/ce/api/branches.html.
my $branches = $api->branches( $project_id, \%params, );
Sends a GET request to projects/:project_id/repository/branches and returns the decoded response body.
projects/:project_id/repository/branches
my $branch = $api->branch( $project_id, $branch_name, );
Sends a GET request to projects/:project_id/repository/branches/:branch_name and returns the decoded response body.
projects/:project_id/repository/branches/:branch_name
my $branch = $api->create_branch( $project_id, \%params, );
Sends a POST request to projects/:project_id/repository/branches and returns the decoded response body.
$api->delete_branch( $project_id, $branch_name, );
Sends a DELETE request to projects/:project_id/repository/branches/:branch_name.
$api->delete_merged_branches( $project_id, );
Sends a DELETE request to projects/:project_id/repository/merged_branches.
projects/:project_id/repository/merged_branches
See https://docs.gitlab.com/ce/api/broadcast_messages.html.
my $messages = $api->broadcast_messages( \%params, );
Sends a GET request to broadcast_messages and returns the decoded response body.
broadcast_messages
my $message = $api->broadcast_message( $message_id, );
Sends a GET request to broadcast_messages/:message_id and returns the decoded response body.
broadcast_messages/:message_id
my $message = $api->create_broadcast_message( \%params, );
Sends a POST request to broadcast_messages and returns the decoded response body.
my $message = $api->edit_broadcast_message( $message_id, \%params, );
Sends a PUT request to broadcast_messages/:message_id and returns the decoded response body.
PUT
$api->delete_broadcast_message( $message_id, );
Sends a DELETE request to broadcast_messages/:message_id.
See https://docs.gitlab.com/ce/api/project_level_variables.html.
my $variables = $api->project_variables( $project_id, \%params, );
Sends a GET request to projects/:project_id/variables and returns the decoded response body.
projects/:project_id/variables
my $variable = $api->project_variable( $project_id, $variable_key, );
Sends a GET request to projects/:project_id/variables/:variable_key and returns the decoded response body.
projects/:project_id/variables/:variable_key
my $variable = $api->create_project_variable( $project_id, \%params, );
Sends a POST request to projects/:project_id/variables and returns the decoded response body.
my $variable = $api->edit_project_variable( $project_id, $variable_key, \%params, );
Sends a PUT request to projects/:project_id/variables/:variable_key and returns the decoded response body.
$api->delete_project_variable( $project_id, $variable_key, );
Sends a DELETE request to projects/:project_id/variables/:variable_key.
See https://docs.gitlab.com/ce/api/group_level_variables.html.
my $variables = $api->group_variables( $group_id, \%params, );
Sends a GET request to groups/:group_id/variables and returns the decoded response body.
groups/:group_id/variables
my $variable = $api->group_variable( $group_id, $variable_key, );
Sends a GET request to groups/:group_id/variables/:variable_key and returns the decoded response body.
groups/:group_id/variables/:variable_key
my $variable = $api->create_group_variable( $group_id, \%params, );
Sends a POST request to groups/:group_id/variables and returns the decoded response body.
my $variable = $api->edit_group_variable( $group_id, $variable_key, \%params, );
Sends a PUT request to groups/:group_id/variables/:variable_key and returns the decoded response body.
$api->delete_group_variable( $group_id, $variable_key, );
Sends a DELETE request to groups/:group_id/variables/:variable_key.
See https://doc.gitlab.com/ce/api/commits.html.
my $commits = $api->commits( $project_id, \%params, );
Sends a GET request to projects/:project_id/repository/commits and returns the decoded response body.
projects/:project_id/repository/commits
my $commit = $api->create_commit( $project_id, \%params, );
Sends a POST request to projects/:project_id/repository/commits and returns the decoded response body.
my $commit = $api->commit( $project_id, $commit_sha, );
Sends a GET request to projects/:project_id/repository/commits/:commit_sha and returns the decoded response body.
projects/:project_id/repository/commits/:commit_sha
my $commit = $api->cherry_pick_commit( $project_id, $commit_sha, \%params, );
Sends a POST request to projects/:project_id/repository/commits/:commit_sha/cherry_pick and returns the decoded response body.
projects/:project_id/repository/commits/:commit_sha/cherry_pick
my $diff = $api->commit_diff( $project_id, $commit_sha, \%params, );
Sends a GET request to projects/:project_id/repository/commits/:commit_sha/diff and returns the decoded response body.
projects/:project_id/repository/commits/:commit_sha/diff
my $comments = $api->commit_comments( $project_id, $commit_sha, \%params, );
Sends a GET request to projects/:project_id/repository/commits/:commit_sha/comments and returns the decoded response body.
projects/:project_id/repository/commits/:commit_sha/comments
$api->create_commit_comment( $project_id, $commit_sha, \%params, );
Sends a POST request to projects/:project_id/repository/commits/:commit_sha/comments.
my $build_statuses = $api->commit_statuses( $project_id, $commit_sha, \%params, );
Sends a GET request to projects/:project_id/repository/commits/:commit_sha/statuses and returns the decoded response body.
projects/:project_id/repository/commits/:commit_sha/statuses
my $build_status = $api->create_commit_status( $project_id, $commit_sha, \%params, );
Sends a POST request to projects/:project_id/statuses/:commit_sha and returns the decoded response body.
projects/:project_id/statuses/:commit_sha
See https://docs.gitlab.com/ce/api/custom_attributes.html.
my $attributes = $api->custom_user_attributes( $user_id, );
Sends a GET request to users/:user_id/custom_attributes and returns the decoded response body.
users/:user_id/custom_attributes
my $attributes = $api->custom_group_attributes( $group_id, );
Sends a GET request to groups/:group_id/custom_attributes and returns the decoded response body.
groups/:group_id/custom_attributes
my $attributes = $api->custom_project_attributes( $project_id, );
Sends a GET request to projects/:project_id/custom_attributes and returns the decoded response body.
projects/:project_id/custom_attributes
my $attribute = $api->custom_user_attribute( $user_id, $attribute_key, );
Sends a GET request to users/:user_id/custom_attributes/:attribute_key and returns the decoded response body.
users/:user_id/custom_attributes/:attribute_key
my $attribute = $api->custom_group_attribute( $group_id, $attribute_key, );
Sends a GET request to groups/:group_id/custom_attributes/:attribute_key and returns the decoded response body.
groups/:group_id/custom_attributes/:attribute_key
my $attribute = $api->custom_project_attribute( $project_id, $attribute_key, );
Sends a GET request to projects/:project_id/custom_attributes/:attribute_key and returns the decoded response body.
projects/:project_id/custom_attributes/:attribute_key
my $attribute = $api->set_custom_user_attribute( $user_id, $attribute_key, \%params, );
Sends a PUT request to users/:user_id/custom_attributes/:attribute_key and returns the decoded response body.
my $attribute = $api->set_custom_group_attribute( $group_id, $attribute_key, \%params, );
Sends a PUT request to groups/:group_id/custom_attributes/:attribute_key and returns the decoded response body.
my $attribute = $api->set_custom_project_attribute( $project_id, $attribute_key, \%params, );
Sends a PUT request to projects/:project_id/custom_attributes/:attribute_key and returns the decoded response body.
$api->delete_custom_user_attribute( $user_id, $attribute_key, );
Sends a DELETE request to users/:user_id/custom_attributes/:attribute_key.
$api->delete_custom_group_attribute( $group_id, $attribute_key, );
Sends a DELETE request to groups/:group_id/custom_attributes/:attribute_key.
$api->delete_custom_project_attribute( $project_id, $attribute_key, );
Sends a DELETE request to projects/:project_id/custom_attributes/:attribute_key.
See https://docs.gitlab.com/ce/api/deployments.html.
my $deployments = $api->deployments( $project_id, \%params, );
Sends a GET request to projects/:project_id/deployments and returns the decoded response body.
projects/:project_id/deployments
my $deployment = $api->deployment( $project_id, $deployment_id, );
Sends a GET request to projects/:project_id/deployments/:deployment_id and returns the decoded response body.
projects/:project_id/deployments/:deployment_id
See https://docs.gitlab.com/ce/api/deploy_keys.html.
my $keys = $api->all_deploy_keys( \%params, );
Sends a GET request to deploy_keys and returns the decoded response body.
deploy_keys
my $keys = $api->deploy_keys( $project_id, \%params, );
Sends a GET request to projects/:project_id/deploy_keys and returns the decoded response body.
projects/:project_id/deploy_keys
my $key = $api->deploy_key( $project_id, $key_id, );
Sends a GET request to projects/:project_id/deploy_keys/:key_id and returns the decoded response body.
projects/:project_id/deploy_keys/:key_id
my $key = $api->create_deploy_key( $project_id, \%params, );
Sends a POST request to projects/:project_id/deploy_keys and returns the decoded response body.
$api->delete_deploy_key( $project_id, $key_id, );
Sends a DELETE request to projects/:project_id/deploy_keys/:key_id.
my $key = $api->enable_deploy_key( $project_id, $key_id, );
Sends a POST request to projects/:project_id/deploy_keys/:key_id/enable and returns the decoded response body.
projects/:project_id/deploy_keys/:key_id/enable
See https://docs.gitlab.com/ce/api/environments.html.
my $environments = $api->environments( $project_id, \%params, );
Sends a GET request to projects/:project_id/environments and returns the decoded response body.
projects/:project_id/environments
my $environment = $api->create_environment( $project_id, \%params, );
Sends a POST request to projects/:project_id/environments and returns the decoded response body.
my $environment = $api->edit_environment( $project_id, $environments_id, \%params, );
Sends a PUT request to projects/:project_id/environments/:environments_id and returns the decoded response body.
projects/:project_id/environments/:environments_id
$api->delete_environment( $project_id, $environment_id, );
Sends a DELETE request to projects/:project_id/environments/:environment_id.
projects/:project_id/environments/:environment_id
my $environment = $api->stop_environment( $project_id, $environment_id, );
Sends a POST request to projects/:project_id/environments/:environment_id/stop and returns the decoded response body.
projects/:project_id/environments/:environment_id/stop
See https://docs.gitlab.com/ce/api/events.html.
my $events = $api->all_events( \%params, );
Sends a GET request to events and returns the decoded response body.
events
my $events = $api->user_events( $user_id, \%params, );
Sends a GET request to users/:user_id/events and returns the decoded response body.
users/:user_id/events
my $events = $api->project_events( $project_id, \%params, );
Sends a GET request to projects/:project_id/events and returns the decoded response body.
projects/:project_id/events
See https://docs.gitlab.com/ce/api/features.html.
my $features = $api->features();
Sends a GET request to features and returns the decoded response body.
features
my $feature = $api->set_feature( $name, \%params, );
Sends a POST request to features/:name and returns the decoded response body.
features/:name
See https://docs.gitlab.com/ce/api/templates/gitignores.html.
my $templates = $api->gitignores_templates( \%params, );
Sends a GET request to templates/gitignores and returns the decoded response body.
templates/gitignores
my $template = $api->gitignores_template( $template_key, );
Sends a GET request to templates/gitignores/:template_key and returns the decoded response body.
templates/gitignores/:template_key
See https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html.
my $templates = $api->gitlab_ci_ymls_templates( \%params, );
Sends a GET request to templates/gitlab_ci_ymls and returns the decoded response body.
templates/gitlab_ci_ymls
my $template = $api->gitlab_ci_ymls_template( $template_key, );
Sends a GET request to templates/gitlab_ci_ymls/:template_key and returns the decoded response body.
templates/gitlab_ci_ymls/:template_key
See https://docs.gitlab.com/ce/api/groups.html.
my $groups = $api->groups( \%params, );
Sends a GET request to groups and returns the decoded response body.
groups
my $subgroups = $api->group_subgroups( $group_id, \%params, );
Sends a GET request to groups/:group_id/subgroups and returns the decoded response body.
groups/:group_id/subgroups
my $projects = $api->group_projects( $group_id, \%params, );
Sends a GET request to groups/:group_id/projects and returns the decoded response body.
groups/:group_id/projects
my $group = $api->group( $group_id, );
Sends a GET request to groups/:group_id and returns the decoded response body.
groups/:group_id
$api->create_group( \%params, );
Sends a POST request to groups.
$api->transfer_project_to_group( $group_id, $project_id, );
Sends a POST request to groups/:group_id/projects/:project_id.
groups/:group_id/projects/:project_id
my $group = $api->edit_group( $group_id, \%params, );
Sends a PUT request to groups/:group_id and returns the decoded response body.
$api->delete_group( $group_id, );
Sends a DELETE request to groups/:group_id.
$api->sync_group_with_ldap( $group_id, );
Sends a POST request to groups/:group_id/ldap_sync.
groups/:group_id/ldap_sync
$api->create_ldap_group_link( $group_id, \%params, );
Sends a POST request to groups/:group_id/ldap_group_links.
groups/:group_id/ldap_group_links
$api->delete_ldap_group_link( $group_id, $cn, );
Sends a DELETE request to groups/:group_id/ldap_group_links/:cn.
groups/:group_id/ldap_group_links/:cn
$api->delete_ldap_provider_group_link( $group_id, $provider, $cn, );
Sends a DELETE request to groups/:group_id/ldap_group_links/:provider/:cn.
groups/:group_id/ldap_group_links/:provider/:cn
See https://docs.gitlab.com/ce/api/members.html.
my $members = $api->group_members( $group_id, \%params, );
Sends a GET request to groups/:group_id/members and returns the decoded response body.
groups/:group_id/members
my $members = $api->project_members( $project_id, \%params, );
Sends a GET request to projects/:project_id/members and returns the decoded response body.
projects/:project_id/members
my $member = $api->group_member( $project_id, $user_id, );
Sends a GET request to groups/:project_id/members/:user_id and returns the decoded response body.
groups/:project_id/members/:user_id
my $member = $api->project_member( $project_id, $user_id, );
Sends a GET request to projects/:project_id/members/:user_id and returns the decoded response body.
projects/:project_id/members/:user_id
my $member = $api->add_group_member( $group_id, \%params, );
Sends a POST request to groups/:group_id/members and returns the decoded response body.
my $member = $api->add_project_member( $project_id, \%params, );
Sends a POST request to projects/:project_id/members and returns the decoded response body.
my $member = $api->update_group_member( $group_id, $user_id, \%params, );
Sends a PUT request to groups/:group_id/members/:user_id and returns the decoded response body.
groups/:group_id/members/:user_id
my $member = $api->update_project_member( $project_id, $user_id, \%params, );
Sends a PUT request to projects/:project_id/members/:user_id and returns the decoded response body.
$api->remove_group_member( $group_id, $user_id, );
Sends a DELETE request to groups/:group_id/members/:user_id.
$api->remove_project_member( $project_id, $user_id, );
Sends a DELETE request to projects/:project_id/members/:user_id.
See https://docs.gitlab.com/ce/api/issues.html.
my $issues = $api->global_issues( \%params, );
Sends a GET request to issues and returns the decoded response body.
issues
my $issues = $api->group_issues( $group_id, \%params, );
Sends a GET request to groups/:group_id/issues and returns the decoded response body.
groups/:group_id/issues
my $issues = $api->issues( $project_id, \%params, );
Sends a GET request to projects/:project_id/issues and returns the decoded response body.
projects/:project_id/issues
my $issue = $api->issue( $project_id, $issue_iid, );
Sends a GET request to projects/:project_id/issues/:issue_iid and returns the decoded response body.
projects/:project_id/issues/:issue_iid
my $issue = $api->create_issue( $project_id, \%params, );
Sends a POST request to projects/:project_id/issues and returns the decoded response body.
my $issue = $api->edit_issue( $project_id, $issue_iid, \%params, );
Sends a PUT request to projects/:project_id/issues/:issue_iid and returns the decoded response body.
$api->delete_issue( $project_id, $issue_iid, );
Sends a DELETE request to projects/:project_id/issues/:issue_iid.
my $issue = $api->move_issue( $project_id, $issue_iid, \%params, );
Sends a POST request to projects/:project_id/issues/:issue_iid/move and returns the decoded response body.
projects/:project_id/issues/:issue_iid/move
my $issue = $api->subscribe_to_issue( $project_id, $issue_iid, );
Sends a POST request to projects/:project_id/issues/:issue_iid/subscribe and returns the decoded response body.
projects/:project_id/issues/:issue_iid/subscribe
my $issue = $api->unsubscribe_from_issue( $project_id, $issue_iid, );
Sends a POST request to projects/:project_id/issues/:issue_iid/unsubscribe and returns the decoded response body.
projects/:project_id/issues/:issue_iid/unsubscribe
my $todo = $api->create_issue_todo( $project_id, $issue_iid, );
Sends a POST request to projects/:project_id/issues/:issue_iid/todo and returns the decoded response body.
projects/:project_id/issues/:issue_iid/todo
my $tracking = $api->set_issue_time_estimate( $project_id, $issue_iid, \%params, );
Sends a POST request to projects/:project_id/issues/:issue_iid/time_estimate and returns the decoded response body.
projects/:project_id/issues/:issue_iid/time_estimate
my $tracking = $api->reset_issue_time_estimate( $project_id, $issue_iid, );
Sends a POST request to projects/:project_id/issues/:issue_iid/reset_time_estimate and returns the decoded response body.
projects/:project_id/issues/:issue_iid/reset_time_estimate
my $tracking = $api->add_issue_spent_time( $project_id, $issue_iid, \%params, );
Sends a POST request to projects/:project_id/issues/:issue_iid/add_spent_time and returns the decoded response body.
projects/:project_id/issues/:issue_iid/add_spent_time
my $tracking = $api->reset_issue_spent_time( $project_id, $issue_iid, );
Sends a POST request to projects/:project_id/issues/:issue_iid/reset_spent_time and returns the decoded response body.
projects/:project_id/issues/:issue_iid/reset_spent_time
my $tracking = $api->issue_time_stats( $project_id, $issue_iid, );
Sends a GET request to projects/:project_id/issues/:issue_iid/time_stats and returns the decoded response body.
projects/:project_id/issues/:issue_iid/time_stats
my $merge_requests = $api->issue_closed_by( $project_id, $issue_iid, );
Sends a GET request to projects/:project_id/issues/:issue_iid/closed_by and returns the decoded response body.
projects/:project_id/issues/:issue_iid/closed_by
my $user_agent = $api->issue_user_agent_detail( $project_id, $issue_iid, );
Sends a GET request to projects/:project_id/issues/:issue_iid/user_agent_detail and returns the decoded response body.
projects/:project_id/issues/:issue_iid/user_agent_detail
See https://docs.gitlab.com/ce/api/boards.html.
my $boards = $api->project_boards( $project_id, \%params, );
Sends a GET request to projects/:project_id/boards and returns the decoded response body.
projects/:project_id/boards
my $lists = $api->project_board_lists( $project_id, $board_id, \%params, );
Sends a GET request to projects/:project_id/boards/:board_id/lists and returns the decoded response body.
projects/:project_id/boards/:board_id/lists
my $list = $api->project_board_list( $project_id, $board_id, $list_id, );
Sends a GET request to projects/:project_id/boards/:board_id/lists/:list_id and returns the decoded response body.
projects/:project_id/boards/:board_id/lists/:list_id
my $list = $api->create_project_board_list( $project_id, $board_id, \%params, );
Sends a POST request to projects/:project_id/boards/:board_id/lists and returns the decoded response body.
my $list = $api->edit_project_board_list( $project_id, $board_id, $list_id, \%params, );
Sends a PUT request to projects/:project_id/boards/:board_id/lists/:list_id and returns the decoded response body.
$api->delete_project_board_list( $project_id, $board_id, $list_id, );
Sends a DELETE request to projects/:project_id/boards/:board_id/lists/:list_id.
See https://docs.gitlab.com/ce/api/jobs.html.
my $jobs = $api->jobs( $project_id, \%params, );
Sends a GET request to projects/:project_id/jobs and returns the decoded response body.
projects/:project_id/jobs
my $jobs = $api->pipeline_jobs( $project_id, $pipeline_id, \%params, );
Sends a GET request to projects/:project_id/pipelines/:pipeline_id/jobs and returns the decoded response body.
projects/:project_id/pipelines/:pipeline_id/jobs
my $job = $api->job( $project_id, $job_id, );
Sends a GET request to projects/:project_id/jobs/:job_id and returns the decoded response body.
projects/:project_id/jobs/:job_id
my $artifacts = $api->job_artifacts( $project_id, $job_id, );
Sends a GET request to projects/:project_id/jobs/:job_id/artifacts and returns the decoded response body.
projects/:project_id/jobs/:job_id/artifacts
my $archive = $api->job_artifacts_archive( $project_id, $ref_name, \%params, );
Sends a GET request to projects/:project_id/jobs/artifacts/:ref_name/download and returns the decoded response body.
projects/:project_id/jobs/artifacts/:ref_name/download
my $file = $api->job_artifacts_file( $project_id, $job_id, $artifact_path, );
Sends a GET request to projects/:project_id/jobs/:job_id/artifacts/:artifact_path and returns the decoded response body.
projects/:project_id/jobs/:job_id/artifacts/:artifact_path
my $file = $api->job_trace_file( $project_id, $job_id, );
Sends a GET request to projects/:project_id/jobs/:job_id/trace and returns the decoded response body.
projects/:project_id/jobs/:job_id/trace
my $job = $api->cancel_job( $project_id, $job_id, );
Sends a POST request to projects/:project_id/jobs/:job_id/cancel and returns the decoded response body.
projects/:project_id/jobs/:job_id/cancel
my $job = $api->retry_job( $project_id, $job_id, );
Sends a POST request to projects/:project_id/jobs/:job_id/retry and returns the decoded response body.
projects/:project_id/jobs/:job_id/retry
my $job = $api->erase_job( $project_id, $job_id, );
Sends a POST request to projects/:project_id/jobs/:job_id/erase and returns the decoded response body.
projects/:project_id/jobs/:job_id/erase
my $job = $api->keep_job_artifacts( $project_id, $job_id, );
Sends a POST request to projects/:project_id/jobs/:job_id/artifacts/keep and returns the decoded response body.
projects/:project_id/jobs/:job_id/artifacts/keep
my $job = $api->play_job( $project_id, $job_id, );
Sends a POST request to projects/:project_id/jobs/:job_id/play and returns the decoded response body.
projects/:project_id/jobs/:job_id/play
See https://docs.gitlab.com/ce/api/keys.html.
my $key = $api->key( $key_id, );
Sends a GET request to keys/:key_id and returns the decoded response body.
keys/:key_id
See https://docs.gitlab.com/ce/api/labels.html.
my $labels = $api->labels( $project_id, \%params, );
Sends a GET request to projects/:project_id/labels and returns the decoded response body.
projects/:project_id/labels
my $label = $api->create_label( $project_id, \%params, );
Sends a POST request to projects/:project_id/labels and returns the decoded response body.
$api->delete_label( $project_id, \%params, );
Sends a DELETE request to projects/:project_id/labels.
my $label = $api->edit_label( $project_id, \%params, );
Sends a PUT request to projects/:project_id/labels and returns the decoded response body.
my $label = $api->subscribe_to_label( $project_id, $label_id, );
Sends a POST request to projects/:project_id/labels/:label_id/subscribe and returns the decoded response body.
projects/:project_id/labels/:label_id/subscribe
$api->unsubscribe_from_label( $project_id, $label_id, );
Sends a POST request to projects/:project_id/labels/:label_id/unsubscribe.
projects/:project_id/labels/:label_id/unsubscribe
See https://docs.gitlab.com/ce/api/merge_requests.html.
my $merge_requests = $api->global_merge_requests( \%params, );
Sends a GET request to merge_requests and returns the decoded response body.
merge_requests
my $merge_requests = $api->merge_requests( $project_id, \%params, );
Sends a GET request to projects/:project_id/merge_requests and returns the decoded response body.
projects/:project_id/merge_requests
my $merge_request = $api->merge_request( $project_id, $merge_request_iid, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid
my $commits = $api->merge_request_commits( $project_id, $merge_request_iid, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/commits and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/commits
my $merge_request = $api->merge_request_with_changes( $project_id, $merge_request_iid, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/changes and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/changes
my $merge_request = $api->create_merge_request( $project_id, \%params, );
Sends a POST request to projects/:project_id/merge_requests and returns the decoded response body.
my $merge_request = $api->edit_merge_request( $project_id, $merge_request_iid, \%params, );
Sends a PUT request to projects/:project_id/merge_requests/:merge_request_iid and returns the decoded response body.
$api->delete_merge_request( $project_id, $merge_request_iid, );
Sends a DELETE request to projects/:project_id/merge_requests/:merge_request_iid.
my $merge_request = $api->accept_merge_request( $project_id, $merge_request_iid, \%params, );
Sends a PUT request to projects/:project_id/merge_requests/:merge_request_iid/merge and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/merge
my $merge_request = $api->cancel_merge_when_pipeline_succeeds( $project_id, $merge_request_iid, );
Sends a PUT request to projects/:project_id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
my $issues = $api->merge_request_closes_issues( $project_id, $merge_request_iid, \%params, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/closes_issues and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/closes_issues
my $merge_request = $api->subscribe_to_merge_request( $project_id, $merge_request_iid, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/subscribe and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/subscribe
my $merge_request = $api->unsubscribe_from_merge_request( $project_id, $merge_request_iid, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/unsubscribe and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/unsubscribe
my $todo = $api->create_merge_request_todo( $project_id, $merge_request_iid, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/todo and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/todo
my $versions = $api->merge_request_diff_versions( $project_id, $merge_request_iid, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/versions and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/versions
my $version = $api->merge_request_diff_version( $project_id, $merge_request_iid, $version_id, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/versions/:version_id and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/versions/:version_id
my $tracking = $api->set_merge_request_time_estimate( $project_id, $merge_request_iid, \%params, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/time_estimate and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/time_estimate
my $tracking = $api->reset_merge_request_time_estimate( $project_id, $merge_request_iid, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/reset_time_estimate and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/reset_time_estimate
my $tracking = $api->add_merge_request_spent_time( $project_id, $merge_request_iid, \%params, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/add_spent_time and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/add_spent_time
my $tracking = $api->reset_merge_request_spent_time( $project_id, $merge_request_iid, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/reset_spent_time and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/reset_spent_time
my $tracking = $api->merge_request_time_stats( $project_id, $merge_request_iid, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/time_stats and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/time_stats
See https://docs.gitlab.com/ce/api/milestones.html.
my $milestones = $api->project_milestones( $project_id, \%params, );
Sends a GET request to projects/:project_id/milestones and returns the decoded response body.
projects/:project_id/milestones
my $milestone = $api->project_milestone( $project_id, $milestone_id, );
Sends a GET request to projects/:project_id/milestones/:milestone_id and returns the decoded response body.
projects/:project_id/milestones/:milestone_id
my $milestone = $api->create_project_milestone( $project_id, \%params, );
Sends a POST request to projects/:project_id/milestones and returns the decoded response body.
my $milestone = $api->edit_project_milestone( $project_id, $milestone_id, \%params, );
Sends a PUT request to projects/:project_id/milestones/:milestone_id and returns the decoded response body.
my $issues = $api->project_milestone_issues( $project_id, $milestone_id, \%params, );
Sends a GET request to projects/:project_id/milestones/:milestone_id/issues and returns the decoded response body.
projects/:project_id/milestones/:milestone_id/issues
my $merge_requests = $api->project_milestone_merge_requests( $project_id, $milestone_id, \%params, );
Sends a GET request to projects/:project_id/milestones/:milestone_id/merge_requests and returns the decoded response body.
projects/:project_id/milestones/:milestone_id/merge_requests
See https://docs.gitlab.com/ce/api/group_milestones.html.
my $milestones = $api->group_milestones( $group_id, \%params, );
Sends a GET request to groups/:group_id/milestones and returns the decoded response body.
groups/:group_id/milestones
my $milestone = $api->group_milestone( $group_id, $milestone_id, );
Sends a GET request to groups/:group_id/milestones/:milestone_id and returns the decoded response body.
groups/:group_id/milestones/:milestone_id
my $milestone = $api->create_group_milestone( $group_id, \%params, );
Sends a POST request to groups/:group_id/milestones and returns the decoded response body.
my $milestone = $api->edit_group_milestone( $group_id, $milestone_id, \%params, );
Sends a PUT request to groups/:group_id/milestones/:milestone_id and returns the decoded response body.
my $issues = $api->group_milestone_issues( $group_id, $milestone_id, \%params, );
Sends a GET request to groups/:group_id/milestones/:milestone_id/issues and returns the decoded response body.
groups/:group_id/milestones/:milestone_id/issues
my $merge_requests = $api->group_milestone_merge_requests( $group_id, $milestone_id, \%params, );
Sends a GET request to groups/:group_id/milestones/:milestone_id/merge_requests and returns the decoded response body.
groups/:group_id/milestones/:milestone_id/merge_requests
See https://docs.gitlab.com/ce/api/namespaces.html.
my $namespaces = $api->namespaces( \%params, );
Sends a GET request to namespaces and returns the decoded response body.
namespaces
my $namespace = $api->namespace( $namespace_id, );
Sends a GET request to namespaces/:namespace_id and returns the decoded response body.
namespaces/:namespace_id
See https://docs.gitlab.com/ce/api/notes.html.
my $notes = $api->issue_notes( $project_id, $issue_iid, \%params, );
Sends a GET request to projects/:project_id/issues/:issue_iid/notes and returns the decoded response body.
projects/:project_id/issues/:issue_iid/notes
my $note = $api->issue_note( $project_id, $issue_iid, $note_id, );
Sends a GET request to projects/:project_id/issues/:issue_iid/notes/:note_id and returns the decoded response body.
projects/:project_id/issues/:issue_iid/notes/:note_id
my $note = $api->create_issue_note( $project_id, $issue_iid, \%params, );
Sends a POST request to projects/:project_id/issues/:issue_iid/notes and returns the decoded response body.
$api->edit_issue_note( $project_id, $issue_iid, $note_id, \%params, );
Sends a PUT request to projects/:project_id/issues/:issue_iid/notes/:note_id.
$api->delete_issue_note( $project_id, $issue_iid, $note_id, );
Sends a DELETE request to projects/:project_id/issues/:issue_iid/notes/:note_id.
my $notes = $api->snippet_notes( $project_id, $snippet_id, \%params, );
Sends a GET request to projects/:project_id/snippets/:snippet_id/notes and returns the decoded response body.
projects/:project_id/snippets/:snippet_id/notes
my $note = $api->snippet_note( $project_id, $snippet_id, $note_id, );
Sends a GET request to projects/:project_id/snippets/:snippet_id/notes/:note_id and returns the decoded response body.
projects/:project_id/snippets/:snippet_id/notes/:note_id
my $note = $api->create_snippet_note( $project_id, $snippet_id, \%params, );
Sends a POST request to projects/:project_id/snippets/:snippet_id/notes and returns the decoded response body.
$api->edit_snippet_note( $project_id, $snippet_id, $note_id, \%params, );
Sends a PUT request to projects/:project_id/snippets/:snippet_id/notes/:note_id.
$api->delete_snippet_note( $project_id, $snippet_id, $note_id, );
Sends a DELETE request to projects/:project_id/snippets/:snippet_id/notes/:note_id.
my $notes = $api->merge_request_notes( $project_id, $merge_request_iid, \%params, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/notes and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/notes
my $note = $api->merge_request_note( $project_id, $merge_request_iid, $note_id, );
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id and returns the decoded response body.
projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id
my $note = $api->create_merge_request_note( $project_id, $merge_request_iid, \%params, );
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/notes and returns the decoded response body.
$api->edit_merge_request_note( $project_id, $merge_request_iid, $note_id, \%params, );
Sends a PUT request to projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id.
$api->delete_merge_request_note( $project_id, $merge_request_iid, $note_id, );
Sends a DELETE request to projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id.
See https://docs.gitlab.com/ce/api/notification_settings.html.
my $settings = $api->global_notification_settings();
Sends a GET request to notification_settings and returns the decoded response body.
notification_settings
my $settings = $api->set_global_notification_settings( \%params, );
Sends a PUT request to notification_settings and returns the decoded response body.
my $settings = $api->group_notification_settings( $group_id, );
Sends a GET request to groups/:group_id/notification_settings and returns the decoded response body.
groups/:group_id/notification_settings
my $settings = $api->project_notification_settings( $project_id, );
Sends a GET request to projects/:project_id/notification_settings and returns the decoded response body.
projects/:project_id/notification_settings
my $settings = $api->set_group_notification_settings( $group_id, \%params, );
Sends a PUT request to groups/:group_id/notification_settings and returns the decoded response body.
my $settings = $api->set_project_notification_settings( $project_id, \%params, );
Sends a PUT request to projects/:project_id/notification_settings and returns the decoded response body.
See https://docs.gitlab.com/ce/api/templates/licenses.html.
my $templates = $api->license_templates( \%params, );
Sends a GET request to templates/licenses and returns the decoded response body.
templates/licenses
my $template = $api->license_template( $template_key, \%params, );
Sends a GET request to templates/licenses/:template_key and returns the decoded response body.
templates/licenses/:template_key
See https://docs.gitlab.com/ce/api/pages_domains.html.
my $domains = $api->global_pages_domains( \%params, );
Sends a GET request to pages/domains and returns the decoded response body.
pages/domains
my $domains = $api->pages_domains( $project_id, \%params, );
Sends a GET request to projects/:project_id/pages/domains and returns the decoded response body.
projects/:project_id/pages/domains
my $domain = $api->pages_domain( $project_id, $domain, );
Sends a GET request to projects/:project_id/pages/domains/:domain and returns the decoded response body.
projects/:project_id/pages/domains/:domain
my $domain = $api->create_pages_domain( $project_id, \%params, );
Sends a POST request to projects/:project_id/pages/domains and returns the decoded response body.
my $domain = $api->edit_pages_domain( $project_id, $domain, \%params, );
Sends a PUT request to projects/:project_id/pages/domains/:domain and returns the decoded response body.
$api->delete_pages_domain( $project_id, $domain, );
Sends a DELETE request to projects/:project_id/pages/domains/:domain.
See https://docs.gitlab.com/ce/api/pipelines.html.
my $pipelines = $api->pipelines( $project_id, \%params, );
Sends a GET request to projects/:project_id/pipelines and returns the decoded response body.
projects/:project_id/pipelines
my $pipeline = $api->pipeline( $project_id, $pipeline_id, );
Sends a GET request to projects/:project_id/pipelines/:pipeline_id and returns the decoded response body.
projects/:project_id/pipelines/:pipeline_id
my $pipeline = $api->create_pipeline( $project_id, \%params, );
Sends a POST request to projects/:project_id/pipeline and returns the decoded response body.
projects/:project_id/pipeline
my $pipeline = $api->retry_pipeline_jobs( $project_id, $pipeline_id, );
Sends a POST request to projects/:project_id/pipelines/:pipeline_id/retry and returns the decoded response body.
projects/:project_id/pipelines/:pipeline_id/retry
my $pipeline = $api->cancel_pipeline_jobs( $project_id, $pipeline_id, );
Sends a POST request to projects/:project_id/pipelines/:pipeline_id/cancel and returns the decoded response body.
projects/:project_id/pipelines/:pipeline_id/cancel
See https://docs.gitlab.com/ce/api/pipeline_triggers.html.
my $triggers = $api->triggers( $project_id, \%params, );
Sends a GET request to projects/:project_id/triggers and returns the decoded response body.
projects/:project_id/triggers
my $trigger = $api->trigger( $project_id, $trigger_id, );
Sends a GET request to projects/:project_id/triggers/:trigger_id and returns the decoded response body.
projects/:project_id/triggers/:trigger_id
my $trigger = $api->create_trigger( $project_id, \%params, );
Sends a POST request to projects/:project_id/triggers and returns the decoded response body.
my $trigger = $api->edit_trigger( $project_id, $trigger_id, \%params, );
Sends a PUT request to projects/:project_id/triggers/:trigger_id and returns the decoded response body.
my $trigger = $api->take_ownership_of_trigger( $project_id, $trigger_id, );
Sends a POST request to projects/:project_id/triggers/:trigger_id/take_ownership and returns the decoded response body.
projects/:project_id/triggers/:trigger_id/take_ownership
$api->delete_trigger( $project_id, $trigger_id, );
Sends a DELETE request to projects/:project_id/triggers/:trigger_id.
See https://docs.gitlab.com/ce/api/pipeline_schedules.html.
my $schedules = $api->pipeline_schedules( $project_id, \%params, );
Sends a GET request to projects/:project_id/pipeline_schedules and returns the decoded response body.
projects/:project_id/pipeline_schedules
my $schedule = $api->pipeline_schedule( $project_id, $pipeline_schedule_id, );
Sends a GET request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id and returns the decoded response body.
projects/:project_id/pipeline_schedules/:pipeline_schedule_id
my $schedule = $api->create_pipeline_schedule( $project_id, \%params, );
Sends a POST request to projects/:project_id/pipeline_schedules and returns the decoded response body.
my $schedule = $api->edit_pipeline_schedule( $project_id, $pipeline_schedule_id, \%params, );
Sends a PUT request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id and returns the decoded response body.
my $schedule = $api->take_ownership_of_pipeline_schedule( $project_id, $pipeline_schedule_id, );
Sends a POST request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id/take_ownership and returns the decoded response body.
projects/:project_id/pipeline_schedules/:pipeline_schedule_id/take_ownership
my $schedule = $api->delete_pipeline_schedule( $project_id, $pipeline_schedule_id, );
Sends a DELETE request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id and returns the decoded response body.
my $variable = $api->create_pipeline_schedule_variable( $project_id, $pipeline_schedule_id, \%params, );
Sends a POST request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables and returns the decoded response body.
projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables
my $variable = $api->edit_pipeline_schedule_variable( $project_id, $pipeline_schedule_id, $variable_key, \%params, );
Sends a PUT request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key and returns the decoded response body.
projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key
my $variable = $api->delete_pipeline_schedule_variable( $project_id, $pipeline_schedule_id, $variable_key, );
Sends a DELETE request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key and returns the decoded response body.
See https://docs.gitlab.com/ce/api/projects.html.
my $projects = $api->projects( \%params, );
Sends a GET request to projects and returns the decoded response body.
projects
my $projects = $api->user_projects( $user_id, \%params, );
Sends a GET request to users/:user_id/projects and returns the decoded response body.
users/:user_id/projects
my $project = $api->project( $project_id, \%params, );
Sends a GET request to projects/:project_id and returns the decoded response body.
projects/:project_id
my $users = $api->project_users( $project_id, \%params, );
Sends a GET request to projects/:project_id/users and returns the decoded response body.
projects/:project_id/users
my $project = $api->create_project( \%params, );
Sends a POST request to projects and returns the decoded response body.
$api->create_project_for_user( $user_id, \%params, );
Sends a POST request to projects/user/:user_id.
projects/user/:user_id
$api->edit_project( $project_id, \%params, );
Sends a PUT request to projects/:project_id.
$api->fork_project( $project_id, \%params, );
Sends a POST request to projects/:project_id/fork.
projects/:project_id/fork
my $forks = $api->project_forks( $project_id, \%params, );
Sends a GET request to projects/:project_id/forks and returns the decoded response body.
projects/:project_id/forks
my $project = $api->start_project( $project_id, );
Sends a POST request to projects/:project_id/star and returns the decoded response body.
projects/:project_id/star
my $project = $api->unstar_project( $project_id, );
Sends a POST request to projects/:project_id/unstar and returns the decoded response body.
projects/:project_id/unstar
my $languages = $api->project_languages( $project_id, );
Sends a GET request to projects/:project_id/languages and returns the decoded response body.
projects/:project_id/languages
my $project = $api->archive_project( $project_id, );
Sends a POST request to projects/:project_id/archive and returns the decoded response body.
projects/:project_id/archive
my $project = $api->unarchive_project( $project_id, );
Sends a POST request to projects/:project_id/unarchive and returns the decoded response body.
projects/:project_id/unarchive
$api->delete_project( $project_id, );
Sends a DELETE request to projects/:project_id.
$api->share_project_with_group( $project_id, \%params, );
Sends a POST request to projects/:project_id/share.
projects/:project_id/share
$api->unshare_project_with_group( $project_id, $group_id, );
Sends a DELETE request to projects/:project_id/share/:group_id.
projects/:project_id/share/:group_id
my $hooks = $api->project_hooks( $project_id, );
Sends a GET request to projects/:project_id/hooks and returns the decoded response body.
projects/:project_id/hooks
my $hook = $api->project_hook( $project_id, $hook_id, );
Sends a GET request to project/:project_id/hooks/:hook_id and returns the decoded response body.
project/:project_id/hooks/:hook_id
$api->create_project_hook( $project_id, \%params, );
Sends a POST request to projects/:project_id/hooks.
$api->edit_project_hook( $project_id, $hook_id, \%params, );
Sends a PUT request to projects/:project_id/hooks/:hook_id.
projects/:project_id/hooks/:hook_id
my $hook = $api->delete_project_hook( $project_id, $hook_id, );
Sends a DELETE request to projects/:project_id/hooks/:hook_id and returns the decoded response body.
$api->set_project_fork( $project_id, $from_project_id, );
Sends a POST request to projects/:project_id/fork/:from_project_id.
projects/:project_id/fork/:from_project_id
$api->clear_project_fork( $project_id, );
Sends a DELETE request to projects/:project_id/fork.
$api->start_housekeeping( $project_id, );
Sends a POST request to projects/:project_id/housekeeping.
projects/:project_id/housekeeping
See https://docs.gitlab.com/ce/api/access_requests.html.
my $requests = $api->group_access_requests( $group_id, \%params, );
Sends a GET request to groups/:group_id/access_requests and returns the decoded response body.
groups/:group_id/access_requests
my $requests = $api->project_access_requests( $project_id, \%params, );
Sends a GET request to projects/:project_id/access_requests and returns the decoded response body.
projects/:project_id/access_requests
my $request = $api->request_group_access( $group_id, );
Sends a POST request to groups/:group_id/access_requests and returns the decoded response body.
my $request = $api->request_project_access( $project_id, );
Sends a POST request to projects/:project_id/access_requests and returns the decoded response body.
my $request = $api->approve_group_access( $group_id, $user_id, );
Sends a PUT request to groups/:group_id/access_requests/:user_id/approve and returns the decoded response body.
groups/:group_id/access_requests/:user_id/approve
my $request = $api->approve_project_access( $project_id, $user_id, );
Sends a PUT request to projects/:project_id/access_requests/:user_id/approve and returns the decoded response body.
projects/:project_id/access_requests/:user_id/approve
$api->deny_group_access( $group_id, $user_id, );
Sends a DELETE request to groups/:group_id/access_requests/:user_id.
groups/:group_id/access_requests/:user_id
$api->deny_project_access( $project_id, $user_id, );
Sends a DELETE request to projects/:project_id/access_requests/:user_id.
projects/:project_id/access_requests/:user_id
See https://docs.gitlab.com/ce/api/project_snippets.html.
my $snippets = $api->snippets( $project_id, \%params, );
Sends a GET request to projects/:project_id/snippets and returns the decoded response body.
projects/:project_id/snippets
my $snippet = $api->snippet( $project_id, $snippet_id, );
Sends a GET request to projects/:project_id/snippets/:snippet_id and returns the decoded response body.
projects/:project_id/snippets/:snippet_id
$api->create_snippet( $project_id, \%params, );
Sends a POST request to projects/:project_id/snippets.
$api->edit_snippet( $project_id, $snippet_id, \%params, );
Sends a PUT request to projects/:project_id/snippets/:snippet_id.
$api->delete_snippet( $project_id, $snippet_id, );
Sends a DELETE request to projects/:project_id/snippets/:snippet_id.
my $content = $api->snippet_content( $project_id, $snippet_id, );
Sends a GET request to projects/:project_id/snippets/:snippet_id/raw and returns the decoded response body.
projects/:project_id/snippets/:snippet_id/raw
my $user_agent = $api->snippet_user_agent_detail( $project_id, $snippet_id, );
Sends a GET request to projects/:project_id/snippets/:snippet_id/user_agent_detail and returns the decoded response body.
projects/:project_id/snippets/:snippet_id/user_agent_detail
See https://docs.gitlab.com/ce/api/protected_branches.html.
my $branches = $api->protected_branches( $project_id, \%params, );
Sends a GET request to projects/:project_id/protected_branches and returns the decoded response body.
projects/:project_id/protected_branches
my $branch = $api->protected_branch( $project_id, $branch_name, );
Sends a GET request to projects/:project_id/protected_branches/:branch_name and returns the decoded response body.
projects/:project_id/protected_branches/:branch_name
my $branch = $api->protect_branch( $project_id, \%params, );
Sends a POST request to projects/:project_id/protected_branches and returns the decoded response body.
$api->unprotect_branch( $project_id, $branch_name, );
Sends a DELETE request to projects/:project_id/protected_branches/:branch_name.
See https://docs.gitlab.com/ce/api/repositories.html.
my $tree = $api->tree( $project_id, \%params, );
Sends a GET request to projects/:project_id/repository/tree and returns the decoded response body.
projects/:project_id/repository/tree
my $blob = $api->blob( $project_id, $sha, );
Sends a GET request to projects/:project_id/repository/blobs/:sha and returns the decoded response body.
projects/:project_id/repository/blobs/:sha
my $raw_blob = $api->raw_blob( $project_id, $sha, );
Sends a GET request to projects/:project_id/repository/blobs/:sha/raw and returns the decoded response body.
projects/:project_id/repository/blobs/:sha/raw
my $archive = $api->archive( $project_id, \%params, );
Sends a GET request to projects/:project_id/repository/archive and returns the decoded response body.
projects/:project_id/repository/archive
my $comparison = $api->compare( $project_id, \%params, );
Sends a GET request to projects/:project_id/repository/compare and returns the decoded response body.
projects/:project_id/repository/compare
my $contributors = $api->contributors( $project_id, \%params, );
Sends a GET request to projects/:project_id/repository/contributors and returns the decoded response body.
projects/:project_id/repository/contributors
See https://docs.gitlab.com/ce/api/repository_files.html.
my $file = $api->file( $project_id, $file_path, \%params, );
Sends a GET request to projects/:project_id/repository/files/:file_path and returns the decoded response body.
projects/:project_id/repository/files/:file_path
my $file = $api->raw_file( $project_id, $file_path, \%params, );
Sends a GET request to projects/:project_id/repository/files/:file_path/raw and returns the decoded response body.
projects/:project_id/repository/files/:file_path/raw
$api->create_file( $project_id, $file_path, \%params, );
Sends a POST request to projects/:project_id/repository/files/:file_path.
$api->edit_file( $project_id, $file_path, \%params, );
Sends a PUT request to projects/:project_id/repository/files/:file_path.
$api->delete_file( $project_id, $file_path, \%params, );
Sends a DELETE request to projects/:project_id/repository/files/:file_path.
See https://docs.gitlab.com/ce/api/runners.html.
my $runners = $api->runners( \%params, );
Sends a GET request to runners and returns the decoded response body.
runners
my $runners = $api->all_runners( \%params, );
Sends a GET request to runners/all and returns the decoded response body.
runners/all
my $runner = $api->runner( $runner_id, );
Sends a GET request to runners/:runner_id and returns the decoded response body.
runners/:runner_id
my $runner = $api->update_runner( $runner_id, \%params, );
Sends a PUT request to runners/:runner_id and returns the decoded response body.
my $runner = $api->delete_runner( $runner_id, );
Sends a DELETE request to runners/:runner_id and returns the decoded response body.
my $jobs = $api->runner_jobs( $runner_id, \%params, );
Sends a GET request to runners/:runner_id/jobs and returns the decoded response body.
runners/:runner_id/jobs
my $runners = $api->project_runners( $project_id, \%params, );
Sends a GET request to projects/:project_id/runners and returns the decoded response body.
projects/:project_id/runners
my $runner = $api->enable_project_runner( $project_id, \%params, );
Sends a POST request to projects/:project_id/runners and returns the decoded response body.
my $runner = $api->disable_project_runner( $project_id, $runner_id, );
Sends a DELETE request to projects/:project_id/runners/:runner_id and returns the decoded response body.
projects/:project_id/runners/:runner_id
See https://docs.gitlab.com/ce/api/services.html.
my $service = $api->project_service( $project_id, $service_name, );
Sends a GET request to projects/:project_id/services/:service_name and returns the decoded response body.
projects/:project_id/services/:service_name
$api->edit_project_service( $project_id, $service_name, \%params, );
Sends a PUT request to projects/:project_id/services/:service_name.
$api->delete_project_service( $project_id, $service_name, );
Sends a DELETE request to projects/:project_id/services/:service_name.
See https://docs.gitlab.com/ce/api/settings.html.
my $settings = $api->settings();
Sends a GET request to application/settings and returns the decoded response body.
application/settings
my $settings = $api->update_settings( \%params, );
Sends a PUT request to application/settings and returns the decoded response body.
See https://docs.gitlab.com/ce/api/sidekiq_metrics.html.
my $metrics = $api->queue_metrics();
Sends a GET request to sidekiq/queue_metrics and returns the decoded response body.
sidekiq/queue_metrics
my $metrics = $api->process_metrics();
Sends a GET request to sidekiq/process_metrics and returns the decoded response body.
sidekiq/process_metrics
my $stats = $api->job_stats();
Sends a GET request to sidekiq/job_stats and returns the decoded response body.
sidekiq/job_stats
my $metrics = $api->compound_metrics();
Sends a GET request to sidekiq/compound_metrics and returns the decoded response body.
sidekiq/compound_metrics
See https://docs.gitlab.com/ce/api/system_hooks.html.
my $hooks = $api->hooks( \%params, );
Sends a GET request to hooks and returns the decoded response body.
hooks
$api->create_hook( \%params, );
Sends a POST request to hooks.
my $hook = $api->test_hook( $hook_id, );
Sends a GET request to hooks/:hook_id and returns the decoded response body.
hooks/:hook_id
$api->delete_hook( $hook_id, );
Sends a DELETE request to hooks/:hook_id.
See https://docs.gitlab.com/ce/api/tags.html.
my $tags = $api->tags( $project_id, \%params, );
Sends a GET request to projects/:project_id/repository/tags and returns the decoded response body.
projects/:project_id/repository/tags
my $tag = $api->tag( $project_id, $tag_name, );
Sends a GET request to projects/:project_id/repository/tags/:tag_name and returns the decoded response body.
projects/:project_id/repository/tags/:tag_name
my $tag = $api->create_tag( $project_id, \%params, );
Sends a POST request to projects/:project_id/repository/tags and returns the decoded response body.
$api->delete_tag( $project_id, $tag_name, );
Sends a DELETE request to projects/:project_id/repository/tags/:tag_name.
$api->create_release( $project_id, $tag_name, \%params, );
Sends a POST request to projects/:project_id/repository/tags/:tag_name/release.
projects/:project_id/repository/tags/:tag_name/release
$api->edit_release( $project_id, $tag_name, \%params, );
Sends a PUT request to projects/:project_id/repository/tags/:tag_name/release.
See https://docs.gitlab.com/ce/api/todos.html.
my $todos = $api->todos( \%params, );
Sends a GET request to todos and returns the decoded response body.
todos
my $todo = $api->mark_todo_done( $todo_id, );
Sends a POST request to todos/:todo_id/mark_as_done and returns the decoded response body.
todos/:todo_id/mark_as_done
$api->mark_all_todos_done();
Sends a POST request to todos/mark_as_done.
todos/mark_as_done
See https://docs.gitlab.com/ce/api/users.html.
my $users = $api->users( \%params, );
Sends a GET request to users and returns the decoded response body.
users
my $user = $api->user( $user_id, );
Sends a GET request to users/:user_id and returns the decoded response body.
users/:user_id
$api->create_user( \%params, );
Sends a POST request to users.
$api->edit_user( $user_id, \%params, );
Sends a PUT request to users/:user_id.
$api->delete_user( $user_id, );
Sends a DELETE request to users/:user_id.
my $user = $api->current_user();
Sends a GET request to user and returns the decoded response body.
user
my $keys = $api->current_user_ssh_keys( \%params, );
Sends a GET request to user/keys and returns the decoded response body.
user/keys
my $keys = $api->user_ssh_keys( $user_id, \%params, );
Sends a GET request to users/:user_id/keys and returns the decoded response body.
users/:user_id/keys
my $key = $api->user_ssh_key( $key_id, );
Sends a GET request to user/keys/:key_id and returns the decoded response body.
user/keys/:key_id
$api->create_current_user_ssh_key( \%params, );
Sends a POST request to user/keys.
$api->create_user_ssh_key( $user_id, \%params, );
Sends a POST request to users/:user_id/keys.
$api->delete_current_user_ssh_key( $key_id, );
Sends a DELETE request to user/keys/:key_id.
$api->delete_user_ssh_key( $user_id, $key_id, );
Sends a DELETE request to users/:user_id/keys/:key_id.
users/:user_id/keys/:key_id
my $keys = $api->current_user_gpg_keys( \%params, );
Sends a GET request to user/gpg_keys and returns the decoded response body.
user/gpg_keys
my $key = $api->current_user_gpg_key( $key_id, );
Sends a GET request to user/gpg_keys/:key_id and returns the decoded response body.
user/gpg_keys/:key_id
$api->create_current_user_gpg_key( \%params, );
Sends a POST request to user/gpg_keys.
$api->delete_current_user_gpg_key( $key_id, );
Sends a DELETE request to user/gpg_keys/:key_id.
my $keys = $api->user_gpg_keys( $user_id, \%params, );
Sends a GET request to users/:user_id/gpg_keys and returns the decoded response body.
users/:user_id/gpg_keys
my $key = $api->user_gpg_key( $user_id, $key_id, );
Sends a GET request to users/:user_id/gpg_keys/:key_id and returns the decoded response body.
users/:user_id/gpg_keys/:key_id
my $keys = $api->create_user_gpg_key( $user_id, \%params, );
Sends a POST request to users/:user_id/gpg_keys and returns the decoded response body.
$api->delete_user_gpg_key( $user_id, $key_id, );
Sends a DELETE request to users/:user_id/gpg_keys/:key_id.
my $emails = $api->current_user_emails( \%params, );
Sends a GET request to user/emails and returns the decoded response body.
user/emails
my $emails = $api->user_emails( $user_id, \%params, );
Sends a GET request to users/:user_id/emails and returns the decoded response body.
users/:user_id/emails
my $email = $api->current_user_email( $email_id, );
Sends a GET request to user/emails/:email_id and returns the decoded response body.
user/emails/:email_id
my $email = $api->create_current_user_email( \%params, );
Sends a POST request to user/emails and returns the decoded response body.
my $email = $api->create_user_email( $user_id, \%params, );
Sends a POST request to users/:user_id/emails and returns the decoded response body.
$api->delete_current_user_email( $email_id, );
Sends a DELETE request to user/emails/:email_id.
$api->delete_user_email( $user_id, $email_id, );
Sends a DELETE request to users/:user_id/emails/:email_id.
users/:user_id/emails/:email_id
my $success = $api->block_user( $user_id, );
Sends a POST request to users/:user_id/block and returns the decoded response body.
users/:user_id/block
my $success = $api->unblock_user( $user_id, );
Sends a POST request to users/:user_id/unblock and returns the decoded response body.
users/:user_id/unblock
my $tokens = $api->user_impersonation_tokens( $user_id, \%params, );
Sends a GET request to users/:user_id/impersonation_tokens and returns the decoded response body.
users/:user_id/impersonation_tokens
my $token = $api->user_impersonation_token( $user_id, $impersonation_token_id, );
Sends a GET request to users/:user_id/impersonation_tokens/:impersonation_token_id and returns the decoded response body.
users/:user_id/impersonation_tokens/:impersonation_token_id
my $token = $api->create_user_impersonation_token( $user_id, \%params, );
Sends a POST request to users/:user_id/impersonation_tokens and returns the decoded response body.
$api->delete_user_impersonation_token( $user_id, $impersonation_token_id, );
Sends a DELETE request to users/:user_id/impersonation_tokens/:impersonation_token_id.
my $activities = $api->all_user_activities( \%params, );
Sends a GET request to user/activities and returns the decoded response body.
user/activities
See https://docs.gitlab.com/ce/api/lint.html.
my $result = $api->lint( \%params, );
Sends a POST request to lint and returns the decoded response body.
lint
See https://docs.gitlab.com/ce/api/version.html.
my $version = $api->version();
Sends a GET request to version and returns the decoded response body.
version
See https://docs.gitlab.com/ce/api/wikis.html.
my $pages = $api->wiki_pages( $project_id, \%params, );
Sends a GET request to projects/:project_id/wikis and returns the decoded response body.
projects/:project_id/wikis
my $pages = $api->wiki_page( $project_id, $slug, );
Sends a GET request to projects/:project_id/wikis/:slug and returns the decoded response body.
projects/:project_id/wikis/:slug
my $page = $api->create_wiki_page( $project_id, \%params, );
Sends a POST request to projects/:project_id/wikis and returns the decoded response body.
my $page = $api->edit_wiki_page( $project_id, $slug, \%params, );
Sends a PUT request to projects/:project_id/wikis/:slug and returns the decoded response body.
$api->delete_wiki_page( $project_id, $slug, );
Sends a DELETE request to projects/:project_id/wikis/:slug.
Net::Gitlab purports to provide an interface to the GitLab API, but it is hard to tell due to a complete lack of documentation via either POD or unit tests.
This module is auto-generated from a set of YAML files defining the interface of GitLab's API. If you'd like to contribute to this module then please feel free to make a fork on GitHub and submit a pull request, just make sure you edit the files in the authors/ directory instead of lib/GitLab/API/v4.pm directly.
authors/
lib/GitLab/API/v4.pm
Please see https://github.com/bluefeet/GitLab-API-v4/blob/master/author/README.pod for more information.
Alternatively, you can open a ticket.
Aran Clary Deltac <bluefeet@gmail.com>
Dotan Dimet <dotan@corky.net>
Nigel Gregoire <nigelgregoire@gmail.com>
trunov-ms <trunov.ms@gmail.com>
Marek R. Sotola <Marek.R.Sotola@nasa.gov>
José Joaquín Atria <jjatria@gmail.com>
Dave Webb <github@d5ve.com>
Simon Ruderich <simon@ruderich.org>
royce55 <royce@ecs.vuw.ac.nz>
Thanks to ZipRecruiter for encouraging their employees to contribute back to the open source ecosystem. Without their dedication to quality software development this distribution would not exist.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install GitLab::API::v4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GitLab::API::v4
CPAN shell
perl -MCPAN -e shell install GitLab::API::v4
For more information on module installation, please visit the detailed CPAN module installation guide.