Create a user
Create a new user. By default, an S3 key pair is automatically created and returned in the response.
If only a access-key or secret-key is provided, the omitted key
will be automatically generated. By default, a generated key is added to the keyring without
replacing an existing key pair. If access-key is specified and refers to an
existing key owned by the user then it will be modified.
Capabilities
`users=write`
Syntax
PUT /admin/user?format=json HTTP/1.1
Host: FULLY_QUALIFIED_DOMAIN_NAME
Request Parameters
uid
- Description
-
The user ID to be created.
- Type
-
String
- Example
-
foo_user - Required
-
Yes
display-name
- Description
-
The display name of the user to be created.
- Type
-
String
- Example
-
foo_user - Required
-
Yes
email
- Description
-
The email address associated with the user.
- Type
-
String
- Example
-
foo@bar.com - Required
-
No
key-type
- Description
-
Key type to be generated, options are: swift, s3 (default).
- Type
-
String
- Example
-
s3[S3] - Required
-
No
access-key
- Description
-
Specify access key.
- Type
-
String
- Example
-
ABCD0EF12GHIJ2K34LMN - Required
-
No
secret-key
- Description
-
Specify secret key.
- Type
-
String
- Example
-
0AbCDEFg1h2i34JklM5nop6QrSTUV+WxyzaBC7D8 - Required
-
No
user-caps
- Description
-
User capabilities.
- Type
-
String
- Example
-
usage=read, write; users=read - Required
-
No
generate-key
- Description
-
Generate a new key pair and add to the existing keyring.
- Type
-
Boolean
- Example
-
True [
True] - Required
-
No
max-buckets
- Description
-
Specify the maximum number of buckets the user can own.
- Type
-
Integer
- Example
-
500 [1000]
- Required
-
No
suspended
- Description
-
Specify whether the user should be suspended
- Type
-
Boolean
- Example
-
False [False]
- Required
-
No
Response Entities
user
- Description
-
Specify whether the user should be suspended
- Type
-
Boolean
- Parent
-
No
user_id
- Description
-
The user ID.
- Type
-
String
- Parent
-
user
display_name
- Description
-
Display name for the user.
- Type
-
String
- Parent
-
user
suspended
- Description
-
True if the user is suspended.
- Type
-
Boolean
- Parent
-
user
max_buckets
- Description
-
The maximum number of buckets to be owned by the user.
- Type
-
Integer
- Parent
-
user
subusers
- Description
-
Subusers associated with this user account.
- Type
-
Container
- Parent
-
user
keys
- Description
-
S3 keys associated with this user account.
- Type
-
Container
- Parent
-
user
swift_keys
- Description
-
Swift keys associated with this user account.
- Type
-
Container
- Parent
-
user
caps
- Description
-
User capabilities.
- Type
-
Container
- Parent
-
If successful, the response contains the user information.
Special Error Responses
UserExists
- Description
-
Attempt to create existing user.
- Code
-
409 Conflict
InvalidAccessKey
- Description
-
Invalid access key specified.
- Code
-
400 Bad Request
InvalidKeyType
- Description
-
Invalid key type specified.
- Code
-
400 Bad Request
InvalidSecretKey
- Description
-
Invalid secret key specified.
- Code
-
400 Bad Request
KeyExists
- Description
-
Provided access key exists and belongs to another user.
- Code
-
409 Conflict
EmailExists
- Description
-
Provided email address exists.
- Code
-
409 Conflict
InvalidCap
- Description
-
Attempt to grant invalid admin capability.
- Code
-
400 Bad Request
Reference
For more information about creating subusers, see Create a subuser.