---
title: "List the GitLab projects the user can link"
method: GET
path: "/gitlab/projects"
tags: ["gitlab"]
---

# List the GitLab projects the user can link

`GET /gitlab/projects`

## Request

- Base URL: `https://api.faable.com`
- URL: `https://api.faable.com/gitlab/projects`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://faable.auth.faable.link/authorize`, token URL `https://faable.auth.faable.link/oauth/token`)
  - HTTP bearer
  - OAuth 2 (client credentials, token URL `https://faable.auth.faable.link/oauth/token`)
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `apikey`

gitlab.com projects where the user is at least Maintainer (needed to create the deploy webhook).

## Query parameters

- `q` string

## Response `200`

Default Response

- object
  - `results` object[], required
    - `id` string, required
    - `path_with_namespace` string, required
    - `default_branch` string, required
    - `visibility` string, required
    - `web_url` string, required

## Other responses

- `400`: `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
- `401`: `unauthorized` — The request carries no valid credentials. `invalid_token` — The bearer token is missing, malformed or expired.
- `403`: `forbidden` — The credentials are valid but do not allow this operation. `user_suspended` — The account is suspended. Contact support@faable.com.
- `412`: `gitlab_identity_missing` — The user has not connected GitLab. Send them through `connect_gitlab`. `gitlab_token_invalid` — The GitLab connection has no usable token (revoked or expired). The user must connect GitLab again.
- `429`: `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.
- `500`: `internal_error` — Unexpected server error. Retry later; the request id is logged.
- `503`: `gitlab_not_configured` — GitLab linking is not enabled on this environment. `database_unavailable` — Faable cannot reach its database right now. Transient: retry after the `Retry-After` header.

---

[API](https://skmtc.dev/faable/apis/faablecloud-api.md) · [All operations](https://skmtc.dev/faable/apis/faablecloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/faable/apis/faablecloud-api/revisions/e2fc93da3c49?raw)
