Directly uploads a Generic artifact. The returned operation will complete once the resources are uploaded. Package, version, and file resources are created based on the uploaded artifact. Uploaded artifacts that conflict with existing resources will raise an ALREADY_EXISTS error.
The ID of the package of the generic artifact. If the package does not exist, a new package will be created. The packageId should start and end with a letter or number, only contain letters, numbers, hyphens, underscores, and periods, and not exceed 256 characters.
versionId
string
The ID of the version of the generic artifact. If the version does not exist, a new version will be created. The versionId must start and end with a letter or number, can only contain lowercase letters, numbers, hyphens and periods, i.e. [a-z0-9-.] and cannot exceed a total of 128 characters.
Creating a version called latest is not allowed.
filename
string
The name of the file of the generic artifact to be uploaded. E.g. example-file.zip The filename is limited to letters, numbers, and url safe characters, i.e. [a-zA-Z0-9-_.~@].
Response body
The response to upload a generic artifact.
If successful, the response body contains data with the following structure:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-13 UTC."],[[["\u003cp\u003eThis API facilitates the direct upload of generic artifacts, automatically creating package, version, and file resources upon successful upload.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eparent\u003c/code\u003e path parameter specifies the repository for the artifact, requiring the \u003ccode\u003eartifactregistry.repositories.uploadArtifacts\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires \u003ccode\u003epackageId\u003c/code\u003e, \u003ccode\u003eversionId\u003c/code\u003e, and \u003ccode\u003efilename\u003c/code\u003e to define the artifact's location and name, with specific formatting constraints for each field.\u003c/p\u003e\n"],["\u003cp\u003eA successful upload returns an \u003ccode\u003eOperation\u003c/code\u003e object in the response body, indicating that the operation is still running and will complete when the resources are uploaded.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization to use the API requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,[]]