User management

The emnify REST API is a multi-tenancy system where tenant is an organization.

Each organization can have multiple users. The users of an organization are managed by the administrator of this organization or (possibly) the parent organization.

  • When an organization administrator manages own user space, setting explicitly an organization for a user is optional. Then the organization for the new account is inherited from the administrator user creating the account.
  • The organization administrator may specify explicitly an organization for a user, if the new user is to be created in a “child” (direct, not “grandchild”) organization of this organization.
  • The system-wide administrators (emnify) must always specify an organization when creating a user account.

The following is a sample user in JSON representation:

1{
2 "id": 123,
3 "username": "eabbot@flatland.org",
4 "name": "Edwin Abbott",
5 "created": "2014-09-27T08:03:00+0000",
6 "status": {
7 "id": 1,
8 "description": "Active"
9 },
10 "organisation": {
11 "id": 123,
12 "name": "Company"
13 },
14 "roles": [
15 {
16 "id": 2,
17 "name": "User"
18 },
19 {
20 "id": 3,
21 "name": "Observer"
22 }
23 ]
24}
NameTypeDescription
idIntegerUnique ID of this user
usernameStringUsed for login, for full capabilities is has to be a valid email address
nameStringUser’s full name
createdTimestampTimestamp when this user was created - Type: ISO 8601 timestamp format
statusObjectid (Integer) - ID of status of this user
description (String) - Description of meaning of the status
organisationObjectid (Integer) - ID of organization
name (String) - Name of the organization
rolesList of ObjectsList of one or more roles
mfaList of ObjectsList of one or more MFA keys, if any have been created by this user