Professional Documents
Culture Documents
Overview
The SRD system provides a REST style Web API, which provides the following functions:
Create, query and cancel waybills.
Create and query the waybill sequence.
Query the running information of the robot, change the online status of the robot, etc.
Changing scene elements, such as disabling paths.
In this protocol, the contents of HTTP requests and responses are JSON structures. The encoding used
can be UTF-8, UTF-16 or UTF-32. Timestamps are encoded using ISO 8601; the timezone used is
UTC (Coordinated Universal Time).
The TCP port to be used for HTTP requests depends on the configuration of the SRD and is 55200 by
default. The corresponding request path for each function will be described below.
This agreement corresponds to SRD version 3.0.63 and above.
Copyright © 2012 - 2022 by Fraunhofer IML
Copyright © 2020 – 2022 Seer Group.
basic path
[ Base URL: localhost:7100/api/route ]
For example, for a program 192.168.1.100 whose , the basic path of the API
is http://192.168.1.100:7100/api/route/ .
HTTP Verbs
verb Description
ask
Function: Get the collection of waybills
method: GET
Interface Description: /transportOrders
GET http://host:7100/api/route/transportOrders
Parameter introduction
Filter the waybill by the name of the robot that actually executes
processing Vehicle string
the waybill
category string Filter the waybill based on the business type of the waybill
response
Responses Code 200
example response
{
"pageNo": 1,
"pageSize": 1,
"page": [
{
"name": "TOrder-01",
"category": "Park",
"creationTime": "2018-05-17T06:42:40.396Z",
"deadline": "2018-05-17T06:42:40.396Z",
"finishedTime": "2018-05-17T06:42:40.396Z",
"state": "RAW",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01",
"destinations": [
{
"locationName": "Storage-01",
"operation": "Store",
"state": "PRISTINE",
"properties": [
{
"key": "key1",
"value": "value1"
}
]
}
],
"dependencies": [
"TOrder-002"
],
"wrappingSequence": "Sequence-0001",
"dispensable": true
}
],
"total": 1
}
Parameter interpretation
maximum: 2147483647
page index
minimum: 1
maximum: 2147483647
pageSize * integer 1
Each page contains the number of
waybill data
string($date- 2018-05-
deadline Waybill cut-off time (UTC time zone)
time) 17T06:42:40.396Z
be allocated.
BEING_PROCESSED:
The waybill is being
executed.
WITHDRAWN: The
waybill is being withdrawn.
FINISHED: final state, the
waybill has been executed
successfully.
FAILED: Final status, the
waybill has been withdrawn
and marked as failed.
UNROUTABLE: final
state. The SRD system was
unable to route this
shipment. When this status
occurs, check the wiring
topology of the scene.
PRISTINE: subtask in
initial state
ACTIVE: The subtask is
active
TRAVELLING: The robot
is in the process of going to
the target point of the
subtask
OPERATING: The robot
has reached the target point
of the subtask and is
performing an operation
FINISHED: The subtask is
complete
FAILED: The subtask has
failed
Filter the waybill by the name of the robot that actually executes
processing Vehicle string
the waybill
category string Filter the waybill based on the business type of the waybill
response
Responses Code 200
example response
{
"pageNo": 1,
"pageSize": 1,
"page": [
{
"name": "TOrder-01",
"category": "Park",
"creationTime": "2018-05-17T06:42:40.396Z",
"deadline": "2018-05-17T06:42:40.396Z",
"finishedTime": "2018-05-17T06:42:40.396Z",
"state": "RAW",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01",
"destinations": [
{
"locationName": "Storage-01",
"operation": "Store",
"state": "PRISTINE",
"properties": [
{
"key": "key1",
"value": "value1"
}
]
}
],
"dependencies": [
"TOrder-002"
],
"wrappingSequence": "Sequence-0001",
"dispensable": true
}
],
"total": 1
}
Parameter interpretation
minimum: 1
PageNo * integer maximum: 2147483647 1
page index
waybill data
minItems: 0_maxItems:
Page * array 2147483647 -
waybill data page
minItems: 1_maxItems:
2147483647
destinations The sequence of target
workstations contained in the
waybill
minItems: 0_maxItems:
2147483647
properties string
The meta attribute of the waybill
subtask
minItems: 0_maxItems:
2147483647
Waybill dependency. Before
dependencies string TOrder-002]
executing this waybill, the list of
names of the waybills that have
been executed is required
ask
Function: Get the waybill with the specified name
method: GET
Interface Description: /transportOrders/{name}
GET "http://host:7100/api/route/transportOrders/{name}"
Parameter introduction
name string The name of the waybill, the name of the waybill cannot be repeated
response
Responses Code 200
example response
{
"name": "TOrder-01",
"category": "Park",
"creationTime": "2018-05-17T06:42:40.396Z",
"deadline": "2018-05-17T06:42:40.396Z",
"finishedTime": "2018-05-17T06:42:40.396Z",
"state": "RAW",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01",
"destinations": [
{
"locationName": "Storage-01",
"operation": "Store",
"state": "PRISTINE",
"properties": [
{
"key": "key1",
"value": "value1"
}
]
}
],
"dependencies": [
"TOrder-002"
],
"wrappingSequence": "Sequence-0001",
"dispensable": true
}
404
Parameter interpretation
successfully.
- FAILED: Final status, the waybill
has been withdrawn and marked as
failed.
- UNROUTABLE: final state. The
SRD system was unable to route
this shipment. When this status
occurs, check the wiring topology
of the scene.
minItems: 1_maxItems:
2147483647
destinations The sequence of target
workstations contained in the
waybill
minItems: 0_maxItems:
2147483647
properties string
The meta attribute of the waybill
subtask
minItems: 0_maxItems:
2147483647
Waybill dependency. Before
dependencies string TOrder-002]
executing this waybill, the list of
names of the waybills that have
been executed is required
ask
Function: Create a new waybill with the specified name
method:POST
Interface Description: /transportOrders/{name}
POST "http://host:7100/api/route/transportOrders/{name}"
Parameter introduction
properties array Meta property of the waybill. You can not pass this
This parameter is deprecated, field, or the value of
version 3.0.127 and later, it is the field is [].
no longer recommended to use
this field, so as not to cause
unnecessary problems.
request example
{
"deadline": "2018-05-17T06:42:40.396Z",
"intendedVehicle": "AMB-01",
"category": "-",
"wrappingSequence": "",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "Wait",
"properties": [
{
"key": "duration",
"value": "2000"
}
]
}
],
"properties":[],
"dependencies": []
}
Notice:
1. If specified intendedVehicle , will force the waybill to be assigned to this robot. If this field is
not specified, the system will automatically assign a robot to the waybill
2. If not specified category , the system will default category to "-"
3. If specified wrappingSequence , the waybill will be added to this waybill sequence. If the
specified waybill sequence does not exist, a 404 exception will be returned
response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown location 'Storage 01'."
]
Application example
common operation
type
Field Name of required Defaults Remark
data
Operation
description SetDO string yes - -
(operation)
【Example of request】
1. LOC-AP1 After letting any robot reach, trigger DO1 (its index is 1).
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "SetDO",
"properties": [
{
"key": "1",
"value": "true"
}
]
}
]
}
type
Default
Field Name of required Remark
s
data
Operation
description wait string yes none -
(operation)
【Example of request】
1. LOC-AP1After letting any robot arrive at , wait 5 seconds.
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "Wait",
"properties": [
{
"key": "duration",
"value": "5000"
}
]
}
]
}
type
Field Name of required Defaults Remark
data
Operation
description WaitKey string yes none -
(operation)
Operational The index of string yes none When the specified digital
properties the car body input reaches the target
DI value, the wait action
ends.
Its value is a Boolean
value expressed as a
(indicated by string;
a string) "true" means the desired
target DI is triggered;
"false" means the desired
target DI is not triggered.
(properties)
After the robot waits for
this time, it ends the
waiting action directly.
infinity
Its value is a non-negative
timeout string no (no
integer represented as a
timeout)
string.
The unit is milliseconds
(ms).
【Example of request】
1. LOC-AP1After having any robot reach , monitor the state of DI3 (its index is 3 ) until it is
triggered.
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "WaitKey",
"properties": [
{
"key": "3",
"value": "true"
}
]
}
]
}
2. LOC-AP1After having any robot arrive at , wait for DI3 (which has index 3 ) to be triggered
with a timeout of 10 seconds.
{
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "WaitKey",
"properties": [
{
"key": "3",
"value": "true"
},
{
"key": "timeout",
"value": "10000"
}
]
}
]
}
type
Field
of required Defaults Remark
Name
data
Operation
description JackLoad string yes - -
(operation)
【Example of request】
1. Let the jacking truck Jack-01go to LOC-AP1 to pick up the goods, and no identification is
required.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackLoad",
"properties": []
}
]
}
2. Let the jacking truck Jack-01go to LOC-AP1 to pick up the goods, and need to load the
file s0002.shelffor identification.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackLoad",
"properties": [
{
"key": "recognize",
"value": "false"
},
{
"key": "recfile",
"value": "shelf/s0002.shelf"
}
]
}
]
}
type
Field
of required Defaults Remark
Name
data
Operation
description JackUnload string yes none -
(operation)
【Request example】
Let the jacking truck Jack-01go to LOC-AP1 to release the goods, and no identification is required.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackLoad",
"properties": []
}
]
}
type
Field
of required Defaults Remark
Name
data
Operation
Jack
description string yes none Lift to the specified height.
Height
(operation)
[Request example]
Ask the jacking vehicle Jack-01to LOC-AP1lift the jacking mechanism to 0.5meters without
identification.
{
"intendedVehicle": "Jack-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "JackHeight",
"properties": [
{
"key": "jack_height",
"value": "0.5"
}
]
}
]
}
type of
Field Name required Defaults Remark
data
Operation RollerPreLoad string yes none The rollers rotate and are
description ready to be loaded with
(operation) goods.
【Example of request】
1. Let the single-roller Roller-01robot LOC-AP1pre-load the load, the loading point is located on
the left side of the robot, and does not need to be identified.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerPreLoad",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}
Field type of
required Defaults Remark
Name data
Operation
description RollerLoad string yes none -
(operation)
【Example of request】
1. Let the single-roller robot Roller-01carry LOC-AP1the goods. The loading point is located on
the left side of the robot and does not need to be identified.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerLoad",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}
Operation
description RollerUnload string yes none -
(operation)
【Example of request】
1. Let the single-roller Roller-01robot LOC-AP1unload the goods. The unloading point is located
on the left side of the robot and does not need to be identified.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerUnload",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}
Operation
Roller
description string yes none -
Roll
(operation)
【Example of request】
1. Once the single-roller robot Roller-01reaches LOC-AP1, keep the roll rolling from left to right.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerRoll",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}
Field type of
required Defaults Remark
Name data
【Example of request】
1. After the single-roller robot Roller-01reaches LOC-AP1, lower the side baffles and keep the
roll rolling from left to right.
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerPass",
"properties": [
{
"key": "direction",
"value": "left"
}
]
}
]
}
Field type of
required Defaults Remark
Name data
Operational
properties none none none none -
(properties)
【Example of request】
1. Have the single-roller Roller-01robot LOC-AP1stop turning the rolls at .
{
"intendedVehicle": "Roller-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "RollerStop",
"properties": []
}
]
}
12. forklift
Forklift pickup
【Parameter Description】
Operation
description ForkLoad string yes none Forklift picks up cargo.
(operation)
【Example of request】
1. Ask the forklift CDD14-01to LOC-AP1pick up the goods. Before picking up the 0.7goods , the
required height of the fork is 0.9meters.
{
"intendedVehicle": "CDD14-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkLoad",
"properties": [
{
"key": "start_height",
"value": "0.7"
},
{
"key": "end_height",
"value": "0.9"
},
{
"key": "recognize",
"value": "false"
}
]
}
]
}
Forklift delivery
【Parameter Description】
Field type of
required Defaults Remark
Name data
Operation
description ForkUnload string yes none Forklift unloads cargo.
(operation)
【Example of request】
1. Let the forklift CDD14-01go to LOC-AP1unload the goods. The height of the fork before
unloading is required to be 0.35meters , and the height of the fork after unloading is required
to be 0.2meters. During the unloading process, no identification is required.
{
"intendedVehicle": "CDD14-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkUnload",
"properties": [
{
"key": "start_height",
"value": "0.35"
},
{
"key": "end_height",
"value": "0.2"
},
{
"key": "recognize",
"value": "false"
}
]
}
]
}
type
Field
of required Defaults Remark
Name
data
Operation
description ForkLoad string yes none Forklift picks up cargo.
(operation)
【Example of request】
1. Let Di Niu DN-01go to LOC-AP1pick up the goods. During the pick-up process, no
identification is required.
{
"intendedVehicle": "DN-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkLoad",
"properties": [
{
"key": "recognize",
"value": "false"
}
]
}
]
}
type
Field Default
of required Remark
Name s
data
Operation
description ForkUnload string yes none Forklift unloads cargo.
(operation)
【Example of request】
1. Let Di Niu DN-01go to LOC-AP1unload, during the unloading process, no identification is
required.
{
"intendedVehicle": "DN-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "ForkUnload",
"properties": [
{
"key": "recognize",
"value": "false"
}
]
}
]
}
14. Cancel the waybill with the specified name
ask
Function: cancel the waybill with the specified name
method:POST
Interface Description: /transportOrders/{name}/withdrawal
POST "http://host:7100/api/route/transportOrders/{name}/withdrawal"
Parameter introduction
2018-05-
name * ** The name of the waybill
17T06:42:40.396Z
request example
POST "http://host:7100/transportOrders/test/withdrawal?immediate=true&disableVehicle=false"
response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown transport order 'TOrder-01'."
]
15. Deadline for updating the waybill with the specified name
ask
Function: Update the cut-off time of the waybill with the specified name
method:PUT
Interface Description: /transportOrders/{name}
PUT "http://host:7100/api/route/transportOrders/{name}/deadline"
Parameter introduction
request example
PUT "http://localhost:7100/api/route/transportOrders/test/deadline?newValue=2018-05-17T06%3A42%3A40.396Z"
Response
16. Robot
1. Get the information collection of the robot
ask
Function: Get the information collection of the robot
method:GET
Interface Description: /vehicles
GET "http://host:7100/api/route/vehicles"
Parameter introduction
response
Responses Code 200
example response
[
{
"name": "AMB-01",
"properties": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"categories": [
"groupA"
],
"energyLevelGood": "90",
"energyLevelCritical": "30",
"energyLevelFullyRecharged": "95",
"energyLevelSufficientlyRecharged": "35",
"energyLevel": "60",
"integrationLevel": "TO_BE_IGNORED",
"procState": "UNAVAILABLE",
"transportOrder": "TOrder-01",
"orderSequence": "TOrder-01",
"currentDestination": "Location-01",
"unfinishedSteps": [
"LM11 --- LM12"
],
"paused": true,
"loadDevices": [
{
"label": "basket",
"full": true
}
],
"errorInfos": [
{
"timestamp": "2018-05-17T06:42:40Z",
"count": 1,
"level": "fatal, error, warning, info, etc.",
"message": "Alarm code + alarm content "
}
],
"owner": "srd@localhost",
"isDominating": true,
"allocations": [
"LM11 --- LM12"
],
"adapterEnabled": true,
"currentPosition": "LM01",
"state": "UNKNOWN"
}
]
Parameter interpretation
Exampl
name type Description
e
AMB-
name string the name of the robot
01
ask
Function: Get the information of the robot with the specified name
method:GET
Interface Description: /vehicles/{name}
GET "http://host:7100/api/route/vehicles/AMB-01"
Parameter introduction
response
Responses Code 200
example response
{
"name": "AMB-01",
"properties": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"categories": [
"groupA"
],
"energyLevelGood": "90",
"energyLevelCritical": "30",
"energyLevelFullyRecharged": "95",
"energyLevelSufficientlyRecharged": "35",
"energyLevel": "60",
"integrationLevel": "TO_BE_IGNORED",
"procState": "UNAVAILABLE",
"transportOrder": "TOrder-01",
"orderSequence": "TOrder-01",
"currentDestination": "Location-01",
"unfinishedSteps": [
"LM11 --- LM12"
],
"paused": true,
"loadDevices": [
{
"label": "basket",
"full": true
}
],
"errorInfos": [
{
"timestamp": "2018-05-17T06:42:40Z",
"count": 1,
"level": "fatal, error, warning, info, etc.",
"message": "Alarm code + alarm content "
}
],
"owner": "srd@localhost",
"isDominating": true,
"allocations": [
"LM11 --- LM12"
],
"adapterEnabled": true,
"currentPosition": "LM01",
"state": "UNKNOWN"
}
Parameter interpretation
Exampl
name type Description
e
AMB-
name string the name of the robot
01
transportOrder string($nullabl The name of the shipment that the robot TOrder-
e) is executing. null means the robot is not 01
Exampl
name type Description
e
ask
Function: Get the information collection of robot details. The robot details information is a
json structure, including a series of information such as the actual coordinates of the robot,
battery voltage and current, digital sensor status, and alarm status. This information does not
have a dedicated schema, and fields will be added as the Robokit version increases.
method:GET
Interface Description: /vehicleDetails
GET "http://host:7100/api/route/vehicleDetails"
Parameter introduction
None
response
Responses Code 200
example response
{
"DI": [false, false, false, false, false, false, false, false, false],
"angle": -3.1369,
"battery_level": 0.72,
"battery_temp": 27.0,
"blocked": false,
"brake": false,
"charging": false,
"confidence": 0.9823,
"current_map": "2020724",
"current_station": "AP146",
"dispatch_mode": 1,
"dispatch_state": 3,
"emergency": false,
"errorinfo": [
{
"code": 55001,
"count": 1,
"level": "Warning",
"message": "The robot is in the dispatching state. If you need to control, please regain control and go offline during
dispatching.",
"timestamp": "2020-09-11T18:11:15.128Z"
}
],
"map_version": "v1.0.6",
"model": "AMB-150-D",
"model_version": "v3.0.2",
"odo": 55910.419,
"pause": false,
"time": 35023398,
"today_odo": 2345.569,
"total_time": 2600814186,
"vehicle_id": "AMB1",
"version": "v3.2.6.46",
"voltage": 51.212,
"vx": -0.0,
"vy": -0.0,
"w": -0.0,
"x": -25.1966,
"y": 3.835
}
Parameter interpretation
name Description
DI DI state
confidence Confidence
_Control mode_
0 = stand-alone mode
dispatch_mode
1 = dispatch
mode_2 = dispatch mode but lost connection with dispatch system_
_Robot status_
0=UNKNOWN
1=UNAVAILABLE
dispatch_state 2=ERROR
3=IDLE
4=EXECUTING
_5=CHARGING _
vx _X direction speed _
vy _Y direction speed _
w _angle _
x X coordinate
y Y coordinate
ask
Function: Get the information collection of robot details. The robot details information is a
json structure, including a series of information such as the actual coordinates of the robot,
battery voltage and current, digital sensor status, and alarm status. This information does not
have a dedicated schema, and fields will be added as the Robokit version increases.
method:GET
Interface Description: /vehicleDetails/{name}
GET "http://host:7100/api/route/vehicleDetails/AMB-01"
Parameter introduction
none
response
Responses Code 200
example response
{
"DI": [false, false, false, false, false, false, false, false, false],
"angle": -3.1369,
"battery_level": 0.72,
"battery_temp": 27.0,
"blocked": false,
"brake": false,
"charging": false,
"confidence": 0.9823,
"current_map": "2020724",
"current_station": "AP146",
"dispatch_mode": 1,
"dispatch_state": 3,
"emergency": false,
"errorinfo": [
{
"code": 55001,
"count": 1,
"level": "Warning",
"message": "The robot is in the dispatching state. If you need to control, please regain control and go offline during
dispatching.",
"timestamp": "2020-09-11T18:11:15.128Z"
}
],
"map_version": "v1.0.6",
"model": "AMB-150-D",
"model_version": "v3.0.2",
"odo": 55910.419,
"pause": false,
"time": 35023398,
"today_odo": 2345.569,
"total_time": 2600814186,
"vehicle_id": "AMB1",
"version": "v3.2.6.46",
"voltage": 51.212,
"vx": -0.0,
"vy": -0.0,
"w": -0.0,
"x": -25.1966,
"y": 3.835
}
Parameter interpretation
name Description
DI DI state
confidence Confidence
_Control mode_
0 = stand-alone mode
dispatch_mode
1 = dispatch
mode_2 = dispatch mode but lost connection with dispatch system_
name Description
_Robot status_
0=UNKNOWN
1=UNAVAILABLE
dispatch_state 2=ERROR
3=IDLE
4=EXECUTING
_5=CHARGING _
vx _X direction speed _
vy _Y direction speed _
name Description
w _angle _
x X coordinate
y Y coordinate
ask
Function: Obtain the information collection of all robot state changes, and the change record
information is a json structure.
method: GET
Interface Description: /api/event-log/vehicles
GET "http://localhost:7100/api/event-log/vehicles?pageNo=1&pageSize=2"
Parameter introduction
pageNo: page number
pageSize: page size, how many pieces of data each page contains
Other field queries are not supported, and the maximum page size should not exceed 5000, and the
cycle of continuously calling this interface should not be too long, and the shortest interval is about 2
seconds before calling the second time. Failure to do so may put request pressure on the system.
response
The response code is 200.
example response
{
"total": 30856,
"page": [
{
"id": "631fefec5410225c48390117",
"vehicle": "WT-CPD01",
"fromState": "UNKNOWN",
"toState": "IDLE",
"duration": 2897,
"robotTask": "",
"transportOrder": "",
"orderSequence": "",
"startOn": "2022-09-13T02:50:17.266Z",
"endOn": "2022-09-13T02:50:20.163Z"
},
{
"id": "631fefec5410225c48390118",
"vehicle": "WB-CPD03",
"fromState": "UNKNOWN",
"toState": "IDLE",
"duration": 2980,
"robotTask": "",
"transportOrder": "",
"orderSequence": "",
"startOn": "2022-09-13T02:50:17.201Z",
"endOn": "2022-09-13T02:50:20.181Z"
}
],
"pageNo": 1,
"pageSize": 2,
"pageNum": 15428
}
Response body parameter
number
total total number of entries
type
number
pageNo. page number
type
number
pageSize page size
type
type
ask
Function: Get a collection of tasks
method:GET
Interface Description: api/stats-error/details
GET "http://127.0.0.1:7100/api/stats-error/details?level=Year&vehicle=AMB-01&time=2021&pageSize=2&pageNo=1"
Parameter introduction
name type Description
Specify the statistical time, which should correspond to the level , such as
time string
Year => 2021, Month => 2021-01 and so on
The example
queries all tasks in January, including the selected time, with one data item per page.
GET "http://127.0.0.1:7100/api/stats-error/details?level=Year&vehicle=AMB-01&time=2021&pageSize=2&pageNo=1"
response
{
"total": 6,
"page": [
{
"code": "54025",
"message": "Motor Disable:motor,motor1",
"last": "2021-08-24T15:00:00Z",
"count": 3
},
{
"code": "52001",
"message": "robot model uninitialized",
"last": "2021-08-24T15:00:00Z",
"count": 3
}
],
"pageNo": 1,
"pageSize": 2,
"pageNum": 3
}
response parsing
Specify the statistical time, which should correspond to the level , such as
time string
Year => 2021, Month => 2021-01 and so on
page field
ask
Function: Get the cumulative collection of robot errors
method:GET
Interface Description: api/stats-error-trace
GET "http://127.0.0.1:7100/api/stats-error-trace?levels=errors&codes=52000,52010&vehicles=AMB-01,AMB-
02&startOnStart=2021-08-24&startOnEnd=2021-08-24&pageNo=1&pageSize=2"
Parameter introduction
The example
queries robots AMB-01, AMB-02 on 2021-08-24 and 2021-08-25, the code is 52000, 52010 error
message, 2 pieces of data per page.
GET "http://127.0.0.1:7100/api/stats-error-trace?levels=errors&codes=52000,52010&vehicles=AMB-01,AMB-
02&startOnStart=2021-08-24&startOnEnd=2021-08-25&pageNo=1&pageSize=2"
response
{
"total": 12,
"page": [
{
"id": "612513fa6f89197fb99d696b",
"vehicle": "AMB-01",
"code": "52000",
"level": "errors",
"message": "mode is not activated",
"duration": 2698394,
"startOn": "2021-08-24T15:00:00Z",
"endOn": "2021-08-24T15:44:58.394Z"
},
{
"id": "612513fa6f89197fb99d696f",
"vehicle": "AMB-01",
"code": "52010",
"level": "errors",
"message": "robot model uninitialized, can not upload",
"duration": 2698394,
"startOn": "2021-08-24T15:00:00Z",
"endOn": "2021-08-24T15:44:58.394Z"
}
],
"pageNo": 1,
"pageSize": 2,
"pageNum": 6
}
response parsing
page field
ask
Function: cancel the waybill being executed by the specified robot, terminate the execution
of the current waybill, but will not delete the waybill from the system and database
method: POST
Interface Description: /vehicles/{name}/withdrawal
POST "http://host:7100/api/route/vehicles/{name}/withdrawal"
Parameter introduction
2018-05-
name * ** The name of the waybill
17T06:42:40.396Z
disableVehicle boolean If yes true, while canceling the waybill, SRD will false
change the online status of the robot executing the
name type Description Default
waybill toTO_BE_RESPECTED
request example
POST "http://host:7100/vehicles/test/withdrawal?immediate=true&disableVehicle=false"
response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
9. Pause or resume the specified robot
ask
Function: Pause or continue the specified robot
method: POST
Interface Description: /vehicles/{name}/pause
PUT "http://host:7100/api/route/vehicles/{name}/pause"
Parameter introduction
request example
POST "http://localhost:7100/api/route/vehicles/AMB-01/pause?newValue=true"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Parameter 'newValue' is illegal."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
10. Pause or resume all bots
ask
Function: Pause or continue all robots
method:POST
Interface Description: /vehicles/pause
PUT "http://host:7100/api/route/vehicles/pause"
Parameter introduction
request example
POST "http://localhost:7100/api/route/vehicles/pause?newValue=true"
response
Responses Code 200
example response
请求已成功
ask
Function: Set the online status for the specified robot
method: PUT
Interface Description: /vehicles/{name}/integrationLevel
PUT "http://host:7100/api/route/vehicles/{name}/integrationLevel"
Parameter introduction
request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/integrationLevel?newValue=TO_BE_UTILIZED"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Parameter 'newValue' is illegal."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
ask
Function: Set online status for all robots
method:PUT
Interface Description: /vehicles/integrationLevel
PUT "http://host:7100/api/route/vehicles/integrationLevel"
Parameter introduction
request example
PUT "http://localhost:7100/api/route/vehicles/integrationLevel?newValue=TO_BE_UTILIZED"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Parameter 'newValue' is illegal."
]
13. Update the type of business that the robot can operate.
ask
Function: Update the business types that the robot can operate
method: PUT
Interface Description: /vehicles/{NAME}/processableCategories
PUT "http://host:7100/api/route/vehicles/{NAME}/processableCategories"
Parameter introduction
name type Description example
request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/processableCategories?newValues=fork"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Missing query parameter newValues."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
ask
Function: Update the robot's "full battery threshold"
method:PUT
Interface Description: /vehicles/{NAME}/energyLevelGood
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelGood"
Parameter introduction
name type Description example
When the robot's power is lower than this value but higher than
newValue * integer energyLevelCritical, the robot will go to the charging station to
charge when it is idle.
request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelGood?newValue=85"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
ask
Function: Update the robot's "battery alarm threshold"
method:PUT
Interface Description: /vehicles/{NAME}/energyLevelCritical
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelCritical"
Parameter introduction
name type Description example
When the power of the robot is lower than this value, the robot
newValue * integer will be forced to go to the charging station to charge after the
current business is over.
request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelCritical?newValue=25"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
ask
Function: Update the robot's "charge to usable threshold"
method:PUT
Interface Description: /vehicles/{NAME}/energyLevelSufficientlyRecharged
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelSufficientlyRecharged"
Parameter introduction
name type Description example
request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelSufficientlyRecharged?newValue=30"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
ask
Function: Update the robot's "charge to full power threshold"
method:PUT
Interface Description: /vehicles/{NAME}/energyLevelFullyRecharged
PUT "http://host:7100/api/route/vehicles/{NAME}/energyLevelFullyRecharged“
Parameter introduction
name type Description example
request example
PUT "http://localhost:7100/api/route/vehicles/AMB-01/energyLevelFullyRecharged?newValue=98"
response
Responses Code 200
example response
请求已成功
Responses Code 400
example response
[
"Bad energy level."
]
Responses Code 404
example response
[
"Unknown vehicle 'AMB-01'."
]
18. Task
Parameter introduction
createdOnStart string Filter tasks whose creation time is greater than or equal to this time
createdOnEnd string Filter tasks whose creation time is less than or equal to this time
The example
queries all tasks in January, including the selected time, with one data item per page.
GET "http://127.0.0.1:7100/api/robot-task?pageNo=1&pageSize=1&createdOnStart=2022-01-01&createdOnEnd=2022-
01-31"
response
{
"total": 40,
"page": [
{
"id": "6320243f1149e33d763cb664",
"def": "",
"createdOn": "2022-09-13T06:33:35.697Z",
"modifiedOn": "2022-09-13T06:34:39.266Z",
"finishedOn": "2022-09-13T06:34:39.267Z",
"duration": 63570,
"state": 1000,
"outOrderNo": null,
"persistedVariables": {},
"workTypes": [],
"workStations": [],
"priority": 0,
"noTransport": false,
"errorInfo": "",
"transports": [
{
"taskId": "6320243f1149e33d763cb664",
"routeOrderName": "6320243f1149e33d763cb666",
"category": "",
"deadline": null,
"intendedRobot": "",
"processingRobot": "WB-CPD02",
"processingRobotAssignedOn": "2022-09-13T06:33:38.800Z",
"seqId": null,
"seqStartSentOn": null,
"timeCost": 0,
"finishedOn": "2022-09-13T06:34:39.262Z",
"state": 1000,
"failReason": "",
"stages": [
{
"state": 1000,
"routeState": "FINISHED",
"location": "Check01",
"area": "",
"operation": "Wait",
"properties": "[]",
"blockReason": "",
"notice": "",
"timeCost": 63541,
"finishedOn": "2022-09-13T06:34:39.256Z"
}
]
}
]
}
],
"pageNo": 1,
"pageSize": 1,
"pageNum": 40
}
Task Basic Fields
name type Description
state integer Task status (0: created, 1000: successful, 1800: canceled, 2000: failed)
transports array Robot information collection (robot information used to record tasks)
state integer stage status, 0: created; 600: executing; 1000: successful; 2000: failed.
ask
Function: Get the waybill sequence with the specified name
method:GET
Interface Description: /orderSequences/{NAME}
GET "http://host:7100/api/route/orderSequences/{NAME}"
Parameter introduction
The name of the waybill sequence, the name of the waybill sequence cannot be
name string
repeated
response
Responses Code 200
example response
{
"name": "Sequence-01",
"orders": [
"Order-01"
],
"complete": true,
"finished": true,
"failureFatal": true,
"finishedIndex": 0,
"category": "Park",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01"
}
Parameter interpretation
Sequence-
name string The name of the waybill sequence
01
ask
Function: Create a new waybill sequence with the specified name
method:POST
Interface Description: /orderSequences/{NAME}
POST "http://host:7100/api/route/orderSequences/{NAME}"
category string (Optional) The overall business type in the waybill sequence
string($date-
deadline * Cut-off time for executing the waybill (UTC time zone)
time)
request example
{
"intendedVehicle": "AMB-01",
"category": "Park",
"failureFatal": true,
"complete": false,
"transports": [
{
"name": "Order-01",
"order": {
"deadline": "2018-05-17T06:42:40.396Z",
"intendedVehicle": "AMB-01",
"category": "Park",
"wrappingSequence": "Sequence-01",
"destinations": [
{
"locationName": "LOC-AP1",
"operation": "Wait",
"properties": [
{
"key": "duration",
"value": "2000"
}
]
}
],
"properties":[],
"dependencies": []
}
],
"properties": []
}
response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown location 'Storage 01'."
]
Responses Code 409
example response
[
"Order sequence 'Sequence-01' already exists."
]
Responses Code 500
example response
[
"string"
]
ask
Function: Get the collection of waybill sequences
method:GET
Interface Description: /orderSequences/{NAME}
GET "http://host:7100/api/route/orderSequences"
Parameter introduction
pageSize integer The page contains the maximum number of waybill sequences
name type Description
Filter the waybills by the name of the robot expected to execute the
intendedVehicle string
waybill sequence
Filter the waybills by the name of the robot that actually executed the
processing Vehicle string
waybill sequence
category string Filter the waybill by the business type of the waybill sequence
complete boolean Whether the waybill sequence has closed the waybill entry
If true, after any waybill in the sequence is canceled and reaches the
failureFatal boolean FAILED final state, SRD will cancel all other waybills in the
sequence and close the sequence entry
response
Responses Code 200
example response
{
"pageNo": 1,
"pageSize": 1,
"page": [
{
"name": "Sequence-01",
"orders": [
"Order-01"
],
"complete": true,
"finished": true,
"failureFatal": true,
"finishedIndex": 0,
"category": "Park",
"intendedVehicle": "AMB-01",
"processingVehicle": "AMB-01"
}
],
"total": 1
}
Parameter interpretation
Sequence-
name string The name of the waybill sequence
01
ask
Function: Close the waybill entry of the waybill sequence, please note that once the waybill
entry of the sequence is closed, the waybill entry cannot be opened again.
method:POST
Interface Description: /orderSequences/{NAME}/markComplete
POST "http://host:7100/api/route/orderSequences/{NAME}/markComplete"
Parameter introduction
request example
POST "http://host:7100/orderSequences/test/markComplete"
response
Responses Code 200
example response
请求已成功
ask
Function: Close and terminate the specified waybill sequence. When there is a waybill in the
sequence being executed by the robot (especially when the robot has already loaded the
goods), please call this API with caution and give full consideration to the upper-level
business logic.
method:POST
Interface Description: /orderSequences/{NAME}/markComplete
POST "http://host:7100/api/route/orderSequences/{NAME}/withdrawal"
Parameter introduction
2018-05-
name * ** The name of the waybill
17T06:42:40.396Z
disableVehicle boolean If yes true, while canceling the waybill sequence, false
name type Description Default
request example
POST "http://host:7100/orderSequences/test/withdrawal?immediate=true&disableVehicle=false"
response
Responses Code 200
example response
请求已成功
Responses Code 404
example response
[
"Unknown order sequence 'Sequence-01'."
]
Parameter introduction
request example
PUT "http://localhost:7100/api/route/paths/LM1-LM2/lock?newValue=true"
response
Responses Code 200
example response
请求已成功
2. Location
Get all location information
ask
Function: Get all location information
method:GET
Interface description: /store-site/_all . (root path is http://host:port/api )
GET "http://host:7100/api/store-site/_all
Parameter introduction
No parameters.
response
Responses Code 200
example response
[
{
"id": "LOC1", // 库位 ID 唯一值
"type": "PS", // 库位类型
"filled": false, // 占用状态,true 表示被占用
"content": "", // 库位上的货物信息
"locked": false, // 锁定状态,true 表示库位是被锁定的
"label": "Production line 1", // 库位的描述
"disabled": false, // 禁用状态,true 表示这个库位被禁用了,默认值为 false
"inputFailed": false, // SRD 和相关传感器的通信状态,true 表示 SRD 无法通过传感器获取库位状态。
"lockedBy": "" // 锁定当前库位的任务编号
},
{
"id": "LOC2",
"type": "PS",
"filled": false,
"content": "",
"locked": false,
"label": "Production line 2",
"disabled": false,
"inputFailed": false,
"lockedBy": ""
}
]
Parameter hint (TODO)
enum ActionStatus {
DONE,
EXECUTING,
FAILED
}
enum Status {
IDLE,
EXECUTING,
ERROR,
TIMEOUT
}
}
response:
Code message
404 The requested object could not be found among the currently enabled devices
Content example:
{
"name" : "SIG01",
"lastAction" : "wait",
"lastActionStatus" : "DONE",
"status" : "IDLE"
}
response:
Code message
404 The requested object could not be found among the currently enabled devices
parameter describe
actionThe name in this example , when the SRD queries the device server and the
wait response isActionStatus , it means that the waiting is over; when the returned is , it means that
it needs to continue waiting.DONEActionStatusEXECUTING
6. 2.2 The process of the robot waiting for the signal in the buffer position
1. When building a scene, the buffer bit is also a Location, and the Location needs to support
operation: Wait. The Location in the example below is temporarily named "L1".
2. In the device server, temporarily use "SIG01" to correspond to the corresponding signal at
"L1".
3. When the robot needs to wait in the buffer position, the business order (transportOrder) sent
by the host computer needs to include the following Destination
Destination:{
"locationName": "L1",
"operation": "Wait",
"properties":
[
{
"key": "device:requestAtSend",
"value": "SIG01:wait" // Inform the device server that the robot has entered the state of waiting for the signal
SIG01。
},
{
"key": "device:queryAtExecuted",
"value": "SIG01:wait" //Continuously query (interval about 1s) device server, signal SIG01 Whether it can be
released, that is, whether the robot can end the waiting 。
}
]
}
4. When the robot executes to the Destination, the scheduling server will send a request
POST "http://host:52000/devices/api/v1/locationDevices/SIG01?action=wait"
5. Then, the scheduling server will query the device server every about 1 second
GET "http://host:52000/devices/api/v1/locationDevices/SIG01?action=wait "
If the response body returned by the device server is
{
"name" : "SIG01",
"lastAction" : "wait",
"lastActionStatus" : "DONE",
"status" : "IDLE"
}
Then, the robot will think that it has received a confirmation signal and start to perform other
tasks. Otherwise, if " name", " " is inconsistent with the value in lastActionthe attribute " " , or " " is in a
state other than " ", the robot will continue to wait for the signal of the
device.device:queryLocationlastActionStatusDONE