GitLab API

GitlabTool

Actions1095

Npm_packages → getApiV4ProjectsIdPackagesNpm*packageName

AI-generated

Summary

Retrieve information about a specific npm package for a project in GitLab using its project ID and package name.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project.
  • package_name (required) — The name of the npm package within the specified project.
  • skipAuthentication — Whether to skip authentication for the request, defaults to false.
  • baseUrl — The base URL of the GitLab instance, defaults to 'https://gitlab.com'.
  • method — HTTP method to use for the request, defaults to GET.

Output shape

a single JSON object containing the details of the specified npm package within the given project.

Requires the project ID and package name as path and query parameters respectively. Authentication is used unless explicitly skipped. Returns data obtained from the GitLab API endpoint /api/v4/projects/{id}/packages/npm/*package_name with a GET request by default.

Examples

Example 1: Get npm package details for project 123 and package 'mypackage'

Set 'id' path parameter to '123' and 'package_name' query parameter to 'mypackage', use default GET method and authentication.

Links

Discussion