> For the complete documentation index, see [llms.txt](https://docs.enlyze.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enlyze.com/enlyze-api/api-referenz/timeseries.md).

# Timeseries

## Get timeseries data

> Returns paginated timeseries data for one or more variables \*\*of the same machine\*\*\
> in a tabular structure, where the first column always represents the timestamp of a row\
> and the following columns hold the variables' data for the given timestamp:\
> e.g. \`\[time, variable\_uuid\_1, variable\_uuid\_2, variable\_uuid\_3]\`.\
> \
> \*\*Note\*\*: The sequence of variables from the request is preserved in the response:\
> \
> A request for \`?variables=A,B\` will yield response data with columns \`\[time, A, B]\`,\
> whereas \`?variables=B,A\` will yield response data with columns \`\[time, B, A]\`.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Timeseries"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"TimeseriesParams":{"properties":{"machine":{"type":"string","title":"Machine","description":"A UUID for a machine"},"start":{"type":"string","format":"date-time","title":"Start","description":"Datetime with timezone in ISO Format e.g. '2000-01-01T09:04:41.783348+00:00'"},"end":{"type":"string","format":"date-time","title":"End","description":"Datetime with timezone in ISO Format e.g. '2000-01-02T09:04:41.783348+00:00'"},"resampling_interval":{"anyOf":[{"type":"integer","maximum":604800,"minimum":10},{"type":"null"}],"title":"Resampling Interval"},"variables":{"items":{"$ref":"#/components/schemas/VariableWithOptionalResamplingMethod"},"type":"array","maxItems":100,"minItems":1,"title":"Variables"},"cursor":{"type":"string","title":"Get page starting at cursor"}},"type":"object","required":["machine","start","end","variables"],"title":"TimeseriesParams"},"VariableWithOptionalResamplingMethod":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid"},"resampling_method":{"anyOf":[{"$ref":"#/components/schemas/ResamplingMethod"},{"type":"null"}]}},"type":"object","required":["uuid"],"title":"VariableWithOptionalResamplingMethod"},"ResamplingMethod":{"type":"string","enum":["first","last","max","min","count","sum","avg","median","std","q5","q25","q75","q95"],"title":"ResamplingMethod"},"TimeseriesResponse":{"properties":{"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."},"data":{"$ref":"#/components/schemas/TimeseriesData"}},"type":"object","required":["metadata","data"],"title":"TimeseriesResponse"},"Metadata":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pagination continuation point. Specify its value as the `cursor` parameter in a request with otherwise the same parameters to fetch the next page. `None`, if there is no more data to be fetched from the server."}},"additionalProperties":false,"type":"object","required":["next_cursor"],"title":"Metadata"},"TimeseriesData":{"properties":{"columns":{"items":{"type":"string"},"type":"array","title":"Columns","description":"The variable uuids included in the response. The order of this list denotes the order of the data in the `records` field. The `time` column will always be present and the first item in the list. "},"records":{"items":{"items":{},"type":"array"},"type":"array","title":"Records","description":"Tabular data of the requested variables. Each element in the list represents a row with the fields in the same order as in `columns`."}},"type":"object","required":["columns","records"],"title":"TimeseriesData"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/timeseries":{"post":{"tags":["Timeseries"],"summary":"Get timeseries data","description":"Returns paginated timeseries data for one or more variables **of the same machine**\nin a tabular structure, where the first column always represents the timestamp of a row\nand the following columns hold the variables' data for the given timestamp:\ne.g. `[time, variable_uuid_1, variable_uuid_2, variable_uuid_3]`.\n\n**Note**: The sequence of variables from the request is preserved in the response:\n\nA request for `?variables=A,B` will yield response data with columns `[time, A, B]`,\nwhereas `?variables=B,A` will yield response data with columns `[time, B, A]`.","operationId":"timeseries_v2_timeseries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeseriesParams"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
