Fetch Environment Summary
Fetches a single summary object for a specific environment. Contains useful and relevant data/statistics that would otherwise be several separate API calls.
Requires the environments-view permission.
Environment Summary Object
- idstring
A unique identifier for the environment.
- stateobject
Information regarding the current state of the environment.
Show child fields - servicesobject
An object containing information about the service containers associated with this container. Each key is the name of a service, one of
discovery
,vpn
, orloadbalancer
.Show child fields - statsobject
Statistics about the containers and instances associated with this environment.
Show child fields
Returns
Returns an environment summary object, otherwise returns an Error.
GET /v1/environments/{ID}/summary
Example Request
$ curl https://api.cycle.io/v1/environments/5b9c2a77b6393d0001eb45fd/summary \-H"Authorization: Bearer API_KEY"\-H"X-Hub-Id=HUB_ID"
Example Response
{"data": {"id": "5cec602e4146380001934759","state": {"changed": "2019-05-27T22:09:50.393Z","job": {"id": "5cf19252db2ab00001fc0e32","queued": "2019-05-31T20:45:07.006Z","queue": "environment-5cec602e4146380001934759"},"current": "live"},"services": {"discovery": {"enable": true,"container_id": "5cec602edb2ab00001777d1e","state": {"changed": "2019-05-31T20:45:07.058Z","job": {"id": "","queued": "0001-01-01T00:00:00Z","queue": ""},"current": "running","desired": "running"}},"vpn": {"enable": true,"container_id": "5cf16e53db2ab00001fc0c8f","state": {"changed": "2019-05-31T20:45:07.36Z","job": {"id": "","queued": "0001-01-01T00:00:00Z","queue": ""},"current": "running","desired": "running"}},"loadbalancer": {"enable": true,"container_id": "5cec602edb2ab00001777d21","state": {"changed": "2019-05-31T20:45:07.366Z","job": {"id": "","queued": "0001-01-01T00:00:00Z","queue": ""},"current": "running","desired": "running"}}},"stats": {"containers": {"state": {"new": 0,"starting": 0,"running": 5,"stopping": 0,"stopped": 0,"deleting": 0},"total": 5,"available": 5},"instances": {"state": {"new": 0,"starting": 0,"reimaging": 0,"running": 5,"stopping": 0,"stopped": 0,"failed": 0,"deleting": 0},"total": 5,"available": 5}}}}