> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.umnai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.umnai.com/_mcp/server.

# Response structure

View responses are returned as JSON.

Most view responses use a shared structure: a top-level `data` array, one object for each generated view, and view-specific data under `view_data`.

## Top-level response

A view response contains a `data` array.

When you generate one view, the array contains one item. When you generate multiple views in the same request, the array contains one item per generated view.

```json5
{
  "data": [
    {
      "views_version": {
        "major": 1,
        "minor": 0,
        "patch": 0
      },
      "output_version": {
        "major": 1,
        "minor": 0,
        "patch": 0
      },
      "view_type": "HISTOGRAM",
      "view_data": {
        "columns": ["field", "value", "count"],
        "index": [0, 1, 2],
        "data": [
          ["gender", "Female", 42],
          ["gender", "Male", 38],
          ["gender", "Unknown", 3]
        ],
        "foreign_keys": [],
        "labels": {},
        "types": [
          { "data_type": "string" },
          { "data_type": "string" },
          { "data_type": "integer" }
        ]
      }
    }
  ]
}
```

## View metadata

Each view object includes metadata that identifies the view output.

| Field            | Description                           |
| ---------------- | ------------------------------------- |
| `views_version`  | Version of the view generation logic. |
| `output_version` | Version of the response format.       |
| `view_type`      | Type of view returned in this item.   |
| `view_data`      | View-specific output data.            |

Some deployed model views may include additional version fields, such as `commons_version` or `core_version`.

## Dataframe structure

Most `view_data` objects are returned as split-orientation dataframes.

| Field          | Description                                         |
| -------------- | --------------------------------------------------- |
| `columns`      | Column names for the dataframe.                     |
| `index`        | Row index values.                                   |
| `data`         | Values aligned to the columns and index.            |
| `foreign_keys` | Foreign key references included with the dataframe. |
| `labels`       | Optional labels associated with the dataframe.      |
| `types`        | Optional data type information for each column.     |

This structure makes view output easier to render as tables, charts, or downstream analysis data.

## Nested dataframe views

Some views return more than one dataframe inside `view_data`.

For example, the Results view returns separate dataframes for model information, query input, predicted output, feature attribution, module attribution, partition data, and decomposition data.

```json5
{
  "data": [
    {
      "view_type": "RESULTS",
      "view_data": {
        "model_info": { "columns": [], "index": [], "data": [], "foreign_keys": [] },
        "query_input": { "columns": [], "index": [], "data": [], "foreign_keys": [] },
        "predicted_output": { "columns": [], "index": [], "data": [], "foreign_keys": [] },
        "feature_attribution": { "columns": [], "index": [], "data": [], "foreign_keys": [] },
        "module_attribution": { "columns": [], "index": [], "data": [], "foreign_keys": [] }
      }
    }
  ]
}
```

When a view returns nested dataframes, each nested object follows the same split-orientation pattern.

## Working with responses

Use `view_type` to identify which view was returned, then read `view_data` according to the page for that view.

For simple views, `view_data` is usually a single dataframe. For richer explanation views, `view_data` may contain multiple named dataframes that should be read together.