Skip to main content
POST
/
missions
Creates a mission
curl --request POST \
  --url https://api.inorbit.ai/missions \
  --header 'Content-Type: application/json' \
  --header 'x-auth-inorbit-app-key: <api-key>' \
  --data '
{
  "robotId": "<string>",
  "missionId": "<string>",
  "status": "<string>",
  "state": "<string>",
  "inProgress": true,
  "label": "<string>",
  "createdTs": 123,
  "startTs": 123,
  "endTs": 123,
  "completedPercent": 123,
  "estimatedDurationSecs": 123,
  "tasks": [
    {
      "taskId": "<string>",
      "status": "<string>",
      "inProgress": true,
      "completed": true,
      "label": "<string>",
      "updatedTs": 123,
      "startTs": 123,
      "endTs": 123,
      "completedPercent": 123,
      "estimatedDurationSecs": 123,
      "arguments": {}
    }
  ],
  "arguments": {},
  "data": {}
}
'
{
  "missionId": "<string>",
  "robotId": "<string>",
  "status": "<string>",
  "inProgress": true,
  "createdTs": 123,
  "tasks": [
    {
      "taskId": "<string>",
      "status": "<string>",
      "inProgress": true,
      "completed": true,
      "label": "<string>",
      "updatedTs": 123,
      "startTs": 123,
      "endTs": 123,
      "completedPercent": 123,
      "estimatedDurationSecs": 123,
      "arguments": {}
    }
  ],
  "state": "<string>",
  "label": "<string>",
  "startTs": 123,
  "endTs": 123,
  "completedPercent": 123,
  "estimatedDurationSecs": 123,
  "arguments": {},
  "data": {},
  "updatedTs": 123,
  "currentTaskId": "<string>"
}

Authorizations

x-auth-inorbit-app-key
string
header
required

InOrbit appKey authenticates API requests using a token.

You can obtain your appKey in the Authentication docs.

Body

application/json

Mission object to be created

robotId
string
required

Optional. The id of the robot associated to this mission. It can only be omitted for missions that have not yet been started.

missionId
string

Unique mission id

status
string

Optional. Mission status (error, warning, ok). Most of the times this value is not needed; it will be derived from status and other fields.

state
string

Optional. Mission state. For example "running", "stuck", "late". Mostly customer-dependent; although some states will have their own semantics (configurable).

inProgress
boolean

Optional. Whether this mission is still running. When inProgress is first changed to true, a startTs value is updated; and when changed from true to false, the endTs field is updated.

label
string

Optional. Mission description (in the PUT call, mission can be renamed).

createdTs
number

Optional. Creation time of a mission. It can only be set during mission creation. It defaults to current timestamp.

startTs
number

Optional. Start time (milliseconds, epoch time). Updates the time the mission actually started. Note that there is no need to update it manually if the flag inProgress is used in POST and PUT calls.

endTs
number

Optional. End time (milliseconds, epoch time). Updates the time the mission ended. Note that there is no need to update it manually if the flag inProgress is used in PUT calls.

completedPercent
number

Optional. Progress of the mission; number from 0.0 to 1.0. This value can be explicitly updated; but in most cases it is not necessary: it can be calculated based on completed tasks and milestones and their declared duration.

estimatedDurationSecs
number

Optional. Updates the mission estimated duration (in seconds).

tasks
object[]

List of mission tasks

arguments
object

Arguments passed to this mission. Free-form, key-value dictionary.

data
object

Metadata associated to this mission; including telemetry or results collected while running the mission. Free-form, key-value dictionary.

Response

A Mission object containing all mission's attributes

missionId
string
required

Unique mission id

robotId
string
required

Optional. The id of the robot associated to this mission. It can only be omitted for missions that have not yet been started.

status
string
required

Optional. Mission status (error, warning, ok). Most of the times this value is not needed; it will be derived from status and other fields.

inProgress
boolean
required

Is the robot currently executing the mission ?

createdTs
number
required

Mission creation timestamp

tasks
object[]
required

List of mission tasks

state
string

Optional. Mission state. For example "running", "stuck", "late". Mostly customer-dependent; although some states will have their own semantics (configurable).

label
string

Optional. Mission description (in the PUT call, mission can be renamed).

startTs
number

Mission last update timestamp

endTs
number

Mission last update timestamp

completedPercent
number

Progress of the mission

estimatedDurationSecs
number

Optional. Updates the mission estimated duration (in seconds).

arguments
object

Arguments passed to this mission. Free-form, key-value dictionary.

data
object

Metadata associated to this mission; including telemetry or results collected while running the mission. Free-form, key-value dictionary.

updatedTs
number

Mission last update timestamp

currentTaskId
string

Id of the task currently being executed by the robot