Accounts¶
Note
See RFC 2616#section-9 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 OK – 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 OK – no error
- 401 Unauthorized – 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