POST service ostor-accounts
Description
Creates a new account.
Requests
Syntax
POST /?ostor-accounts&emailAddress=<value>&accountName=<value> HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
POST /?ostor-accounts&id=<value>&accountName=<value> HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
Parameters
Parameter | Description | Required |
---|---|---|
emailAddress
|
User email address. Type: string. Default value: none. |
No* |
id
|
User ID. Type: string. Default value: none. |
No* |
accountName
|
Account name. Type: string. Default value: none. |
Yes |
* Only one of the required parameters can be set in a single request.
Headers
This implementation uses only common request headers.
Responses
Headers
This implementation uses only common response headers.
Body
A JSON dictionary with account information in the following format:
{ "Name" : "<name>", "AWSAccessKeys : [ { "AWSAccessKeyId" : "<access_key>", "AWSSecretAccessKey" : "<secret_key>" }] }
Examples
Sample request
Creates an account with the name account1
for the user with the email user1@email.com
.
POST /?ostor-accounts&emailAddress=user1@email.com&accountName=account1 HTTP/1.1 Host: s3.example.com Date: Wed, 24 Mar 2021 14:37:10 GMT Authorization: <authorization_string>
Sample response
HTTP/1.1 200 OK Server: nginx Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive Date: Wed, 24 Mar 2021 14:37:11 GMT x-amz-req-time-micros: 32753 x-amz-request-id: 8000000000000016000060d722e695e2 { "Name": "account1", "AWSAccessKeys": [ { "AWSAccessKeyId": "bc6265392b818465FQYC", "AWSSecretAccessKey": "iWs4rkwHMUYn8K0fPhjjAENC4QYUBIgIyJhNEx4l" } ] }