Get container

Get container

curl -X GET "https://onfleet.com/api/v2/containers/workers/2Fwp6wS5wLNjDn36r1LJPscA" \
     -u "cd3b3de84cc1ee040bf06512d233719c:"
onfleet.containers.get(workers="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"
  }
}

For containers that do not exist, a ResourceNotFound error will be thrown instead of an InvalidContent.

The following examples show all of the possible container assignment cases.