GitLab API icon

GitLab API

Gitlab

Actions1062

Conan_packages → putApiV4ProjectsIdPackagesConanV1FilesPackageNamePackageVersionPackageUsernamePackageChannelRecipeRevisionPackageConanPackageReferencePackageRevisionFileName

AI-generated

Summary

Updates or uploads a specified file associated with a Conan package in a GitLab project by sending a PUT request to the GitLab API endpoint for Conan package files.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the Conan package.
  • package_name (required) — The name of the Conan package.
  • package_version (required) — The version of the Conan package.
  • package_username (required) — The package username, typically the group and project name concatenated.
  • package_channel (required) — The channel name of the Conan package (e.g., 'stable').
  • recipe_revision (required) — The revision number of the Conan recipe.
  • conan_package_reference (required) — The unique Conan package ID reference.
  • package_revision (required) — The revision number of the Conan package.
  • file_name (required) — The specific filename of the Conan package file to update, limited to predefined names such as 'conanfile.py', 'conanmanifest.txt', 'conan_sources.tgz', 'conan_export.tgz', 'conaninfo.txt', or 'conan_package.tgz'.
  • Request Body (required) — The file content or payload to upload or update for the specified Conan package file.

Output shape

The API response body as JSON representing the result of the file upload or update operation, typically including metadata about the Conan package file.

Requires authentication via the configured GitLab API credentials unless 'Skip Authentication' is enabled. The operation constructs a PUT request to the URL path '/api/v4/projects/{id}/packages/conan/v1/files/{package_name}/{package_version}/{package_username}/{package_channel}/{recipe_revision}/package/{conan_package_reference}/{package_revision}/{file_name}' with all path parameters required and specified. The response content depends on the GitLab API's standard for package file updates.

Examples

Example 1: Upload or update the 'conaninfo.txt' file of a specific Conan package revision.

Set all required path parameters including project ID, package name, version, username, channel, recipe revision, package reference, package revision, and choose 'conaninfo.txt' for file name. Provide the file content in the request body.

Links

Discussion