GITLAB-API-V4(1p)
π NAME π
gitlab-api-v4 β bestie, it's literally a command line interface to the GitLab API v4. That's it, that's the vibe. β¨
This is a Perl manpage from the User Contributed Perl Documentation collection, page GITLAB-API-V4(1p), and it's giving "let me talk to GitLab from my terminal without crying." π«Ά
β¨ SYNOPSIS β¨
Okay so here's how you actually use it:
# Generally:
gitlab-api-v4 [<options>] <method> [<arg> ...] [<param>:<value> ...]
# List all groups:
gitlab-api-v4 groups
# List information about a project:
gitlab-api-v4 project <project_id>
# Create an admin user:
gitlab-api-v4 create-user \
username:foo \
password:xxxxxxxx \
email:user@example.com \
"name:Foo Smith" \
admin:1
Likeβ¦ the create-user one? Lowkey iconic. You just hand it a pile of key:value pairs and it goes. π
π CONFIGURING π
So you've got three whole ways to configure this thing, pick your fighter:
- environment variables
- command line options
- a configuration file
To set up that config file, run:
gitlab-api-v4 configure
It's gonna ask you several interactive questions to help you configure this script. Heads up though β the info it stores, which may include GitLab authentication tokens, lives in ~/.gitlab-api-v4.json. π
Read more at GitLab::API::v4::Config.
πΈ OPTIONS πΈ
url
--url=<url>
Sets url in GitLab::API::v4.
access-token
--access-token=<token>
Sets access_token in GitLab::API::v4.
private-token
--private-token=<token>
Sets private_token in GitLab::API::v4.
retries
--retries=<count>
Sets retries in GitLab::API::v4.
all
--all
-a
Retrieves all the results when the results would normally be paged. Because who has time for pages, fr fr. See "all" in GitLab::API::v4::Paginator for details.
pretty
--pretty
-p
Enables the "pretty" in JSON::PP feature. Make that JSON serve. π
canonical
--canonical
-c
Enables the "canonical" in JSON::PP feature.
π¦ API METHOD π¦
<method>
The API method to call β one of the methods documented in "API METHODS" in GitLab::API::v4.
π API ARGUMENTS π
<arg> ...
Any arguments that the API METHOD requires. Feed it what it needs, bestie. π
π API PARAMETERS π
<param>:<value> ...
Any parameters that the API METHOD accepts.
access-level
access-level:guest
access-level:reporter
access-level:developer
access-level:master
access-level:owner
There are mappings set up for the various access-level parameters so that you can, for example, specify access-level:guest and it will be automatically converted to access-level:10. No cap, it just does the math for you. π§
β SUPPORT β
See "SUPPORT" in GitLab::API::v4.
π AUTHORS π
See "AUTHORS" in GitLab::API::v4.
π COPYRIGHT AND LICENSE π
See "COPYRIGHT AND LICENSE" in GitLab::API::v4.
And that's the whole page, bestie β you ate. π β¨
Quick lil sign-off from the fine print: this is perl v5.36.0, dated 2023-06-13, and the page is GITLAB-API-V4(1p). Slay. π«ΆπΈ
π¦ 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