GitLab::API::v4(3pm)
๐ GitLab::API::v4 ๐
okay bestie, welcome to the manual page for GitLab::API::v4 โ the perl module (a 3pm page, iykyk) that gives you a full, one-to-one glow-up client for the GitLab API v4. she's complete, she's thorough, she's that girl. let's get into it ๐
โจ NAME โจ
GitLab::API::v4 โ a complete GitLab API v4 client. no notes. periodt. ๐
๐ฆ SYNOPSIS ๐ฆ
use GitLab::API::v4;
my $api = GitLab::API::v4->new(
url => $v4_api_url,
private_token => $token,
);
my $branches = $api->branches( $project_id );
like... that's it. that's the whole vibe. make an object, hit an endpoint, get your data back. main character energy fr fr ๐ธ
๐ DESCRIPTION ๐
so this module is a one-to-one interface with the GitLab API v4 โ meaning whatever GitLab's API does, this does, matching it step for step. a LOT of it isn't written out here, bestie, because that would literally just be duplicating GitLab's own API Documentation, and honestly? why would we do that when they already did it.
GitLab's own API docs live here: <http://doc.gitlab.com/ce/api/README.html>
also!!! important!!! this distribution ships with the gitlab-api-v4 command-line interface (CLI). so you can vibe in the terminal too, not just in perl. iconic. ๐
๐ Upgrading ๐
if you're upgrading from GitLab::API::v3, bestie, please please PLEASE read this first, no skipping:
<https://docs.gitlab.com/ce/api/v3_to_v4.html>
and also go read the "Changes" file that comes with the distribution โ it lays out all the changes that were made converting the v3 module to v4:
<https://github.com/bluefeet/GitLab-API-v4/blob/master/Changes>
and finally (yes there's a third thing, stay with me ๐): be aware that a whole bunch of methods were added, removed, renamed, and/or altered. if you wanna see exactly what changed, GitHub's compare tool has you:
<https://github.com/bluefeet/GitLab-API-v4/compare/72e384775c9570f60f8ef68dee3a1eecd347fb69...master>
or, if you're a clone-the-repo kind of girlie, run this:
"git diff 72e384775c9570f60f8ef68dee3a1eecd347fb69..HEAD --
author/sections/"
๐ Credentials ๐
you define your auth credentials by setting either the "access_token" or the "private_token" arguments.
if you supply no credentials at all? the client goes anonymous, and it is greatly limited in what it can do with the API. like showing up to the party with no invite. ๐ญ
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. she's discreet. she's secure. we love her. ๐
๐งฎ Constants ๐งฎ
the GitLab API, in rare cases, uses a hard-coded value to represent a state. to make life easier, the GitLab::API::v4::Constants module exposes these states as named variables. cute, right? ๐ธ
๐ Exceptions ๐
every single API method will throw a useful exception if an unsuccessful response comes back from the API. every one! except โ and this is the exception to the exceptions, lol โ "GET" requests that return a 404 response. those will return "undef" for methods that return a value. so like, no drama, just undef.
if you'd like to catch and handle these exceptions, consider using Try::Tiny. ๐ซถ
๐ Logging ๐
this module uses Log::Any and produces some debug messages here and there, but honestly the most useful bits are the info messages produced just before each API call. little breadcrumbs of what's about to happen. adorable. โจ
๐ Project ID ๐
heads up bestie: a LOT of API calls require a $project_id. you can give it 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. ๐คทโโ๏ธ we said what we said.
๐ REQUIRED ARGUMENTS ๐
url
the URL to your v4 API endpoint. typically this'll be something like "https://git.example.com/api/v4". give her the address and she'll find her way. ๐บ๏ธ
๐ OPTIONAL ARGUMENTS ๐
access_token
a GitLab API OAuth2 token. if this is set, then "private_token" may not be set. they're mutually exclusive, bestie, pick one. ๐
see <https://docs.gitlab.com/ce/api/#oauth2-tokens>.
private_token
a GitLab API personal token. if this is set, then "access_token" may not be set. same rule, opposite direction. ๐
see <https://docs.gitlab.com/ce/api/#personal-access-tokens>.
retries
the number of times the request should be retried in case it fails (5XX HTTP response code). defaults to 0 (false), meaning a failed request will not be retried. so by default, one shot, no take-backs. ๐ค
sudo_user
the user to execute API calls as. you might find it more useful to use the "sudo" method instead โ she's the cooler option.
see <https://docs.gitlab.com/ce/api/#sudo>.
rest_client
an instance of GitLab::API::v4::RESTClient (or whatever "rest_client_class" is set to). typically you will NOT be setting this, because it defaults to a new instance and customization should not be necessary. leave her alone, she's fine. ๐
rest_client_class
the class to use when constructing the "rest_client". defaults to GitLab::API::v4::RESTClient. โจ
๐ ๏ธ UTILITY METHODS ๐ ๏ธ
paginator
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 that supports the "page" and "per_page" parameters and returns an array ref, this hands you back a GitLab::API::v4::Paginator object. that object lets you walk the records one page or one record at a time โ whichever your little heart desires. ๐
sudo
$api->sudo('fred')->create_issue(...);
returns a new instance of GitLab::API::v4 with the "sudo_user" argument set. it's like a little costume change. ๐ง
see <https://docs.gitlab.com/ce/api/#sudo>.
๐ธ API METHODS ๐ธ
๐ Award Emoji ๐
see <https://docs.gitlab.com/ce/api/award_emoji.html>.
issue_award_emojis
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 content. ๐
merge_request_award_emojis
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 content. โจ
snippet_award_emojis
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 content. ๐ฆ
issue_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 content. ๐
merge_request_award_emoji
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 content. ๐
snippet_award_emoji
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 content. โญ
create_issue_award_emoji
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 content. ๐ฅ
create_merge_request_award_emoji
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 content. ๐
create_snippet_award_emoji
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 content. ๐
delete_issue_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 content. bye bye ๐
delete_merge_request_award_emoji
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 content. gone. ๐
delete_snippet_award_emoji
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 content. โจ
issue_note_award_emojis
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 content. ๐ธ
issue_note_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 content. ๐ซถ
create_issue_note_award_emoji
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 content. ๐ฅ
delete_issue_note_award_emoji
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 content. ๐
merge_request_note_award_emojis
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 content. ๐
merge_request_note_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 hands you back the decoded response content. ๐
create_merge_request_note_award_emoji
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 hands you back the decoded response content. ๐
delete_merge_request_note_award_emoji
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 hands you back the decoded response content. bye bestie ๐
๐ธ Branches ๐ธ
See https://docs.gitlab.com/ce/api/branches.html.
branches
my $branches = $api->branches(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/repository/branches and hands you back the decoded response content. ๐ฟ
branch
my $branch = $api->branch(
$project_id,
$branch_name,
);
Sends a GET request to projects/:project_id/repository/branches/:branch_name and hands you back the decoded response content.
create_branch
my $branch = $api->create_branch(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/repository/branches and hands you back the decoded response content. new branch just dropped โจ
delete_branch
$api->delete_branch(
$project_id,
$branch_name,
);
Sends a DELETE request to projects/:project_id/repository/branches/:branch_name. that branch is GONE, no response content coming back ๐
delete_merged_branches
$api->delete_merged_branches(
$project_id,
);
Sends a DELETE request to projects/:project_id/repository/merged_branches. all the merged ones, cleared out, and again no decoded response content for you ๐งน
๐ข Broadcast Messages ๐ข
See https://docs.gitlab.com/ce/api/broadcast_messages.html.
broadcast_messages
my $messages = $api->broadcast_messages(
\%params,
);
Sends a GET request to broadcast_messages and hands you back the decoded response content. ๐ฃ
broadcast_message
my $message = $api->broadcast_message(
$message_id,
);
Sends a GET request to broadcast_messages/:message_id and hands you back the decoded response content.
create_broadcast_message
my $message = $api->create_broadcast_message(
\%params,
);
Sends a POST request to broadcast_messages and hands you back the decoded response content.
edit_broadcast_message
my $message = $api->edit_broadcast_message(
$message_id,
\%params,
);
Sends a PUT request to broadcast_messages/:message_id and hands you back the decoded response content.
delete_broadcast_message
$api->delete_broadcast_message(
$message_id,
);
Sends a DELETE request to broadcast_messages/:message_id. gone, deleted, no response content ๐
๐ Project-level Variables ๐
See https://docs.gitlab.com/ce/api/project_level_variables.html.
project_variables
my $variables = $api->project_variables(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/variables and hands you back the decoded response content.
project_variable
my $variable = $api->project_variable(
$project_id,
$variable_key,
);
Sends a GET request to projects/:project_id/variables/:variable_key and hands you back the decoded response content.
create_project_variable
my $variable = $api->create_project_variable(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/variables and hands you back the decoded response content.
edit_project_variable
my $variable = $api->edit_project_variable(
$project_id,
$variable_key,
\%params,
);
Sends a PUT request to projects/:project_id/variables/:variable_key and hands you back the decoded response content.
delete_project_variable
$api->delete_project_variable(
$project_id,
$variable_key,
);
Sends a DELETE request to projects/:project_id/variables/:variable_key. no decoded response content, it's just gone ๐ฅ
๐ Group-level Variables ๐
See https://docs.gitlab.com/ce/api/group_level_variables.html.
group_variables
my $variables = $api->group_variables(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/variables and hands you back the decoded response content.
group_variable
my $variable = $api->group_variable(
$group_id,
$variable_key,
);
Sends a GET request to groups/:group_id/variables/:variable_key and hands you back the decoded response content.
create_group_variable
my $variable = $api->create_group_variable(
$group_id,
\%params,
);
Sends a POST request to groups/:group_id/variables and hands you back the decoded response content.
edit_group_variable
my $variable = $api->edit_group_variable(
$group_id,
$variable_key,
\%params,
);
Sends a PUT request to groups/:group_id/variables/:variable_key and hands you back the decoded response content.
delete_group_variable
$api->delete_group_variable(
$group_id,
$variable_key,
);
Sends a DELETE request to groups/:group_id/variables/:variable_key. and once again, no decoded response content ๐
๐ฆ Snippets ๐ฆ
See https://docs.gitlab.com/ce/api/snippets.html.
snippets
my $snippets = $api->snippets();
Sends a GET request to snippets and hands you back the decoded response content. look at this one, no arguments at all, she's low maintenance ๐
snippet
my $snippet = $api->snippet(
$snippet_id,
);
Sends a GET request to snippets/:snippet_id and hands you back the decoded response content.
create_snippet
my $snippet = $api->create_snippet(
\%params,
);
Sends a POST request to snippets and hands you back the decoded response content.
edit_snippet
my $snippet = $api->edit_snippet(
$snippet_id,
\%params,
);
Sends a PUT request to snippets/:snippet_id and hands you back the decoded response content.
delete_snippet
$api->delete_snippet(
$snippet_id,
);
Sends a DELETE request to snippets/:snippet_id. no response content, it's over ๐
public_snippets
my $snippets = $api->public_snippets(
\%params,
);
Sends a GET request to snippets/public and hands you back the decoded response content. for the whole world to see ๐
snippet_user_agent_detail
my $user_agent = $api->snippet_user_agent_detail(
$snippet_id,
);
Sends a GET request to snippets/:snippet_id/user_agent_detail and hands you back the decoded response content.
โญ Commits โญ
See https://docs.gitlab.com/ce/api/commits.html.
commits
my $commits = $api->commits(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/repository/commits and hands you back the decoded response content.
create_commit
my $commit = $api->create_commit(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/repository/commits and hands you back the decoded response content.
commit
my $commit = $api->commit(
$project_id,
$commit_sha,
);
Sends a GET request to projects/:project_id/repository/commits/:commit_sha and hands you back the decoded response content.
commit_refs
my $refs = $api->commit_refs(
$project_id,
$commit_sha,
\%params,
);
Sends a GET request to projects/:project_id/repository/commits/:commit_sha/refs and hands you back the decoded response content.
cherry_pick_commit
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 hands you back the decoded response content. ๐ iconic behaviour tbh
commit_diff
my $diff = $api->commit_diff(
$project_id,
$commit_sha,
\%params,
);
Sends a GET request to projects/:project_id/repository/commits/:commit_sha/diff and hands you back the decoded response content.
commit_comments
my $comments = $api->commit_comments(
$project_id,
$commit_sha,
\%params,
);
Sends a GET request to projects/:project_id/repository/commits/:commit_sha/comments and hands you back the decoded response content.
create_commit_comment
$api->create_commit_comment(
$project_id,
$commit_sha,
\%params,
);
Sends a POST request to projects/:project_id/repository/commits/:commit_sha/comments. heads up bestie, this one doesn't say it hands back the decoded response content ๐ซถ
commit_statuses
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 hands you back the decoded response content.
create_commit_status
my $build_status = $api->create_commit_status(
$project_id,
$commit_sha,
\%params,
);
Sends a POST request to projects/:project_id/statuses/:commit_sha and hands you back the decoded response content. bestie it literally just posts a status, it's giving "I'm alive" but for CI ๐
๐ Container Registry ๐
See <https://docs.gitlab.com/ce/api/container_registry.html>.
registry_repositories_in_project
my $registry_repositories = $api->registry_repositories_in_project(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/registry/repositories and returns the decoded response content. all the repos in one project, slay โจ
registry_repositories_in_group
my $registry_repositories = $api->registry_repositories_in_group(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/registry/repositories and returns the decoded response content. same vibe but for a whole group, iconic ๐ซถ
delete_registry_repository
$api->delete_registry_repository(
$project_id,
$repository_id,
);
Sends a DELETE request to projects/:project_id/registry/repositories/:repository_id. no return value, it's just gone, bye ๐
registry_repository_tags
my $tags = $api->registry_repository_tags(
$project_id,
$repository_id,
);
Sends a GET request to projects/:project_id/registry/repositories/:repository_id/tags and returns the decoded response content. every tag in that repo, all lined up ๐ธ
registry_repository_tag
my $tag = $api->registry_repository_tag(
$project_id,
$repository_id,
$tag_name,
);
Sends a GET request to projects/:project_id/registry/repositories/:repository_id/tags/:tag_name and returns the decoded response content. one specific tag, main character energy only โจ
delete_registry_repository_tag
$api->delete_registry_repository_tag(
$project_id,
$repository_id,
$tag_name,
);
Sends a DELETE request to projects/:project_id/registry/repositories/:repository_id/tags/:tag_name. that tag? deleted. no cap ๐
bulk_delete_registry_repository_tags
$api->bulk_delete_registry_repository_tags(
$project_id,
$repository_id,
\%params,
);
Sends a DELETE request to projects/:project_id/registry/repositories/:repository_id/tags. it's the "delete a bunch at once" one, hence bulk โ pass your filters in \%params ๐งน
๐ Custom Attributes ๐
See <https://docs.gitlab.com/ce/api/custom_attributes.html>.
custom_user_attributes
my $attributes = $api->custom_user_attributes(
$user_id,
);
Sends a GET request to users/:user_id/custom_attributes and returns the decoded response content.
custom_group_attributes
my $attributes = $api->custom_group_attributes(
$group_id,
);
Sends a GET request to groups/:group_id/custom_attributes and returns the decoded response content.
custom_project_attributes
my $attributes = $api->custom_project_attributes(
$project_id,
);
Sends a GET request to projects/:project_id/custom_attributes and returns the decoded response content.
custom_user_attribute
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 content. one single attribute, so specific, we love her ๐
custom_group_attribute
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 content.
custom_project_attribute
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 content.
set_custom_user_attribute
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 content.
set_custom_group_attribute
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 content.
set_custom_project_attribute
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 content.
delete_custom_user_attribute
$api->delete_custom_user_attribute(
$user_id,
$attribute_key,
);
Sends a DELETE request to users/:user_id/custom_attributes/:attribute_key.
delete_custom_group_attribute
$api->delete_custom_group_attribute(
$group_id,
$attribute_key,
);
Sends a DELETE request to groups/:group_id/custom_attributes/:attribute_key.
delete_custom_project_attribute
$api->delete_custom_project_attribute(
$project_id,
$attribute_key,
);
Sends a DELETE request to projects/:project_id/custom_attributes/:attribute_key.
๐ฆ Deployments ๐ฆ
See <https://docs.gitlab.com/ce/api/deployments.html>.
deployments
my $deployments = $api->deployments(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/deployments and returns the decoded response content.
deployment
my $deployment = $api->deployment(
$project_id,
$deployment_id,
);
Sends a GET request to projects/:project_id/deployments/:deployment_id and returns the decoded response content. singular. one. her. ๐
๐ Deploy Keys ๐
See <https://docs.gitlab.com/ce/api/deploy_keys.html>.
all_deploy_keys
my $keys = $api->all_deploy_keys(
\%params,
);
Sends a GET request to deploy_keys and returns the decoded response content. every deploy key across the whole instance, no project needed, we're global now ๐
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 content.
deploy_key
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 content.
create_deploy_key
my $key = $api->create_deploy_key(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/deploy_keys and returns the decoded response content. new key just dropped โจ
delete_deploy_key
$api->delete_deploy_key(
$project_id,
$key_id,
);
Sends a DELETE request to projects/:project_id/deploy_keys/:key_id.
enable_deploy_key
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 content. un-benched, back on the roster ๐ซถ
๐ธ Environments ๐ธ
See <https://docs.gitlab.com/ce/api/environments.html>.
environments
my $environments = $api->environments(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/environments and returns the decoded response content.
create_environment
my $environment = $api->create_environment(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/environments and returns the decoded response content.
edit_environment
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 content.
ok bestie real talk: the argument here is$environments_idโ with the s โ so copy it exactly, don't "fix" it to$environment_id, it's just like that in the source and we don't argue with the source ๐
delete_environment
$api->delete_environment(
$project_id,
$environment_id,
);
Sends a DELETE request to projects/:project_id/environments/:environment_id. (and yes, this one is $environment_id, singular โ they're different, it's fine, we move ๐)
stop_environment
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 content. shutting it down, she's resting now ๐
โญ Events โญ
See <https://docs.gitlab.com/ce/api/events.html>.
all_events
my $events = $api->all_events(
\%params,
);
Sends a GET request to events and returns the decoded response content.
user_events
my $events = $api->user_events(
$user_id,
\%params,
);
Sends a GET request to users/:user_id/events and returns the decoded response content.
project_events
my $events = $api->project_events(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/events and returns the decoded response content.
๐ Feature flags ๐
See <https://docs.gitlab.com/ce/api/features.html>.
features
my $features = $api->features();
Sends a GET request to features and returns the decoded response content. no args, no params, she simply exists โจ
set_feature
my $feature = $api->set_feature(
$name,
\%params,
);
Sends a POST request to features/:name and returns the decoded response content. flipping a feature on/off, the power, the drama ๐
๐ง Gitignores ๐ง
See <https://docs.gitlab.com/ce/api/templates/gitignores.html>.
okay bestie, we're deep in the API methods now and it's giving organized ๐ Each one of these is a little wrapper that hits a GitLab endpoint and hands you back the decoded response content. No cap.
GitLab CI YMLs
See <https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html>.
gitlab_ci_ymls_templates
my $templates = $api->gitlab_ci_ymls_templates(
\%params,
);
Sends a GET request to templates/gitlab_ci_ymls and returns the decoded response content. Free .gitlab-ci.yml fits, go off โจ
gitlab_ci_ymls_template
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 content. One template, hand-picked ๐
Groups
See <https://docs.gitlab.com/ce/api/groups.html>.
groups
my $groups = $api->groups(
\%params,
);
Sends a GET request to groups and returns the decoded response content. The whole group family reunion ๐ธ
group_subgroups
my $subgroups = $api->group_subgroups(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/subgroups and returns the decoded response content. Groups within groups, it's giving nesting doll energy ๐ช
group_projects
my $projects = $api->group_projects(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/projects and returns the decoded response content.
group
my $group = $api->group(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id and returns the decoded response content. One group, main character ๐
create_group
$api->create_group(
\%params,
);
Sends a POST request to groups. New group just dropped ๐
transfer_project_to_group
$api->transfer_project_to_group(
$group_id,
$project_id,
);
Sends a POST request to groups/:group_id/projects/:project_id. Moving a project into a group, lowkey a whole relocation arc ๐
edit_group
my $group = $api->edit_group(
$group_id,
\%params,
);
Sends a PUT request to groups/:group_id and returns the decoded response content. Glow-up time โจ
delete_group
$api->delete_group(
$group_id,
);
Sends a DELETE request to groups/:group_id. Gone, no takebacks ๐
sync_group_with_ldap
$api->sync_group_with_ldap(
$group_id,
);
Sends a POST request to groups/:group_id/ldap_sync.
create_ldap_group_link
$api->create_ldap_group_link(
$group_id,
\%params,
);
Sends a POST request to groups/:group_id/ldap_group_links.
delete_ldap_group_link
$api->delete_ldap_group_link(
$group_id,
$cn,
);
Sends a DELETE request to groups/:group_id/ldap_group_links/:cn.
delete_ldap_provider_group_link
$api->delete_ldap_provider_group_link(
$group_id,
$provider,
$cn,
);
Sends a DELETE request to groups/:group_id/ldap_group_links/:provider/:cn.
share_group_with_group
$api->share_group_with_group(
$group_id,
\%params,
);
Sends a POST request to groups/:group_id/share. Sharing is caring fr fr ๐ซถ
unshare_group_with_group
$api->unshare_group_with_group(
$group_id,
$shared_with_group_id,
);
Sends a DELETE request to groups/:group_id/share/:shared_with_group_id. Un-sharing, the friendship-ending arc ๐ญ
Group access requests
See <https://docs.gitlab.com/ce/api/access_requests.html>.
group_access_requests
my $requests = $api->group_access_requests(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/access_requests and returns the decoded response content. Who's knocking at the door ๐ช
request_group_access
my $request = $api->request_group_access(
$group_id,
);
Sends a POST request to groups/:group_id/access_requests and returns the decoded response content. Politely asking to be let in ๐
approve_group_access
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 content. Let them in, slay โจ
deny_group_access
$api->deny_group_access(
$group_id,
$user_id,
);
Sends a DELETE request to groups/:group_id/access_requests/:user_id. The door closes ๐
Group badges
See <https://docs.gitlab.com/ce/api/group_badges.html>.
group_badges
my $badges = $api->group_badges(
$group_id,
);
Sends a GET request to groups/:group_id/badges and returns the decoded response content.
group_badge
my $badge = $api->group_badge(
$group_id,
$badge_id,
);
Sends a GET request to groups/:group_id/badges/:badge_id and returns the decoded response content.
create_group_badge
my $badge = $api->create_group_badge(
$group_id,
\%params,
);
Sends a POST request to groups/:group_id/badges and returns the decoded response content. New badge, new drip ๐
edit_group_badge
my $badge = $api->edit_group_badge(
$group_id,
$badge_id,
\%params,
);
Sends a PUT request to groups/:group_id/badges/:badge_id and returns the decoded response content.
delete_group_badge
$api->delete_group_badge(
$group_id,
$badge_id,
);
Sends a DELETE request to groups/:group_id/badges/:badge_id.
preview_group_badge
my $preview = $api->preview_group_badge(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/badges/render and returns the decoded response content. A lil sneak peek before you commit ๐
Group members
See <https://docs.gitlab.com/ce/api/members.html>.
group_members
my $members = $api->group_members(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/members and returns the decoded response content. The squad ๐ซ
all_group_members
my $members = $api->all_group_members(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/members/all and returns the decoded response content. Not just the direct ones โ all of them, including inherited members ๐
group_member
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 content.
ngl bestie, peep that the first arg here is literally named$project_idin the original โ not$group_idโ even though the path saysgroups/. I'm not gonna pretend otherwise, I'm just telling you what it says ๐
add_group_member
my $member = $api->add_group_member(
$group_id,
\%params,
);
Sends a POST request to groups/:group_id/members and returns the decoded response content. Adding to the roster โจ
update_group_member
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 content.
remove_group_member
$api->remove_group_member(
$group_id,
$user_id,
);
Sends a DELETE request to groups/:group_id/members/:user_id. Byeeeee ๐
Issues
See <https://docs.gitlab.com/ce/api/issues.html>.
global_issues
my $issues = $api->global_issues(
\%params,
);
Sends a GET request to issues and returns the decoded response content. Every issue, everywhere, all at once ๐
group_issues
my $issues = $api->group_issues(
$group_id,
\%params,
);
Sends a GET request to groups/:group_id/issues and returns the decoded response content.
issues
my $issues = $api->issues(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/issues and returns the decoded response content.
issue
my $issue = $api->issue(
$project_id,
$issue_iid,
);
Sends a GET request to projects/:project_id/issues/:issue_iid and returns the decoded response content. One issue, front and center ๐
create_issue
my $issue = $api->create_issue(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/issues and returns the decoded response content. Opening a new issue, iconic behavior โจ
edit_issue
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 content.
delete_issue
$api->delete_issue(
$project_id,
$issue_iid,
);
Sends a DELETE request to projects/:project_id/issues/:issue_iid. Closing it out permanently ๐
move_issue
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 content. New project, new me ๐
subscribe_to_issue
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 content. Turning notifications ON ๐
unsubscribe_from_issue
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 content. Turning them back OFF ๐
create_issue_todo
my $todo = $api->create_issue_todo(
$project_id,
$issue_iid,
);
(and bestie, this one's mid-sentence in the original โ more coming right up, don't you dare close the tab ๐ )
Sends a POST to projects/:project_id/issues/:issue_iid/todo and hands you back the decoded response content. ๐
๐ Issue Boards ๐
See https://docs.gitlab.com/ce/api/boards.html for the official tea. โ
project_boards
my $boards = $api->project_boards(
$project_id,
\%params,
);
Sends a GET to projects/:project_id/boards and returns the decoded response content. โจ
project_board_lists
my $lists = $api->project_board_lists(
$project_id,
$board_id,
\%params,
);
Sends a GET to projects/:project_id/boards/:board_id/lists and returns the decoded response content. ๐ฆ
project_board_list
my $list = $api->project_board_list(
$project_id,
$board_id,
$list_id,
);
Sends a GET to projects/:project_id/boards/:board_id/lists/:list_id and returns the decoded response content. ๐ฆ
create_project_board_list
my $list = $api->create_project_board_list(
$project_id,
$board_id,
\%params,
);
Sends a POST to projects/:project_id/boards/:board_id/lists and returns the decoded response content. ๐
edit_project_board_list
my $list = $api->edit_project_board_list(
$project_id,
$board_id,
$list_id,
\%params,
);
Sends a PUT to projects/:project_id/boards/:board_id/lists/:list_id and returns the decoded response content. โจ
delete_project_board_list
$api->delete_project_board_list(
$project_id,
$board_id,
$list_id,
);
Sends a DELETE to projects/:project_id/boards/:board_id/lists/:list_id. No decoded response content coming back on this one, bestie โ it's giving just a vibe and a status. ๐
๐ Group Issue Boards ๐
See https://docs.gitlab.com/ce/api/group_boards.html for the lore. ๐
group_boards
my $boards = $api->group_boards(
$group_id,
);
Sends a GET to groups/:group_id/boards and returns the decoded response content. โจ
group_board
my $board = $api->group_board(
$group_id,
$board_id,
);
Sends a GET to groups/:group_id/boards/:board_id and returns the decoded response content. ๐ฆ
group_board_lists
my $lists = $api->group_board_lists(
$group_id,
$board_id,
);
Sends a GET to groups/:group_id/boards/:board_id/lists and returns the decoded response content. ๐ฆ
group_board_list
my $list = $api->group_board_list(
$group_id,
$board_id,
$list_id,
);
Sends a GET to groups/:group_id/boards/:board_id/lists/:list_id and returns the decoded response content. ๐ฆ
create_group_board_list
my $list = $api->create_group_board_list(
$group_id,
$board_id,
\%params,
);
Sends a POST to groups/:group_id/boards/:board_id/lists and returns the decoded response content. ๐
edit_group_board_list
my $list = $api->edit_group_board_list(
$group_id,
$board_id,
$list_id,
\%params,
);
Sends a PUT to groups/:group_id/boards/:board_id/lists/:list_id and returns the decoded response content. โจ
delete_group_board_list
$api->delete_group_board_list(
$group_id,
$board_id,
$list_id,
);
Sends a DELETE to groups/:group_id/boards/:board_id/lists/:list_id. Again, nothing decoded comes back โ she's gone, periodt. ๐
๐ฅ Jobs ๐ฅ
See https://docs.gitlab.com/ce/api/jobs.html for the full rundown. ๐
jobs
my $jobs = $api->jobs(
$project_id,
\%params,
);
Sends a GET to projects/:project_id/jobs and returns the decoded response content. โจ
pipeline_jobs
my $jobs = $api->pipeline_jobs(
$project_id,
$pipeline_id,
\%params,
);
Sends a GET to projects/:project_id/pipelines/:pipeline_id/jobs and returns the decoded response content. โจ
job
my $job = $api->job(
$project_id,
$job_id,
);
Sends a GET to projects/:project_id/jobs/:job_id and returns the decoded response content. ๐ฆ
job_artifacts
my $artifacts = $api->job_artifacts(
$project_id,
$job_id,
);
Sends a GET to projects/:project_id/jobs/:job_id/artifacts and returns the decoded response content. ๐
job_artifacts_archive
my $archive = $api->job_artifacts_archive(
$project_id,
$ref_name,
\%params,
);
Sends a GET to projects/:project_id/jobs/artifacts/:ref_name/download and returns the decoded response content. ๐
job_artifacts_file
my $file = $api->job_artifacts_file(
$project_id,
$job_id,
$artifact_path,
);
Sends a GET to projects/:project_id/jobs/:job_id/artifacts/:artifact_path and returns the decoded response content. ๐
job_trace_file
my $file = $api->job_trace_file(
$project_id,
$job_id,
);
Sends a GET to projects/:project_id/jobs/:job_id/trace and returns the decoded response content. ๐ฆ
cancel_job
my $job = $api->cancel_job(
$project_id,
$job_id,
);
Sends a POST to projects/:project_id/jobs/:job_id/cancel and returns the decoded response content. ๐
retry_job
my $job = $api->retry_job(
$project_id,
$job_id,
);
Sends a POST to projects/:project_id/jobs/:job_id/retry and returns the decoded response content. ๐
erase_job
my $job = $api->erase_job(
$project_id,
$job_id,
);
Sends a POST to projects/:project_id/jobs/:job_id/erase and returns the decoded response content. ๐
keep_job_artifacts
my $job = $api->keep_job_artifacts(
$project_id,
$job_id,
);
Sends a POST to projects/:project_id/jobs/:job_id/artifacts/keep and returns the decoded response content. ๐
play_job
my $job = $api->play_job(
$project_id,
$job_id,
);
Sends a POST to projects/:project_id/jobs/:job_id/play and returns the decoded response content. โถ๏ธ
๐ Keys ๐
See https://docs.gitlab.com/ce/api/keys.html for the details. ๐๏ธ
key
my $key = $api->key(
$key_id,
);
Sends a GET to keys/:key_id and returns the decoded response content. โจ
๐ท๏ธ Labels ๐ท๏ธ
See https://docs.gitlab.com/ce/api/labels.html for the whole story. ๐
labels
my $labels = $api->labels(
$project_id,
\%params,
);
Sends a GET to projects/:project_id/labels and returns the decoded response content. ๐ธ
create_label
my $label = $api->create_label(
$project_id,
\%params,
);
Sends a POST to projects/:project_id/labels and returns the decoded response content. ๐
delete_label
$api->delete_label(
$project_id,
\%params,
);
Sends a DELETE to projects/:project_id/labels. No decoded content back, she just dips. ๐
edit_label
my $label = $api->edit_label(
$project_id,
\%params,
);
Sends a PUT to projects/:project_id/labels and returns the decoded response content. โจ
subscribe_to_label
my $label = $api->subscribe_to_label(
$project_id,
$label_id,
);
Sends a POST to projects/:project_id/labels/:label_id/subscribe and returns the decoded response content. ๐
unsubscribe_from_label
$api->unsubscribe_from_label(
$project_id,
$label_id,
);
Fires a POST at projects/:project_id/labels/:label_id/unsubscribe โ like leaving the group chat for that one label ๐
no return value promised, it just does the thing.
โจ Markdown โจ
Peep the docs, bestie: https://docs.gitlab.com/ce/api/markdown.html.
markdown
my $html = $api->markdown(
\%params,
);
Sends a POST to markdown and hands you back the decoded response content. You give it markdown, it gives you the glow-up ๐ฆ
๐ Merge requests ๐
Docs live here: https://docs.gitlab.com/ce/api/merge_requests.html. This is the main character section, fr fr ๐
global_merge_requests
my $merge_requests = $api->global_merge_requests(
\%params,
);
Sends a GET to merge_requests and returns the decoded response content. Every MR across the whole GitLab, not just one project โ the full timeline, no filters on the vibe ๐
merge_requests
my $merge_requests = $api->merge_requests(
$project_id,
\%params,
);
Sends a GET to projects/:project_id/merge_requests and returns the decoded response content. All the MRs for one project.
merge_request
my $merge_request = $api->merge_request(
$project_id,
$merge_request_iid,
);
Sends a GET to projects/:project_id/merge_requests/:merge_request_iid and returns the decoded response content. One singular MR, in all its glory.
merge_request_commits
my $commits = $api->merge_request_commits(
$project_id,
$merge_request_iid,
);
Sends a GET to projects/:project_id/merge_requests/:merge_request_iid/commits and returns the decoded response content. Every commit in the MR ๐
merge_request_with_changes
my $merge_request = $api->merge_request_with_changes(
$project_id,
$merge_request_iid,
);
Sends a GET to projects/:project_id/merge_requests/:merge_request_iid/changes and returns the decoded response content. The MR plus the diff โ the receipts, basically ๐
create_merge_request
my $merge_request = $api->create_merge_request(
$project_id,
\%params,
);
Sends a POST to projects/:project_id/merge_requests and returns the decoded response content. New MR just dropped โจ
edit_merge_request
my $merge_request = $api->edit_merge_request(
$project_id,
$merge_request_iid,
\%params,
);
Sends a PUT to projects/:project_id/merge_requests/:merge_request_iid and returns the decoded response content. Glow-up time for an existing MR ๐
delete_merge_request
$api->delete_merge_request(
$project_id,
$merge_request_iid,
);
Sends a DELETE to projects/:project_id/merge_requests/:merge_request_iid. Gone. Not even a return value, it just yeets it ๐
accept_merge_request
my $merge_request = $api->accept_merge_request(
$project_id,
$merge_request_iid,
\%params,
);
Sends a PUT to projects/:project_id/merge_requests/:merge_request_iid/merge and returns the decoded response content. That's the merge button, babes โ it's giving shipping to prod ๐
approve_merge_request
my $merge_request = $api->approve_merge_request(
$project_id,
$merge_request_iid,
\%params,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/approve and returns the decoded response content. Giving it the ๐ stamp of approval.
unapprove_merge_request
my $merge_request = $api->unapprove_merge_request(
$project_id,
$merge_request_iid,
\%params,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/unapprove and returns the decoded response content. Taking the approval back โ we've all been there ๐
cancel_merge_when_pipeline_succeeds
my $merge_request = $api->cancel_merge_when_pipeline_succeeds(
$project_id,
$merge_request_iid,
);
Sends a PUT to projects/:project_id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds and returns the decoded response content. You queued it to auto-merge once the pipeline passed, and now you're likeโฆ actually no ๐ซ cancelling that.
merge_request_closes_issues
my $issues = $api->merge_request_closes_issues(
$project_id,
$merge_request_iid,
\%params,
);
Sends a GET to projects/:project_id/merge_requests/:merge_request_iid/closes_issues and returns the decoded response content. All the issues this MR is gonna close when it lands ๐
subscribe_to_merge_request
my $merge_request = $api->subscribe_to_merge_request(
$project_id,
$merge_request_iid,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/subscribe and returns the decoded response content. Notifications ON, bestie ๐
unsubscribe_from_merge_request
my $merge_request = $api->unsubscribe_from_merge_request(
$project_id,
$merge_request_iid,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/unsubscribe and returns the decoded response content. Notifications OFF โ protecting your peace ๐ธ
create_merge_request_todo
my $todo = $api->create_merge_request_todo(
$project_id,
$merge_request_iid,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/todo and returns the decoded response content. Adding it to your to-do list so you literally cannot forget ๐ญ
merge_request_diff_versions
my $versions = $api->merge_request_diff_versions(
$project_id,
$merge_request_iid,
);
Sends a GET to projects/:project_id/merge_requests/:merge_request_iid/versions and returns the decoded response content. Every version of the diff โ the whole evolution arc ๐ฆ
merge_request_diff_version
my $version = $api->merge_request_diff_version(
$project_id,
$merge_request_iid,
$version_id,
);
Sends a GET to projects/:project_id/merge_requests/:merge_request_iid/versions/:version_id and returns the decoded response content. Just one of those versions, picked by $version_id.
set_merge_request_time_estimate
my $tracking = $api->set_merge_request_time_estimate(
$project_id,
$merge_request_iid,
\%params,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/time_estimate and returns the decoded response content. How long do we think this is gonna take? ๐ฐ๏ธ
reset_merge_request_time_estimate
my $tracking = $api->reset_merge_request_time_estimate(
$project_id,
$merge_request_iid,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/reset_time_estimate and returns the decoded response content. Nvm, erase that estimate ๐
add_merge_request_spent_time
my $tracking = $api->add_merge_request_spent_time(
$project_id,
$merge_request_iid,
\%params,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/add_spent_time and returns the decoded response content. Logging the hours you actually spent on it โจ
reset_merge_request_spent_time
my $tracking = $api->reset_merge_request_spent_time(
$project_id,
$merge_request_iid,
);
Sends a POST to projects/:project_id/merge_requests/:merge_request_iid/reset_spent_time and returns the decoded response content. Wiping that time tracking like it never happened ๐
merge_request_time_stats
my $tracking = $api->merge_request_time_stats(
$project_id,
$merge_request_iid,
);
Sends a GET to projects/:project_id/merge_requests/:merge_request_iid/time_stats and returns the decoded response content. The stats: estimate vs spent, the whole situation ๐
๐ Milestones ๐
Docs: https://docs.gitlab.com/ce/api/milestones.html.
project_milestones
my $milestones = $api->project_milestones(
$project_id,
\%params,
);
Sends a GET to projects/:project_id/milestones and returns the decoded response content. All the milestones for a project, lined up ๐
project_milestone
my $milestone = $api->project_milestone(
$project_id,
$milestone_id,
);
Sends a GET to projects/:project_id/milestones/:milestone_id and returns the decoded response content. One milestone, front and center.
create_project_milestone
my $milestone = $api->create_project_milestone(
$project_id,
\%params,
);
Sends a POST to projects/:project_id/milestones and returns the decoded response content. New milestone, new era ๐
edit_project_milestone
my $milestone = $api->edit_project_milestone(
$project_id,
$milestone_id,
\%params,
);
Sends a PUT to projects/:project_id/milestones/:milestone_id and returns the decoded response content. Tweaking it, glow-up style ๐
project_milestone_issues
my $issues = $api->project_milestone_issues(
$project_id,
$milestone_id,
\%params,
);
Sends a GET to projects/:project_id/milestones/:milestone_id/issues and returns the decoded response content. Every issue filed under that milestone ๐
project_milestone_merge_requests
my $merge_requests = $api->project_milestone_merge_requests(
$project_id,
$milestone_id,
\%params,
);
Sends a GET to projects/:project_id/milestones/:milestone_id/merge_requests and returns the decoded response content. Every MR attached to that milestone ๐ซถ
๐ Group milestones ๐
Docs: https://docs.gitlab.com/ce/api/group_milestones.html. Same energy, but for whole groups instead of one project.
group_milestones
my $milestones = $api->group_milestones(
$group_id,
\%params,
);
Sends a GET to groups/:group_id/milestones and returns the decoded response content. All the group's milestones, together at last ๐
group_milestone
my $milestone = $api->group_milestone(
$group_id,
$milestone_id,
);
Sends a GET to groups/:group_id/milestones/:milestone_id and returns the decoded response content. Just the one, bestie.
create_group_milestone
my $milestone = $api->create_group_milestone(
$group_id,
\%params,
);
Sends a POST to groups/:group_id/milestones and returns the decoded response content. A brand new group milestone has entered the chat โจ
edit_group_milestone
my $milestone = $api->edit_group_milestone(
$group_id,
$milestone_id,
\%params,
);
Sends a "PUT" request to groups/:group_id/milestones/:milestone_id and hands you back the decoded response content. ๐
group_milestone_issues
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 content. All the issues riding with that milestone ๐
group_milestone_merge_requests
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 content. โจ
๐ธ Namespaces ๐ธ
Docs live at https://docs.gitlab.com/ce/api/namespaces.html if you wanna peek bestie.
namespaces
my $namespaces = $api->namespaces(
\%params,
);
Sends a "GET" request to namespaces and returns the decoded response content. ๐ฆ
namespace
my $namespace = $api->namespace(
$namespace_id,
);
Sends a "GET" request to namespaces/:namespace_id and returns the decoded response content.
๐ Notes ๐
Docs: https://docs.gitlab.com/ce/api/notes.html โ the receipts of every conversation fr.
issue_notes
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 content. ๐ฌ
issue_note
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 content.
create_issue_note
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 content. New note just dropped ๐
edit_issue_note
$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.
delete_issue_note
$api->delete_issue_note(
$project_id,
$issue_iid,
$note_id,
);
Sends a "DELETE" request to projects/:project_id/issues/:issue_iid/notes/:note_id. Gone, no cap ๐
snippet_notes
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 content.
snippet_note
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 content.
create_snippet_note
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 content. โจ
edit_snippet_note
$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.
delete_snippet_note
$api->delete_snippet_note(
$project_id,
$snippet_id,
$note_id,
);
Sends a "DELETE" request to projects/:project_id/snippets/:snippet_id/notes/:note_id.
merge_request_notes
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 content. ๐ซถ
merge_request_note
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 content.
create_merge_request_note
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 content.
edit_merge_request_note
$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.
delete_merge_request_note
$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. ๐๏ธ
๐ฌ Discussions ๐ฌ
Docs: https://docs.gitlab.com/ce/api/discussions.html โ threads, but make it API.
issue_discussions
my $discussions = $api->issue_discussions(
$project_id,
$issue_iid,
\%params,
);
Sends a "GET" request to projects/:project_id/issues/:issue_iid/discussions and returns the decoded response content. ๐
issue_discussion
my $discussion = $api->issue_discussion(
$project_id,
$issue_iid,
$discussion_id,
);
Sends a "GET" request to projects/:project_id/issues/:issue_iid/discussions/:discussion_id and returns the decoded response content.
create_issue_discussion
my $discussion = $api->create_issue_discussion(
$project_id,
$issue_iid,
\%params,
);
Sends a "POST" request to projects/:project_id/issues/:issue_iid/discussions and returns the decoded response content. Start a thread bestie ๐งต
create_issue_discussion_note
$api->create_issue_discussion_note(
$project_id,
$issue_iid,
$discussion_id,
\%params,
);
Sends a "POST" request to projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes.
edit_issue_discussion_note
$api->edit_issue_discussion_note(
$project_id,
$issue_iid,
$discussion_id,
$note_id,
\%params,
);
Sends a "PUT" request to projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id.
delete_issue_discussion_note
$api->delete_issue_discussion_note(
$project_id,
$issue_iid,
$discussion_id,
$note_id,
);
Sends a "DELETE" request to projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id.
project_snippet_discussions
my $discussions = $api->project_snippet_discussions(
$project_id,
$snippet_id,
\%params,
);
Sends a "GET" request to projects/:project_id/snippets/:snippet_id/discussions and returns the decoded response content.
project_snippet_discussion
my $discussion = $api->project_snippet_discussion(
$project_id,
$snippet_id,
$discussion_id,
);
Sends a "GET" request to projects/:project_id/snippets/:snippet_id/discussions/:discussion_id and returns the decoded response content. โจ
create_project_snippet_discussion
my $discussion = $api->create_project_snippet_discussion(
$project_id,
$snippet_id,
\%params,
);
Sends a "POST" request to projects/:project_id/snippets/:snippet_id/discussions and returns the decoded response content.
create_project_snippet_discussion_note
$api->create_project_snippet_discussion_note(
$project_id,
$snippet_id,
$discussion_id,
\%params,
);
Sends a "POST" request to projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes.
edit_project_snippet_discussion_note
$api->edit_project_snippet_discussion_note(
$project_id,
$snippet_id,
$discussion_id,
$note_id,
\%params,
);
Sends a "PUT" request to projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id.
delete_project_snippet_discussion_note
$api->delete_project_snippet_discussion_note(
$project_id,
$snippet_id,
$discussion_id,
$note_id,
);
Sends a "DELETE" request to projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id.
merge_request_discussions
my $discussions = $api->merge_request_discussions(
$project_id,
$merge_request_iid,
\%params,
);
Sends a "GET" request to projects/:project_id/merge_requests/:merge_request_iid/discussions and returns the decoded response content. ๐ฅ
merge_request_discussion
my $discussion = $api->merge_request_discussion(
$project_id,
$merge_request_iid,
$discussion_id,
);
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id and drops the decoded response content right back in your lap. ๐
create_merge_request_discussion
my $discussion = $api->create_merge_request_discussion(
$project_id,
$merge_request_iid,
\%params,
);
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/discussions and returns the decoded response content. New discussion, who dis. โจ
resolve_merge_request_discussion
$api->resolve_merge_request_discussion(
$project_id,
$merge_request_iid,
$discussion_id,
\%params,
);
Sends a PUT request to projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id.
create_merge_request_discussion_note
$api->create_merge_request_discussion_note(
$project_id,
$merge_request_iid,
$discussion_id,
\%params,
);
Sends a POST request to projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes.
edit_merge_request_discussion_note
$api->edit_merge_request_discussion_note(
$project_id,
$merge_request_iid,
$discussion_id,
$note_id,
\%params,
);
Sends a PUT request to projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id.
delete_merge_request_discussion_note
$api->delete_merge_request_discussion_note(
$project_id,
$merge_request_iid,
$discussion_id,
$note_id,
);
Sends a DELETE request to projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id. Gone. Poof. ๐
commit_discussions
my $discussions = $api->commit_discussions(
$project_id,
$commit_id,
\%params,
);
Sends a GET request to projects/:project_id/commits/:commit_id/discussions and returns the decoded response content.
commit_discussion
my $discussion = $api->commit_discussion(
$project_id,
$commit_id,
$discussion_id,
);
Sends a GET request to projects/:project_id/commits/:commit_id/discussions/:discussion_id and returns the decoded response content.
create_commit_discussion
my $discussion = $api->create_commit_discussion(
$project_id,
$commit_id,
\%params,
);
Sends a POST request to projects/:project_id/commits/:commit_id/discussions and returns the decoded response content.
create_commit_discussion_note
$api->create_commit_discussion_note(
$project_id,
$commit_id,
$discussion_id,
\%params,
);
Sends a POST request to projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes.
edit_commit_discussion_note
$api->edit_commit_discussion_note(
$project_id,
$commit_id,
$discussion_id,
$note_id,
\%params,
);
Sends a PUT request to projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id.
delete_commit_discussion_note
$api->delete_commit_discussion_note(
$project_id,
$commit_id,
$discussion_id,
$note_id,
);
Sends a DELETE request to projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id.
๐ท๏ธ Resource label events ๐ท๏ธ
Peep the docs: https://docs.gitlab.com/ce/api/resource_label_events.html.
issue_resource_label_events
my $events = $api->issue_resource_label_events(
$project_id,
$issue_iid,
);
Sends a GET request to projects/:project_id/issues/:issue_iid/resource_label_events and returns the decoded response content. Every label that ever came or went on this issue, all in one list. ๐
issue_resource_label_event
my $event = $api->issue_resource_label_event(
$project_id,
$issue_iid,
$resource_label_event_id,
);
Sends a GET request to projects/:project_id/issues/:issue_iid/resource_label_events/:resource_label_event_id and returns the decoded response content.
merge_request_resource_label_events
my $events = $api->merge_request_resource_label_events(
$project_id,
$merge_request_iid,
);
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/resource_label_events and returns the decoded response content.
merge_request_resource_label_event
my $event = $api->merge_request_resource_label_event(
$project_id,
$merge_request_iid,
$resource_label_event_id,
);
Sends a GET request to projects/:project_id/merge_requests/:merge_request_iid/resource_label_events/:resource_label_event_id and returns the decoded response content.
๐ Notification settings ๐
Docs live here: https://docs.gitlab.com/ce/api/notification_settings.html.
global_notification_settings
my $settings = $api->global_notification_settings();
Sends a GET request to notification_settings and returns the decoded response content. No args, no stress. ๐ง
set_global_notification_settings
my $settings = $api->set_global_notification_settings(
\%params,
);
Sends a PUT request to notification_settings and returns the decoded response content.
group_notification_settings
my $settings = $api->group_notification_settings(
$group_id,
);
Sends a GET request to groups/:group_id/notification_settings and returns the decoded response content.
project_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 content.
set_group_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 content.
set_project_notification_settings
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 content.
๐ Licenses ๐
Docs: https://docs.gitlab.com/ce/api/templates/licenses.html.
license_templates
my $templates = $api->license_templates(
\%params,
);
Sends a GET request to templates/licenses and returns the decoded response content.
license_template
my $template = $api->license_template(
$template_key,
\%params,
);
Sends a GET request to templates/licenses/:template_key and returns the decoded response content.
๐ฆ Pages domains ๐ฆ
Docs: https://docs.gitlab.com/ce/api/pages_domains.html.
global_pages_domains
my $domains = $api->global_pages_domains(
\%params,
);
Sends a GET request to pages/domains and returns the decoded response content.
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 content.
pages_domain
my $domain = $api->pages_domain(
$project_id,
$domain,
);
Sends a GET request to projects/:project_id/pages/domains/:domain and returns the decoded response content.
create_pages_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 content.
edit_pages_domain
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 content.
delete_pages_domain
$api->delete_pages_domain(
$project_id,
$domain,
);
Sends a DELETE request to projects/:project_id/pages/domains/:domain.
๐ Pipelines ๐
Docs: https://docs.gitlab.com/ce/api/pipelines.html.
pipelines
my $pipelines = $api->pipelines(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/pipelines and returns the decoded response content.
pipeline
my $pipeline = $api->pipeline(
$project_id,
$pipeline_id,
);
Sends a GET request to projects/:project_id/pipelines/:pipeline_id and returns the decoded response content.
create_pipeline
my $pipeline = $api->create_pipeline(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/pipeline and returns the decoded response content.
Heads up bestie โ the Git ref (branch or tag) name must be specified in thereffield of the%paramshash. Not optional. It's giving mandatory. ๐ซถ
You can also pass variables to a pipeline in the variables field, like in the following example:
my $pipeline = $api->create_pipeline(
$project_id,
{
'ref' => 'master',
variables => [
{ 'key' => 'VARIABLE1', 'value' => 'VALUE1' },
{ 'key' => 'VARIABLE2', 'value' => 'VALUE2' },
],
},
);
๐
retry_pipeline_jobs
my $pipeline = $api->retry_pipeline_jobs(
$project_id,
$pipeline_id,
);
Sends a POST request to projects/:project_id/pipelines/:pipeline_id/retry and hands you back the decoded response content. Your failed jobs get a second chance bestie, we love a redemption arc ๐
๐ cancel_pipeline_jobs
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 content. It's giving "never mind, shutting it all down" โ
๐ delete_pipeline
$api->delete_pipeline(
$project_id,
$pipeline_id,
);
Sends a DELETE request to projects/:project_id/pipelines/:pipeline_id. Gone. Not returning anything, just gone ๐
๐ Pipeline triggers
Peep https://docs.gitlab.com/ce/api/pipeline_triggers.html for the lore โจ
triggers
my $triggers = $api->triggers(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/triggers and returns the decoded response content.
trigger
my $trigger = $api->trigger(
$project_id,
$trigger_id,
);
Sends a GET request to projects/:project_id/triggers/:trigger_id and returns the decoded response content.
create_trigger
my $trigger = $api->create_trigger(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/triggers and returns the decoded response content.
edit_trigger
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 content.
take_ownership_of_trigger
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 content. Claiming it, main character style ๐
delete_trigger
$api->delete_trigger(
$project_id,
$trigger_id,
);
Sends a DELETE request to projects/:project_id/triggers/:trigger_id.
๐ trigger_pipeline
my $pipeline = $api->trigger_pipeline(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/trigger/pipeline and returns the decoded response content.
Okay so the tea โ: the API authentication token (that's the private_token or access_token params you'd normally drop in the constructor) is not needed when you use this method. Instead you must pass the trigger token (generated back when the trigger was created) as the token field, and the git ref name as the ref field, both inside the %params hash. You can also pass variables you want set in the pipeline in the variables field. Example bestie:
my $pipeline = $api->trigger_pipeline(
$project_id,
{
token => 'd69dba9162ab6ac72fa0993496286ada',
'ref' => 'master',
variables => {
variable1 => 'value1',
variable2 => 'value2',
},
},
);
Read more at https://docs.gitlab.com/ce/ci/triggers/#triggering-a-pipeline ๐
๐๏ธ Pipeline schedules
Check https://docs.gitlab.com/ce/api/pipeline_schedules.html for the full rundown โจ
pipeline_schedules
my $schedules = $api->pipeline_schedules(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/pipeline_schedules and returns the decoded response content.
pipeline_schedule
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 content.
create_pipeline_schedule
my $schedule = $api->create_pipeline_schedule(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/pipeline_schedules and returns the decoded response content.
edit_pipeline_schedule
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 content.
take_ownership_of_pipeline_schedule
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 content.
run_pipeline_schedule
my $variable = $api->run_pipeline_schedule(
$project_id,
$pipeline_schedule_id,
);
Sends a POST request to projects/:project_id/pipeline_schedules/:pipeline_schedule_id/play and returns the decoded response content. Pressing play fr fr โถ๏ธ
delete_pipeline_schedule
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 content.
create_pipeline_schedule_variable
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 content.
edit_pipeline_schedule_variable
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 content.
delete_pipeline_schedule_variable
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 content.
๐ Projects
Peep https://docs.gitlab.com/ce/api/projects.html โ this is the whole vibe โจ
projects
my $projects = $api->projects(
\%params,
);
Sends a GET request to projects and returns the decoded response content.
user_projects
my $projects = $api->user_projects(
$user_id,
\%params,
);
Sends a GET request to users/:user_id/projects and returns the decoded response content.
project
my $project = $api->project(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id and returns the decoded response content.
project_users
my $users = $api->project_users(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/users and returns the decoded response content.
create_project
my $project = $api->create_project(
\%params,
);
Sends a POST request to projects and returns the decoded response content. Baby project incoming ๐ผ
create_project_for_user
$api->create_project_for_user(
$user_id,
\%params,
);
Sends a POST request to projects/user/:user_id.
edit_project
$api->edit_project(
$project_id,
\%params,
);
Sends a PUT request to projects/:project_id.
edit_project_multipart
$api->edit_project_multipart(
$project_id,
\%params,
);
Sends a PUT request to projects/:project_id.
Heads up bestie: the request will have the multipart/form-data header set, which is what you need for uploading files ๐
fork_project
$api->fork_project(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/fork.
project_forks
my $forks = $api->project_forks(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/forks and returns the decoded response content.
start_project
my $project = $api->start_project(
$project_id,
);
Sends a POST request to projects/:project_id/star and returns the decoded response content. Starring it, giving it its flowers โญ
unstar_project
my $project = $api->unstar_project(
$project_id,
);
Sends a POST request to projects/:project_id/unstar and returns the decoded response content.
project_languages
my $languages = $api->project_languages(
$project_id,
);
Sends a GET request to projects/:project_id/languages and returns the decoded response content.
archive_project
my $project = $api->archive_project(
$project_id,
);
Sends a POST request to projects/:project_id/archive and returns the decoded response content.
unarchive_project
my $project = $api->unarchive_project(
$project_id,
);
Sends a POST request to projects/:project_id/unarchive and returns the decoded response content.
delete_project
$api->delete_project(
$project_id,
);
Sends a DELETE request to projects/:project_id.
๐ upload_file_to_project
my $upload = $api->upload_file_to_project(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/uploads and returns the decoded response content.
The file parameter has got to point to a readable file on your local filesystem, bestie โ like it literally has to be right there and openable, no cap. ๐ฅ
share_project_with_group
$api->share_project_with_group(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/share. ๐
unshare_project_with_group
$api->unshare_project_with_group(
$project_id,
$group_id,
);
Sends a DELETE request to projects/:project_id/share/:group_id. Bye bestie ๐
project_hooks
my $hooks = $api->project_hooks(
$project_id,
);
Sends a GET request to projects/:project_id/hooks and hands you back the decoded response content. โจ
project_hook
my $hook = $api->project_hook(
$project_id,
$hook_id,
);
Sends a GET request to projects/:project_id/hooks/:hook_id and hands you back the decoded response content. ๐
create_project_hook
my $hook = $api->create_project_hook(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/hooks and hands you back the decoded response content. ๐ธ
edit_project_hook
my $hook = $api->edit_project_hook(
$project_id,
$hook_id,
\%params,
);
Sends a PUT request to projects/:project_id/hooks/:hook_id and hands you back the decoded response content. ๐ฆ
delete_project_hook
$api->delete_project_hook(
$project_id,
$hook_id,
);
Sends a DELETE request to projects/:project_id/hooks/:hook_id. Gone, periodt. ๐
set_project_fork
$api->set_project_fork(
$project_id,
$from_project_id,
);
Sends a POST request to projects/:project_id/fork/:from_project_id. Fork it, slay. ๐ด
clear_project_fork
$api->clear_project_fork(
$project_id,
);
Sends a DELETE request to projects/:project_id/fork. Un-fork, we love to see it. ๐
start_housekeeping
$api->start_housekeeping(
$project_id,
);
Sends a POST request to projects/:project_id/housekeeping. Time to clean, main character energy ๐งนโจ
transfer_project_to_namespace
$api->transfer_project_to_namespace(
$project_id,
\%params,
);
Sends a PUT request to projects/:project_id/transfer. Moving out, moving on ๐
Project access requests
See <https://docs.gitlab.com/ce/api/access_requests.html>. ๐
project_access_requests
my $requests = $api->project_access_requests(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/access_requests and hands you back the decoded response content. ๐
request_project_access
my $request = $api->request_project_access(
$project_id,
);
Sends a POST request to projects/:project_id/access_requests and hands you back the decoded response content. ๐โโ๏ธ
approve_project_access
my $request = $api->approve_project_access(
$project_id,
$user_id,
);
Sends a PUT request to projects/:project_id/access_requests/:user_id/approve and hands you back the decoded response content. โ
deny_project_access
$api->deny_project_access(
$project_id,
$user_id,
);
Sends a DELETE request to projects/:project_id/access_requests/:user_id. Not you, bestie ๐ซ
Project badges
See <https://docs.gitlab.com/ce/api/project_badges.html>. ๐
project_badges
my $badges = $api->project_badges(
$project_id,
);
Sends a GET request to projects/:project_id/badges and hands you back the decoded response content. ๐
project_badge
my $badge = $api->project_badge(
$project_id,
$badge_id,
);
Sends a GET request to projects/:project_id/badges/:badge_id and hands you back the decoded response content. โจ
create_project_badge
my $badge = $api->create_project_badge(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/badges and hands you back the decoded response content. ๐
edit_project_badge
my $badge = $api->edit_project_badge(
$project_id,
$badge_id,
\%params,
);
Sends a PUT request to projects/:project_id/badges/:badge_id and hands you back the decoded response content. ๐
delete_project_badge
$api->delete_project_badge(
$project_id,
$badge_id,
);
Sends a DELETE request to projects/:project_id/badges/:badge_id. Badge revoked, iconic behaviour. ๐
preview_project_badge
my $preview = $api->preview_project_badge(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/badges/render and hands you back the decoded response content. ๐โจ
Project import/export
See <https://docs.gitlab.com/ce/api/project_import_export.html>. ๐
schedule_project_export
$api->schedule_project_export(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/export. ๐ฆ
project_export_status
my $status = $api->project_export_status(
$project_id,
);
Sends a GET request to projects/:project_id/export and hands you back the decoded response content. โณ
download_project_export
my $download = $api->download_project_export(
$project_id,
);
Sends a GET request to projects/:project_id/export/download and hands you back the decoded response content. โฌ๏ธ
schedule_project_import
$api->schedule_project_import(
\%params,
);
Sends a POST request to projects/import. ๐ฅ
project_import_status
my $status = $api->project_import_status(
$project_id,
);
Sends a GET request to projects/:project_id/import and hands you back the decoded response content. โณ
Project members
See <https://docs.gitlab.com/ce/api/members.html>. ๐
project_members
my $members = $api->project_members(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/members and hands you back the decoded response content. ๐ซถ
all_project_members
my $members = $api->all_project_members(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/members/all and hands you back the decoded response content. Everyone, all of them ๐
project_member
my $member = $api->project_member(
$project_id,
$user_id,
);
Sends a GET request to projects/:project_id/members/:user_id and hands you back the decoded response content. ๐
add_project_member
my $member = $api->add_project_member(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/members and hands you back the decoded response content. โ
update_project_member
my $member = $api->update_project_member(
$project_id,
$user_id,
\%params,
);
Sends a PUT request to projects/:project_id/members/:user_id and hands you back the decoded response content. โจ
remove_project_member
$api->remove_project_member(
$project_id,
$user_id,
);
Sends a DELETE request to projects/:project_id/members/:user_id. It's giving removal ๐
Project snippets
See <https://docs.gitlab.com/ce/api/project_snippets.html>. ๐
project_snippets
my $snippets = $api->project_snippets(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/snippets and hands you back the decoded response content. ๐
project_snippet
my $snippet = $api->project_snippet(
$project_id,
$snippet_id,
);
Sends a GET request to projects/:project_id/snippets/:snippet_id and hands you back the decoded response content. โจ
create_project_snippet
$api->create_project_snippet(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/snippets. ๐ธ
edit_project_snippet
$api->edit_project_snippet(
$project_id,
$snippet_id,
\%params,
);
Sends a PUT request to projects/:project_id/snippets/:snippet_id. ๐
delete_project_snippet
$api->delete_project_snippet(
$project_id,
$snippet_id,
);
Sends a DELETE request to projects/:project_id/snippets/:snippet_id. ๐
project_snippet_content
my $content = $api->project_snippet_content(
$project_id,
$snippet_id,
);
Sends a GET request to projects/:project_id/snippets/:snippet_id/raw and hands you back the decoded response content. Raw and unfiltered, iykyk ๐
project_snippet_user_agent_detail
my $user_agent = $api->project_snippet_user_agent_detail(
$project_id,
$snippet_id,
);
Sends a GET request to projects/:project_id/snippets/:snippet_id/user_agent_detail and hands you back the decoded response content. ๐ต๏ธโโ๏ธ
Protected branches
See <https://docs.gitlab.com/ce/api/protected_branches.html>. ๐
protected_branches
my $branches = $api->protected_branches(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/protected_branches and hands you back the decoded response content. ๐ก๏ธ
protected_branch
my $branch = $api->protected_branch(
$project_id,
$branch_name,
);
Sends a GET request to projects/:project_id/protected_branches/:branch_name and hands you back the decoded response content. ๐
protect_branch
my $branch = $api->protect_branch(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/protected_branches and hands you back the decoded response content. Guarding it with your life, periodt ๐
unprotect_branch
$api->unprotect_branch(
$project_id,
$branch_name,
);
Sends a DELETE request to projects/:project_id/protected_branches/:branch_name.
๐ท๏ธ Protected tags
Docs live at https://docs.gitlab.com/ce/api/protected_tags.html.
protected_tags
my $tags = $api->protected_tags(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/protected_tags and hands you back the decoded response content. ๐
protected_tag
my $tag = $api->protected_tag(
$project_id,
$tag_name,
);
Sends a GET request to projects/:project_id/protected_tags/:tag_name and returns the decoded response content. โจ
protect_tag
my $tag = $api->protect_tag(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/protected_tags and returns the decoded response content. ๐ก๏ธ
unprotect_tag
$api->unprotect_tag(
$project_id,
$tag_name,
);
Sends a DELETE request to projects/:project_id/protected_tags/:tag_name. Bye-bye protection ๐
๐ Releases
Docs live at https://docs.gitlab.com/ce/api/releases/index.html.
releases
my $releases = $api->releases(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/releases and returns the decoded response content. ๐ฆ
release
my $release = $api->release(
$project_id,
$tag_name,
);
Sends a GET request to projects/:project_id/releases/:tag_name and returns the decoded response content.
create_release
my $release = $api->create_release(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/releases and returns the decoded response content. New release just dropped, periodt ๐
update_release
my $release = $api->update_release(
$project_id,
$tag_name,
\%params,
);
Sends a PUT request to projects/:project_id/releases/:tag_name and returns the decoded response content.
delete_release
my $release = $api->delete_release(
$project_id,
$tag_name,
);
Sends a DELETE request to projects/:project_id/releases/:tag_name and returns the decoded response content. ๐
๐ Release Links
Docs live at https://docs.gitlab.com/ce/api/releases/links.html.
release_links
my $links = $api->release_links(
$project_id,
$tag_name,
\%params,
);
Sends a GET request to projects/:project_id/releases/:tag_name/assets/links and returns the decoded response content. ๐
release_link
my $link = $api->release_link(
$project_id,
$tag_name,
$link_id,
);
Sends a GET request to projects/:project_id/releases/:tag_name/assets/links/:link_id and returns the decoded response content.
create_release_link
my $link = $api->create_release_link(
$project_id,
$tag_name,
\%params,
);
Sends a POST request to projects/:project_id/releases/:tag_name/assets/links and returns the decoded response content. โจ
update_release_link
my $link = $api->update_release_link(
$project_id,
$tag_name,
$link_id,
\%params,
);
Sends a PUT request to projects/:project_id/releases/:tag_name/assets/links/:link_id and returns the decoded response content.
delete_release_link
my $link = $api->delete_release_link(
$project_id,
$tag_name,
$link_id,
);
Sends a DELETE request to projects/:project_id/releases/:tag_name/assets/links/:link_id and returns the decoded response content. ๐ซถ
๐ช Remote Mirrors
Docs live at https://docs.gitlab.com/ce/api/remote_mirrors.html.
remote_mirrors
my $mirrors = $api->remote_mirrors(
$project_id,
);
Sends a GET request to projects/:project_id/remote_mirrors and returns the decoded response content. So many mirrors, it's giving twin energy ๐ช
create_remote_mirror
my $mirror = $api->create_remote_mirror(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/remote_mirrors and returns the decoded response content.
edit_remote_mirror
my $mirror = $api->edit_remote_mirror(
$project_id,
$mirror_id,
\%params,
);
Sends a PUT request to projects/:project_id/remote_mirrors/:mirror_id and returns the decoded response content. โจ
๐ณ Repositories
Docs live at https://docs.gitlab.com/ce/api/repositories.html.
tree
my $tree = $api->tree(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/repository/tree and returns the decoded response content. ๐ฒ
blob
my $blob = $api->blob(
$project_id,
$sha,
);
Sends a GET request to projects/:project_id/repository/blobs/:sha and returns the decoded response content.
raw_blob
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 content. ๐
archive
my $archive = $api->archive(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/repository/archive and returns the raw response content. Heads up bestie โ this one is raw, not decoded! ๐ง
compare
my $comparison = $api->compare(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/repository/compare and returns the decoded response content.
contributors
my $contributors = $api->contributors(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/repository/contributors and returns the decoded response content. ๐
๐ Repository files
Docs live at https://docs.gitlab.com/ce/api/repository_files.html.
file
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 content. ๐
raw_file
my $content = $api->raw_file(
$project_id,
$file_path,
\%params,
);
Sends a GET request to projects/:project_id/repository/files/:file_path/raw and returns the raw response content. Again: raw, not decoded, no cap ๐
create_file
$api->create_file(
$project_id,
$file_path,
\%params,
);
Sends a POST request to projects/:project_id/repository/files/:file_path. โจ
edit_file
$api->edit_file(
$project_id,
$file_path,
\%params,
);
Sends a PUT request to projects/:project_id/repository/files/:file_path.
delete_file
$api->delete_file(
$project_id,
$file_path,
\%params,
);
Sends a DELETE request to projects/:project_id/repository/files/:file_path. Gone. Reduced to atoms ๐
๐ Runners
Docs live at https://docs.gitlab.com/ce/api/runners.html.
runners
my $runners = $api->runners(
\%params,
);
Sends a GET request to runners and returns the decoded response content. ๐โ๏ธ
all_runners
my $runners = $api->all_runners(
\%params,
);
Sends a GET request to runners/all and returns the decoded response content. ALL of them. every single one ๐ซถ
runner
my $runner = $api->runner(
$runner_id,
);
Sends a GET request to runners/:runner_id and returns the decoded response content.
update_runner
my $runner = $api->update_runner(
$runner_id,
\%params,
);
Sends a PUT request to runners/:runner_id and returns the decoded response content.
delete_runner
$api->delete_runner(
$runner_id,
);
Sends a DELETE request to runners/:runner_id. ๐
runner_jobs
my $jobs = $api->runner_jobs(
$runner_id,
\%params,
);
Sends a GET request to runners/:runner_id/jobs and returns the decoded response content. ๐ฅ
project_runners
my $runners = $api->project_runners(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/runners and returns the decoded response content.
enable_project_runner
my $runner = $api->enable_project_runner(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/runners and returns the decoded response content. Enabling? iconic. ๐
disable_project_runner
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 content. ๐
๐ Search
Docs live at https://docs.gitlab.com/ce/api/search.html.
search
my $results = $api->search(
\%params,
);
Sends a GET request to search and returns the decoded response content. Go find ur stuff bestie ๐โจ
๐ ๏ธ Services
Docs live at https://docs.gitlab.com/ce/api/services.html.
project_service
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 content. ๐
edit_project_service
$api->edit_project_service(
$project_id,
$service_name,
\%params,
);
Sends a PUT request to projects/:project_id/services/:service_name. Tweak a service's config, bestie ๐
delete_project_service
$api->delete_project_service(
$project_id,
$service_name,
);
Sends a DELETE request to projects/:project_id/services/:service_name. Gone. Poof. ๐ซถ
โจ Application settings โจ
The whole instance's vibes, configurable. Docs live at https://docs.gitlab.com/ce/api/settings.html.
settings
my $settings = $api->settings();
Sends a GET request to application/settings and returns the decoded response content. It's giving "read the room, the whole instance". ๐
update_settings
my $settings = $api->update_settings(
\%params,
);
Sends a PUT request to application/settings and returns the decoded response content. Change the whole instance's settings, no cap. ๐
๐ Application statistics ๐
Numbers. Stats. The receipts, basically. Docs: https://docs.gitlab.com/ce/api/statistics.html.
statistics
my $statistics = $api->statistics();
Sends a GET request to application/statistics and returns the decoded response content. ๐
๐ฆ Sidekiq Metrics ๐ฆ
All the background-job gossip. Docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html.
queue_metrics
my $metrics = $api->queue_metrics();
Sends a GET request to sidekiq/queue_metrics and returns the decoded response content. How's the queue looking? ๐ญ
process_metrics
my $metrics = $api->process_metrics();
Sends a GET request to sidekiq/process_metrics and returns the decoded response content. The processes, they're processing. โจ
job_stats
my $stats = $api->job_stats();
Sends a GET request to sidekiq/job_stats and returns the decoded response content. ๐ (in a good way)
compound_metrics
my $metrics = $api->compound_metrics();
Sends a GET request to sidekiq/compound_metrics and returns the decoded response content. All the metrics, one request, iconic behaviour fr fr. ๐ฅ
๐ System hooks ๐
Instance-wide webhooks. Docs: https://docs.gitlab.com/ce/api/system_hooks.html.
hooks
my $hooks = $api->hooks(
\%params,
);
Sends a GET request to hooks and returns the decoded response content.
create_hook
$api->create_hook(
\%params,
);
Sends a POST request to hooks.
test_hook
my $hook = $api->test_hook(
$hook_id,
);
Sends a GET request to hooks/:hook_id and returns the decoded response content. Vibe check the hook before you commit, iykyk. ๐ธ
delete_hook
$api->delete_hook(
$hook_id,
);
Sends a DELETE request to hooks/:hook_id.
๐ Tags ๐
Release tags, bestie. Docs: https://docs.gitlab.com/ce/api/tags.html.
tags
my $tags = $api->tags(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/repository/tags and returns the decoded response content.
tag
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 content. Just the one tag, main character energy. โญ
create_tag
my $tag = $api->create_tag(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/repository/tags and returns the decoded response content. Tag it and slay. ๐
delete_tag
$api->delete_tag(
$project_id,
$tag_name,
);
Sends a DELETE request to projects/:project_id/repository/tags/:tag_name.
create_tag_release
my $release = $api->create_tag_release(
$project_id,
$tag_name,
\%params,
);
Sends a POST request to projects/:project_id/repository/tags/:tag_name/release and returns the decoded response content. Tag plus release notes = the full glow-up. ๐ฆ
update_tag_release
my $release = $api->update_tag_release(
$project_id,
$tag_name,
\%params,
);
Sends a PUT request to projects/:project_id/repository/tags/:tag_name/release and returns the decoded response content.
๐ Todos ๐
The to-do list, but make it API. Docs: https://docs.gitlab.com/ce/api/todos.html.
todos
my $todos = $api->todos(
\%params,
);
Sends a GET request to todos and returns the decoded response content.
mark_todo_done
my $todo = $api->mark_todo_done(
$todo_id,
);
Sends a POST request to todos/:todo_id/mark_as_done and returns the decoded response content. One down, you're doing amazing sweetie. ๐ซถ
mark_all_todos_done
$api->mark_all_todos_done();
Sends a POST request to todos/mark_as_done. Inbox zero but for todos, it's giving productivity. โจ
๐ Users ๐
Everyone on the instance. Docs: https://docs.gitlab.com/ce/api/users.html.
users
my $users = $api->users(
\%params,
);
Sends a GET request to users and returns the decoded response content.
user
my $user = $api->user(
$user_id,
);
Sends a GET request to users/:user_id and returns the decoded response content.
create_user
$api->create_user(
\%params,
);
Sends a POST request to users.
edit_user
$api->edit_user(
$user_id,
\%params,
);
Sends a PUT request to users/:user_id.
delete_user
$api->delete_user(
$user_id,
\%params,
);
Sends a DELETE request to users/:user_id. Note the \%params here, bestie โ it's not just the id, don't forget it. ๐
current_user
my $user = $api->current_user();
Sends a GET request to user and returns the decoded response content. It's you! You're the main character. ๐
current_user_ssh_keys
my $keys = $api->current_user_ssh_keys(
\%params,
);
Sends a GET request to user/keys and returns the decoded response content.
user_ssh_keys
my $keys = $api->user_ssh_keys(
$user_id,
\%params,
);
Sends a GET request to users/:user_id/keys and returns the decoded response content.
user_ssh_key
my $key = $api->user_ssh_key(
$key_id,
);
Sends a GET request to user/keys/:key_id and returns the decoded response content.
create_current_user_ssh_key
$api->create_current_user_ssh_key(
\%params,
);
Sends a POST request to user/keys.
create_user_ssh_key
$api->create_user_ssh_key(
$user_id,
\%params,
);
Sends a POST request to users/:user_id/keys.
delete_current_user_ssh_key
$api->delete_current_user_ssh_key(
$key_id,
);
Sends a DELETE request to user/keys/:key_id.
delete_user_ssh_key
$api->delete_user_ssh_key(
$user_id,
$key_id,
);
Sends a DELETE request to users/:user_id/keys/:key_id.
current_user_gpg_keys
my $keys = $api->current_user_gpg_keys(
\%params,
);
Sends a GET request to user/gpg_keys and returns the decoded response content.
current_user_gpg_key
my $key = $api->current_user_gpg_key(
$key_id,
);
Sends a GET request to user/gpg_keys/:key_id and returns the decoded response content.
create_current_user_gpg_key
$api->create_current_user_gpg_key(
\%params,
);
Sends a POST request to user/gpg_keys.
delete_current_user_gpg_key
$api->delete_current_user_gpg_key(
$key_id,
);
Sends a DELETE request to user/gpg_keys/:key_id.
user_gpg_keys
my $keys = $api->user_gpg_keys(
$user_id,
\%params,
);
Sends a GET request to users/:user_id/gpg_keys and returns the decoded response content.
user_gpg_key
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 content.
create_user_gpg_key
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 content.
delete_user_gpg_key
$api->delete_user_gpg_key(
$user_id,
$key_id,
);
Sends a DELETE request to users/:user_id/gpg_keys/:key_id.
current_user_emails
my $emails = $api->current_user_emails(
\%params,
);
Sends a GET request to user/emails and returns the decoded response content.
user_emails
my $emails = $api->user_emails(
$user_id,
\%params,
);
Sends a GET request to users/:user_id/emails and returns the decoded response content.
current_user_email
my $email = $api->current_user_email(
$email_id,
);
Sends a GET request to user/emails/:email_id and returns the decoded response content.
create_current_user_email
my $email = $api->create_current_user_email(
\%params,
);
Sends a POST request to user/emails and returns the decoded response content.
create_user_email
my $email = $api->create_user_email(
$user_id,
\%params,
);
Sends a POST request to users/:user_id/emails and returns the decoded response content.
delete_current_user_email
$api->delete_current_user_email(
$email_id,
);
Sends a DELETE request to user/emails/:email_id.
delete_user_email
$api->delete_user_email(
$user_id,
$email_id,
);
Sends a DELETE request to users/:user_id/emails/:email_id.
block_user
my $success = $api->block_user(
$user_id,
);
Sends a POST request to users/:user_id/block and returns the decoded response content. Blocked. Periodt. ๐ซ
unblock_user
my $success = $api->unblock_user(
$user_id,
);
Sends a POST request to users/:user_id/block and returns the decoded response content. We're so back, bestie ๐ซถ
Sends a POST request to users/:user_id/unblock and returns the decoded response content. โจ
approve_user ๐
$api->approve_user(
$user_id,
);
Sends a POST request to users/:user_id/approve.
reject_user ๐ซถ
$api->reject_user(
$user_id,
);
Sends a POST request to users/:user_id/reject.
activate_user ๐ฅ
$api->activate_user(
$user_id,
);
Sends a POST request to users/:user_id/activate.
deactivate_user ๐ค
$api->deactivate_user(
$user_id,
);
Sends a POST request to users/:user_id/deactivate.
ban_user ๐ซ
$api->ban_user(
$user_id,
);
Sends a POST request to users/:user_id/ban.
unban_user ๐
$api->unban_user(
$user_id,
);
Sends a POST request to users/:user_id/unban.
user_impersonation_tokens ๐ญ
my $tokens = $api->user_impersonation_tokens(
$user_id,
\%params,
);
Sends a GET request to users/:user_id/impersonation_tokens and returns the decoded response content.
user_impersonation_token ๐ญ
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 content.
create_user_impersonation_token โจ
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 content.
delete_user_impersonation_token ๐
$api->delete_user_impersonation_token(
$user_id,
$impersonation_token_id,
);
Sends a DELETE request to users/:user_id/impersonation_tokens/:impersonation_token_id.
all_user_activities ๐
my $activities = $api->all_user_activities(
\%params,
);
Sends a GET request to user/activities and returns the decoded response content.
user_memberships ๐ซ
my $memberships = $api->user_memberships(
$user_id,
\%params,
);
Sends a GET request to users/:user_id/memberships and returns the decoded response content.
Validate the .gitlab-ci.yml ๐งช
See https://docs.gitlab.com/ce/api/lint.html.
lint ๐งผ
my $result = $api->lint(
\%params,
);
Sends a POST request to lint and returns the decoded response content.
Version ๐
See https://docs.gitlab.com/ce/api/version.html.
version ๐
my $version = $api->version();
Sends a GET request to version and returns the decoded response content.
Wikis ๐
See https://docs.gitlab.com/ce/api/wikis.html.
wiki_pages ๐
my $pages = $api->wiki_pages(
$project_id,
\%params,
);
Sends a GET request to projects/:project_id/wikis and returns the decoded response content.
wiki_page ๐
my $pages = $api->wiki_page(
$project_id,
$slug,
);
Sends a GET request to projects/:project_id/wikis/:slug and returns the decoded response content.
create_wiki_page ๐
my $page = $api->create_wiki_page(
$project_id,
\%params,
);
Sends a POST request to projects/:project_id/wikis and returns the decoded response content.
edit_wiki_page โ๏ธ
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 content.
delete_wiki_page ๐๏ธ
$api->delete_wiki_page(
$project_id,
$slug,
);
Sends a DELETE request to projects/:project_id/wikis/:slug.
CONTRIBUTING ๐ซถ
Okay so bestie, here's the tea: this module is auto-generated from a set of YAML files that define the interface of GitLab's API. So if you wanna contribute (and you totally should, main character energy), feel free to make a fork on GitHub and submit a pull request:
https://github.com/bluefeet/GitLab-API-v4
Just please please PLEASE make sure you edit the files in the authors/ directory instead of lib/GitLab/API/v4.pm directly. That's the whole vibe. ๐
More info lives here:
https://github.com/bluefeet/GitLab-API-v4/blob/master/author/README.pod
Alternatively, you can just open a ticket:
https://github.com/bluefeet/GitLab-API-v4/issues
SUPPORT ๐
Please submit bugs and feature requests to the GitLab-API-v4 GitHub issue tracker:
https://github.com/bluefeet/GitLab-API-v4/issues
AUTHOR ๐
- Aran Clary Deltac
<bluefeet@gmail.com>
CONTRIBUTORS ๐
The way this many legends showed up?? Obsessed, fr fr:
- Dotan Dimet
<dotan@corky.net> - Nigel Gregoire
<nigelgregoire@gmail.com> - trunov-ms
<trunov.ms@gmail.com> - Marek R. Sotola
<Marek.R.Sotola@nasa.gov> - Jose Joaquin Atria
<jjatria@gmail.com> - Dave Webb
<github@d5ve.com> - Simon Ruderich
<simon@ruderich.org> - royce55
<royce@ecs.vuw.ac.nz> - gregor herrmann
<gregoa@debian.org> - Luc Didry
<luc@didry.org> - Kieren Diment
<kieren.diment@staples.com.au> - Dmitry Frolov
<dmitry.frolov@gmail.com> - Thomas Klausner
<domm@plix.at> - Graham Knop
<haarg@haarg.org> - Stig Palmquist
<git@stig.io> - Dan Book
<grinnz@grinnz.com> - James Wright
<jwright@ecstuning.com> - Jonathan Taylor
<jon@stackhaus.com> - g0t mi1k
<have.you.g0tmi1k@gmail.com>
LICENSE ๐
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay. ๐
And that's a wrap on the whole page, bestie!! ๐ This wasperl v5.36.0, dated2023-06-13, and you just finished readingGitLab::API::v4(3pm). Go forth and call some endpoints, you absolute icon. ๐ธ๐ฆโจ
๐ฆ where this page comes from
- debian trixie: libgitlab-api-v4-perl 0.27-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgitlab-api-v4-perl 0.27-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgitlab-api-v4-perl 0.27-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgitlab-api-v4-perl 0.27-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms