API Actions – User Mgmt

REST API Actions - User Management

Create User

Request Syntax – using XML parameter encoding:

POST /api/CreateUser HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
<?xml version="1.0" encoding="utf-8"?>
<CreateUserRequest>
<Email>your-user@yourdomain.com</Email>
<UserName>user-name</UserName>
<Firstname>first-name</Firstname>
<Lastname>last-name</Lastname>
<Password>sample-password</Password>
<IsAdmin>true</IsAdmin>
</CreateUserRequest>

 

Request Parameters

Parameter Description Required
Email A character string that represents a valid email address. Must be unique among all users.
Type: String
Default: None
Yes
UserName The User Name that will be used when trying to login to the CloudBasic console. Must be unique among all users.
Type: String
Default: None
Yes
FirstName The First Name of the user that is being created.
Type: String
Default: None
Yes
LastName The Last Name of the user that is being created.
Type: String
Default: None
Yes
Password The password that will be used when trying to login to the CloudBasic console.
Type: String
Default: None
Yes
IsAdmin Indicates whether the user will be granted administrative privileges or not.
Type: String
Default: None
Valid value: true/ false
Yes

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

Response Syntax – using XML parameter encoding:

HTTP/1.1 200
status: 200
 
<?xml version="1.0" encoding="utf-8"?>
<CreateUserResponse>
<UserName>user-name</UserName>
<PublicKey>AHECKQOCKWECPTYESPRL</PublicKey>
<PrivateKey>y04DIKJPOdDZ16Q1iK4oZvoQnTwUtOOcZWRmPdTD</PrivateKey>
<IsAdmin>true</IsAdmin>
</CreateUserResponse>

 

Response Parameters

Parameter Description
UserName The User Name of the user that was just created.
PublicKey This is the Public Key required to authenticate requests to the CloudBasic API. For more information please see the section API Security
Attention: This is the only time this value will be returned by the API. There are no other ways to retrieve this value.
PrivateKey This is the Private Key required to authenticate requests to the CloudBasic API. For more information please see the section API Security
Attention: This is the only time this value will be returned by the API. There are no other ways to retrieve this value.
IsAdmin true/ false. Indicates whether the user was granted administrative privileges.

 
Error Response Syntax – using XML parameter encoding:

HTTP/1.1 400
status: 400
 
<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse> 
  <RequestId>request-id</RequestId> 
  <Errors> 
    <Error> <Message>Error message 1</Message> </Error> 
    <Error> <Message>Error message 2</Message> </Error> 
  </Errors> 
</ErrorResponse>

Alter User

Request Syntax – using XML parameter encoding:

POST /api/AlterUser HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential=UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
<?xml version="1.0" encoding="utf-8"?>
<AlterUserRequest>
<Email>your-user@yourdomain.com</Email>
<UserName>user-name</UserName>
<Firstname>first-name</Firstname>
<Lastname>last-name</Lastname>
<IsAdmin>true</IsAdmin>
<RecreateAccessKey>true</RecreateAccessKey>
</AlterUserRequest>

 

Request Parameters

Parameter Description Required
Email A character string that represents a valid email address. Must be unique among all users.
Type: String
Default: None
No*
UserName The User Name that will be used when trying to login to the CloudBasic console. Must be unique among all users.
Type: String
Default: None
No*
FirstName The First Name of the user being changed.
Type: String
Default: None
No*
LastName The Last Name of the user being changed.
Type: String
Default: None
No*
IsAdmin Indicates whether the user will be granted administrative privileges or not.
Type: String
Default: None
Valid value: true/ false
No*
RecreateAccessKey Indicates whether to generate a new Access Keys pair.
Type: String
Default: None
Valid value: true/ false
No*

*At least one Request Parameter is required.
Note:

(a) Depending on the intent of the request, at least one parameter must be provided. For example, when recycling Access Keys, pass only the <RecreateAccessKey>true</RecreateAccessKey> parameter.
(b) IsAdmin - API calls authenticated with the access key of any administrator can demote/promote users to non-admin/admin. If a user is being promoted to an admin, an API access key will be generated and returned in the response.
(c) RecreateAccessKey - Only API calls authenticated with the root [admin]'s access key, can request regeneration of other administrators’ API access keys. All other administrators can regenerate only their access keys for which the API call must be authenticated with the access key of the respective administrator.

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

Response Syntax – using XML parameter encoding:

HTTP/1.1 400
status: 200

 

Response Parameters

None
Error Response Syntax – using XML parameter encoding:

HTTP/1.1 400
status: 400
 
<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse> 
  <RequestId>request-id</RequestId> 
  <Errors> 
    <Error> <Message>Error message 1</Message> </Error> 
    <Error> <Message>Error message 2</Message> </Error> 
  </Errors> 
</ErrorResponse>

 

Delete User

Request Syntax – using XML parameter encoding:

POST /api/DeleteUser HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential=UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
<?xml version="1.0" encoding="utf-8"?>
<DeleteUserRequest>
<Username>user-name</Username>
</DeleteUserRequest>

 

Request Parameters

Parameter Description
UserName The User Name to be deleted.
Type: String
Default: None

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

Response Syntax – using XML parameter encoding:

HTTP/1.1 200
status: 200

 

Response Parameters

None
 
Error Response Syntax – using XML parameter encoding:

HTTP/1.1 400
status: 400
 
<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse> 
  <RequestId>request-id</RequestId> 
  <Errors> 
    <Error> <Message>Error message 1</Message> </Error> 
    <Error> <Message>Error message 2</Message> </Error> 
  </Errors> 
</ErrorResponse>