Skip to content

Preview a support operation cohort

POST
/api/admin/support-ops/cohorts/preview
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/support-ops/cohorts/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "resource": "User", "selector": { "field": "status", "op": "eq", "value": "active" }, "intent": { "action": "suspend" } }'

Preview matched, actionable, and blocked counts for a support operation selector without saving a cohort. After low-count and complementary suppression, visible counts and the risk summary’s matched count are rounded down in steps of the resource’s minimum count. Preview privacy reports count_exact=false and count_precision=min_count. Preview audit counts use the same values. Frozen cohort counts retain their existing privacy rules.

Preview a resource selector without saving a cohort. Only resource is required. Omitting selector selects all active records; omitting intent.action applies no action-specific blockers. Use the resource registry for allowed fields, operators, and implemented actions. Currently only User and its suspend action are supported.

Media type application/json
object
resource
required
string
Allowed values: User
selector

A field/op/value condition or a nested all/any group of 1-20 selectors. Fields must be filterable and non-sensitive, and operators and values must be allowed by the resource registry. PII fields such as email are refused.

object
key
additional properties
intent
object
action
string
Allowed values: suspend
reason
string
support_case_id
string
Example
{
"resource": "User",
"selector": {
"field": "status",
"op": "eq",
"value": "active"
},
"intent": {
"action": "suspend"
}
}

A privacy-preserving selector preview. Counts are suppressed when necessary, then rounded down in steps of privacy.count_precision. No cohort, target identities, or selector values are returned.

Media type application/json
object
resource
required
string
Allowed values: User
matched_count
required
Any of:
integer format: int64
actionable_count
required
Any of:
integer format: int64
blocked_count
required
Any of:
integer format: int64
blocked_reasons
required

Distinct sorted blocker codes, empty when blocked reasons are suppressed.

Array<string>
blocked_reasons_suppressed
required
boolean
privacy
required
object
min_count
required
integer
>= 1
low_count_suppressed
required
boolean
count_exact
required
boolean
count_precision
required

Equal to min_count, the resource’s minimum count.

integer
>= 1
key
additional properties
risk
required
object
min_count
required
integer
>= 1
matched_count
required
Any of:
integer format: int64
low_count_suppressed
required

Equal to privacy.low_count_suppressed.

boolean
uses_sensitive_field
required

Sensitive selector fields are refused rather than read.

boolean
risk_level
required
string
Allowed values: low medium high
approval_required
required
boolean
key
additional properties
selector_hash
required
string
/^sha256:[0-9a-f]{64}$/
key
additional properties
Example
{
"resource": "User",
"matched_count": 30,
"actionable_count": 20,
"blocked_count": 10,
"blocked_reasons": [
"not_active"
],
"blocked_reasons_suppressed": false,
"privacy": {
"min_count": 10,
"low_count_suppressed": false,
"count_exact": false,
"count_precision": 10
},
"risk": {
"min_count": 10,
"matched_count": 30,
"low_count_suppressed": false,
"uses_sensitive_field": false,
"risk_level": "low",
"approval_required": true
},
"selector_hash": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}

The resource, requested action, or selector is unsupported or invalid.

Media type application/json
object
error
required
string
error_description
required
string
error
required
Allowed values: unsupported_resource unsupported_action invalid_selector
Example
{
"error": "invalid_selector",
"error_description": "Invalid selector"
}

The caller lacks admin:support_ops:cohorts:preview.

Media type application/json
object
error
required
string
error_description
required
string
error
required
Allowed value: forbidden
Example
{
"error": "forbidden",
"error_description": "Missing permission: admin:support_ops:cohorts:preview"
}

An account exists in more than one account database (account_store_ambiguous), or counts changed while their ownership was checked (count_unverified). No counts are returned.

Media type application/json
object
error
required
string
error_description
required
string
error
required
Allowed values: account_store_ambiguous count_unverified
Example
{
"error": "count_unverified",
"error_description": "The counts could not be verified across the account databases"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}