GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves statistics for a specific project from the GitLab API (version 4). It is useful for scenarios where users need to obtain detailed project metrics such as repository size, storage usage, and other statistical data related to a GitLab project. For example, a DevOps engineer might use this node to monitor project storage consumption automatically.

Use Case Examples

  1. Retrieve statistics for a project by providing its ID or URL-encoded path to monitor storage usage.
  2. Automate reporting of project metrics for project management dashboards.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Path Parameters The path parameters for the API request, specifically the project ID or URL-encoded path required to identify the project.

Output

JSON

  • statistics
    • repository_size - Size of the repository in bytes.
    • lfs_objects_size - Size of LFS (Large File Storage) objects in bytes.
    • job_artifacts_size - Size of job artifacts in bytes.
    • packages_size - Size of packages in bytes.
    • snippets_size - Size of snippets in bytes.
    • wiki_size - Size of the wiki repository in bytes.
    • storage_size - Total storage size used by the project in bytes.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correctly provided in the path parameters; otherwise, the API request will fail.
  • If authentication is enabled, verify that the GitLab API key credential is valid and has sufficient permissions to access project statistics.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion