Skip to content

API Reference / Proxy assignments

Count proxy assignments per filter option

Returns, for each requested facet field (pool, provider, health, pinned), how many assignments carry each value under the same AssignmentFilter as ListAssignments, with the field's own filter left out. Drives the assignments filter flyout.

POST/proxies.v1.Proxies/GetAssignmentFacetCounts

Request body

application/jsonRequired

Request for the per value counts of up to 8 assignment facet fields under the same filter as ListAssignments, so a filter flyout shows how many assignments each option would select.

fields?array<string>

The facet fields to count, at most 8.

Value in"ASSIGNMENT_FACET_FIELD_POOL""ASSIGNMENT_FACET_FIELD_PROVIDER""ASSIGNMENT_FACET_FIELD_HEALTH""ASSIGNMENT_FACET_FIELD_PINNED""ASSIGNMENT_FACET_FIELD_ACCOUNT_SESSION_STATUS""ASSIGNMENT_FACET_FIELD_COUNTRY"

filter?AssignmentFilter

The same filter as ListAssignments. Each facet is counted with every other field applied but not its own, so choosing one pool still shows the counts of the other pools.

Show attributes
accountName?string

Deprecated: use account_names. One Steam account name to limit results to, matched exactly after trimming. Setting both account_name and account_names is rejected with invalid_argument.

accountNames?array<string>

Steam account names to limit results to, at most 100, each matched exactly after trimming. Empty includes assignments across all accounts.

accountSessionStatusesarray<string>

Steam session statuses of the assigned account to include, OR within the field. An account whose status is not known yet matches none of them. Empty includes every account. Required.

Value in"SESSION_STATUS_DISCONNECTED""SESSION_STATUS_CONNECTING""SESSION_STATUS_CONNECTED""SESSION_STATUS_LOGGED_ON""SESSION_STATUS_ERROR"

countries?array<string>

Exit countries of the bound session to include, as upper-case ISO 3166-1 alpha-2 codes, OR within the field. The empty string selects assignments whose country is not known: a pending assignment and a session whose provider reports none. Empty includes every country.

healths?array<string>

Health states of the bound session to include. A pending assignment has no session and matches none of them. Empty includes assignments regardless of health.

Value in"SESSION_HEALTH_STATE_HEALTHY""SESSION_HEALTH_STATE_UNHEALTHY""SESSION_HEALTH_STATE_UNPROBED"

pinned?boolean

True selects only pinned assignments, false only unpinned ones. Unset includes both.

poolId?string

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

Format"byte" base64

providerIds?array<string>

Opaque 16-byte provider identifiers, base64-encoded in JSON, to limit results to assignments whose bound session comes from one of them. Empty includes every provider.

sessionId?string

Optional session id to limit results to assignments bound to a single session. Unset includes assignments across all sessions.

Format"byte" base64

Response body

application/json

Success

facets?array<AssignmentFacetCounts>

One entry per requested field, in request order.

Show attributes
counts?FacetFieldCounts

The values ordered by count descending then value, at most 50, with truncated set when more exist.

Show attributes
truncated?boolean

True when the field has more than 50 values, so the list shows only the 50 most common.

values?array<FacetValueCount>

The values and their counts, ordered by count descending then by value, at most 50.

Show attributes
count?string

Number of rows carrying the value under the facet's predicate. Returned as a JSON string to preserve integer precision.

Format"int64"

value?string

The value as the list rows carry it: an enum name, a base64 id or an account name, so a client maps it to a label exactly as it maps a row.

field?string

The facet field these counts are for.

Value in"ASSIGNMENT_FACET_FIELD_POOL""ASSIGNMENT_FACET_FIELD_PROVIDER""ASSIGNMENT_FACET_FIELD_HEALTH""ASSIGNMENT_FACET_FIELD_PINNED""ASSIGNMENT_FACET_FIELD_ACCOUNT_SESSION_STATUS""ASSIGNMENT_FACET_FIELD_COUNTRY"

curl -X POST "https://api.goldmine.to/proxies.v1.Proxies/GetAssignmentFacetCounts" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": [
      "ASSIGNMENT_FACET_FIELD_HEALTH",
      "ASSIGNMENT_FACET_FIELD_PINNED"
    ]
  }'
{
  "facets": [
    {
      "field": "ASSIGNMENT_FACET_FIELD_HEALTH",
      "counts": {
        "values": [
          {
            "value": "SESSION_HEALTH_STATE_HEALTHY",
            "count": "9"
          }
        ],
        "truncated": false
      }
    },
    {
      "field": "ASSIGNMENT_FACET_FIELD_PINNED",
      "counts": {
        "values": [
          {
            "value": "false",
            "count": "8"
          },
          {
            "value": "true",
            "count": "1"
          }
        ],
        "truncated": false
      }
    }
  ]
}