Users

Entities

User

Field Explanation
id user identifier
email user email
first_name user’s first name,
last_name user’s last name
login user login
base_resource_id base_resource_id
role user’s role
time_zone user’s time_zone
locale user’s locale
status user status
suspend_at time when user will be suspended
extra_info user’s extended info

User list :

[user resource 1, user resource 2, ...]

User Login

Field Explanation
id user identifier
login user login

User login list :

User bandwith stats

Field Explanation
date_from date for the stats
traffic list of dictionaries with stats information

Operations

Edit Api User

Method:PUT
Url:/account/<account_id>/api_user/<id>
Success Code:200
Returned Data:user resource
Has Token:No

Parameters:

  • email
  • first_name
  • last_name

Get Api user

Method:GET
Url:/account/<account_id>/api_user/<id>
Success Code:200
Returned Data:user resource
Has Token:No

List Api users

Method:GET
Url:/account/<account_id>/api_users
Success Code:200
Returned Data:user resource list
Has Token:No

Filters:

  • id: This is the only way a regular user can use this, to search for himself
  • login: partial match to the login field.
  • status: filter by status.
  • name
  • first_name
  • last_name

Get logins

Method:GET
Url:/account/<account_id>/api_users/logins
Success Code:200
Returned Data:user resource
Has Token:No

Filters:

  • id
  • login
  • status

Get bandwith stats

Method:GET
Url:/account/<account_id>/bw_stats
Success Code:200
Returned Data:user network usage resource
Has Token:No

Stats of network usage for the virtual machine

Mandatory parameters:

  • period: period reported. Accepted values: -1H for 1 hour, -1day for 1 day, -1M for 1 month, -1Y for 1 year.

Example:

{
    "24": {
        "date_from": 1407074400,
        "traffic": [
            [
                {
                    "network_id": 1,
                    "is_public": true,
                    "data": {
                        "0: {
                            "traffic_out": 138011.4023164,
                            "traffic_in": 46079.765606529996
                        },
                        "1": {
                            "traffic_out": 21745.984031400003,
                            "traffic_in": 7214.964376399999
                        }
                    },
                    "interface_id": 45
                }
            ],
            [
                {
                    "network_id": 709,
                    "is_public": false,
                    "data": {
                        "30": {
                            "traffic_out": 0,
                            "traffic_in": 0
                        },
                        "31": {
                            "traffic_out": 100.93769200200008,
                            "traffic_in": 6750.9520935300025
                        }
                    },
                    "interface_id": 46
                }
            ]
        ],
        "date_to": 1409760000
    }
}

Table Of Contents

Previous topic

Template (O.S.)

Next topic

Virtual Machines