GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves snippets from a specific project in GitLab using the GitLab API v4. It is useful for scenarios where you need to access or manage code snippets associated with a particular project, such as fetching all snippets for review or integration into other workflows.

Use Case Examples

  1. Fetch all snippets from a project by providing the project ID.
  2. Paginate through snippets using page and per_page query parameters to handle large sets of snippets.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public projects or testing.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters for pagination such as page number and items per page.
Path Parameters Path parameters including the project ID or URL-encoded path to specify the project.

Output

JSON

  • snippets - List of snippets retrieved from the specified project
  • pagination
    • page - Current page number of the results
    • per_page - Number of items per page in the results
    • total - Total number of snippets available

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided authentication.
  • If skipping authentication, verify the project is public and accessible without credentials.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Pagination parameters (page and per_page) should be valid integers; otherwise, the API may return errors or unexpected results.

Links

Discussion