GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation authorizes access to job artifacts in GitLab by sending a POST request to the endpoint `/api/v4/jobs/{id}/artifacts/authorize`. It is useful in scenarios where you need to programmatically authorize artifact downloads for specific CI/CD jobs in GitLab, such as automating artifact access control in a CI/CD pipeline.

Use Case Examples

  1. Automate artifact authorization for a specific job in a GitLab pipeline.
  2. Integrate artifact authorization into a custom deployment workflow that requires artifact access permissions.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to be included in the request path, specifically the job ID for this operation.

Output

JSON

  • id - The ID of the job for which artifact authorization was requested.
  • status - The status of the authorization request.
  • message - Any message returned from the authorization request, such as success or error details.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the job ID provided in the path parameters is valid and exists in the GitLab project.
  • Verify that the API key credential has sufficient permissions to authorize job artifacts.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated requests for this endpoint, otherwise the request will fail.
  • Check the base URL to confirm it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion