GitLab project issues
Issues of a public gitlab.com project: id, number, title, link, state, author and assignees (username, name, profile), labels, milestone, dates, comment count, up and down votes, type, due date, weight, linked merge requests, severity, task completion and the description (first 4,000 characters). total is the number of matches. Pass next_page back as page; null on the last page. Pass iid for one issue with more detail.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
pathrequired | string | Project path (namespace/project), its gitlab.com link, or the numeric project id. Example: gitlab-org/gitlab-runner |
state | opened | closed | all | opened (default), closed or all. |
q | string | Search words in title and description. |
labels | string | Label names, comma-separated (all must match). |
milestone | string | Milestone title. |
author | string | Author's username. |
assignee | string | Assignee's username. |
created_after | string | ISO 8601 time. |
created_before | string | ISO 8601 time. |
updated_after | string | ISO 8601 time. |
updated_before | string | ISO 8601 time. |
order_by | created_at | updated_at | priority | due_date | relative_position | label_priority | milestone_due | popularity | weight | title | Sort field (default created_at). |
sort | desc | asc | desc (default) or asc. |
type | issue | incident | test_case | task | Work item type. |
confidential | true | false | true or false. |
page | integer | Page number (default 1). |
limit | integer | Results per page (default 20, max 100). |
iid | integer | One issue by its number (the number in its URL). The answer then holds that issue in items and item, with its full reference, closed by, time tracking, blocking issues count, epic and iteration. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/gitlab/v1/project/issues?path=gitlab-org%2Fgitlab-runner" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/gitlab/v1/project/issues",
params={"path": "gitlab-org/gitlab-runner"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/gitlab/v1/project/issues");
url.searchParams.set("path", "gitlab-org/gitlab-runner");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).