API Schema Reference
This page documents all request/response schemas used by the
XplainClient API.
Note
This file is auto-generated. Do not edit it directly. Regenerate with:
python xplain-openapi/generate_client.py
SessionResponse
The current session state, including loaded objects, dimensions, attributes, open requests and their results. Most method calls return this structure.
ErrorResponse
Property |
Type |
Description |
|---|---|---|
|
|
Human-readable error message |
|
|
Machine-readable error type One of: |
FileDescriptor
Property |
Type |
Description |
|---|---|---|
|
|
File type identifier (e.g. XTABLE, XANALYSIS, XSELECTION, XMODEL, XMODELRESULT, XSCRIPT). Set automatically if missing. |
|
|
Access level for the file One of: |
|
|
Team name (required when ownership is TEAM) |
|
|
User name (required when ownership is USER) |
|
list of |
Required. Path components to the file (list of path segments) |
Example
filePath:
- Patient.xtable
fileType: XTABLE
ownership: PUBLIC
AttributePath
Property |
Type |
Description |
|---|---|---|
|
|
Required. XObject (table) name |
|
|
Required. Dimension name |
|
|
Required. Attribute name |
Example
attribute: Age Group
dimension: Age Group
object: Patient
XElementPath
Property |
Type |
Description |
|---|---|---|
|
|
Required. XObject (table) name |
|
|
Dimension name (optional) |
|
|
Attribute name (optional, requires dimension) |
|
|
State name (optional, requires attribute) |
|
|
Hierarchy level name (optional, requires attribute) |
Example
attribute: Age Group
dimension: Age Group
object: Patient
AggregationUIModel
Defines a statistical aggregation (measure) for a statistics request. Either aggregationType or type must be provided.
Property |
Type |
Description |
|---|---|---|
|
|
Optional name for this aggregation |
|
|
The aggregation function to apply. Identical to the type field (one of the two must be set). One of: |
|
|
Alias for aggregationType One of: |
|
|
XObject (table) name to aggregate over |
|
|
Dimension (measure dimension) name. Required for SUM, AVG, MIN, MAX, VAR, VARP, STDEV, STDEVP, COUNTENTITY, COUNTDISTINCT, QUANTILE. |
|
|
Attribute name. Required for COUNTDISTINCT to specify which attribute to count distinct values of. |
|
list of |
Optional list of state names to restrict counting distinct values to (for COUNTDISTINCT). |
|
|
Hierarchy level name for COUNTDISTINCT. When given, all states at this level are used instead of the explicit states list. |
|
|
For COUNTDISTINCT: whether to complement missing branches in the hierarchy. |
|
|
For FIRSTKEY aggregation: name of the cycle dimension. Only the first occurrence of this key triggers the inner aggregation. |
|
For FIRSTKEY aggregation: the inner aggregation applied to the first occurrence. |
|
|
|
For COMPUTED_MEASURE: a mathematical expression referencing other aggregations by name in curly braces, e.g. “{SUM(Income)} / {# Person}”. |
|
list of |
For QUANTILE aggregation: list of quantile values between 0.0 and 1.0, e.g. [0.1, 0.25, 0.5, 0.75, 0.9]. |
|
|
Format string inherited from the dimension (read-only, set by server). |
Example
aggregationType: SUM
dimension: Income
object: Customer
GroupByUIModel
Defines a group-by dimension for a statistics request. Either attribute (for a one-dimensional group-by) or subGroupings (for a multi-dimensional group-by) must be provided.
Property |
Type |
Description |
|---|---|---|
|
|
Optional name for this group-by |
|
The attribute to group by (for one-dimensional group-bys) |
|
|
|
Name of the hierarchy level to group by. If given, states at this level are used. Takes precedence over groupByLevelNumber. |
|
|
Depth of the hierarchy level (1-based; 0 = root, 1 = first level). Used when groupByLevel is not given. |
|
|
Whether to include states from levels above the specified groupByLevel in the result. Defaults to false (only the exact level states). |
|
list of |
States whose children are included in the group-by (for tree-style navigation). The state itself and its direct children are included. |
|
list of |
Explicit list of state names to use as group-by states. Takes effect only when no logical build information (groupByLevel, expandedStates) is available. |
|
list of GroupByUIModel |
For multi-dimensional group-bys: list of one-dimensional sub-groupings. |
Example
attribute:
attribute: Gender
dimension: Gender
object: Customer
SelectionActionUIModel
A single selection action (SELECT or DESELECT) applied to a set of states.
Property |
Type |
Description |
|---|---|---|
|
|
Required. Whether to select or deselect the given states One of: |
|
list of |
Required. List of state names to select or deselect |
SelectionUIModel
Defines a selection (filter) on a specific attribute. Either selectedStates or selectActions must be provided.
Property |
Type |
Description |
|---|---|---|
|
The attribute on which the selection is applied |
|
|
list of |
Simple list of state names to select. All other states are excluded. |
|
list of SelectionActionUIModel |
Sequential list of SELECT/DESELECT actions for complex selections. |
|
|
If true, the selection is negated (select everything EXCEPT the specified states). |
Example
attribute:
attribute: Region
dimension: Region
object: Patient
selectedStates:
- Berlin
- Munich
StatisticsRequestUIModel
A complete statistics request defining what data to compute. Contains group-bys (dimensions to slice by), aggregations (measures to compute), and optional selections (filters).
Property |
Type |
Description |
|---|---|---|
|
|
Unique identifier / name for this request |
|
|
[Deprecated] Deprecated alias for requestId. Use requestId instead. |
|
list of GroupByUIModel |
Dimensions to group/slice the data by |
|
list of AggregationUIModel |
Measures/aggregations to compute |
|
list of SelectionUIModel |
Fixed selections (filters) for this request. These are kept constant and not affected by global selections (for openRequest). |
|
|
Name of an external selection set to use as additional filter (e.g. “globalSelections”). |
|
|
If true, the group-by states are restricted to currently selected states only. |
|
|
If true, the request is paused and will not be recomputed automatically. |
|
|
If true, result rows where all aggregation values are null/zero are omitted from the response. |
Example
aggregations:
- aggregationType: COUNT
object: Customer
groupBys:
- attribute:
attribute: Gender
dimension: Gender
object: Customer
requestId: My Request
selections:
- attribute:
attribute: Region
dimension: Region
object: Customer
selectedStates:
- Berlin