• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V3 Interfaces
  5. Volumes
  6. Create Volume Metadata

Create Volume Metadata

Function Description

This interface is used to add or update volume metadata.

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

Interface Format

Method

URI

Description

POST

/v3/{project_id}/volumes/{volume_id}/metadata

Adds metadata of a volume.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Remarks

metadata

Dict

Yes

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

Response Parameter

Parameter

Type

Mandatory

Remarks

metadata

Dict

Yes

Adds metadata of a volume.

Request Example

POST https://volume.localdomain.com:8776/v3/5f13ecc9281d4c34bd740f277620bdee/volumes/d23a846b-0c0c-427a-a490-84331c33c52f/metadata
{
"metadata": {
           "testkey1": "testvalue1", 
           "testkey2": "testvalue2"
          }
}

Response Example

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

Error Code

See section Processing Return Code.