Get container
Retrieve a container and its current list of assigned tasks. Use this endpoint to view all tasks currently assigned to a specific worker, team, or organization. The container type can be workers, teams, or organizations.
curl -X GET "https://onfleet.com/api/v2/containers/workers/2Fwp6wS5wLNjDn36r1LJPscA" \
-u "<your_api_key>:"onfleet.containers.get(container_type="workers", id="2Fwp6wS5wLNjDn36r1LJPscA")onfleet.containers.get("2Fwp6wS5wLNjDn36r1LJPscA", "workers");$onfleet->containers->get("2Fwp6wS5wLNjDn36r1LJPscA", "workers"){
"id": "NngUFbKT95Hly0PkFwPui*kg",
"timeCreated": 1518563775000,
"timeLastModified": 1518563775468,
"organization": "yAM*fDkztrT3gUcz9mNDgNOL",
"type": "WORKER",
"activeTask": null,
"tasks": [
"b3F~z2sU7H*auNKkM6LoiXzP",
"1ry863mrjoQaqMNxnrD5YvxH",
"l33lg5WLrja3Tft*MO383Gub"
],
"worker": "2Fwp6wS5wLNjDn36r1LJPscA"
}{
"code": "ResourceNotFound",
"message": {
"error": 1402,
"message": "The requested resource does not exist.",
"cause": "Container does not exist.",
"request": "3dc06b12-7d58-4df6-9e92-97f527a6002b"
}
}{
"code": "InvalidContent",
"message": {
"error": 1000,
"message": "The values of one or more parameters are invalid.",
"cause": "Invalid container identifier.",
"request": "c2042f90-80b0-4404-81ea-9de20296846a"
}
}If the container does not exist, a ResourceNotFound error will be returned. If the container identifier is invalid or improperly formatted, an InvalidContent error will be returned.
