Method: projects.locations.repositories.genericArtifacts.upload

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.

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The resource name of the repository where the generic artifact will be uploaded.

Authorization requires the following IAM permission on the specified resource parent:

  • artifactregistry.repositories.uploadArtifacts

Request body

The request body contains data with the following structure:

JSON representation
{
  "packageId": string,
  "versionId": string,
  "filename": string
}
Fields
packageId

string

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:

JSON representation
{
  "operation": {
    object (Operation)
  }
}
Fields
operation

object (Operation)

Operation that will be returned to the user.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.