GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves environment details for a specific project from the GitLab API (v4). It is useful for users who want to fetch information about deployment environments associated with a GitLab project, such as available, stopping, or stopped environments. Practical examples include automating environment status checks or integrating environment data into CI/CD pipelines.

Use Case Examples

  1. Fetch all environments for a project by its ID.
  2. Search for environments by name or partial match within a project.
  3. Filter environments by their state (available, stopping, stopped).

Properties

Name Meaning
Skip Authentication If true, the node will skip using authentication for 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.
Parameter Schema Defines the parameters accepted by the API endpoint, including path and query parameters such as project ID, pagination, environment name, search term, and environment states.
Query Parameters Collection of optional query parameters to filter or paginate the environments list, including page number, items per page, environment name, search string, and environment states.
Path Parameters Collection of path parameters required by the API endpoint, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The unique identifier of the environment.
  • name - The name of the environment.
  • state - The current state of the environment (e.g., available, stopping, stopped).
  • external_url - The external URL associated with the environment.
  • updated_at - Timestamp of the last update to the environment.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the authentication credentials (API key) are valid and have sufficient permissions to access the project's environments.
  • Check that query parameters such as 'name' and 'search' are used exclusively as they are mutually exclusive.
  • If no environments are returned, verify that the project has environments matching the specified filters and states.

Links

Discussion