Fetch Container

Fetch a specific container by ID.

Requires the containers-view permission.

query
  • include

    Accepted Values: creatorsimagesstack_buildsstacksenvironments

  • meta

    Accepted Values: instance_countsdomaindomainsips

Returns

Returns a container resource, otherwise returns an Error.

GET /v1/containers/{ID}

Example Request
$ curl https://api.cycle.io/v1/containers/5b9c2a77b6393d0001eb45fd \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-HUB-ID: HUB_ID"
Example Response
{
"data": {
"id": "5b9c2a77b6393d0001eb45fd",
"name": "Demo Name",
"identifier": "demo-container",
"creator": {
"id": "5b9c2a77b6393d0001eb45fd",
"type": "account"
},
"environment": {
"id": "5b9c2a77b6393d0001eb45fd",
"cluster": "production",
"container_subnet": "01d6",
"ipv6": {
"ip": "fd00::452a:d6:0:0",
"cidr": "fd00::452a:d6:0:0/96"
},
"legacy": {
"subnet": 221,
"ipv4": {
"ip": "10.222.221.0",
"cidr": "10.222.221.0/16"
}
}
},
"hub_id": "5b9c2a77b6393d0001eb45fd",
"image": {
"id": "5cf4c971b894940001b730a3",
"service": null
},
"config": {
"network": {
"public": "enable",
"hostname": "test-container",
"ports": [
"9000:3000"
]
},
"deploy": {
"instances": 1,
"constraints": {
"node": {
"tags": {
"any": [],
"all": []
}
},
"secrets": [],
"containers": []
}
},
"integrations": {
"lets_encrypt": {
"enable": false
}
}
},
"instances": 1,
"annotations": {},
"stateful": false,
"role": null,
"deprecate": false,
"state": {
"changed": "2019-06-18T04:49:55.336Z",
"current": "running",
"desired": "running"
},
"events": {
"created": "2019-06-03T07:17:20.411Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z",
"started": "0001-01-01T00:00:00Z"
}
}
}