Create a new mission log
POST/mission-logs
Create a new mission log.
Request
- application/json
Body
required
missionId uuid
robotRequestId uuid
type stringrequired
Possible values: [robotRequest, mission]
Responses
- 201
- 400
- 401
- 403
- 409
- 500
Mission log created
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
_id uuid
missionId uuid
robotRequestId uuid
startedAt date-time
completedAt date-time
status string
Possible values: [pending, active, completed, aborted, cancelled]
completionPercentage number
progress object[]
state string
startedAt date-time
completedAt date-time
message string
completionPercentage number
type string
Possible values: [robotRequest, mission]
createdAt date-time
updatedAt date-time
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"missionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"robotRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"startedAt": "2024-12-03T13:25:44.904Z",
"completedAt": "2024-12-03T13:25:44.904Z",
"status": "pending",
"completionPercentage": 0,
"progress": [
{
"state": "string",
"startedAt": "2024-12-03T13:25:44.904Z",
"completedAt": "2024-12-03T13:25:44.904Z",
"message": "string",
"completionPercentage": 0
}
],
"type": "robotRequest",
"createdAt": "2024-12-03T13:25:44.904Z",
"updatedAt": "2024-12-03T13:25:44.904Z"
}
Bad Request due to validation errors in the request body
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "Name is required."
},
{
"field": "email",
"message": "Email must be a valid email address."
}
]
}
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "Name is required."
},
{
"field": "email",
"message": "Email must be a valid email address."
}
]
}
Unauthorized.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Authentication token not provided."
}
{
"message": "Authentication token not provided."
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
A mission log with the given details already exists.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "A mission log with the given details already exists."
}
{
"message": "A mission log with the given details already exists."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}
Loading...