HCP Tenant Management Help


Request contents (PUT copy object)

The PUT request to copy an object or version of an object has these elements:

If you’re accessing the target namespace as an authenticated user, an Authorization header

An X-HCP-CopySource header in this format:

X-HCP-CopySource:
source-namespace-name.source-tenant-name/source-object-path

The value of the X-HCP-CopySource header must be URL-encoded.

A URL specifying the location in which to store the object

Note: If the X-HCP-CopySource header identifies a directory, HCP creates an empty directory with the path specified in the target URL, assuming the specified path does not already exist.

Conditionally copying an object or version

To copy an object or version only if the source or target object meets certain conditions, use conditional operation headers. Use the optional forceEtag query parameter for conditional operations if the source object might not yet have an ETag.

For information about conditional operation headers and the forceEtag query parameter, see Conditional operations.

Copying a specific version

To copy a specific version of an object, specify a version parameter in the X-HCP-CopySource header, in this format:

X-HCP-CopySource: source-namespace-name.source-tenant-name/object-
    path?version=version-id

Copying custom metadata

To specify whether to copy custom metadata with the source object, include an X-HCP-MetadataDirective header with either of these values:

ALL — Copy all the source object custom metadata. If the source object has multiple annotations, copy all the annotations.

NONE — Do not copy any custom metadata with the source object.

This header is optional. The default is NONE.

© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.