Deleting Server Metadata Items

When you want to delete an existing metadata item, you will need to use the DELETE method and the four-part URI, /servers/id/metadata/key.

The id part is the numeric id of the server. For example, if you wanted to set the owner metadata key of the server whose id is 1, the path would be /servers/1/metadata/owner.

If you were to use curl to set metadata keys, this is how you'd do it:

$ curl -X DELETE -H "X-Auth-Token:999888777666" -H "Accept: application/json" http://localhost:8774/v1.1/openstack/servers/1/metadata/owner

Please note there is no data payload in a delete operation. It is a common mistake to leave it in while editing scripts.



loading table of contents...