Solve issue #2

Solve issue #2
implement getEndpointStatus() and query()