GitLab API

GitlabTool

Actions1095

Npm_packages → putApiV4ProjectsIdPackagesNpmPackage*packageNameDistTagsTag

AI-generated

Summary

Update or create a distribution tag for an NPM package in a GitLab project by specifying the project ID, package name, and tag name, along with the update details in the request body.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the NPM package.
  • tag (required) — The distribution tag name to update or create for the specified NPM package.
  • putApiV4ProjectsIdPackagesNpmPackage*packageNameDistTagsTag (required) — The JSON request body containing details to update or create the distribution tag for the NPM package.
  • skipAuthentication — Option to skip authentication; defaults to false and requires GitLab API credentials if not skipped.
  • baseUrl — The base URL of the GitLab instance, defaulting to https://gitlab.com if not specified.

Output shape

a JSON object representing the updated or created distribution tag in the NPM package registry within the specified GitLab project

The output reflects the response returned from the GitLab API after performing the PUT request to update or create the dist-tag. Authentication is required unless explicitly skipped. The operation targets the endpoint /api/v4/projects/{id}/packages/npm/-/package/*package_name/dist-tags/{tag}.

Examples

Example 1: Update a dist-tag for a package in a GitLab project

Provide the project ID, distribution tag name, and a valid JSON body with the dist-tag update details; ensure GitLab API credentials are configured unless skipping authentication.

Links

Discussion