List Environment Services

Each environment contains several "helper" services, such as load balancing or DNS discovery. This call lists the available services in the environment this instance is a part of.

Service Summary Attributes
  • container
    object

    A summary of the container for this service. Will contain all fields of a container resource, minus theidentifier, volumes, config, instances, stateful, and role properties.

  • instances
    array of objects

    An array of instances that exist for this service. Will contain all fields of an instance resource, minus theevents property.

Returns

Returns an object where the keys are the name of the services, and the value of each service is a container/instance summary. Otherwise returns an Error.

GET /v1/environment/services

Example Request
$ curl --unix-socket /var/run/cycle/api/api.sock http://internal.cycle/v1/environment/services \
-H "x-cycle-token: $CYCLE_API_TOKEN"
Example Response
{
"data": {
"discovery": {
"containers": {
"id": "3h2h4g4w1417597772g6e8k3",
"name": "Environment Discovery (DNS)",
"creator": {
"id": "3h2h4g4w1417597772g6e8k3",
"type": "environment"
},
"environment": {
"id": "3h2h4g4w1417597772g6e8k3",
"container_subnet": "9e9b",
"ipv6": {
"ip": "fd00::f4f0:9e9b:0:0",
"cidr": "fd00::f4f0:9e9b:0:0/96"
},
"legacy": null
},
"hub_id": "3h2h4g4w1417597772g6e8k3",
"image": {
"id": null,
"service": "discovery"
},
"state": {
"changed": "2020-01-14T19:12:13.67Z",
"job": {
"id": "",
"queued": "0001-01-01T00:00:00Z",
"queue": ""
},
"current": "running",
"desired": "running"
},
"events": {
"created": "2020-01-14T03:55:06.193Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z",
"started": "2020-01-14T19:12:13.651Z"
}
},
"instances": [
{
"id": "5e1d3b9adb2ab00001176d14",
"creator": {
"id": "3h2h4g4w1417597772g6e8k3",
"type": "environment"
},
"hub_id": "3h2h4g4w1417597772g6e8k3",
"container_id": "3h2h4g4w1417597772g6e8k3",
"location_id": "5c8058f44938523a9e339a63",
"environment": {
"id": "3h2h4g4w1417597772g6e8k3",
"network_subnet": "f4f0",
"subnet": "1",
"ipv6": {
"ip": "fd00::f4f0:9e9b:1:1",
"cidr": "fd00::f4f0:9e9b:1:1/112"
},
"legacy": null,
"mac_addr": "e6:a8:1b:7f:f5:ff",
"vxlan_tag": 18001
},
"stateful": null,
"provider": {
"identifier": "vultr",
"location": "3"
},
"server_id": "3h2h4g4w1417597772g6e8k3",
"ready_state": "active",
"hostname": "env-discovery",
"service": "discovery",
"state": {
"changed": "2020-01-14T19:12:13.487Z",
"job": {
"id": "",
"queued": "0001-01-01T00:00:00Z",
"queue": ""
},
"current": "running",
"health": null
}
}
]
},
"loadbalancer": {
"containers": {
"id": "5e1d3b9adb2ab00001176d18",
"name": "Environment Load Balancer",
"creator": {
"id": "3h2h4g4w1417597772g6e8k3",
"type": "environment"
},
"environment": {
"id": "3h2h4g4w1417597772g6e8k3",
"container_subnet": "d1ef",
"ipv6": {
"ip": "fd00::f4f0:d1ef:0:0",
"cidr": "fd00::f4f0:d1ef:0:0/96"
},
"legacy": null
},
"hub_id": "3h2h4g4w1417597772g6e8k3",
"image": {
"id": null,
"service": "loadbalancer"
},
"state": {
"changed": "2020-01-14T19:15:08.271Z",
"job": {
"id": "5e1e133adb2ab00001389b68",
"queued": "2020-01-14T19:15:06.359Z",
"queue": "environment-3h2h4g4w1417597772g6e8k3"
},
"current": "stopped",
"desired": "stopped"
},
"events": {
"created": "2020-01-14T03:55:06.337Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z",
"started": "2020-01-14T19:12:55.945Z"
}
},
"instances": [
{
"id": "5e1e12b1db2ab00001389b53",
"creator": {
"id": "3h2h4g4w1417597772g6e8k3",
"type": "environment"
},
"hub_id": "3h2h4g4w1417597772g6e8k3",
"container_id": "5e1d3b9adb2ab00001176d18",
"location_id": "3h2h4g4w1417597772g6e8k3",
"environment": {
"id": "3h2h4g4w1417597772g6e8k3",
"network_subnet": "f4f0",
"subnet": "1",
"ipv6": {
"ip": "fd00::f4f0:d1ef:1:1",
"cidr": "fd00::f4f0:d1ef:1:1/112"
},
"legacy": null,
"mac_addr": "92:9d:07:76:bf:ff",
"vxlan_tag": 18001
},
"stateful": null,
"provider": {
"identifier": "vultr",
"location": "3"
},
"server_id": "3h2h4g4w1417597772g6e8k3",
"ready_state": "active",
"hostname": "env-lb",
"service": "loadbalancer",
"state": {
"changed": "2020-01-14T19:15:08.104Z",
"job": {
"id": "",
"queued": "0001-01-01T00:00:00Z",
"queue": ""
},
"current": "stopped",
"health": null
}
}
]
},
"vpn": {
"containers": {
"id": "5e1d3b9adb2ab00001176d15",
"name": "Environment VPN",
"creator": {
"id": "3h2h4g4w1417597772g6e8k3",
"type": "environment"
},
"environment": {
"id": "3h2h4g4w1417597772g6e8k3",
"container_subnet": "65d5",
"ipv6": {
"ip": "fd00::f4f0:65d5:0:0",
"cidr": "fd00::f4f0:65d5:0:0/96"
},
"legacy": null
},
"hub_id": "3h2h4g4w1417597772g6e8k3",
"image": {
"id": null,
"service": "vpn"
},
"state": {
"changed": "2020-01-14T03:58:57.279Z",
"job": {
"id": "",
"queued": "0001-01-01T00:00:00Z",
"queue": ""
},
"current": "running",
"desired": "running"
},
"events": {
"created": "2020-01-14T03:55:06.264Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z",
"started": "2020-01-14T03:58:57.261Z"
}
},
"instances": [
{
"id": "5e1d3b9adb2ab00001176d17",
"creator": {
"id": "3h2h4g4w1417597772g6e8k3",
"type": "environment"
},
"hub_id": "3h2h4g4w1417597772g6e8k3",
"container_id": "5e1d3b9adb2ab00001176d15",
"location_id": "5c8058f44938523a9e339a63",
"environment": {
"id": "3h2h4g4w1417597772g6e8k3",
"network_subnet": "f4f0",
"subnet": "1",
"ipv6": {
"ip": "fd00::f4f0:65d5:1:1",
"cidr": "fd00::f4f0:65d5:1:1/112"
},
"legacy": null,
"mac_addr": "26:30:bf:bd:b4:ff",
"vxlan_tag": 18001
},
"stateful": null,
"provider": {
"identifier": "vultr",
"location": "3"
},
"server_id": "3h2h4g4w1417597772g6e8k3",
"ready_state": "active",
"hostname": "env-vpn",
"service": "vpn",
"state": {
"changed": "2020-01-14T03:58:57.096Z",
"job": {
"id": "",
"queued": "0001-01-01T00:00:00Z",
"queue": ""
},
"current": "running",
"health": null
}
}
]
}
}
}