GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a list of projects associated with a specific user in GitLab using the GitLab API v4. It supports various query parameters to filter, sort, and paginate the projects, such as ordering by creation date, filtering by visibility, archived status, ownership, and more. This operation is useful for scenarios where you need to fetch and analyze projects related to a user, for example, to display user projects in a dashboard or to automate project management tasks.

Use Case Examples

  1. Fetch all projects for a user ordered by creation date descending.
  2. Retrieve only public projects owned by a user.
  3. Get projects with enabled issues and merge requests features for a specific user.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
baseUrl The base URL of the GitLab instance to connect to.
Method HTTP method to use for the request (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Collection of optional query parameters to filter and customize the projects list, such as order_by, sort, archived, visibility, search, owned, starred, membership, and pagination options.
Path Parameters Path parameters including user_id to specify the user whose projects are being retrieved.

Output

JSON

  • ``
    • id - The unique identifier of each project.
    • name - The name of each project.
    • path - The path of each project.
    • visibility - The visibility level of each project (private, internal, public).
    • archived - Whether the project is archived.
    • created_at - The creation date of the project.
    • last_activity_at - The last activity date on the project.
    • statistics - Statistics about the project if requested, such as storage size and repository size.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the user_id path parameter is correctly set and valid; otherwise, the API will return an error.
  • Verify that the authentication token has sufficient permissions to access the user's projects, especially for private or internal projects.
  • Check that the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab server.
  • If filtering by certain query parameters like visibility or archived, ensure the values are valid and supported by the API.
  • Pagination parameters (page, per_page) should be set correctly to avoid missing data or excessive data retrieval.

Links

Discussion