Skip to main content

REST API Reference

Complete reference for the IDI Fly v3 Integration REST API. All paths are relative to the REST base URL https://api.idi-fly.com (see Base URLs).

Unless stated otherwise, every endpoint:

  • Requires an Authorization: Bearer <token> header (see Authentication).
  • Is scoped to your organisation — you only ever see your own resources.
  • Returns application/json.

Authentication

POST /v3/auth/token

Exchange client credentials for a JWT access token. This is the only endpoint that uses an API key instead of a bearer token.

Headers

x-api-key: <your-api-key>
Content-Type: application/json

Body

FieldTypeRequiredDescription
grant_typestringMust be client_credentials
client_idstringCognito App Client ID
client_secretstringCognito App Client secret

Response 200 OK

{
"access_token": "eyJraWQiOiJEaWVoK0U0...",
"token_type": "Bearer",
"expires_in": 3600
}

Errors

StatuserrorWhen
400invalid_requestMissing body, client_id, or client_secret
400unsupported_grant_typegrant_type is not client_credentials
401invalid_clientCredentials rejected by Cognito

Jobs

A job is a drone mission request. Jobs progress through a defined status lifecycle.

MethodPathScopeDescription
POST/v3/jobs/createcommand:createCreate a job
GET/v3/jobscommand:readList jobs
GET/v3/jobs/{jobId}command:readGet a job
PATCH/v3/jobs/{jobId}command:updateUpdate a job
DELETE/v3/jobs/{jobId}command:updateDelete a job
POST/v3/jobs/{jobId}/cancelcommand:updateCancel a pending/queued job

Job status lifecycle

Create a job

POST /v3/jobs/create

FieldTypeRequiredDescription
namestringHuman-readable job name
missionIdstringMission to run
deviceIdstringTarget drone device ID
deviceGroupIdstringDevice group the drone belongs to
descriptionstringOptional description
priorityintegerPriority (default 5)
scheduledAtstring (ISO 8601)When to run the job
metadataobjectFree-form key/value data
curl -X POST https://api.idi-fly.com/v3/jobs/create \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Inspection Mission Alpha",
"description": "Routine infrastructure inspection",
"missionId": "mission-uuid-123",
"deviceId": "drone-uuid-456",
"deviceGroupId": "group-uuid-789",
"priority": 5,
"scheduledAt": "2024-01-15T10:00:00Z",
"metadata": { "customer": "ACME Corp" }
}'

Response 201 Created

{
"success": true,
"job": {
"jobId": "job-uuid-abc",
"name": "Inspection Mission Alpha",
"status": "PENDING",
"priority": 5,
"createdAt": "2024-01-14T15:30:00Z"
}
}

List jobs

GET /v3/jobs

Query paramTypeDescription
statusstringFilter by status (PENDING, QUEUED, IN_PROGRESS, COMPLETED, FAILED, CANCELLED)
limitintegerMax results, default 50, capped at 100
curl -X GET "https://api.idi-fly.com/v3/jobs?status=PENDING&limit=20" \
-H "Authorization: Bearer <token>"

Response 200 OK

{
"success": true,
"jobs": [ { "jobId": "job-uuid-abc", "status": "PENDING" } ],
"count": 1
}

If more results are available, a nextToken field is returned; pass it back to paginate.

Get a job

GET /v3/jobs/{jobId}200 OK with { "success": true, "job": { ... } }, or 404 if not found.

Update a job

PATCH /v3/jobs/{jobId} — all fields optional.

FieldTypeDescription
namestringNew name
descriptionstringNew description
priorityintegerNew priority
statusstringNew status
metadataobjectReplacement metadata

Cancel a job

POST /v3/jobs/{jobId}/cancel — cancels a PENDING or QUEUED job. Returns 400 if the job is in a state that cannot be cancelled, 404 if it does not exist.

Delete a job

DELETE /v3/jobs/{jobId}200 OK with { "success": true, "message": "Job deleted successfully" }.


Streams

Generate shareable links for a device's live stream or telemetry.

MethodPathScopeDescription
POST/v3/streams/sharestream:shareCreate a stream share
GET/v3/streams/shareshare:readList active stream shares
GET/v3/streams/share/{shareCode}share:readGet a stream share
DELETE/v3/streams/share/{shareCode}share:manageRevoke a stream share

Create a stream share

POST /v3/streams/share

FieldTypeRequiredDescription
resourceIdstringDevice or stream ID to share
shareTypestringSTREAM (live video) or DEVICE_STATUS (telemetry)
permissionsarrayDefaults to ["view"]; also supports "control"
expiresInintegerSeconds until expiry (default 3600, max 86400)
maxViewersintegerMaximum concurrent viewers (default 10)
metadataobjectFree-form data
curl -X POST https://api.idi-fly.com/v3/streams/share \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"resourceId": "device-uuid-123",
"shareType": "STREAM",
"permissions": ["view"],
"expiresIn": 3600,
"maxViewers": 10
}'

Response 201 Created

{
"success": true,
"share": {
"shareCode": "abc123xyz",
"shareUrl": "https://app.idi-fly.com/share/abc123xyz",
"expiresAt": "2024-01-14T16:30:00Z",
"maxViewers": 10
}
}

Shares

Manage all shares (both STREAM and DEVICE_STATUS) belonging to your organisation.

MethodPathScopeDescription
GET/v3/sharesshare:readList active shares
GET/v3/shares/{shareCode}share:readGet share details
DELETE/v3/shares/{shareCode}share:manageRevoke a share

List shares

curl -X GET https://api.idi-fly.com/v3/shares \
-H "Authorization: Bearer <token>"

Response 200 OK

{
"success": true,
"shares": [
{
"shareCode": "abc123xyz",
"resourceId": "device-uuid",
"shareType": "STREAM",
"permissions": ["view"],
"expiresAt": "2024-01-15T12:00:00Z",
"maxViewers": 10,
"currentViewers": 3
}
],
"count": 1
}

Requesting a share that belongs to a different organisation returns 403; an unknown or expired share returns 404.


Resources

MethodPathScopeDescription
GET/v3/resourcesresources:readList device groups available to your organisation
curl -X GET https://api.idi-fly.com/v3/resources \
-H "Authorization: Bearer <token>"

Response 200 OK

{
"success": true,
"resources": [
{
"deviceGroupId": "group-uuid-123",
"name": "Fleet Alpha",
"description": "Primary inspection fleet",
"deviceCount": 5,
"devices": [
{ "deviceId": "drone-001", "name": "Mavic 3 Enterprise", "status": "online" }
]
}
],
"count": 1
}

Errors

All endpoints share the same status-code semantics:

StatusMeaning
400Missing or invalid parameters
401Missing, invalid, or expired token
403Lacking the required scope, or accessing another organisation's resource
404Resource not found
405Method not allowed for that route
500Internal server error

Resource errors return { "error": "<message>" }. The token endpoint returns the OAuth shape { "error": "<code>", "error_description": "<message>" }.


Rate limits

EndpointRate limitBurst
POST /v3/auth/token50 / second100
All other endpointsNo fixed limit

Cache and reuse your access token for its full lifetime rather than requesting a new one per call.