Accounts¶
Note
See RFC 2616 for more details on HTTP methods semantics
General¶
The accounts API supports the following actions
Create account¶
- POST /accounts/action/?do=create¶
- Creates an account on the system. In case of succes, the user has to check his email for a confirmation link, which will ask him to create a password for the account.
Status Codes: - 200 – no error
Parameters: - email – The email of the account to be created
- promo – Promo code for initial subscriptions and demo server (optional)
Example request:
POST /api/2.0/accounts/action/?do=create HTTP/1.1 Content-Type: application/json { "email": "john_doe+42@cloudsigma.com", "promo": null }
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "success": true, "uuid": "ba8cce4c-9809-4389-a41e-2f9faabf87e9" }
Login/Logout¶
- POST /accounts/action/?do=login¶
Login to the system using cookie auth
Status Codes: - 200 – no error
- 401 – unauthorized
Example request:
POST /accounts/action/?do=login HTTP/1.1 Host: api.cloudsigma.com Accept: application/json
Request body
{ 'username':'123@asd.com', 'password':'parola' }
- Response:
- Empty
- POST /accounts/action/?do=logout¶
Logout from the system when using cookie auth
Status Codes: - 200 – no error
- Example request:
POST /accounts/action/?do=logout HTTP/1.1 Host: api.cloudsigma.com Accept: application/json
Request body
{}
- Response:
- Empty
- POST /accounts/action/?do=check_login¶
Check if you are logged in the system
Status Codes: - 200 – no error
Example request:
POST /accounts/action/?do=check_login HTTP/1.1 Host: api.cloudsigma.com Accept: application/json
Request body
{}
- Response:
- Empty