Maia

Endpoints


Get categories

GET/maia/categories

Roles:

maia:write

Arguments

No arguments needed

Response

Returns list of categories

{
"status": "ok",
"data": [
{
"id": 1,
"supercategory": "person",
"name": "person"
}
]
}

Get object tags

GET/maia/objecttags

Roles:

maia:read

Arguments

No arguments needed

Response

Returns list of object tags

{
"status": "ok",
"data": [
{
"id": 1,
"name": "helmet",
"categoryId": 92,
"attribute": 91
}
]
}

Get cameras

GET/maia/cameras

Roles:

maia:write

Arguments

No arguments needed

Response

Returns list of camera objects

{
"status": "ok",
"data": [
{
"id": "8b084a37-6fd4-4c1b-beea-ea403917791b",
"name": "My Camera",
"status": "IDLE",
"statusMessage": "Message",
"imageLink": "https://blog.intenseye.com/content/images/size/w2000/2019/11/blog-post---1-1.png",
"createdAt": "2020-02-14T07:43:00Z",
"updatedAt": "2020-02-14T07:43:00Z",
"subscriptionId": 3,
"dataCollectionEnabled": true,
"dataCollectionObjects": [
"object",
"object2"
],
"dataCollectionConfig": {
"minWidth": 500,
"minHeight": 400,
"interval": 5000
},
"groundTruthKey": "keyName",
"facilityId": "3a85f898-c173-4a5a-8e4b-1884ffcace8b",
"collectSampleVideos": true,
"imageDimensions": {
"width": 500,
"height": 400
},
"alertRuleIds": [
"9a12w142-c173-4a5a-8e4b-1884ffcace8b"
],
"url": "https://blog.intenseye.com/content/images/size/w2000/2019/11/blog-post---1-1.png",
"streamType": "proxy",
"streamProtocol": "rtsp",
"advancedSettings" : {},
"proxyHost": "proxyHost"
},
{
"id": "8b084a37-6fd4-4c1b-beea-ea403917791b",
"name": "My Camera",
"status": "IDLE",
"statusMessage": "Message",
"imageLink": "https://blog.intenseye.com/content/images/size/w2000/2019/11/blog-post---1-1.png",
"createdAt": "2020-02-14T07:43:00Z",
"updatedAt": "2020-02-14T07:43:00Z",
"subscriptionId": 3,
"dataCollectionEnabled": true,
"dataCollectionObjects": [
"object",
"object2"
],
"dataCollectionConfig": {
"minWidth": 500,
"minHeight": 400,
"interval": 5000
},
"groundTruthKey": "keyName",
"facilityId": "3a85f898-c173-4a5a-8e4b-1884ffcace8b",
"collectSampleVideos": true,
"imageDimensions": {
"width": 500,
"height": 400
},
"alertRuleIds": [
"9a12w142-c173-4a5a-8e4b-1884ffcace8b"
],
"url": "https://blog.intenseye.com/content/images/size/w2000/2019/11/blog-post---1-1.png",
"streamType": "proxy",
"streamProtocol": "rtsp",
"advancedSettings" : {},
"proxyHost": "proxyHost"
}
]
}

Get videos

GET/maia/videos

Roles:

maia:write

Arguments

No arguments needed

Response

Returns list of videos

{
"status": "ok",
"data": [
{
"id": "Bda543E5-e6ee-6DE9-a1a4-7Af6aA96e2A9",
"drawingState": "INPROGRESS",
"cameraId": "a775CD33-94Af-9ede-aCf1-5D4d9e49E09a",
"updatedAt": "1973-04-13T00:15:19.206Z",
"createdAt": "1948-03-16T17:11:17.339Z",
"metadata": {
"codec_name": "h264",
"width": 1920,
"height": 1080,
"display_aspect_ratio": "0:1",
"pix_fmt": "yuv420p",
"avg_frame_rate": 20,
"duration": "duration",
"duration_ts": 1614597114,
"bit_rate": "1",
"nb_frames": "10"
}
}
]
}

Get board

GET/maia/board

Roles:

maia:write

Arguments

No arguments needed

Response

Returns list of maia jobs

{
"status": "ok",
"data": [
[
"Finished",
[
{
"id": "da9988d6-c85b-4fc3-9ca3-5ae66d015348",
"name": "test",
"sources": [
{
"id": "d9999366-82da-416c-9117-33a105d6c84a",
"type": "Camera"
}
],
"imageLimit": 0,
"status": "Finished",
"assigneeId": "d602c4a7-f821-4fc1-87d8-a44ef7adc98b",
"createdAt": "2021-01-18T10:28:08Z",
"labelCount": 0,
"context": [
3,
93,
97,
92,
91,
94,
96,
1
],
"sampling": "Ordered",
"friendlyId": "gold-sheep"
},
{
"id": "ec3ad7ec-af18-4e28-8eb0-32d3a74a8dad",
"name": "Some title",
"sources": [
{
"id": "59e665a7-5442-4a55-bf1b-81a4af318f5d",
"type": "Camera"
}
],
"imageLimit": 200,
"status": "Finished",
"assigneeId": "9f14a39a-ae56-4bcb-9894-1416b77871b4",
"createdAt": "2020-08-28T08:07:55Z",
"labelCount": 0,
"context": [
1,
93
],
"sampling": "Ordered",
"friendlyId": "lime-muskrat"
}
]
]
]
}

Create a maia job

POST/maia/jobs

Roles:

maia:write

Arguments

BODY
  • name String required
  • sources List[MaiaJobSource] required
    • MaiaJobSource Object
      • id UUID required
      • type String
        • Video required
        • Camera required
  • imageLimit Int required
  • assigneeId UUID optional
  • context List[Int] required
  • sampling Enum optional
    • Ordered
    • Random
    • TrueRandom

Response

Returns a success message

{
"status": "ok",
"message": "Job created"
}

Get progress of maia job

GET/maia/jobs/:jobId/progress

Roles:

maia:write

Arguments

PATH PARAMETER
  • jobId UUID required The id of the maia job

Response

{
"status": "ok",
"data": [
[
"Removed",
3
],
[
"Pending",
1991
],
[
"Saved",
6
]
]
}

Change status of maia job

POST/maia/jobs/:jobId/status

Roles:

maia:write

Arguments

PATH PARAMETER
  • jobId UUID required The id of the maia job
BODY
  • status Enum required
    • Idle
    • InProgress
    • Cancelled
    • Parked
    • Finished
    • Archived

Response

Returns a success message

{
"status": "ok",
"message": "Job status updated"
}

Change assignee of maia job

POST/maia/jobs/:jobId/assignee

Roles:

maia:write

Arguments

PATH PARAMETER
  • jobId UUID required The id of the maia job
BODY
  • assigneeId UUID required

Response

Returns a success message

{
"status": "ok",
"message": "Job assigneeId updated"
}

Remove assignee of maia job

DELETE/maia/jobs/:jobId/assignee

Roles:

maia:write

Arguments

PATH PARAMETER
  • jobId UUID required The id of the maia job

Response

Returns a success message

{
"status": "ok",
"message": "Job assigneeId removed"
}

Add an object tag

POST/objecttags

Roles:

maia:write

Arguments

BODY
  • id Int Id of the object tag
  • name Int Name of the object tag
  • categoryId Int Category id of the object tag
  • attribute Int Attribute id of the object tag
  • isDefault Boolean Default configuration for attribute of the object tag

Response

Returns a success message

{
"status": "ok",
"message": "Object tag added successfully"
}

Delete an object tag

DELETE/objecttags

Roles:

maia:write

Arguments

BODY
  • name String required Name of the object tag

Response

Returns a success message

{
"status": "ok",
"message": "Object tag deleted"
}