GITLAB-API-V4(1p)

πŸ“¦
version 0.27 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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.


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