You are not logged in.

#1 2023-11-26 06:31:23

cherio
Member
Registered: 2022-04-27
Posts: 29

New GitLab issue list API

I need to access GitLab Arch issues via REST API but I can't figure out the URL to use.

I tried the following:
curl -sL --header "PRIVATE-TOKEN: my-private-arch-gitlab-token" "https://gitlab.archlinux.org/api/v4/iss … ate=opened"

It is based on the spec here: https://docs.gitlab.com/ee/api/issues.html
It seems to be working, no errors, returns a valid JSON, but the result is just an empty list.

Offline

#2 2023-11-26 09:29:16

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: New GitLab issue list API

By default it returns only issues created by the current user. To get all issues, use parameter scope=all.

Offline

#3 2023-11-26 17:58:02

cherio
Member
Registered: 2022-04-27
Posts: 29

Re: New GitLab issue list API

That's it! Thank you.

BTW, maybe you know the solution to another relevant issue. I am trying to pull bugs with either "severity::2-high" or "severity::1-critical". I am not sure if this is even possible. A request such as this

curl --header "PRIVATE-TOKEN: my-token-XXX" "https://gitlab.archlinux.org/api/v4/issues?sort=desc&order_by=created_at&scope=all&labels=scope::bug&labels=severity::2-high,severity::1-critical"

attempts to pull issues with both severity labels present, which obviously results in an empty list and not what's needed. I wonder if there is a way to have the request match issues with any of the specified labels.

Offline

#4 2023-11-27 15:50:59

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,150

Re: New GitLab issue list API

Offline

Board footer

Powered by FluxBB