Sub-user
Additional users with their own rights and their own subset of the account's trackers.
A sub-user is an additional login on a master account, with its own rights and its own subset of the account's trackers. It is how a company gives several employees access to one monitoring account without giving them all the same powers.
Two mechanisms limit what a sub-user can do. Scoping limits what they can see: a sub-user is bound to a subset of the master account's trackers, and everything associated with a tracker outside that subset is hidden from them too. Rights, granted through a security group, limit what they can change.
Sub-user object
A sub-user object is almost identical to an ordinary user.
API actions
API base path: /subuser.
Every operation on this page needs the multilevel_access tariff feature on all trackers, and the admin right, which is available only to master users. Failing either returns error 13 for the right and error 236 for the feature, so those two are not repeated per operation below.
List the sub-users of the current master account.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Callable with an empty body. Also accepts GET.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
The sub-users
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error response object
POST /v2/subuser/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": true,
"list": [
{
"id": null,
"activated": true,
"login": "text",
"first_name": "text",
"middle_name": "text",
"last_name": "text",
"legal_type": "legal_entity",
"phone": "text",
"post_country": "text",
"post_index": "text",
"post_region": "text",
"post_city": "text",
"post_street_address": "text",
"registered_country": "text",
"registered_index": "text",
"registered_region": "text",
"registered_city": "text",
"registered_street_address": "text",
"state_reg_num": "text",
"tin": "text",
"legal_name": "text",
"iec": "text",
"security_group_id": null,
"creation_date": "text"
}
]
}Errors
These errors come in addition to the general error codes:
13 - The caller is a sub-user.
236 - The account lacks the
multilevel_accessfeature.
Create a sub-user under the current master account, and return its ID.
A new sub-user starts with whatever security group is given in security_group_id. Null means the default group, which has no rights at all.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Password for the new sub-user. Must hold at least one uppercase letter, one lowercase letter, one digit and one special character. The length limits and the accepted special characters are installation config, not platform constants, so read them from paas_settings.password_policy in user/get_info instead of assuming: the hosted platform asks for 12 to 20 characters. A password that fails the policy returns error 7 naming password.
The created sub-user
true if request finished successfully.
trueID of the new sub-user.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error 206: the login is already in use.
Error response object
POST /v2/subuser/register HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 519
{
"user": {
"id": null,
"activated": true,
"login": "text",
"first_name": "text",
"middle_name": "text",
"last_name": "text",
"legal_type": "legal_entity",
"phone": "text",
"post_country": "text",
"post_index": "text",
"post_region": "text",
"post_city": "text",
"post_street_address": "text",
"registered_country": "text",
"registered_index": "text",
"registered_region": "text",
"registered_city": "text",
"registered_street_address": "text",
"state_reg_num": "text",
"tin": "text",
"legal_name": "text",
"iec": "text",
"security_group_id": null
},
"password": "text"
}{
"success": true,
"id": 1
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database, when the given
security_group_iddoes not exist.206 - Login already in use.
Update a sub-user. Pass a full sub-user object including its id.
creation_date is read-only and should not be sent.
The password is not changed here.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Sub-user updated
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error response object
POST /v2/subuser/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 501
{
"user": {
"id": null,
"activated": true,
"login": "text",
"first_name": "text",
"middle_name": "text",
"last_name": "text",
"legal_type": "legal_entity",
"phone": "text",
"post_country": "text",
"post_index": "text",
"post_region": "text",
"post_city": "text",
"post_street_address": "text",
"registered_country": "text",
"registered_index": "text",
"registered_region": "text",
"registered_city": "text",
"registered_street_address": "text",
"state_reg_num": "text",
"tin": "text",
"legal_name": "text",
"iec": "text",
"security_group_id": null
}
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database, when no sub-user has the given ID or it belongs to another master user. Also when the given
security_group_iddoes not exist.
Delete a sub-user. This cannot be reversed.
Entities the sub-user created stay with the master account, since a sub-user owns nothing exclusively. The exception is reports: each sub-user has its own report pool and schedule.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Also accepts GET with the same parameters as query-string values.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of a sub-user belonging to the current account.
Sub-user deleted
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error response object
POST /v2/subuser/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"subuser_id": 1
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database, when no sub-user has the given ID or it belongs to another master user.
More in this section
Sub-user places
Sub-user security group
Sub-user session
Sub-user trackers
Sub-user geofences
Last updated
Was this helpful?