GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to perform operations related to jobs, specifically allowing the user to send a POST request to the /api/v4/jobs/request endpoint. It is useful for automating job requests in GitLab pipelines or managing CI/CD jobs programmatically. For example, it can be used to trigger a new job request in a GitLab project as part of an automated workflow.

Use Case Examples

  1. Triggering a new CI/CD job in GitLab by sending a job request payload to the API.
  2. Automating job management in GitLab by programmatically posting job requests.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method to use for the API request, defaulting to GET but supporting POST, PUT, DELETE, HEAD, and PATCH.
Parameter Schema Defines the schema for the parameters of the postApiV4JobsRequest operation, required in the request body.
Request Body Schema Defines the schema for the request body of the postApiV4JobsRequest operation.
Request Path The API endpoint path for the postApiV4JobsRequest operation, fixed to /api/v4/jobs/request.

Output

JSON

  • response - The JSON response returned from the GitLab API after posting the job request.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to post job requests.
  • Verify the baseUrl is correct and accessible from the environment where the node runs.
  • Check that the request body matches the expected schema for the /api/v4/jobs/request endpoint to avoid validation errors.

Links

Discussion