Skip to content

API Reference / Proxy sessions

Find proxy sessions by host and port

Returns every live session in your workspace, in any pool, whose host and port equal one of the given endpoints, with the pool it is in. Host names compare case-insensitively and IPv6 addresses compare as addresses, so a bracketed and a bare form match. An endpoint held by several sessions returns one match for each, ordered by the endpoint's position in the request and then by pool name. At most 10000 endpoints a call.

POST/proxies.v1.Proxies/MatchSessionEndpoints

Request body

application/jsonRequired

Request to find the workspace's sessions at the given endpoints.

endpoints?array<ProxyEndpoint>

The endpoints to look for, at most 10000. More is rejected with invalid_argument.

Show attributes
host?string

Host name or IP address. Host names compare case-insensitively. An IPv6 address may be bare or in brackets.

port?integer

TCP port.

Format"int32"

Response body

application/json

Success

matches?array<SessionEndpointMatch>

The matches, one per session. An endpoint with no session has none.

Show attributes
index?integer

Position of the matched endpoint in the request, from zero.

Format"int32"

poolId?string

Opaque 16-byte identifier of the pool the session is in, base64-encoded in JSON.

Format"byte" base64

poolName?string

Name of the pool the session is in.

sessionId?string

Opaque 16-byte identifier of the session, base64-encoded in JSON.

Format"byte" base64

curl -X POST "https://api.goldmine.to/proxies.v1.Proxies/MatchSessionEndpoints" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoints": [
      {
        "host": "203.0.113.10",
        "port": 8080
      },
      {
        "host": "proxy.example.com",
        "port": 3128
      }
    ]
  }'
{
  "matches": [
    {
      "index": 0,
      "sessionId": "AY+MIjMzfu6P/05OTk5OTg==",
      "poolId": "AY+MISIifMyN3T09PT09PQ==",
      "poolName": "imported-proxies"
    }
  ]
}