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 success, the user has to check his email for a confirmation link, which will ask him to create a password for the account.

Status Codes:
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

Log in to the system using cookie auth

Status Codes:

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:
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 to the system

Status Codes:

Example request:

POST /accounts/action/?do=check_login HTTP/1.1
Host: api.cloudsigma.com
Accept: application/json

Request body

{}
Response:

Empty

POST accounts/action/?do=check_login_with_return_uuid

Check how an authenticated service can get a user uuid via Cloudsigma API

Status Codes:

Example request:

POST accounts/action/?do=check_login_with_return_uuid HTTP/1.1
Host: api.cloudsigma.com
Accept: application/json

Request body

{
  curl --location --request POST 'https://tbc.cloudsigma.com/api/2.0/accounts/action/?do=check_login_with_return_uuid'   --header 'Cookie: csrftoken=zIiunVyYStnrRXxB1CmatfKsosHuaI6gYJw1P88r18pFCZ3YklNR7uEqEcQQOdze; sessionid=esqi1j0bpe2cto9ca59hw1k1kw7m95xd'   --header 'Referer: https://tbc.cloudsigma.com/ui/5.0/passs'   --header 'Content-Type: application/json'   --data-raw '{"username": "email", "password":"passwd"}'
}
Response:

Empty