Users

User object

This is a object representing your user. You can retrieve it to see you user information.

{
"id": "475fd302-ea5b-4ab4-93de-942baa826b09",
"email": "[email protected]",
"firstName": "John",
"lastName": "Patterson",
"fullName": "John Patterson",
"emailVerified": true,
"roles": [],
"activeWorkspace": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"picture": "https://i.imgur.com/5Pt4yZH.png",
"isSso": true,
"connection": "Intenseye"
}

Endpoints


Authorize the token

GET/authorize

This endpoint is mainly used in dashboard to do the initial setup for the user

Arguments

No arguments needed

Response

Return HTTP 200 or HTTP 401


Get invitations

GET/users/invitations

Roles:

users:write

Arguments

No arguments needed

Response

Return list of invitations

{
"status": "ok",
"data": [
{
"id": "475fd302-ea5b-4ab4-93de-942baa826b09",
"email": "[email protected]",
"workspaceId": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"groupId": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"isSso": true,
"jobTitle": "JobTitle",
"createdAt": "2020-02-14T07:43:00Z",
"connection": "Intenseye"
}
]
}

Invite a user to workspace

POST/users/invite

Roles:

users:write

Arguments

BODY
  • workspaceId UUID required The id of the workspace that the user is being invited.
  • firstName String required First name of the person
  • lastName String required Last name of the person
  • email String required Email address of the invited user
  • groupId UUID required The id of the group that the user is being invited.
  • jobTitle String optional Job title of the user

Response

{
"status": "ok",
"message": "Invitation sent!"
}

Discard user invitation

DELETE/users/invite

Roles:

users:write

Arguments

QUERY STRING PARAMETER
  • email String required Email address of the invited user

Response

{
"status": "ok",
"message": "Invitation deleted!"
}

Delete a user

DELETE/users/:id

Roles:

users:delete

Arguments

PATH PARAMETER
  • id UUID required The id of the user to be deleted

Response

{
"status": "ok",
"message": "User deleted successfully"
}

Update users password

POST/users/change_password

Arguments

No arguments needed

Response

{
"status": "ok",
"message": "Password reset email sent!"
}

Get user email reports

GET/users/email_reports

Roles:

reporting:read

Arguments

No arguments needed

Response

Return list of user email report objects

{
"status": "ok",
"data": [
{
"hour": -36390475,
"includeHeatmaps": false,
"cameraIds": [
"C5BFF0D5-4fc4-FDb3-ECC9-EAFf10B7eC06",
"7cFCD86a-16ab-D4dF-ceAA-A6f1Ba5fB0cD"
],
"userIds": [
"af83df9e-aCa9-ADbE-Aa43-98aF20BCb1A3",
"BB70cec9-E760-aBD6-87af-cDDeaaE11D3E",
"82FCb810-Fe80-64a7-cF85-35128cbB982B",
"db9FEdfe-5A48-892A-5DAD-BEeC2Cd138Fe",
"c8cf7Cd0-EbDc-7AEf-84C5-f640F7bA72FD"
],
"digestInterval": "monthly",
"alertTypes": [
"pariatur qui labore officia",
"eu ut",
"ea eiusmod voluptate"
],
"days": [
-38283768
],
"facilityIds": [
"5dDe5413-eea9-FcbB-ffDD-F23C09Aac9bE",
"3f581385-cC4b-6489-B9Fc-C4BA45A7FAA8",
"7384Ab15-cCaa-BfCE-BE1A-2e4B5BcA1eD8",
"45a8eabd-6FBd-5AFb-1c20-e7FE1Dcf0122"
]
},
{
"hour": -36390475,
"includeHeatmaps": false,
"cameraIds": [
"C5BFF0D5-4fc4-FDb3-ECC9-EAFf10B7eC06",
"7cFCD86a-16ab-D4dF-ceAA-A6f1Ba5fB0cD"
],
"userIds": [
"af83df9e-aCa9-ADbE-Aa43-98aF20BCb1A3",
"BB70cec9-E760-aBD6-87af-cDDeaaE11D3E",
"82FCb810-Fe80-64a7-cF85-35128cbB982B",
"db9FEdfe-5A48-892A-5DAD-BEeC2Cd138Fe",
"c8cf7Cd0-EbDc-7AEf-84C5-f640F7bA72FD"
],
"digestInterval": "monthly",
"alertTypes": [
"pariatur qui labore officia",
"eu ut",
"ea eiusmod voluptate"
],
"days": [
-38283768
],
"facilityIds": [
"5dDe5413-eea9-FcbB-ffDD-F23C09Aac9bE",
"3f581385-cC4b-6489-B9Fc-C4BA45A7FAA8",
"7384Ab15-cCaa-BfCE-BE1A-2e4B5BcA1eD8",
"45a8eabd-6FBd-5AFb-1c20-e7FE1Dcf0122"
]
}
]
}

Create user email report

POST/users/email_reports

Roles:

reporting:write

Arguments

BODY
  • id UUID optional The id of the report
  • workspaceId UUID optional The id of the workspace
  • userIds List[UUID] required List of user ids
  • days List[Int] required List of days
  • dayOfMonth Int optional Day of the month
  • hour String required Hour
  • facilityIds List[UUID] required List of facilities
  • cameraIds List[UUID] required List of cameras
  • alertTypes List[Enum] required List of alert types
    • APRON
    • BANNISTER_USAGE
    • CLEAN_PEDESTRIAN_WAYS
    • CLEAN_VEHICLE_ROADS
    • CLIMBING
    • MAX_WORKER_IN_CONFINED_SPACE
    • MIN_WORKER_IN_CONFINED_SPACE
    • CONTACT_WITH_ELECTRICITY
    • CRANE_AREA
    • CUSTOM
    • DYNAMIC_DELIMITATION_AREA
    • EXCLUSION_ZONE
    • FACE_MASK
    • FIRE_DETECTION
    • GLASSES
    • GLOVE
    • GROUP
    • GROUPING
    • HELMET
    • LEAKAGE_AND_SPILL
    • LIGHT_CONTROLS
    • LINE_OF_FIRE
    • MACHINE_MAN_RESTRICTED_AREA
    • MANDOWN
    • MASK
    • OPEN_CLOSED_DOORS
    • PEDESTRIAN_WAY_VIOLATION
    • REFLECTIVE_VEST
    • RESTRICTED_HEIGHT
    • SCISSOR_LIFT_HELMET_USAGE
    • VEHICLE_PPE_COMPLIANCE
    • SLEEVE
    • SOCIAL_DISTANCE
    • SPEED_LIMIT
    • STATIC_DELIMITATION_AREA
    • TIME_LIMITED_AREA
    • UNATTENDED_OBJECT_DETECTION
    • VEHICLE_RESTRICTED_AREA
    • VEHICLE_OPERATION_ZONE
    • VEHICLE_NEAR_MISS
  • createdAt String optional Date of the creation
  • timeZoneId String optional Timezone of facility (ex: America/New_York)
  • includeHeatmaps Boolean required
  • digestInterval Enum required
    • daily
    • monthly
    • yearly

Response

{
"status": "ok",
"insertedItem": {
"id": "2cbFB8b9-a511-82C6-64f6-Bd9073eEE58F"
}
}

`

Update user email report

PATCH/users/email_reports/:id

Roles:

reporting:write

Arguments

PATH PARAMETER
  • id UUID required The id of the report
BODY
  • userIds List[UUID] required List of user ids
  • days List[Int] required List of days
  • dayOfMonth String optional Day of the month
  • hour String required Hour
  • facilityIds List[UUID] required List of facilities
  • cameraIds List[UUID] required List of cameras
  • alertTypes List[Enum] required
    • APRON
    • BANNISTER_USAGE
    • CLEAN_PEDESTRIAN_WAYS
    • CLEAN_VEHICLE_ROADS
    • CLIMBING
    • MAX_WORKER_IN_CONFINED_SPACE
    • MIN_WORKER_IN_CONFINED_SPACE
    • CONTACT_WITH_ELECTRICITY
    • CRANE_AREA
    • CUSTOM
    • DYNAMIC_DELIMITATION_AREA
    • EXCLUSION_ZONE
    • FACE_MASK
    • FIRE_DETECTION
    • GLASSES
    • GLOVE
    • GROUP
    • GROUPING
    • HELMET
    • LEAKAGE_AND_SPILL
    • LIGHT_CONTROLS
    • LINE_OF_FIRE
    • MACHINE_MAN_RESTRICTED_AREA
    • MANDOWN
    • MASK
    • OPEN_CLOSED_DOORS
    • PEDESTRIAN_WAY_VIOLATION
    • REFLECTIVE_VEST
    • RESTRICTED_HEIGHT
    • SCISSOR_LIFT_HELMET_USAGE
    • VEHICLE_PPE_COMPLIANCE
    • SLEEVE
    • SOCIAL_DISTANCE
    • SPEED_LIMIT
    • STATIC_DELIMITATION_AREA
    • TIME_LIMITED_AREA
    • UNATTENDED_OBJECT_DETECTION
    • VEHICLE_RESTRICTED_AREA
    • VEHICLE_OPERATION_ZONE
    • VEHICLE_NEAR_MISS
  • timeZoneId String optional Timezone of facility (ex: America/New_York)
  • includeHeatmaps Boolean required
  • digestInterval Enum required
    • daily
    • monthly
    • yearly

Response

{
"status": "ok",
"message": "Updated"
}

Delete user email report

DELETE/users/email_reports/:id

Roles:

reporting:delete

Arguments

PATH PARAMETER
  • id UUID required The id of the report

Response

{
"status": "ok",
"message": "Deleted"
}

Send user email report

POST/users/email_reports/:id/send

Arguments

PATH PARAMETER
  • id UUID required The id of the report

Response

{
"status": "ok",
"message": "Mail sent to actor!"
}

Get users in the workspace

GET/workspaces/users

Arguments

No arguments needed

Returns

Returns list of users workspace that the user belongs to.

{
"status": "ok",
"data": {
"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"
}
}