GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves statistical data for a specific project from the GitLab API (version 4). It is useful for scenarios where users need to obtain detailed statistics about a project, such as storage usage or repository size, by providing the project's ID or URL-encoded path. For example, a user can automate monitoring of project statistics to track resource usage over time.

Use Case Examples

  1. Retrieve storage statistics for a project with a given ID to monitor repository size.
  2. Automate fetching project statistics to generate reports on project resource consumption.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, hidden if Skip Authentication is true.
baseUrl Base URL of the GitLab instance to which the API request is sent.
Method HTTP method used for the API request.
Path Parameters Parameters included in the request path, specifically the project ID or URL-encoded path.

Output

JSON

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

Dependencies

  • GitLab API authentication

Troubleshooting

  • Ensure the project ID or URL-encoded path is correctly provided in the path parameters to avoid 404 errors.
  • Verify that the authentication credentials are valid and have sufficient permissions to access project statistics.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion