---
title: "calicoq eval"
description: "Reference for the calicoq evaluate command in Calico Enterprise, used to list endpoints matched by a policy selector expression."
product: "Calico Enterprise"
version: "3.23 (latest)"
section: "Reference"
canonical_url: "https://docs.tigera.io/calico-enterprise/latest/reference/clis/calicoq/eval"
---

# calicoq eval

`calicoq eval <selector>` is used to display the endpoints that are matched by `<selector>`.

## Examples

To find all endpoints that match the `role=='frontend'` selector, i.e. that have a `role` label with value `frontend`:

```text
calicoq eval "role=='frontend'"
```

Sample output follows.

```text
Endpoints matching selector role=='frontend':
  Host endpoint webserver1/eth0
  Host endpoint webserver2/eth0
```

To find all endpoints that have an `app` label (with any value):

```text
calicoq eval "has(app)"
```

Sample output follows.

```text
Endpoints matching selector has(app):
  Workload endpoint rack1-host1/k8s/default.frontend-5gs43/eth0
```

(In this case the answer is a Kubernetes pod.)

To find endpoint for a selector that does not match any endpoints:

```text
calicoq eval "role=='endfront'"
```

Sample output follows.

```text
Endpoints matching selector role=='endfront':
```

## See also

- [NetworkPolicy](https://docs.tigera.io/calico-enterprise/latest/reference/resources/networkpolicy.md) and [GlobalNetworkPolicy](https://docs.tigera.io/calico-enterprise/latest/reference/resources/globalnetworkpolicy.md) for more information about the Calico Enterprise policy model.
- [calicoq and selectors](https://docs.tigera.io/calico-enterprise/latest/reference/clis/calicoq/selectors.md) for a recap on how selectors are used in Calico Enterprise policy.
