• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (Swift)
  4. Operations on Accounts
  5. Create/Update/Delete Account Metadata
  6. Request

Request

Method

Table 1 Method description

Method

URI

Description

POST

/v1/{account}

Creates, updates, or deletes account metadata.

{account} indicates the name of an account.

Metadata creation or update depends on whether the specified metadata exists. Metadata is created if it does not exist. Metadata is updated if it exists.

This operation does not involve a request body.

Example Request

Create or update metadata:

curl -i $publicURL -X POST -H "X-Auth-Token:$token" -H "X-Account-Meta-name:value"

Delete metadata:

curl -i $publicURL -X POST -H "X-Auth-Token:$token" -H "X-Remove-Account-Meta-name:value"

Request Query Parameters

Parameter

Type

Description

bulk-delete

String

(Optional)

Bulk-deletes containers. This parameter is used with the deletion list file.

A maximum of 10,000 empty containers can be deleted.

Request Headers

Request URI parameters

Parameter

Type

Description

{account}

String

(Required)

Unique name of the account. In the current version, it indicates the unique ID of the account.

Request header parameters

Parameter

Type

Description

X-Auth-Token

String

(Required)

Authentication token.

X-Account-Meta-Temp-URL-Key

String

(Optional)

Secret key value for TempURL.

X-Account-Meta-Temp-URL-Key-2

String

(Optional)

A second secret key value for TempURL.

X-Account-Meta-name

String

(Optional)

Account metadata. {name} is the name of metadata item that you want to add, update, or delete. To delete this item, send an empty value in this header. You must specify an X-Account-Meta-{name} header for each metadata item (for each {name}) that you want to add, update, or delete.

X-Remove-Account-Meta-name

String

(Optional)

Deletes metadata. If a tool does not support empty headers, such as an earlier version of cURL, send this header to delete metadata. {name} indicates the metadata to delete. Set {name} to a non-empty value.

X-Account-Meta-Quota-Bytes

Int

(Optional)

Configures the tenant quota. The value ranges from 0 to 9223372036854775807. After setting the quota, the quota will be checked each time you upload or copy an object, or modify the metadata of an object or bucket. A quota fails to be checked with status code 413 returned.

X-Remove-Account-Meta-Quota-Bytes

String

(Optional)

Deletes the quota. This parameter can be set to any non-empty value. If you delete a quota without setting it first, status code 403 is returned.