GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves the Go module proxy file (.mod) for a specific Go module version from a GitLab project. It is useful for developers who want to programmatically access Go module metadata stored in GitLab's package registry. For example, it can be used to fetch module information for dependency management or automation in CI/CD pipelines.

Use Case Examples

  1. Fetch the .mod file for a Go module version 'v1.0.0' in a project with ID '12345' to verify module dependencies.
  2. Automate retrieval of Go module metadata during build processes to ensure correct module versions are used.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters.module_name The name of the Go module to retrieve.
Path Parameters.id The project ID or full path of the GitLab project.
Path Parameters.module_version The version of the Go module to retrieve.

Output

JSON

  • id - The project ID or full path of the project.
  • module_name - The name of the Go module.
  • module_version - The version of the Go module.
  • content - The content of the Go module proxy file (.mod) retrieved from the GitLab API.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and module version are correctly specified; incorrect values will result in a 404 Not Found error.
  • If authentication is required and skipped, the request may fail with a 401 Unauthorized error.
  • Verify that the base URL is correct, especially if using a self-hosted GitLab instance.

Discussion