Dell Technologies ECS REST API

Search (SHIFT+S)




Set Account Metadata

POST /v1/{account}

Creates, updates, or deletes account metadata. To create or update custom metadata, use the X-Account-Meta-{name} request header, where {name} is the name of the metadata item. To delete a metadata header, send an empty value for that header.

URL Format

v1/{account}

Request Headers

X-Account-Meta-{name} requiredValue of the custom metadata.

Prerequisites

The following conditions must be met in order to call this operation.

  • User must be a Namespace Admin

  • Account corresponding to this container must exist


Request Payload

No Request Payload


Response Body

Response indicating Success or Failure for this operation.


Examples

Request
# Create or update account metadata
curl -v -X POST -H "$token" -H "X-Auth-User: swiftuser1" http://192.168.0.0:9024/v1/ns1 -H "X-Account-Meta-Book: MobyDick"
> POST /v1/ns1 HTTP/1.1
> Host: 192.168.0.0:9024
> User-Agent: curl/7.43.0
> Accept: */*
> X-Auth-Token: ECS_token
> X-Auth-User: swiftuser1
> X-Account-Meta-Book: MobyDick
> X-Account-Meta-Subject: Literature
>

# Delete account metadata
curl -v -X POST -H "$token" -H "X-Auth-User: swiftuser1" http://192.168.0.0:9024/v1/ns1 -H "X-Account-Meta-Book: " -H "X-Account-Meta-Subject: "
> POST /v1/ns1 HTTP/1.1
> Host: 192.168.0.0:9024
> User-Agent: curl/7.43.0
> Accept: */*
> X-Auth-Token: ECS_token
> X-Auth-User: swiftuser1
>
Response
# Created or updated account metadata
< HTTP/1.1 204 No Content
< Date: Fri, 16 Feb 2018 17:16:05 GMT
< x-emc-request-id: 0af9f568:16191d41718:3229d:6
< X-Trans-Id: tx0af9f56816191d4171832-29d600000000
< Content-Type: text/html
< Content-Length: 0

# Deleted account metadata
< HTTP/1.1 204 No Content
< Date: Fri, 16 Feb 2018 17:16:34 GMT
< Content-Type: text/html
<