GitLab API

GitlabTool

Actions1000

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 authentication for the API request.
Authentication Specifies the authentication method to use if authentication is not skipped.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method to use for the request, defaulting to PATCH.
Path Parameters Parameters included in the request path to identify the project and the package protection rule to update.

Output

JSON

  • id - The unique identifier of the updated package protection rule.
  • name - The name 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.
  • access_level - The access level setting of the package protection rule.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and package protection rule ID are correct and exist in the GitLab instance.
  • Verify that the authentication credentials are valid and have sufficient permissions to update package protection rules.
  • Check the base URL to confirm it points to the correct GitLab instance.
  • If the PATCH request fails, review the request body schema to ensure all required fields are correctly provided.

Links

Discussion