GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to retrieve public snippets using the API v4 endpoint. It is useful for scenarios where users want to fetch publicly available code snippets from GitLab, optionally filtering by creation date and paginating results. For example, it can be used to gather recent public snippets created after a certain date or to browse snippets page by page.

Use Case Examples

  1. Fetch all public snippets created after January 1, 2023.
  2. Retrieve the second page of public snippets with 50 snippets per page.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, defaulting to GET.
Query Parameters Optional query parameters to filter and paginate the public snippets retrieved from GitLab.

Output

JSON

  • id - Unique identifier of the snippet.
  • title - Title of the snippet.
  • file_name - Name of the file in the snippet.
  • author
    • id - ID of the author who created the snippet.
    • name - Name of the author.
  • created_at - Timestamp when the snippet was created.
  • updated_at - Timestamp when the snippet was last updated.
  • visibility - Visibility level of the snippet (e.g., public).
  • web_url - URL to view the snippet on GitLab.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the baseUrl is correct and accessible; incorrect URLs will cause request failures.
  • If authentication is enabled, verify that the API key credential is valid and has sufficient permissions.
  • Check that query parameters like dates are in the correct ISO 8601 format to avoid API errors.
  • Pagination parameters (page, per_page) should be positive integers; invalid values may cause unexpected results or errors.

Links

Discussion