> For the complete documentation index, see [llms.txt](https://developer.abacum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.abacum.ai/api-reference/models/get-model-rolling-data.md).

# Get model rolling data

Retrieve rolling data for the requested model and scenario. Combining actuals and scenario data.

```json
{"openapi":"3.0.0","info":{"title":"Abacum public API","version":"1.0.0"},"tags":[{"name":"Models","description":"List, create, rename and move models, and read their actuals, scenario and rolling data and their logic."}],"servers":[{"url":"https://api.abacum.io","description":"Prod environment"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An access token from the token endpoint, sent as `Authorization: Bearer <access_token>`. Use it to try an endpoint from this page. The token carries the permissions of its user, so use a user with the lowest role that fits the call."}},"parameters":{"ModelId":{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The ID of the model. It must be a UUID. Any other value returns a `404` with an HTML page."},"ScenarioId":{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The ID of the scenario. It must be a UUID. Any other value returns a `404` with an HTML page."},"StartDate":{"name":"start_date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}(-\\d{2})?$"},"description":"Start of the period. Accepts `YYYY-MM` (monthly models only) or `YYYY-MM-DD`. The period is snapped to the model's grain: monthly models expand a month to its first day; weekly models snap to the week start."},"EndDate":{"name":"end_date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}(-\\d{2})?$"},"description":"End of the period. Accepts `YYYY-MM` (monthly models only) or `YYYY-MM-DD`. The period is snapped to the model's grain: monthly models expand a month to its last day; weekly models snap to the week end."},"Enrich":{"name":"enrich","in":"query","required":false,"schema":{"type":"boolean"},"description":"Replace variable IDs with variable names, and dimension names with labels. In `metadata.properties`, the `variable_id` entry is then named `variable_name`, and the keys of its `variables` map are variable names."},"VariableIds":{"name":"variable_ids","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of variable IDs to filter the data. Only data for the specified variables will be returned."},"OutputFormat":{"name":"output_format","in":"query","required":false,"schema":{"type":"string","enum":["csv","parquet"],"default":"csv"},"description":"Output file format. `csv` returns a presigned URL (30 min TTL); `parquet` returns a presigned URL (2 h TTL)."},"Timescale":{"name":"timescale","in":"query","required":false,"schema":{"type":"string","enum":["monthly","quarterly","yearly","full"]},"description":"Time grain of the returned data. Defaults to the model's own grain. It must be the model's grain or coarser, otherwise the request fails with `400`. `full` aggregates the whole requested period into one value per variable, and the file and `metadata.properties` have no time column. On a weekly model, `metadata.properties` also has a `fiscal_week` entry."},"Dimensions":{"name":"dimensions","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of dimension codes. The data is broken down by these dimensions only, and the others are rolled up. Every returned variable must have all of them, otherwise the request fails with `400`. Omit the parameter to keep each variable's own dimensions. Pass an empty value (`dimensions=`) to remove all dimensions."}},"schemas":{"ModelDataColumns":{"type":"object","description":"Describes the columns of the data file, keyed by column name.","required":["value"],"properties":{"variable_id":{"$ref":"#/components/schemas/ModelDataVariableColumn"},"variable_name":{"$ref":"#/components/schemas/ModelDataVariableColumn"},"time":{"type":"object","required":["type","format"],"properties":{"type":{"type":"string","enum":["string"]},"format":{"type":"string","enum":["date"]}}},"value":{"type":"object","required":["type","format"],"properties":{"type":{"type":"string","enum":["number"]},"format":{"type":"string","enum":["float"]}}}},"additionalProperties":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"}}}},"ModelDataVariableColumn":{"type":"object","description":"The column that holds the variable. It is named `variable_id`, or `variable_name` when `enrich=true`.","required":["type","variables"],"properties":{"type":{"type":"string","enum":["string"]},"variables":{"type":"object","description":"The variables in the file, keyed by variable ID, or by variable name when `enrich=true`.","additionalProperties":{"type":"object","required":["id","name","dimensions"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"dimensions":{"type":"array","items":{"type":"string"}}}}}}},"ErrorMessage":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"DetailMessage":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}},"responses":{"ForbiddenAdminOnly":{"description":"One of two causes:\n\n- The bearer token is missing, invalid or expired. The response has an empty body.\n- The token's user is not an Admin or Super Admin. The body is `{\"detail\": \"You do not have permission to perform this action.\"}`.\n\nThe API answers `403` for a bad token, not `401`.\n","headers":{"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailMessage"}}}},"TooManyRequests10PerMinute":{"description":"Rate limit exceeded: 10 requests per minute for the same user and URL. Wait the number of seconds in the `Retry-After` header, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}},"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailMessage"}}}},"InternalServerError":{"description":"An unexpected error on our side. The response has an empty body. Repeat the request, and contact support if it keeps failing.","headers":{"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}}}},"headers":{"XRequestID":{"description":"Identifier of this request. Quote it when you contact support so they can find the exact request. A server-side client can set it by sending an `X-Request-ID` request header of 1 to 64 characters from `A-Za-z0-9_-`; any other value is replaced by a generated one. Browsers can read this header but cannot send their own. The value identifies a request for support, but it is not proof that only one request used it.","schema":{"type":"string"}}}},"paths":{"/public-api/models/{model_id}/rolling_data/{scenario_id}":{"get":{"summary":"Get model rolling data","description":"Retrieve rolling data for the requested model and scenario. Combining actuals and scenario data.","operationId":"getModelRollingData","tags":["Models"],"parameters":[{"$ref":"#/components/parameters/ModelId"},{"$ref":"#/components/parameters/ScenarioId"},{"$ref":"#/components/parameters/StartDate"},{"$ref":"#/components/parameters/EndDate"},{"$ref":"#/components/parameters/Enrich"},{"$ref":"#/components/parameters/VariableIds"},{"$ref":"#/components/parameters/OutputFormat"},{"$ref":"#/components/parameters/Timescale"},{"$ref":"#/components/parameters/Dimensions"}],"responses":{"200":{"description":"A download link to a file (CSV or Parquet, per `output_format`) containing rolling data for the Model.","content":{"application/json":{"schema":{"type":"object","required":["data","metadata"],"properties":{"data":{"type":"string","description":"Pre-signed S3 URL for downloading the data file."},"metadata":{"type":"object","required":["properties","switch_over_date","estimate"],"properties":{"properties":{"$ref":"#/components/schemas/ModelDataColumns"},"switch_over_date":{"type":"string","format":"date","nullable":true,"description":"The version's switchover date: the point where it transitions from actuals to version data. Months up to and including this date are actuals; later months are version data."},"estimate":{"type":"boolean","description":"Whether the values are an estimate — actuals up to `switch_over_date` combined with version data after it, as the app shows them. `false` means the version's formulas were evaluated for every month in range, so months up to `switch_over_date` will not match the app."}}}}}}}},"400":{"description":"Invalid request. The body is `{\"error\": \"<message>\"}`. Causes: an invalid parameter value, `start_date` and `end_date` not provided together, a month-level (`YYYY-MM`) filter on a weekly model, a `timescale` finer than the model's grain, `variable_ids` that are not in the model, `dimensions` that a returned variable does not have, or a result too large to return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"403":{"$ref":"#/components/responses/ForbiddenAdminOnly"},"404":{"description":"Not found - the model or scenario does not exist, or the user cannot access it. The response has an empty body."},"429":{"$ref":"#/components/responses/TooManyRequests10PerMinute"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
