GitLab API

GitlabTool

Actions1095

Npm_packages → getApiV4PackagesNpm*packageName

AI-generated

Summary

Retrieve information about an npm package by its name from the GitLab API at the endpoint /api/v4/packages/npm/*package_name using a configurable HTTP method (default GET).

Inputs

  • package_name (required) — The name of the npm package to retrieve information for.
  • method — HTTP method to use for the request, defaulting to GET.
  • baseUrl — The base URL of the GitLab instance, defaulting to https://gitlab.com.
  • skipAuthentication — Boolean to decide whether to skip authentication; defaults to false, meaning authentication via the GitLab API credential is used.

Output shape

a JSON response containing npm package details from the GitLab API, corresponding to the specified package name

The response structure depends on the GitLab API. Authentication is applied unless skipped. The operation does not modify data if using GET (default method). Other HTTP methods are also supported per user choice, but typical usage is GET.

Examples

Example 1: Get package details

Set package_name to 'mypackage', method to 'GET' (default), baseUrl to 'https://gitlab.com', and authentication to enabled (skipAuthentication false). The node returns the package info JSON.

Links

Discussion