Executes a KQL query and returns its columns and rows.
On a translation, validation, or execution failure the response is
400 Bad Request
with a Microsoft.AspNetCore.Mvc.ProblemDetails whose detail carries a sanitized, user-facing
message. Large result sets may be capped — see EnergyCap.DTO.V202606.EdxQueryResultDTO.Truncated.
Requires the Edx feature flag.
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
| ECI-ApiKey | string | Yes | Your API key. See Authentication. |
| Content-Type | application/json | Yes | All requests must specify JSON content type, including the request body. |
Request Body
EdxQueryRequestV202606
| Property | Description | Type |
|---|---|---|
| defaultBillFilters | True for Watts Reports: void, accrual and non-vendor (chargeback) bills are excluded from bill tables unless the query filters on Void, Accrual or FromVendor itself. | boolean |
| kql | The KQL query text. | string |
| limit | Optional row cap (defaults applied server-side; hard-capped at 100k). | integer (int32) |
Example Request Body
{ "defaultBillFilters": false, "kql": "string", "limit": 1
}
Responses
200
The query executed; columns and rows are returned.
The request succeeded and the response body contains the requested data.
Response Body Parameters
EdxQueryResultV202606
| Property | Description | Type | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| columns | EdxColumnV202606[] | ||||||||||||||||||||||||||||||||||||||||||||||
|
EdxColumnV202606 properties
|
|||||||||||||||||||||||||||||||||||||||||||||||
| queryTimeMs | integer (int64) | ||||||||||||||||||||||||||||||||||||||||||||||
| render | EdxRenderV202606 | ||||||||||||||||||||||||||||||||||||||||||||||
|
EdxRenderV202606 properties
|
|||||||||||||||||||||||||||||||||||||||||||||||
| rowCount | integer (int32) | ||||||||||||||||||||||||||||||||||||||||||||||
| rows | Rows, each an array of cell values aligned positionally to EnergyCap.DTO.V202606.EdxQueryResultDTO.Columns. | array[] | |||||||||||||||||||||||||||||||||||||||||||||
| truncated | True when results were capped and more rows exist. | boolean | |||||||||||||||||||||||||||||||||||||||||||||
Example Response
{ "columns": [
{ "dataType": "string", "description": "string", "name": "string", "presentation": { "entityType": "string", "format": "string", "fractionDigits": 1
}, "relatedFields": [
{ "name": "string", "type": "string"
}
]
}
], "queryTimeMs": 1, "render": { "accumulate": false, "chartType": "string", "kind": "string", "series": [
"string"
], "title": "string", "xColumn": "string", "yColumns": [
"string"
]
}, "rowCount": 1, "rows": [
[
{}
]
], "truncated": false
}
400
The query could not be translated, validated, or executed; see the problem detail.
The request was malformed or contains invalid parameters. Check the request body and query parameters.
Response Body Parameters
ProblemDetails
| Property | Description | Type |
|---|---|---|
| detail | string | |
| instance | string | |
| status | integer (int32) | |
| title | string | |
| type | string |
Example Response
{ "detail": "string", "instance": "string", "status": 1, "title": "string", "type": "string"
}