Module Mission (v1)#

REST Requests:#

Websockets:#

Websocket endpoint: GET /api/v1/mission/notifications

Websocket Events:

Module Mission REST API (v1)#

GET /api/v1/mission/missions#

List installed missions

Status Codes:

Example:

List installed missions

GET /api/v1/mission/missions/
[
  {
    "uid": "com.parrot.missions.simple",
    "name": "Simple mission",
    "desc": "This is a simple mission",
    "version": "0.0.1",
    "target_model_id": 2330,
    "target_min_version": "0.0.0",
    "target_max_version": "99.99.99",
    "digest": "sha512:5862815df39863818738079d4471555710859b13c64427d3a0325bcd987504665c827c91d78a12c276b6fc4846b7568db37e38f659d9ba701393de33c93b7408"
  }
]
PUT /api/v1/mission/missions/#

Upload and install a mission file

Query Parameters:
  • (deprecated) (allow_overwrite) – allow/disallow overwrite of existing mission with same uid

  • allow_downgrade – allow/disallow downgrade of existing mission (previous version)

  • is_default – allow to set or not the uploaded mission as default one

  • is_delayed – allow to delay the installation at next reboot (other parameters are ignored)

Status Codes:
  • 200 OK – the installed mission information – JSON Schema: info

  • 405 Method Not Allowed – if the method is incorrect

  • 403 Forbidden – if mission with same uid is found (overwrite = no)

  • 415 Unsupported Media Type – if mission install failed

  • 500 Internal Server Error – if there is a server internal error

  • 507 Insufficient Storage – if there is no more space left in internal storage

  • 550 – if the signature is invalid

  • 551 – if the targetted drone version is invalid

  • 552 – if the targetted drone is invalid

  • 553 – if something is wrong in info file (json)

  • 554 – if the file is invalid/corrupted

  • 555 – if the mission was build with an unsupported SDK version

  • 556 – if the mission was build for the wrong target

Example:

Upload mission file

PUT /api/v1/mission/missions/
<mission file content in request body>
[
  {
    "uid": "com.parrot.missions.simple",
    "name": "Simple mission",
    "desc": "This is a simple mission",
    "version": "0.0.1",
    "target_model_id": 2330,
    "target_min_version": "0.0.0",
    "target_max_version": "99.99.99",
    "digest": "sha512:5862815df39863818738079d4471555710859b13c64427d3a0325bcd987504665c827c91d78a12c276b6fc4846b7568db37e38f659d9ba701393de33c93b7408"
  }
]
GET /api/v1/mission/missions/(uid)#

Get an installed mission metadata

Parameters:
  • uid (string) – uid of mission to get

Status Codes:

Example:

Get ‘com.parrot.missions.simple’ mission metadata

GET /api/v1/mission/missions/com.parrot.missions.simple
[
  {
    "uid": "com.parrot.missions.simple",
    "name": "Simple mission",
    "desc": "This is a simple mission",
    "version": "0.0.1",
    "target_model_id": 2330,
    "target_min_version": "0.0.0",
    "target_max_version": "99.99.99",
    "digest": "sha512:5862815df39863818738079d4471555710859b13c64427d3a0325bcd987504665c827c91d78a12c276b6fc4846b7568db37e38f659d9ba701393de33c93b7408",
    "assets": [
      "/data/missions/com.parrot.missions.simple/ui/js/fullscreen_overlay.js"
    ]
  }
]
GET (asset_url)#

download a mission asset

Parameters:
  • asset_url (string) – relative url of the mission assert (as returned by the ‘/missions/<uid>’ API endpoint)

Status Codes:
DELETE /api/v1/mission/missions/(uid)#

Delete a mission

Parameters:
  • uid (string) – uid of mission to delete

Status Codes:

Example:

Delete a mission

DELETE /api/v1/mission/missions/com.parrot.missions.simple

Module Mission Websocket events (v1)#

Endpoint:

GET /api/v1/mission/notifications#
Request Headers:

Events:

Module Mission JSON Schema (v1)#

mission_created#

type

object

properties

  • name

string

mission_removed#

type

object

properties

  • name

string

info#

type

object

properties

  • uid

string

  • name

string

  • desc

string

  • version

string

  • target_model_id

integer

  • target_min_version

string

  • target_max_version

string

  • digest

string

mission#

type

object

properties

  • metadata

info

  • assets

type

array

items

string

allow_overwrite#

type

string

oneOf

if a mission with the same uid is found it will be overwritten

const

yes

if a mission with the same uid is found it will be rejected

const

no

allow_downgrade#

type

string

oneOf

if a mission with the same uid is found it will allow downgrade

const

yes

if a mission with the same uid is found it will not allow downgrade

const

no

is_default#

type

string

oneOf

the uploaded mission will be set as default one

const

yes

the uploaded mission will not be set as default one

const

no

is_delayed#

type

string

oneOf

the uploaded mission will be delayed for install at next reboot

const

yes

the uploaded mission will be installed at current boot

const

no