Skip to main content

Users

User Object

You can see all elements of the user object at the json below.

"id": "ae34bc53-660c-4d7b-94df-393baed04f32", "authId": "auth0|23f4291ere127", "createdAt": "2020-02-18T09:11:32.481Z", "updatedAt": "2020-02-21T09:25:57.734Z", "email": "[email protected]", "firstName": "FirstName", "lastName": "LastName", "fullName": "FirstName LastName", "emailVerified": true, "roles": [], "lastLogin": "2020-02-21T09:25:57.734Z", "activeWorkspace": "f213e5dd-4b92-46f0-95df-0b9dfff4e588", "lastIp": "194.142.152.18", "loginsCount": 5, "locale": "en", "picture": "https://intenseye.test/img.png", "isSso": true, "connection": "Intenseye"

{
"id": "ae34bc53-660c-4d7b-94df-393baed04f32",
"firstName": "FirstName",
"lastName": "LastName",
"fullName": "FirstName LastName",
"groupId": "970df7c4-843d-4A1D-9264-Bd0Cc5c5d927",
"isSso": true,
"emailVerified": true,
"connection": "cillum",
"roles": [],
"email": "[email protected]",
"activeWorkspace": "a9a9EeF6-C0aF-eB2A-EECB-8E0cFF80FfD9",
"picture": "https://intenseye.test/img.png",
"jobTitle": "Engineer",
"phoneNumber": {
"nationalNumber": 555,
"region": "US",
"countryCode": 1,
"e164Format": "+1555"
}
}

Endpoints


Query users

GET/user

Returns

Returns a response contains partial information of user object.

{
"status": "ok",
"data": {
"id": "ae34bc53-660c-4d7b-94df-393baed04f32",
"email": "[email protected]",
"firstName": "FirstName",
"lastName": "LastName",
"fullName": "FirstName LastName",
"emailVerified": true,
"roles": [],
"activeWorkspace": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"picture": "https://intenseye.test/img.png",
"isSso": true,
"connection": "Intenseye",
"groupId": "16f0cbe3-bc75-45ea-9168-52e52c941ada",
"phoneNumber": {
"countryCode": 90,
"e164Format": "+905554443322",
"nationalNumber": 5554443322,
"region": "TR"
},
"jobTitle": "IT",
"intercomHash": "d928b1c3719886f05c8a251d83f801f5fc7f8602fd6aaebb19179a9050f07723"
}
}

Update firstname and lastname of a user

PATCH/user

Arguments

BODY
  • firstName String required First name of the user
  • lastName String required Last name of the user
  • jobTitle String required Job title of the user

Returns

Returns HTTP 200


Update user picture

PATCH/user/picture

Arguments

MULTIPART FORM UPLOAD
  • image binary required Binary Image to upload

Returns

Returns HTTP 200


Update phone number of a user

PATCH/user/phone_number

Arguments

BODY
  • phoneNumber String required Phone number of the user
  • region String required Region of the user

Returns

Returns a success message

{
"status": "ok",
"message": "Phone number updated"
}

Give facility access to a user

POST/facilities/:facilityId/give_access

Roles:

users:write
#### Arguments
PATH PARAMETERS
  • :facilityId UUID required Id of the facility
BODY
  • actions List[String] required List of actions

Returns

Returns a success message

{
"status": "ok",
"message": "Access given to the user"
}

Delete facility access from a user

//TODO This endpoint wired incorrectly on backend side and not working as intended

POST/facilities/:facilityId/remove_access

Roles:

users:write

Arguments

PATH PARAMETERS
  • :facilityId UUID required Id of the facility
BODY
  • actions List[String] required List of actions

Returns

Returns a success message

{
"status": "ok",
"message": "Access removed from the user"
}