GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation fetches public snippets from the GitLab API (version 4). It is useful for retrieving publicly available code snippets shared on GitLab, which can be filtered by creation date and paginated for easier data handling. Practical examples include aggregating public code snippets for analysis, displaying recent snippets on a dashboard, or integrating snippet data into other applications.

Use Case Examples

  1. Fetch all public snippets created after a specific date to monitor recent contributions.
  2. Retrieve a paginated list of public snippets to display in a user interface with pagination controls.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request. Useful for accessing public data without credentials.
Authentication Specifies the authentication method to use if authentication is not skipped. Defaults to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent. Defaults to https://gitlab.com.
Method The HTTP method used for the API request. Defaults to GET, which is typical for fetching data.
Query Parameters Collection of optional query parameters to filter and paginate the public snippets retrieved from the API.

Output

JSON

  • snippets - Array of public snippets returned from the GitLab API, each containing snippet details such as ID, title, content, author, creation date, and other metadata.

Dependencies

  • GitLab API key credential (optional if Skip Authentication is false)

Troubleshooting

  • If authentication is required but credentials are missing or invalid, the node will fail to fetch data. Ensure the GitLab API key is correctly configured unless Skip Authentication is enabled.
  • Incorrect baseUrl may lead to connection errors. Verify the GitLab instance URL is correct.
  • Invalid query parameters (e.g., wrong date format) may cause the API to return errors. Use ISO 8601 date-time format for created_after and created_before.

Links

Discussion