Getting Started¶
This section provides a quick way to invoke the ACS APIs using command-line tools.
Endpoint Configuration¶
The ACS API is deployed on-premises. Contact your system administrator for the actual endpoint address.
| Protocol | Endpoint (example) |
|---|---|
| gRPC | acs-api.your-site.local:443 |
| HTTP | http://acs-api.your-site.local:8080 |
Note
Replace the example endpoints above with the actual addresses provided by your administrator.
Invoking the APIs¶
There are two different ways to invoke the APIs: gRPC and plain HTTP (via gRPC-HTTP transcoding).
gRPC¶
Note
To invoke the gRPC APIs from the command line, grpcurl is used in the examples below. Make sure the CLI tool is installed in your environment prior to testing.
Get Online Robots¶
Retrieve all currently online robots:
grpcurl -plaintext -d '{}' \
acs-api.your-site.local:443 \
bearrobotics.api.acs.v0.services.APIService.GetOnlineRobots
Dispatch a Task Chain¶
Create a task chain with load and unload tasks:
grpcurl -plaintext -d '{
"taskChain": {
"areaId": 1,
"amrId": 0,
"priority": 10,
"taskSeq": "ORDER-001",
"name": "Pickup and Deliver"
},
"tasks": [
{
"taskType": "TASK_TYPE_LOAD",
"mapId": 1,
"endPointCode": "PICKUP_01"
},
{
"taskType": "TASK_TYPE_UNLOAD",
"mapId": 1,
"endPointCode": "DROPOFF_01"
}
]
}' acs-api.your-site.local:443 \
bearrobotics.api.acs.v0.services.APIService.AddTaskChain
Query Task Chain Status¶
Check the status of a task chain:
grpcurl -plaintext -d '{
"taskChainIds": [12345]
}' acs-api.your-site.local:443 \
bearrobotics.api.acs.v0.services.APIService.QueryTaskChain
Plain HTTP¶
All RPCs are also available via HTTP/JSON transcoding. See the API Reference for HTTP methods and paths.
Get Online Robots¶
Dispatch a Task Chain¶
curl -X POST http://acs-api.your-site.local:8080/task/add \
-H "Content-Type: application/json" \
-d '{
"taskChain": {
"areaId": 1,
"amrId": 0,
"priority": 10,
"taskSeq": "ORDER-001",
"name": "Pickup and Deliver"
},
"tasks": [
{
"taskType": "TASK_TYPE_LOAD",
"mapId": 1,
"endPointCode": "PICKUP_01"
},
{
"taskType": "TASK_TYPE_UNLOAD",
"mapId": 1,
"endPointCode": "DROPOFF_01"
}
]
}'