GitLab API

GitlabTool

Actions905

Overview

This node operation authorizes access to job artifacts in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/jobs/{id}/artifacts/authorize`. It is useful for workflows that need to programmatically authorize and access job artifacts in GitLab CI/CD pipelines, such as automating artifact retrieval or validation processes.

Use Case Examples

  1. Automate authorization to download job artifacts for further processing in a CI/CD pipeline.
  2. Integrate GitLab job artifact authorization into a larger DevOps workflow to manage build outputs.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the 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 request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the request, fixed to POST for this operation.
Path Parameters Parameters included in the request path, specifically the job ID to identify which job's artifacts to authorize.

Output

JSON

  • response - The JSON response from the GitLab API after authorizing job artifacts, typically containing authorization details or status.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the job ID provided in the path parameters is valid and exists in the GitLab project.
  • Verify that the API key used has sufficient permissions to authorize job artifacts.
  • Check the baseUrl to confirm it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages may include 401 Unauthorized if authentication fails, or 404 Not Found if the job ID does not exist.

Links

Discussion