Skip to content

Jobs & Tasks

This API allows you to manage Jobs and Tasks within Unleash live. A Job is a high-level container that groups multiple Tasks. A Task represents a specific unit of work, such as a flight request or a manual inspection, and can include geographical boundaries (geofences) and associated missions.

Base URL: https://api.unleashlive.com


All endpoints described in this section require a valid AWS Cognito JWT authentication token. The token must be passed in the x-amz-cognito-security-token header.

See the Authentication section for detailed instructions on generating tokens.


POST /v1/job

Creates a new Job. The author of the job is assigned automatically.

KeyTypeDescription
titleStringrequired Name of the job
descriptionStringrequired Detailed description of the job
userIdsString[]Array of User IDs to assign (must be in the same team)
statusUserTaskStatus[]Initial status of the job
{
"title": "Weekly Transmission Line Inspection",
"description": "Routine visual inspection of power lines in Sector 7G",
"userIds": ["user-123", "user-456"]
}

Returns a Job Object.

Code sample: create-job.js


GET /v1/job/{jobId}

Retrieves a specific job by its ID.

Returns a Job Object.

Code sample: get-job.js


GET /v1/job

Lists all jobs specifically assigned to your user context.

[
{
"id": "job-12345",
"title": "Weekly Transmission Line Inspection",
"companyId": "comp-123",
"teamId": "team-123",
"ownerId": "user-123",
"assignedId": "user-456",
"createdAt": 1690000000000,
"updatedAt": 1690000000000,
"pk": "pk-1234",
"sk": "sk-1234"
}
]

Code sample: list-assigned-jobs.js


GET /v1/job/team

Lists all jobs across your active team (requires admin privileges).

[
{
"id": "job-12345",
"title": "Weekly Transmission Line Inspection",
"companyId": "comp-123",
"teamId": "team-123",
"ownerId": "user-123",
"assignedId": "user-456",
"createdAt": 1690000000000,
"updatedAt": 1690000000000,
"pk": "pk-1234",
"sk": "sk-1234"
}
]

Code sample: list-team-jobs.js


PATCH /v1/job/{jobId}

Updates specific fields of an existing job. Only the updated fields are returned in the response.

KeyTypeDescription
titleStringJob name
descriptionStringJob description
userIdsString[]Assigned Users
statusUserTaskStatus[]Job status
{
"updatedAt": 1690000005000,
"title": "Monthly Transmission Line Inspection"
}

Code sample: update-job.js


DELETE /v1/job/{jobId}

Deletes a job from the database.

Returns the deleted Job Object.

Code sample: delete-job.js


PATCH /v1/job/{jobId}/task

Bulk assigns a specific user to every task currently attached to the job.

KeyTypeDescription
assignedIdStringrequired User ID

Code sample: assign-user-job-all-task.js


POST /v1/task

Creates a new task and assigns it to a parent Job. It is also possible to bind a mission to the task during creation (or later via update) using the context object.

KeyTypeDescription
jobIdStringrequired ID of the parent job
typeTaskTyperequired Type of task
descriptionStringTask description
statusUserTaskStatus[]Initial task status
latNumberLatitude coordinate
lngNumberLongitude coordinate
flightHistoryFlightHistory[]History of flights
contextTaskContextAdditional context/metadata
{
"title": "Inspect Tower Alpha",
"description": "Visual inspection of top tier",
"jobId": "job-12345",
"type": "FLIGHT_REQUEST",
"lat": -33.8635599,
"lng": 151.2021623
}

Returns a Task Object.

Code sample: create-task.js


POST /v1/task/mission

Creates a task and simultaneously attaches a new flight mission in one unified request. The created mission can then be reused in other tasks by passing its ID to context.mission.id.

Includes geofence polygons (via GeoJSON mapping) and a multi-point route.

{
"jobId": "job-1234",
"type": "FLIGHT_REQUEST",
"name": "Lamp inspection",
"desc": "Sample-mission",
"speed": 2,
"context": {
"geojson": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[0, 0],
[0, 1],
[1, 1],
[1, 0],
[0, 0]
]
]
},
"properties": {}
}
]
}
},
"route": [
{
"pole": "Lamp 1",
"lat": -33.863841,
"lng": 151.200829,
"altitude": 10.0,
"actions": [{ "action": "TAKE_PHOTO" }]
}
]
}

Returns a Task Object representing the created task, containing the newly minted Mission ID within its context.

Code sample: create-task-mission.js


POST /v1/task/mission-corridor

Creates a corridor mission task. Corridor missions are designed for linear flight paths with multiple waypoints, commonly used for infrastructure inspection, pipeline monitoring, or power line surveys.

Code sample: create-task-corridor-mission.js


GET /v1/task/{taskId}

Retrieves a specific task from the database.

Returns a Task Object.

Code sample: get-task.js


GET /v1/task
GET /v1/task/team
GET /v1/task/company
GET /v1/task/job/{jobId}

Retrieves lists of tasks based on the endpoint called:

  • /v1/task - Lists all tasks assigned to your user context.
  • /v1/task/team - Lists all tasks for your current team.
  • /v1/task/company - Lists all tasks across your company.
  • /v1/task/job/{jobId} - Lists all tasks attached to a specific job.

All endpoints return paginated data.

ParameterDescription
limitMaximum number of items to return.
nextTokenPagination token generated by the previous request to fetch the next page.
GET /v1/task?nextToken=abcd123&limit=50
{
"items": [
{
"id": "task-1234",
"title": "Task title returning",
"type": "FLIGHT_REQUEST",
"status": "PUBLISHED",
"jobId": "job-1234",
"ownerId": "user-123",
"teamId": "team-123",
"companyId": "comp-123",
"lat": 52.253057,
"lng": 21.067224,
"context": {
"mission": {
"id": "mission-1234",
"route": [...]
}
},
"createdAt": 1690000000000,
"updatedAt": 1690000000000
}
],
"nextToken": "next-token-hex"
}

Code samples:


PATCH /v1/task/{taskId}

Updates task fields. The API returns the entire new task object.

Returns the updated Task Object.

Code sample: update-task.js


DELETE /v1/task/{taskId}

Removes a task from the database.

Returns the deleted Task Object.

Code sample: delete-task.js


FieldTypeDescription
idStringUnique identifier
titleStringJob title
descriptionStringDetailed description
statusStringCurrent status (e.g., DRAFT)
totalTasksIntegerTotal number of tasks in this job
completedTasksIntegerNumber of tasks marked completed
userIdsString[]Array of assigned User IDs
ownerIdStringID of the user who created the job
teamIdStringTeam ID
companyIdStringCompany ID
createdAtIntegerEpoch timestamp of creation
updatedAtIntegerEpoch timestamp of last update
FieldTypeDescription
idStringUnique identifier
jobIdStringParent Job ID
typeStringTask Type
titleStringTask title
descriptionStringDetailed description
statusStringStatus
contextObjectTask Context Metadata
latNumberLatitude
lngNumberLongitude
ownerIdStringID of the user who created the job
teamIdStringTeam ID
companyIdStringCompany ID
createdAtIntegerEpoch timestamp of creation
updatedAtIntegerEpoch timestamp of last update
StatusDescription
DRAFTInitial state, task is being prepared
PUBLISHEDTask is ready for assignment and execution
IN_PROGRESSTask is currently being worked on
COMPLETEDTask has been successfully finished
FAILEDTask encountered issues and couldn’t complete
Type
FLIGHT_REQUEST
FLIGHT_REQUEST_MANUAL
KeyTypeDescription
missionPartial <Mission>Attached mission details
assetPartial <Asset>Attached asset details
propertiesRecord<String, String>Additional metadata describing task
geojsonGeoJSONGeoJSON geographical data
KeyTypeDescription
flightStartNumberStart timestamp of the flight
flightEndNumberEnd timestamp of the flight
distanceNumberDistance traveled
s3PathStringPath to the file storing the flight route

GeoJSON context configuration allows you to define geographical shapes such as lists of points, lines, or polygons defining areas. It can also be used as boundaries that enforce flight restrictions or geofencing.

Supported Geometry Types:

TypeDescriptionCoordinates Format
PolygonClosed area with boundariesArray of [longitude, latitude]
PointSingle coordinate point[longitude, latitude]
LineStringLinear path with multiple pointsArray of [longitude, latitude]

Geofence Feature Properties:

When constructing your GeoJSON, you can attach properties to dictate bounding boxes and visual representations.

KeyTypeDescription
nameStringHuman-readable name for the geofenced area
strokeStringBorder color in hex format
stroke-widthNumberBorder width in pixels
stroke-opacityNumberBorder opacity (0-1)
fillStringFill color in hex format
fill-opacityNumberFill opacity (0-1)
geofenceStringGeofence behavior: inclusion or exclusion

Example Exclusion Zone (Polygon)

{
"properties": {
"name": "Flight restriction zone",
"stroke": "#ff0000",
"stroke-width": 3,
"stroke-opacity": 0.8,
"fill": "#ff0000",
"fill-opacity": 0.2,
"geofence": "exclusion"
}
}