GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows updating a specific package protection rule within a GitLab project by sending a PATCH request to the GitLab API. It is useful for managing package protection rules programmatically, such as modifying access controls or rule settings for packages in a project.

Use Case Examples

  1. Updating a package protection rule to change its access level or restrictions in a GitLab project.
  2. Automating the management of package protection rules across multiple projects in GitLab.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to PATCH for this operation.
Path Parameters Parameters to specify the project ID or URL-encoded path and the package protection rule ID to identify the resource to update.

Output

JSON

  • id - The ID of the updated package protection rule.
  • name - The name of the package protection rule.
  • access_level - The access level setting of the package protection rule.
  • created_at - Timestamp when the package protection rule was created.
  • updated_at - Timestamp when the package protection rule was last updated.

Dependencies

  • GitLab API authentication

Troubleshooting

  • Ensure the project ID and package protection rule ID are correctly specified and URL-encoded if necessary.
  • Verify that the authentication credentials are valid and have sufficient permissions to update package protection rules.
  • Check that the base URL is correct for the GitLab instance being accessed.
  • Common error messages may include 401 Unauthorized (authentication issues), 404 Not Found (invalid project or rule ID), and 400 Bad Request (invalid request body or parameters).

Links

Discussion