Create a subuser
Learn how to create a new subuser, primarily useful for clients using the Swift API.
gen-subuser or subuser is required for a valid
request. In general, for a subuser to be useful, it must be granted permissions by specifying
access. As with user creation if subuser is specified without
secret, then a secret key is automatically generated.Capabilities
`users=write`
Syntax
PUT /admin/user?subuser&format=json HTTP/1.1
Host FULLY_QUALIFIED_DOMAIN_NAME
Request Parameters
uid
- Description
-
The user ID under which a subuser is to be created.
- Type
-
String
- Example
-
foo_user - Required
-
Yes
subuser
- Description
-
Specify the subuser ID to be created.
- Type
-
String
- Example
-
sub_foo - Required
-
Yes (or
gen-subuser)
gen-subuser
- Description
-
Specify the subuser ID to be created.
- Type
-
String
- Example
-
sub_foo - Required
-
Yes (or
gen-subuser)
secret-key
- Description
-
Specify secret key.
- Type
-
String
- Example
-
0AbCDEFg1h2i34JklM5nop6QrSTUV+WxyzaBC7D8 - Required
-
No
key-type
- Description
-
Key type to be generated, options are: swift (default), s3.
- Type
-
String
- Example
-
swift[swift] - Required
-
No
access
- Description
-
Set access permissions for sub-user, should be one of
read, write, readwrite, full. - Type
-
String
- Example
-
read - Required
-
No
generate-secret
- Description
-
Generate the secret key.
- Type
-
Boolean
- Example
-
True [False]
- Required
-
No
Response Entities
subusers
- Description
-
Subusers associated with the user account.
- Type
-
Container
- Parent
-
N/A
permissions
- Description
-
Subuser access to user account.
- Type
-
String
- Parent
-
subusers
If successful, the response contains the subuser information.
SubuserExists
- Description
-
Specified subuser exists.
- Code
-
409 Conflict
InvalidKeyType
- Description
-
Invalid key type specified.
- Code
-
400 Bad Request
InvalidSecretKey
- Description
-
Invalid secret key specified.
- Code
-
400 Bad Request
InvalidAccess
- Description
-
Invalid subuser access specified
- Code
-
400 Bad Request