api.accounts.user — User manipulation

/accounts/user

api.accounts.user.base.views.user_list(*args, **kwargs)

List (GET) all available users.

GET /accounts/user
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.full (boolean) – Return list of all users with user details (default: false)
  • data.extended (boolean) – Display extended user details (default: false)
  • data.is_active (boolean) – Return list of all active users (default: true)
  • data.order_by (string) – Available fields for sorting: username, created (default: username)
Status Codes:

/accounts/user/profile

api.accounts.user.base.views.userprofile_list(*args, **kwargs)

List (GET) all available user profiles.

GET /accounts/user/profile
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
Status Codes:

/accounts/user/(username)

api.accounts.user.base.views.user_manage(*args, **kwargs)

Show (GET), create (POST), update (PUT) or delete (DELETE) a user.

GET /accounts/user/(username)

Note

For security reasons, api-key and callback-key values are not displayed. To see their values use GET /accounts/user/(username)/apikeys

DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • data.extended (boolean) – Display extended user details (default: false)
Status Codes:
POST /accounts/user/(username)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • data.first_name (string) – required - User’s first name
  • data.last_name (string) – required - User’s last name
  • data.email (string) – required - User’s primary email (valid email address)
  • data.password (string) – required - User’s password
  • data.groups (array) – User roles (supports multiple groups, requires valid group, requires SuperAdmin permission for dc_bound=false, and UserAdmin permission for dc_bound=true, but only dc_bound=true roles can be assigned) (default: [])
  • data.dc_bound (boolean) – Whether the user is bound to a datacenter (requires SuperAdmin permission) (default: None)
  • data.dc (string) – Name of the datacenter the user will be attached to (required if DC-bound)
  • data.api_access (boolean) – Allow the user to access the API via HTTP (requires SuperAdmin permission for dc_bound=false, and UserAdmin permission for dc_bound=true) (default: false)
  • data.api_key (boolean) – Generate new API key value (default: false)
  • data.callback_key (boolean) – Generate new callback key value (default: false)
  • data.is_active (boolean) – Allow the user to login to the application (requires SuperAdmin permission for dc_bound=false, and UserAdmin permission for dc_bound=true) (default: true)
  • data.is_super_admin (boolean) – Grant SuperAdmin rights to the user (requires SuperAdmin permission) (default: false)
Status Codes:
PUT /accounts/user/(username)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • data.first_name (string) – User first name
  • data.last_name (string) – User last name
  • data.email (string) – Primary user email (valid email address)
  • data.password (string) – User password
  • data.groups (array) – User groups (supports multiple groups, overwrite all already assigned groups, requires valid group, requires SuperAdmin permission for dc_bound=false, and UserAdmin permission for dc_bound=true, but only dc_bound=true roles can be assigned)
  • data.dc_bound (boolean) – Whether the user is bound to a datacenter (requires SuperAdmin permission)
  • data.dc (string) – Name of the datacenter the user will be attached to (required if DC-bound)
  • data.api_access (boolean) – Allow the user to access the API via HTTP (requires SuperAdmin permission for dc_bound=false, and UserAdmin permission for dc_bound=true)
  • data.api_key (boolean) – Generate new API key value
  • data.callback_key (boolean) – Generate new callback key value
  • data.is_active (boolean) – Allow the user to login to the application (requires SuperAdmin permission for dc_bound=false, and UserAdmin permission for dc_bound=true)
  • data.is_super_admin (boolean) – Grant SuperAdmin rights to the user (requires SuperAdmin permission)
Status Codes:
DELETE /accounts/user/(username)

Note

A user can be deleted only if he has no relations to any other objects.

DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
Status Codes:

/accounts/user/(username)/apikeys

api.accounts.user.base.views.user_apikeys(*args, **kwargs)

Show (GET), update (PUT) a user API key and Callback key.

Note

This function is available only when user is logged in via username and password. Authenticated requests with ES-API-KEY header are forbidden.

GET /accounts/user/(username)/apikeys
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
Status Codes:
PUT /accounts/user/(username)/apikeys
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • data.api_key (boolean) – Generate new API key value (default: false)
  • data.callback_key (boolean) – Generate new callback key value (default: false)
Status Codes:

/accounts/user/(username)/profile

api.accounts.user.profile.views.userprofile_manage(*args, **kwargs)

Show (GET) or edit (PUT) user profile details.

GET /accounts/user/(username)/profile
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
Status Codes:
PUT /accounts/user/(username)/profile
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • data.tos_acceptation (boolean) – TOS acceptation
  • data.email (string) – Primary user email (valid email address)
  • data.email_verified (boolean) – Email verification check
  • data.email2 (string) – Secondary email (generally used for billing purposes, valid email address)
  • data.phone (string) – Phone number (in international format +xx yyy yyyy yyyy, valid phone number)
  • data.phone_verified (boolean) – Phone verification check
  • data.phone2 (string) – Secondary phone number (Generally used for billing purposes, in international format +xx yyy yyyy yyyy, valid phone number)
  • data.newsletter_tech (boolean) – User willing to receive technical newsletters
  • data.newsletter_buss (boolean) – User willing to receive business newsletters
  • data.usertype (integer) – Account type (available: 0: Unknown account type, 1: Personal account, 2: Company account)
  • data.language (string) – Default language used after user login (available: en, sk)
  • data.timezone (string) – Default timezone used for user
  • data.currency (string) – Default currency used in billing (available: EUR)
  • data.title (string) – User title
  • data.first_name (string) – User first name
  • data.middle_name (string) – User middle name
  • data.last_name (string) – User last name
  • data.website (string) – User website
  • data.jabber (string) – User jabber account (valid email address format)
  • data.street_1 (string) – Street (primary address)
  • data.street2_1 (string) – Street - second line (primary address)
  • data.city (string) – City (primary address)
  • data.postcode (string) – Postal code (primary address)
  • data.state (string) – State (primary address)
  • data.country (string) – Country code (primary address) (e.g: SK, GB, US…)
  • data.different_billing (boolean) – Use different address for billing?
  • data.street2_1 – Street (secondary/billing address)
  • data.street2_2 (string) – Street - second line (secondary/billing address)
  • data.city2 (string) – City (secondary/billing address)
  • data.postcode2 (string) – Postal code (secondary/billing address)
  • data.state2 (string) – State (secondary/billing address)
  • data.country2 (string) – Country code (secondary/billing address)
  • data.company (string) – Company name
  • data.companyid (string) – Company ID
  • data.taxid (string) – Company Tax ID
  • data.vatid (string) – Company VAT ID
  • data.bankid (string) – Bank Account Number
  • data.alerting_email (string) – Email address used for alerting purposes (valid email address format)
  • data.alerting_phone (string) – Phone number used for alerting purposes
  • data.alerting_jabber (string) – Jabber account used for alerting purposes (valid email address format)
Status Codes:

/accounts/user/(username)/sshkey

api.accounts.user.sshkey.views.sshkey_list(*args, **kwargs)

List (GET) all user’s SSH keys

GET /accounts/user/(username)/sshkey
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • data.full (boolean) – Return list of all ssh keys with key details (default: false)
  • data.order_by (string) – Available fields for sorting: title (default: title)
Status Codes:

es example:

es get /accounts/user/admin/sshkey
{
    "url": "https://my.erigones.com/api/accounts/user/admin/sshkey/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            "admin@support",
        ],
        "task_id": "1e1d1-6f75849b-ca49-40d3-81d5"
    }
}

/accounts/user/(username)/sshkey/(title)

api.accounts.user.sshkey.views.sshkey_manage(*args, **kwargs)

Show (GET), create (POST) or delete (DELETE) a user’s SSH key.

GET /accounts/user/(username)/sshkey/(title)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • title (string) – required - SSH key title
Status Codes:
POST /accounts/user/(username)/sshkey/(title)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • title (string) – required - SSH key title
  • data.key (string) – required - Public SSH key in OpenSSH format
Status Codes:
DELETE /accounts/user/(username)/sshkey/(title)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • username (string) – required - Username
  • title (string) – required - SSH key title
Status Codes:

es example:

es create /accounts/user/admin/sshkey/admin@management -key 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDqEN0oe+exk6cQK+goychxNY05xkvoARqbMq4/mRqc0EjRkgXrSJGVt/vsXU/rfMDIn1hUohaGyzlXfNPFjcmJ9Ws/P25ts2OsZlZNlngFXyswAKDJU/i9CYavHFaxwKvpiSU5Bm7q7nte++77oiM+4HBxcwRCiBfry09wHPWmM/qG9roOA2C9pLJQBHc6q4HkLgFAn5HrFuFwEPZfwtQtxxR46yT9iy4lOth1/apOqNp7ABBziE3fZQ//o3e1ngtT7jW5UltMYCsX2UXI2hcgl-Hh5WkrRGls+whHlNRztL8Utt03dgXwPaxdVezTM6CN7mv6X6K8EZ72ixQ24Ai9 admin@management'
{
    "url": "https://my.erigones.com/api/accounts/user/admin/sshkey/testkey/",
    "status": 201,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "fingerprint": "9e:23:25:c5:02:28:f2:0a:42:f3:e4:af:a7:5b:75:c0",
            "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDqEN0oe+exk6cQK+goychxNY05xkvoARqbMq4/mRqc0EjRkgXrSJGVt/vsXU/rfMDIn1hUohaGyzlXfNPFjcmJ9Ws/P25ts2OsZlZNlngFXyswAKDJU/i9CYavHFaxwKvpiSU5Bm7q7nte++77oiM+4HBxcwRCiBfry09wHPWmM/qG9roOA2C9pLJQBHc6q4HkLgFAn5HrFuFwEPZfwtQtxxR46yT9iy4lOth1/apOqNp7ABBziE3fZQ//o3e1ngtT7jW5UltMYCsX2UXI2hcgl-Hh5WkrRGls+whHlNRztL8Utt03dgXwPaxdVezTM6CN7mv6X6K8EZ72ixQ24Ai9 admin@management"
            "title": "admin@management"
        },
        "task_id": "1e1d1-6f75849b-0b87-4dfd-a157"
    }
}