PutBucket

Interface description

Call the PutBucket interface to create a storage container (Bucket).

Note: By creating a storage container, you become the owner of the bucket.

Request Syntax

PUT GatewayURL

Request header

Don't forget to add your identity signature to the header.

Response

Response format: application/json

Status codeMessageResponse description

200

Block hash

Block hash generated when bucket is created

400

InvalidHead.MissingToken

The access key is empty, or the permissions are insufficient

400

InvalidHead.Token

Access key error

400

InvalidParameter.Name

Wrong bucket name

403

NoPermission

Access key verification failed

500

InternalError

Server internal error

Request example

Request to create a bucket named “bucketname”

# curl -X PUT URL/ -H "BucketName: bucketname" -H "Account: cX..." -H "Message: xxx" -H "Signature: 0x..."

Last updated