---
title: "How to use REST API to find the connection state of the Netprobes"
description: "The REST API can be used to find the connection state of Netprobes in Geneos. You can query the Gateway for the Netprobe's Connection State Runtime Parameter to identify Netprobes with \"Up\" or \"Down\" states."
url: "https://docs.itrsgroup.com/docs/faq/geneos/360022734233-geneos-how-to-use-rest-api-to-find-the-connection-state-of-the-netprobes/index.html"
---
## Solution

You can query the Gateway for the Netprobe's [Connection State](https://docs.itrsgroup.com/docs/geneos/current/processing/configuration/gateway_probes/index.html#Probe_runtime_states) Runtime Parameter.

To find that all Netprobes that do NOT have an "Up" connection state as seen in the [Gateway-ProbeData](https://docs.itrsgroup.com/docs/geneos/current/processing/configuration/geneos_gateway_plugins_tr/index.html#samplers__sampler__plugin__Gateway-probeData) dataview run the following command:

```
curl -u username:password -X GET -s --data '{"target":"//probe[(rparam(\"ConState\")!=\"Up\")]"}' http://gatewayHost:gatewayPort/rest/xpaths/match | python -m json.tool
```

To find that all Netprobes with a "Down" connection state run the following command:

```
curl -u username:password -X GET -s --data '{"target":"//probe[(rparam(\"ConState\")=\"Down\")]"}' http://gatewayHost:gatewayPort/rest/xpaths/match | python -m json.tool
```

## Related Articles

[Rest Service/REST API Documentation](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_commands_tr/index.html#REST_Service)


