Device Connectivity Made Easy

Focus on your product and innovation and leave communication and management to DeviceHive.

Get Started

Represents a user to this API.

Methods

Method

Authorization

Uri

Description

list

Access JSON Web Token (ManageUser)

GET /user

Gets list of users.

count

Access JSON Web Token (ManageUser)

GET /user/count

Gets count of users.

get

Access JSON Web Token (GetCurrentUser)

GET /user/{id}

Gets information about user and its assigned networks.
Only administrators are allowed to get information about any user. User-level accounts can only retrieve information about themselves.

insert

Access JSON Web Token (ManageUser)

POST /user

Creates new user.

update

Access JSON Web Token (UpdateCurrentUser)

PUT /user/{id}

Updates an existing user.
Only administrators are allowed to update any property of any user. User-level accounts can only change their own password in case:

  • They already have a password.
  • They provide a valid current password in the 'oldPassword' property.

delete

Access JSON Web Token (ManageUser)

DELETE /user/{id}

Deletes an existing user.

getCurrent

Access JSON Web Token (ManageUser)

GET /user/current

Gets information about user/network association.
Only administrators are allowed to get information about any user. User-level accounts can only retrieve information about themselves.

updateCurrent

Access JSON Web Token (ManageUser)

PUT /user/current

Updates the current user.
Only administrators are allowed to update any property of any user. User-level accounts can only change their own password in case:

  • They already have a password.
  • They provide a valid current password in the 'oldPassword' property.

getNetwork

Access JSON Web Token (ManageUser)

GET /user/{id}/network/{networkId}

Gets information about user/network association.

assignNetwork

Access JSON Web Token (ManageUser)

PUT /user/{id}/network/{networkId}

Associates network with the user.

unassignNetwork

Access JSON Web Token (ManageUser)

DELETE /user/{id}/network/{networkId}

Removes association between network and user.

assignDeviceType

Access JSON Web Token (ManageUser)

PUT /user/{id}/devicetype/{deviceTypeId}

Associates device type with the user.

unassignDeviceType

Access JSON Web Token (ManageUser)

DELETE /user/{id}/devicetype/{deviceTypeId}

Removes association between device type and user.

getDeviceTypes

Access JSON Web Token (ManageUser)

GET /user/{id}/devicetype

Gets information about all user/device type associations.

allowAllDeviceTypes

Access JSON Web Token (ManageUser)

PUT /user/{id}/devicetype/all

Allows all device types for user.

disallowAllDeviceTypes

Access JSON Web Token (ManageUser)

DELETE /user/{id}/devicetype/all

Disallows all device types for user.

Resource Representation

{
    "id": {integer},
    "login": {string},
    "role": {integer},
    "status": {integer},
    "lastLogin": {datetime},
    "data": {object},
    "introReviewed": {boolean}
}

Property Name

Type

Description

id

integer

User identifier.

login

string

User login using during authentication.

role

integer

User role. Available values:
0: Administrator role
1: Client role

status

integer

User status. Available values:
0: The user is active
1: The user has been locked out due to invalid login attempts
2: The user has been disabled

lastLogin

datetime

User last login timestamp (UTC).

data

object

User data, a JSON object with an arbitrary structure.

introReviewed

boolean

Indicates if user reviewed an intro.

Updated 3 years ago

User


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.