api end point to retrieve list of connections

please move the open { up to the line before