• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V2 Interfaces
  5. Snapshot
  6. Create snapshot Metadata

Create snapshot Metadata

Function Description

This interface is used to add or update the snapshot metadata.

In cascading scenarios, metadata of a snapshot is delivered by cinder-proxy to the cascaded layer and updated.

Interface Format

Method

URI

Description

POST

/v2/{tenant_id}/snapshots/{snapshot_id}/metadata

Adds metadata of a snapshot.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Remarks

metadata

Dict

Yes

Specifies the snapshot metadata. Ensure that key and value in the metadata contain fewer than 255 characters.

Response Parameter

Parameter

Type

Mandatory

Remarks

metadata

Dict

Yes

Specifies the metadata of the snapshot.

Request Example

{
"metadata": {
           "testkey1": "testvalue1", 
           "testkey2": "testvalue2"
          }
}

Response Example

{
"metadata": {
           "testkey1": "testvalue1", 
           "testkey2": "testvalue2",
           "originkey": "originvalue"
          }
}

Error Code

See section Processing Return Code.