GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves details of a specific environment within a GitLab project using the GitLab API. It is useful for users who want to programmatically access environment information such as deployment status or configuration within a project. For example, a DevOps engineer might use this node to fetch environment details to automate deployment pipelines or monitor environment states.

Use Case Examples

  1. Fetch environment details for a project to check deployment status.
  2. Retrieve configuration of a specific environment for audit or reporting purposes.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance to which the API request is sent.
Method HTTP method used for the API request, default is GET.
Path Parameters Parameters used in the API request path to specify the project and environment.

Output

JSON

  • id - The unique identifier of the environment.
  • name - The name of the environment.
  • slug - The slugified name of the environment.
  • external_url - The external URL associated with the environment.
  • state - The current state of the environment (e.g., available, stopped).
  • created_at - Timestamp when the environment was created.
  • updated_at - Timestamp when the environment was last updated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and environment ID are correct and accessible by the authenticated user to avoid 404 errors.
  • If authentication is skipped, the API request may fail due to lack of permissions.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the API endpoint is reachable.

Links

Discussion