'.. http:get:: /debug/circuits
A GET request to this endpoint returns information about the built circuits in the tunnel community.
**Example request**:
.. sourcecode:: none
curl -X GET http://localhost:8085/debug/circuits
**Example response**:
.. sourcecode:: javascript
"circuits": [
"id": 1234,
"state": "EXTENDING",
"goal_hops": 4,
"bytes_up": 45,
"bytes_down": 49,
"created": 1468176257,
"hops": [{
"host": "unknown"
"host": "39.95.147.20:8965"'

def render_GET(self, request):

    tunnel_community = self.get_tunnel_community()
    if (not tunnel_community):
        request.setResponseCode(http.NOT_FOUND)
        return json.dumps({'error': 'tunnel    community    not    found'})
    circuits_json = []
    for (circuit_id, circuit) in tunnel_community.circuits.iteritems():
        item = {'id': circuit_id, 'state': str(circuit.state), 'goal_hops': circuit.goal_hops, 'bytes_up': circuit.bytes_up, 'bytes_down': circuit.bytes_down, 'created': circuit.creation_time}
        hops_array = []
        for hop in circuit.hops:
            hops_array.append({'host': ('unknown' if ('UNKNOWN    HOST' in hop.host) else ('%s:%s' % (hop.host, hop.port)))})
        item['hops'] = hops_array
        circuits_json.append(item)
    return json.dumps({'circuits': circuits_json})
