Skip to main content
Risk segmentation configurations are saved views for the Risk Segmentation dashboard on an analysis. Each config describes how results should be broken down (the segments), which summary columns appear in the table, and optional dashboard filters. Configs correspond to the segment picker in the web application. This API manages those saved configurations only. It does not return dashboard table data or support drilling into entries. (The web app loads table rows through separate private endpoints.) Each config belongs to one analysis. analysisId is the analysis run id (the same id returned by /v1/analyses for the run, not the analysis context id). Names must be unique within an analysis.

Typical workflow

  1. Create a config with analysisId, a unique name, ordered segments, and ordered columns.
  2. Query configs for an analysis (for example { "$eq": ["analysisId", "<analysis-run-id>"] }).
  3. Read a config by id when you need the full definition.
  4. Delete configs you no longer need.
There is no update operation on the public API. To change a config, delete it and create a new one.

Segments

segments is an ordered list. Order defines the hierarchy shown in the dashboard table (outer segments first, inner segments nested beneath them). Each value must be a valid SQL identifier. risk_score is required in segments. Create requests without it are rejected.

Built-in segment keys (general ledger and similar analyses)

The web application builds population segment ids from enabled populations on the analysis.

Custom analysis segments

For custom (flex) analyses, additional segment fields may be used when they name categorical columns on the analysis entry data table. Those names must be valid SQL identifiers and must exist on the table. The analysis designer uses the same rules when defining risk segmentation there.

Columns

columns is an ordered list of metric fields displayed in the dashboard table for each segment row. Values must match the snake_case ids below (these are the same ids the web application sends as columns).

Count and value summaries

High / medium / low counts and values

High / medium / low percentages

Debit/credit column variants apply to general ledger analyses that expose separate debit and credit totals. Omit them when not relevant to the analysis type. Do not put segment keys (such as risk_group or account_l1) in columns; those belong in segments.

Optional filters

These fields mirror the Risk group and Risk score filters on the dashboard facet bar. They restrict which scores and categories are in scope when the config is opened. They do not add extra grouping levels. riskGroups values are category labels, not risk range ids and not entries from /v1/risk-ranges.

Other fields

Example create request

Validation

  • analysisId must reference an existing analysis run.
  • name must be unique among configs for that analysis.
  • segments must include risk_score.
  • Segment and column names must be valid SQL identifiers.
  • Invalid segment or column combinations for the analysis type may be rejected at create time.

Query

See the query operation description for filterable fields.