Skip to content

API Reference / Proxy sessions

Count proxy sessions

Returns the number of proxy sessions in your workspace matching the same filter ListSessions takes, so a list page can render a count without loading and counting every row.

POST/proxies.v1.Proxies/CountSessions

Request body

application/jsonRequired

Request for the number of proxy sessions in the caller's workspace matching a filter.

filter?SessionFilter

The same filter as ListSessions.

Show attributes
assigned?boolean

True selects only sessions with at least one live account assignment, false only sessions with none. Unset includes both.

cities?array<string>

Exit cities to include, as the English city names the sessions report in health.exit_city, OR within the field. The empty string selects sessions whose city is not known. Empty includes sessions in every city.

countries?array<string>

Exit countries to include, as upper-case ISO 3166-1 alpha-2 codes, OR within the field. A session's country is health.exit_country when observed, otherwise the provider's country. Empty includes sessions in every country and sessions whose country is not known.

enabled?boolean

True selects only enabled sessions, false only disabled sessions. Unset includes sessions regardless of enabled state.

healths?array<string>

Health states to include. Empty includes sessions in every state.

Value in"SESSION_HEALTH_STATE_HEALTHY""SESSION_HEALTH_STATE_UNHEALTHY""SESSION_HEALTH_STATE_UNPROBED"

poolId?string

Optional pool id to limit results to a single pool. Unset includes sessions across all pools.

Format"byte" base64

query?string

Literal case-insensitive substring of the session's host, slot number or an assigned account name. Absent or empty matches every session.

Response body

application/json

Success

count?integer

Number of live sessions matching the filter.

Format"int32"

curl -X POST "https://api.goldmine.to/proxies.v1.Proxies/CountSessions" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "poolId": "AY+MISIifMyN3T09PT09PQ=="
    }
  }'
{
  "count": 3
}