POST /api/Timeseries/MathEditor/CalculateCsv
Evaluates a math editor formula over a date range. MCP endpoint: does not persist anything — use PostFormula to save a formula as a timeseries. When the formula evaluates to a timeseries (numeric or boolean) or a scalar, returns CSV instead of a JSON array/object, to reduce token usage in LLM tool responses. A timeseries result is CSV with "timestamp,value" rows; a scalar result is CSV with a single "value" row. Any other result type (standing data, expressions, etc.) has no tabular data to export, so the normal JSON envelope is returned instead of CSV.
curl -X POST "/api/Timeseries/MathEditor/CalculateCsv" \
-H "Authorization: $ATLAS_ETRM_API_DOCUMENTATION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": {
"formula": "string",
"startDate": "2026-01-15T09:30:00Z",
"endDate": "2026-01-15T09:30:00Z",
"timezone": 0
}
}'Authorization
AuthorizationstringheaderrequiredJWT Authorization header using the Bearer scheme. Enter your token including the 'Bearer ' prefix (e.g. 'Bearer eyJ...').
Body
dataEtrmApiGateway.DTOs.Timeseries.MathEditorCalculateExternalRequest
Response
Returns a CSV file, or the normal JSON envelope for non-tabular result types.
"string"