GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the Go module .mod file for a specific project package from the GitLab API. It is useful for developers or automation workflows that need to fetch Go module metadata for a given project, module name, and version. For example, it can be used to automate dependency management or auditing of Go modules hosted in GitLab.

Use Case Examples

  1. Fetch the Go module .mod file for project ID '123', module name 'github.com/example/module', and version 'v1.0.0' to verify dependencies.
  2. Automate retrieval of Go module metadata for continuous integration pipelines to ensure correct module versions are used.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request (boolean). Defaults to false.
Authentication The authentication method to use, hidden unless Skip Authentication is false. Defaults to GitLab API key.
baseUrl The base URL of the GitLab instance. Defaults to https://gitlab.com.
Method HTTP method to use for the request. Defaults to GET.
Query Parameters.module_name The name of the Go module to retrieve. Required for the operation.
Path Parameters.id The project ID or full path of the project. Required for the operation.
Path Parameters.module_version The version of the Go module to retrieve. Required for the operation.

Output

JSON

  • data - The raw content of the Go module .mod file retrieved from the GitLab API.

Dependencies

  • GitLab API key credential for authentication unless Skip Authentication is true

Troubleshooting

  • Ensure the project ID or full path is correct and accessible with the provided credentials.
  • Verify the module_name and module_version parameters are correctly specified and exist in the project.
  • If authentication is skipped, ensure the GitLab instance allows unauthenticated access to the requested resource.
  • Common errors include 404 Not Found if the project or module version does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion