Workspaces

Workspace object

{
"id": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"ownerId": "475fd302-ea5b-4ab4-93de-942baa826b09",
"name": "Intenseye",
"contactEmail": "[email protected]",
"profilePicture": "https://intenseye.test/img.png",
"lastAccidentDate": "2020-02-14T07:43:00Z",
"connection": "Intenseye"
}

Endpoints


Get workspaces

GET/workspaces

Arguments

No arguments needed

Returns

Returns a workspace object for the account that was authenticated in the request.


Add a profile picture to workspace

POST/workspaces/image

Roles:

workspaces:write

Arguments

MULTIPART FORM UPLOAD
  • image binary required Binary Image to upload

Returns

Returns a response with the id of the workspace that has been created.

{
"status": "ok",
"url": "https://intenseye.test/img.png"
}

Add cloud service integration.

POST/workspaces/cloud_service_integration

Arguments

BODY
  • cloudService Enum required
    • AWS
    • AZURE
    • UNKNOWN
  • accountId String required
  • region String required
  • metadata List[String,String] required

Returns

Returns a success message

{
"status": "ok",
"message": "Saved workspace cloud service integration"
}

Get cloud service integration.

GET/workspaces/cloud_service_integration

Arguments

No arguments needed

Returns

Returns cloud service integration

{
"status": "ok",
"data": {
"accountId": "incididunt id ut voluptate",
"workspaceId": "0380fEF2-EFAB-05D6-BbD8-2aa85B7dde7E",
"region": "id laboris commodo dolor nisi",
"cloudService": "AWS",
"metadata": {
"": "culpa cillum laborum in",
"e": "Duis",
"*QNq2t>": "mollit sit",
"#QyP}j": "consectetur voluptate"
},
"createdAt": "2017-07-01T13:39:22.738Z",
"id": "aA0A170b-6DEc-dF8A-320E-CCDAfA7b6EF9"
}
}

Delete cloud service integration.

DELETE/workspaces/cloud_service_integration

Arguments

QUERY STRING PARAMETERS
  • id UUID required Id of the cloud service integration

Returns

Returns a success message

{
"status": "ok",
"message": "Deleted workspace cloud integration"
}

Add object storage.

POST/workspaces/object_storage

Arguments

BODY
  • objectType Enum required
    • ALERT
    • ALERT_RAW
    • DATA_COLLECTION
    • CAMERA_THUMBNAIL
    • IMAGE
    • VIDEO
    • VIDEO_OUTPUT
    • VIDEO_CAPTURES
  • storageType Enum required
    • S3
    • BLOB_STORAGE
    • UNKNOWN
  • bucket String required

Returns

Returns a success message

{
"status": "ok",
"message": "Saved workspace object storage"
}

Get object storages.

GET/workspaces/object_storage

Arguments

No arguments needed

Returns

Returns list of cloud service integration

{
"status": "ok",
"data": [
{
"id": "0380fEF2-EFAB-05D6-BbD8-2aa85B7dde7E",
"workspaceId": "0380fEF2-EFAB-05D6-BbD8-2aa85B7dde7E",
"objectType": "ALERT",
"storageType": "S3",
"bucket": "bucketName",
"createdAt": "2017-07-01T13:39:22.738Z"
}
]
}

Delete cloud service integration.

DELETE/workspaces/object_storage

Arguments

QUERY STRING PARAMETERS
  • id UUID required Id of the object storage

Returns

Returns a success message

{
"status": "ok",
"message": "Deleted workspace object storage"
}

Get retention policy

GET/workspaces/retention

Roles:

workspaces:read

Arguments

No arguments needed

Returns

Returns retention policy info

{
"status": "ok",
"data": [
{
"workspaceId": "0380fEF2-EFAB-05D6-BbD8-2aa85B7dde7E",
"retentionPeriod": 730
}
]
}

Add/Update retention policy

POST/workspaces/retention

Roles:

workspaces:write

Arguments

BODY
  • retentionPeriod Int required

Returns

Returns a success message

{
"status": "ok",
"message": "Retention period set for 0380fEF2-EFAB-05D6-BbD8-2aa85B7dde7E"
}

Get connectivity

POST/workspaces/connectivity

Arguments

BODY
  • start Long required Start of the timestamp to get connectivity
  • end Long required End of the timestamp to get connectivity
  • aggregate Enum required
    • day
    • week
    • month Aggregation identifier

Returns

Returns connectivity report of a workspace

{
"status": "ok",
"data": {
"series": [
{
"groups": [
{
"state": "INPROGRESS",
"durationInMinutes": 20485
},
{
"state": "DISCONNECTED",
"durationInMinutes": 9752
}
],
"start": 1617235200,
"end": 1617321600,
"humanStartDate": "Thu, 1 Apr 2021 00:00:00 +0000",
"humanEndDate": "Fri, 2 Apr 2021 00:00:00 +0000"
}
],
"comparison": {
"previous": [
{
"state": "DISCONNECTED",
"durationInMinutes": 43505
},
{
"state": "INPROGRESS",
"durationInMinutes": 66117
}
],
"current": [
{
"state": "DISCONNECTED",
"durationInMinutes": 50104
},
{
"state": "INPROGRESS",
"durationInMinutes": 100033
}
],
"percentageChange": [
{
"state": "DISCONNECTED",
"durationInMinutes": 0.15168371451557291
},
{
"state": "INPROGRESS",
"durationInMinutes": 0.5129694329748778
}
]
}
}
}