Get user to thing authorizations

Prev Next
Get
/inventory/userThingAuthorizations

Retrieves the thing authorizations for a specific user.

Required permissions: READ_USER_AUTHORIZATION.

Security
HTTP
Type bearer
Header parameters
X-Servitly-Tenant
stringRequired

The name of the target tenant (e.g. acme).

Query parameters
customerId
string

Condition on customer id.

Exampleabcd1234
userId
string

The identifier of the user whose permissions must be retrieved.
If specified, the CustomerId must also be specified.

Minimum1.0
Exampleabcd1234
includeDefaults
booleanRequired

The flag defining whether to retrieve also the default user authorizations.

Minimum1.0
Responses
200

Successful operation.

Array of object
object
id
string

The authorization unique identifier.

userId
string

The identifier of the user associated to this authorization.

thingId
string

The identifier of the thing associated to this authorization.

authorization
string

The authorization of the user on the thing.

Valid values[ "GRANT", "DENY" ]
userTypeId
string

The identifier of the user-type the user impersonate when operating on the associated thing.

userType
object

The user-type object associated to this authorization.

id
string

The user-type object identifier.

name
string
category
string

The category this user type belongs to, one of ORGANIZATION, CUSTOMER, PARTNER.

rank
integer

The rank of the user type used to prevent unauthorized user reads or updates.

commandPayloadDuration
integer

The duration in milliseconds a command-payload is valid after its creation.

permissions
Array of string

The list of permissions associated with this user type.

string
limitedTime
object

The time limitation of this authorization.

startDayTime
number

The day time the authorization starts (e.g. 10:00 -> 1000). The default value is 0.

Example1000
endDayTime
number

The day time the authorization ends (e.g. 20:30 -> 2230). The default value is 2359.

Example2230
weekDays
Array of string

The list of week days the authorization is valid.

string
Valid values[ "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" ]
startTimestamp
integer (int64)

The timestamp UTC the authorization starts.

Example1578438000000
endTimestamp
integer (int64)

The timestamp UTC the authorization ends.

Example1578438000000
401

User not authenticated.

object
message
string

The error response.

ExampleUser not authenticated
403

User not authorized.

object
message
string

The error response.

ExampleUser not authorized
404

Resource was not found.

object
message
string

The error response.

ExampleResource not found
429

API call rate limit exeeded.

object
message
string

The error response.

ExampleAPI call rate limit exeeded
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error