Update a waypoint by ID
PUT/waypoints/:waypointId
The Update Waypoint request allows you to update the information of an existing waypoint for current Active Map in ANSCER ANYA. This request takes in the waypoint's unique ID as a parameter, as well as any updated waypoint information in the form of a JSON object. This request can be used to update a waypoint's name, and category, dockMarker, and/or location.
Request
Path Parameters
The ID of the waypoint to retrieve, update or delete
Query Parameters
Optional boolean parameter. If set to true, the coordinate of the waypoint will be updated to the current robot pose.
- application/json
Body
required
Possible values: >= 3 characters and <= 50 characters
A unique name of the waypoint
Possible values: [normal, special, charging, home]
Dock marker number, this will be required if the waypoint type is charging or special.
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 500
Waypoint updated
- application/json
- Schema
- Example (from schema)
Schema
Possible values: >= 3 characters and <= 50 characters
Possible values: [normal, special, charging, home]
coordinate object
position objectrequired
orientation objectrequired
map object
Possible values: >= 3 characters and <= 50 characters
createdBy object
The user who created this waypoint
updatedBy object
The user who last updated this waypoint
The date and time this waypoint was created
The date and time this waypoint was last updated
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"category": "normal",
"dockMarker": 0,
"coordinate": {
"position": {
"x": 0,
"y": 0,
"z": 0
},
"orientation": {
"x": 0,
"y": 0,
"z": 0,
"w": 0
}
},
"map": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"properties": {},
"createdBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"updatedBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"createdAt": "2024-12-03T13:26:27.488Z",
"updatedAt": "2024-12-03T13:26:27.488Z"
}
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."
}
]
}
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "Name is required."
}
]
}
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."
}
Resource not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Resource not found."
}
{
"message": "Resource not found."
}
The Waypoint with given name already exists.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "The Waypoint with given name already exists."
}
{
"message": "The Waypoint with given name 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."
}