Registry

CreateArtifact creates a specified artifact.

post/v1/projects/{project}/locations/{location}/artifacts

Path parameters

projectstring required

The project id.

locationstring required

The location id.

Query parameters

artifactIdstring

Required. The ID to use for the artifact, which will become the final component of the artifact's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. Following AIP-162, IDs must not have the form of a UUID.

Request body

namestring

Resource name.

createTimestring date-time

Output only. Creation timestamp.

updateTimestring date-time

Output only. Last update timestamp.

mimeTypestring

A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

sizeBytesinteger

Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.

hashstring

Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.

contentsstring bytes

Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.

Response

OK

namestring

Resource name.

createTimestring date-time

Output only. Creation timestamp.

updateTimestring date-time

Output only. Last update timestamp.

mimeTypestring

A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

sizeBytesinteger

Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.

hashstring

Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.

contentsstring bytes

Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents.

Changes

Changed in 4 of the 14 revisions of this API.5610

  • 60e792df408842See the full diff
    • the request's body type/format changed from / to object/

      request-body-type-changed

    • the response's body type/format changed from / to object/ for status 200

      response-body-type-changed

    • the createTime response's property type/format changed from string/RFC3339 to string/date-time for status 200

      response-property-type-changed

    • the updateTime response's property type/format changed from string/RFC3339 to string/date-time for status 200

      response-property-type-changed

    • the request optional property contents became write-only

      request-optional-property-became-write-only

    • the response optional property contents became write-only for the status 200

      response-optional-property-became-write-only

  • ce92b3e601d467See the full diff
    • deleted the query request parameter artifact_id

      request-parameter-removed

    • removed the request property mime_type

      request-property-removed

    • removed the optional property create_time from the response with the 200 status

      response-optional-property-removed

    • removed the optional property mime_type from the response with the 200 status

      response-optional-property-removed

    • removed the optional property size_bytes from the response with the 200 status

      response-optional-property-removed

    • removed the optional property update_time from the response with the 200 status

      response-optional-property-removed

    • api tag Registry added

      api-tag-added

    • added the new optional query request parameter artifactId

      new-optional-request-parameter

    • added the new optional request property mimeType

      new-optional-request-property

    • added the optional property createTime to the response with the 200 status

      response-optional-property-added

    • added the optional property mimeType to the response with the 200 status

      response-optional-property-added

    • added the optional property sizeBytes to the response with the 200 status

      response-optional-property-added

    • added the optional property updateTime to the response with the 200 status

      response-optional-property-added

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 15 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog