### GET /exports/{id}/download Source: https://connhex.com/api/exporter/latest/api.json Download export. Required Permission: - Resource: ```exporter:exports:{id}``` - Action: ```exporter:exports:download``` ```markdown ### Parameters - **id** (string, path, required) ### Responses #### 200 - response Empty response body #### 400 - Missing user identity id Missing user identity id #### 401 - response #### 403 - response #### 404 - response ### Example Usage ```bash curl -X GET "https://apis./exports/{id}/download" ``` ``` -------------------------------- ### GET /exports Source: https://connhex.com/api/exporter/latest/api.json List exports. Required Permission: - Resource: ```exporter:exports``` - Action: ```exporter:exports:list``` ```markdown ### Parameters - **ids** (array (string), query, optional) - **status** (array (string (notProcessed|inProgress|failed|done|expired)), query, optional) - **type** (string (recurring|oneTime), query, optional) - **tagLabels** (array (string), query, optional) - **tagLabelValues** (array (string), query, optional) - **from** (string (date-time), query, optional) - **to** (string (date-time), query, optional) - **page** (number, query, optional) - **pageSize** (number, query, optional) - **sort** (string, query, optional) ### Responses #### 200 - response **PagedExportRequestsDto** - **results** (array (ReadExportRequestDto)) (required) Array items: - **format** (object) (required) - **filename** (string) - **extension** (string (csv|xlsx|pdf)) (required) ("csv"|"xlsx"|"pdf") - **columns** (array (ColumnDto)): Define how exported data fields are mapped to the output file. For **resource exports**, each column `id` must follow the pattern `.`, using the **singular** resource type as prefix (e.g. `device.serial`, `installation.name`). To reference an included related resource, use its own singular type as prefix (e.g. `installation.name` when `include=installation` is set on the export item). For **message exports**, column `id` maps directly to message fields (e.g. `time`, `name`, `value`, `unit`). Array items: - **id** (string) (required): Column `id`. When exporting resource items it must be formatted as: `.`. - **label** (string) (required): Column label - **timezone** (string): Target timezone: all data field will be remapped to this timezone - **template** (string (tabular|expanded)): PDF layout template. Only applies to resource exports (`pdf` extension). Ignored for message exports and report exports. - `tabular` (default): all resources are rendered in a single table, one row per resource. - `expanded`: each resource is rendered as its own card with one row per field. Useful when resources have many attributes that would make a wide table unreadable. ("tabular"|"expanded") - **csvDelimiter** (string) - **type** (string (recurring|oneTime)) (required) ("recurring"|"oneTime") - **items** (array (CreateExportItemDto)) (required) Array items: - **params** (object) (required) - **target** (object) (required) - **value** (string) (required): Identifier of the resource the be exported: typically a URN. It is possible to export multiple resources by providing a comma separated list of values. - **label** (string): Label that will replace the target `value`. If multiple `values` are provided, you can can pass a comma separated list of labels. The number of labels must match the number of `values`. - **channelId** (string) (required) (example: "0115c85d-ef3e-4de9-9732-d0c5c4f2c482") - **subtopic** (string) (required): Subtopic from which to retrieve data for export (example: "events.data") - **from** (number): Unix timestamp: number of seconds since 1970 UTC - **to** (number): Unix timestamp: number of seconds since 1970 UTC - **period** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **decimation** (object) - **ds** (object) (required): Decimation granularity. Only supports positive integer. (example: "15m") - **dsf** (string (avg|max|min|sum|stddev|variance)) (required): Aggregation algotithm ("avg"|"max"|"min"|"sum"|"stddev"|"variance") - **transform** (string (delta)) ("delta") - **outputFormat** (string (long|wide)) (required): Determines how exported data will be formatted in the output file. Check the following link for more info: https://en.wikipedia.org/wiki/Wide_and_narrow_data In the `long` format exported variables are spread across multiple rows. In the `wide` format exported variables are spread across multiple columns, and each row represents a different timestamp. If `wide` format is selected, `request.colums` must be provided. ("long"|"wide") - **filename** (string): Name of the output file (without extension) - **periodicity** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **periodStart** (number): Period start expressed in Unix timestamp. If not specified, the creation date of the request will be used. - **notification** (object) - **messages** (array (NotificationMessageDto)) (required): Notification messages. For each notification, there must be exactly two notification messages with the two different policies (`onSuccess`, `onFailure`) Array items: - **target** (string): Notification target, whose format depends on the selected `medium`. If not specified, the notification is sent to the user who created the rule. Supported formats: - `email`: email address - `sms`: E.164 phone number (e.g. "+391234567890") - `telegram`: username ("@user") - `slack` / `discord` / `msteams`: webhook URL - `fcm`: device registration token The value must match the expected format for the chosen medium. Invalid or incompatible values may result in notification delivery failure. - **policy** (string (onSuccess|onFailure)) (required): The notification policy: whether it is associated with a success event (export delivered), or a failure event (export failed) ("onSuccess"|"onFailure") - **medium** (string (email|telegram|sms|slack|discord|fcm|msteams)) (required) ("email"|"telegram"|"sms"|"slack"|"discord"|"fcm"|"msteams") - **title** (string) (required) - **text** (string) (required) - **tags** (array (CreateTagDto)) Array items: - **label** (string) (required) - **labelValue** (string) (required) - **metadata** (object): Other custom properties associated to the tag - **id** (string) (required) - **createdAt** (string (date-time)) (required) - **updatedAt** (string (date-time)) (required) - **deletedAt** (string (date-time)) (required) - **total** (number) (required) #### 400 - Missing user identity id Missing user identity id ### Example Usage ```bash curl -X GET "https://apis./exports?ids=item1,item2&status=item1,item2&type=recurring&tagLabels=item1,item2&tagLabelValues=item1,item2&from=2023-01-01T00:00:00Z&to=2023-01-01T00:00:00Z&page=0&pageSize=1000&sort=createdAt:desc" ``` ``` -------------------------------- ### GET /exports/{id}/status Source: https://connhex.com/api/exporter/latest/api.json Get export status. Required Permission: - Resource: ```exporter:exports:{id}``` - Action: ```exporter:exports:get``` ```markdown ### Parameters - **id** (string, path, required) ### Responses #### 200 - response Empty response body #### 400 - Missing user identity id Missing user identity id #### 404 - response ### Example Usage ```bash curl -X GET "https://apis./exports/{id}/status" ``` ``` -------------------------------- ### POST /exports Source: https://connhex.com/api/exporter/latest/api.json Create export request. Required Permission: - Resource: ```exporter:exports``` - Action: ```exporter:exports:create``` ```markdown ### Request Body **Content-Type:** application/json - **format** (object) (required) - **filename** (string) - **extension** (string (csv|xlsx|pdf)) (required) ("csv"|"xlsx"|"pdf") - **columns** (array (ColumnDto)): Define how exported data fields are mapped to the output file. For **resource exports**, each column `id` must follow the pattern `.`, using the **singular** resource type as prefix (e.g. `device.serial`, `installation.name`). To reference an included related resource, use its own singular type as prefix (e.g. `installation.name` when `include=installation` is set on the export item). For **message exports**, column `id` maps directly to message fields (e.g. `time`, `name`, `value`, `unit`). Array items: - **id** (string) (required): Column `id`. When exporting resource items it must be formatted as: `.`. - **label** (string) (required): Column label - **timezone** (string): Target timezone: all data field will be remapped to this timezone - **template** (string (tabular|expanded)): PDF layout template. Only applies to resource exports (`pdf` extension). Ignored for message exports and report exports. - `tabular` (default): all resources are rendered in a single table, one row per resource. - `expanded`: each resource is rendered as its own card with one row per field. Useful when resources have many attributes that would make a wide table unreadable. ("tabular"|"expanded") - **csvDelimiter** (string) - **type** (string (recurring|oneTime)) (required) ("recurring"|"oneTime") - **items** (array (CreateExportItemDto)) (required) Array items: - **params** (object) (required) - **target** (object) (required) - **value** (string) (required): Identifier of the resource the be exported: typically a URN. It is possible to export multiple resources by providing a comma separated list of values. - **label** (string): Label that will replace the target `value`. If multiple `values` are provided, you can can pass a comma separated list of labels. The number of labels must match the number of `values`. - **channelId** (string) (required) (example: "0115c85d-ef3e-4de9-9732-d0c5c4f2c482") - **subtopic** (string) (required): Subtopic from which to retrieve data for export (example: "events.data") - **from** (number): Unix timestamp: number of seconds since 1970 UTC - **to** (number): Unix timestamp: number of seconds since 1970 UTC - **period** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **decimation** (object) - **ds** (object) (required): Decimation granularity. Only supports positive integer. (example: "15m") - **dsf** (string (avg|max|min|sum|stddev|variance)) (required): Aggregation algotithm ("avg"|"max"|"min"|"sum"|"stddev"|"variance") - **transform** (string (delta)) ("delta") - **outputFormat** (string (long|wide)) (required): Determines how exported data will be formatted in the output file. Check the following link for more info: https://en.wikipedia.org/wiki/Wide_and_narrow_data In the `long` format exported variables are spread across multiple rows. In the `wide` format exported variables are spread across multiple columns, and each row represents a different timestamp. If `wide` format is selected, `request.colums` must be provided. ("long"|"wide") - **filename** (string): Name of the output file (without extension) - **periodicity** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **periodStart** (number): Period start expressed in Unix timestamp. If not specified, the creation date of the request will be used. - **notification** (object) - **messages** (array (NotificationMessageDto)) (required): Notification messages. For each notification, there must be exactly two notification messages with the two different policies (`onSuccess`, `onFailure`) Array items: - **target** (string): Notification target, whose format depends on the selected `medium`. If not specified, the notification is sent to the user who created the rule. Supported formats: - `email`: email address - `sms`: E.164 phone number (e.g. "+391234567890") - `telegram`: username ("@user") - `slack` / `discord` / `msteams`: webhook URL - `fcm`: device registration token The value must match the expected format for the chosen medium. Invalid or incompatible values may result in notification delivery failure. - **policy** (string (onSuccess|onFailure)) (required): The notification policy: whether it is associated with a success event (export delivered), or a failure event (export failed) ("onSuccess"|"onFailure") - **medium** (string (email|telegram|sms|slack|discord|fcm|msteams)) (required) ("email"|"telegram"|"sms"|"slack"|"discord"|"fcm"|"msteams") - **title** (string) (required) - **text** (string) (required) - **tags** (array (CreateTagDto)) Array items: - **label** (string) (required) - **labelValue** (string) (required) - **metadata** (object): Other custom properties associated to the tag ### Responses #### 201 - response **ReadExportRequestDto** - **format** (object) (required) - **filename** (string) - **extension** (string (csv|xlsx|pdf)) (required) ("csv"|"xlsx"|"pdf") - **columns** (array (ColumnDto)): Define how exported data fields are mapped to the output file. For **resource exports**, each column `id` must follow the pattern `.`, using the **singular** resource type as prefix (e.g. `device.serial`, `installation.name`). To reference an included related resource, use its own singular type as prefix (e.g. `installation.name` when `include=installation` is set on the export item). For **message exports**, column `id` maps directly to message fields (e.g. `time`, `name`, `value`, `unit`). Array items: - **id** (string) (required): Column `id`. When exporting resource items it must be formatted as: `.`. - **label** (string) (required): Column label - **timezone** (string): Target timezone: all data field will be remapped to this timezone - **template** (string (tabular|expanded)): PDF layout template. Only applies to resource exports (`pdf` extension). Ignored for message exports and report exports. - `tabular` (default): all resources are rendered in a single table, one row per resource. - `expanded`: each resource is rendered as its own card with one row per field. Useful when resources have many attributes that would make a wide table unreadable. ("tabular"|"expanded") - **csvDelimiter** (string) - **type** (string (recurring|oneTime)) (required) ("recurring"|"oneTime") - **items** (array (CreateExportItemDto)) (required) Array items: - **params** (object) (required) - **target** (object) (required) - **value** (string) (required): Identifier of the resource the be exported: typically a URN. It is possible to export multiple resources by providing a comma separated list of values. - **label** (string): Label that will replace the target `value`. If multiple `values` are provided, you can can pass a comma separated list of labels. The number of labels must match the number of `values`. - **channelId** (string) (required) (example: "0115c85d-ef3e-4de9-9732-d0c5c4f2c482") - **subtopic** (string) (required): Subtopic from which to retrieve data for export (example: "events.data") - **from** (number): Unix timestamp: number of seconds since 1970 UTC - **to** (number): Unix timestamp: number of seconds since 1970 UTC - **period** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **decimation** (object) - **ds** (object) (required): Decimation granularity. Only supports positive integer. (example: "15m") - **dsf** (string (avg|max|min|sum|stddev|variance)) (required): Aggregation algotithm ("avg"|"max"|"min"|"sum"|"stddev"|"variance") - **transform** (string (delta)) ("delta") - **outputFormat** (string (long|wide)) (required): Determines how exported data will be formatted in the output file. Check the following link for more info: https://en.wikipedia.org/wiki/Wide_and_narrow_data In the `long` format exported variables are spread across multiple rows. In the `wide` format exported variables are spread across multiple columns, and each row represents a different timestamp. If `wide` format is selected, `request.colums` must be provided. ("long"|"wide") - **filename** (string): Name of the output file (without extension) - **periodicity** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **periodStart** (number): Period start expressed in Unix timestamp. If not specified, the creation date of the request will be used. - **notification** (object) - **messages** (array (NotificationMessageDto)) (required): Notification messages. For each notification, there must be exactly two notification messages with the two different policies (`onSuccess`, `onFailure`) Array items: - **target** (string): Notification target, whose format depends on the selected `medium`. If not specified, the notification is sent to the user who created the rule. Supported formats: - `email`: email address - `sms`: E.164 phone number (e.g. "+391234567890") - `telegram`: username ("@user") - `slack` / `discord` / `msteams`: webhook URL - `fcm`: device registration token The value must match the expected format for the chosen medium. Invalid or incompatible values may result in notification delivery failure. - **policy** (string (onSuccess|onFailure)) (required): The notification policy: whether it is associated with a success event (export delivered), or a failure event (export failed) ("onSuccess"|"onFailure") - **medium** (string (email|telegram|sms|slack|discord|fcm|msteams)) (required) ("email"|"telegram"|"sms"|"slack"|"discord"|"fcm"|"msteams") - **title** (string) (required) - **text** (string) (required) - **tags** (array (CreateTagDto)) Array items: - **label** (string) (required) - **labelValue** (string) (required) - **metadata** (object): Other custom properties associated to the tag - **id** (string) (required) - **createdAt** (string (date-time)) (required) - **updatedAt** (string (date-time)) (required) - **deletedAt** (string (date-time)) (required) #### 400 - Missing user identity id Missing user identity id #### 429 - Maximum number of queued exports reached Maximum number of queued exports reached ### Example Usage ```bash curl -X POST "https://apis./exports" \ -H "Content-Type: application/json" \ -d '{ "format": "value", "type": "recurring", "items": [ "value" ], "periodicity": "P1Y6M4DT12H30M5S", "periodStart": "0", "notification": "value", "tags": [ "value" ] }' ``` ``` -------------------------------- ### Schema: ChartXAxisOptionsDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ChartXAxisOptionsDto ```markdown ## Schema: ChartXAxisOptionsDto Schema definition for ChartXAxisOptionsDto **Type:** object - **type** (string (string|datetime)) (required) ("string"|"datetime") - **format** (string): Formatting string. If X axis represents time, this will be used to format the date. ``` -------------------------------- ### Schema: CreateTagDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for CreateTagDto ```markdown ## Schema: CreateTagDto Schema definition for CreateTagDto **Type:** object - **label** (string) (required) - **labelValue** (string) (required) - **metadata** (object): Other custom properties associated to the tag ``` -------------------------------- ### Schema: TargetDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for TargetDto ```markdown ## Schema: TargetDto Schema definition for TargetDto **Type:** object - **value** (string) (required): Identifier of the resource the be exported: typically a URN. It is possible to export multiple resources by providing a comma separated list of values. - **label** (string): Label that will replace the target `value`. If multiple `values` are provided, you can can pass a comma separated list of labels. The number of labels must match the number of `values`. ``` -------------------------------- ### Schema: ChartXAxisDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ChartXAxisDto ```markdown ## Schema: ChartXAxisDto Schema definition for ChartXAxisDto **Type:** object - **key** (string) (required): Defines the key of the object whose value will be plotted in the X axis - **options** (object) (required) - **type** (string (string|datetime)) (required) ("string"|"datetime") - **format** (string): Formatting string. If X axis represents time, this will be used to format the date. ``` -------------------------------- ### Security: chx_auth_session Source: https://connhex.com/api/exporter/latest/api.json Security scheme: chx_auth_session ```markdown ## Security: chx_auth_session **Description:** Security scheme: chx_auth_session **Type:** apiKey ``` -------------------------------- ### Schema: NotificationMessageDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for NotificationMessageDto ```markdown ## Schema: NotificationMessageDto Schema definition for NotificationMessageDto **Type:** object - **target** (string): Notification target, whose format depends on the selected `medium`. If not specified, the notification is sent to the user who created the rule. Supported formats: - `email`: email address - `sms`: E.164 phone number (e.g. "+391234567890") - `telegram`: username ("@user") - `slack` / `discord` / `msteams`: webhook URL - `fcm`: device registration token The value must match the expected format for the chosen medium. Invalid or incompatible values may result in notification delivery failure. - **policy** (string (onSuccess|onFailure)) (required): The notification policy: whether it is associated with a success event (export delivered), or a failure event (export failed) ("onSuccess"|"onFailure") - **medium** (string (email|telegram|sms|slack|discord|fcm|msteams)) (required) ("email"|"telegram"|"sms"|"slack"|"discord"|"fcm"|"msteams") - **title** (string) (required) - **text** (string) (required) ``` -------------------------------- ### Schema: ColumnDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ColumnDto ```markdown ## Schema: ColumnDto Schema definition for ColumnDto **Type:** object - **id** (string) (required): Column `id`. When exporting resource items it must be formatted as: `.`. - **label** (string) (required): Column label ``` -------------------------------- ### Schema: ChartCanvasDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ChartCanvasDto ```markdown ## Schema: ChartCanvasDto Schema definition for ChartCanvasDto **Type:** object - **width** (number) (required) - **height** (number) (required) ``` -------------------------------- ### Schema: CreateExportItemDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for CreateExportItemDto ```markdown ## Schema: CreateExportItemDto Schema definition for CreateExportItemDto **Type:** object - **params** (object) (required) - **target** (object) (required) - **value** (string) (required): Identifier of the resource the be exported: typically a URN. It is possible to export multiple resources by providing a comma separated list of values. - **label** (string): Label that will replace the target `value`. If multiple `values` are provided, you can can pass a comma separated list of labels. The number of labels must match the number of `values`. - **channelId** (string) (required) (example: "0115c85d-ef3e-4de9-9732-d0c5c4f2c482") - **subtopic** (string) (required): Subtopic from which to retrieve data for export (example: "events.data") - **from** (number): Unix timestamp: number of seconds since 1970 UTC - **to** (number): Unix timestamp: number of seconds since 1970 UTC - **period** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **decimation** (object) - **ds** (object) (required): Decimation granularity. Only supports positive integer. (example: "15m") - **dsf** (string (avg|max|min|sum|stddev|variance)) (required): Aggregation algotithm ("avg"|"max"|"min"|"sum"|"stddev"|"variance") - **transform** (string (delta)) ("delta") - **outputFormat** (string (long|wide)) (required): Determines how exported data will be formatted in the output file. Check the following link for more info: https://en.wikipedia.org/wiki/Wide_and_narrow_data In the `long` format exported variables are spread across multiple rows. In the `wide` format exported variables are spread across multiple columns, and each row represents a different timestamp. If `wide` format is selected, `request.colums` must be provided. ("long"|"wide") - **filename** (string): Name of the output file (without extension) ``` -------------------------------- ### Schema: ChartYAxisDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ChartYAxisDto ```markdown ## Schema: ChartYAxisDto Schema definition for ChartYAxisDto **Type:** object - **key** (string) (required): Defines the key of the object whose value will be plotted in the Y axis ``` -------------------------------- ### API Overview: connhex-exporter Source: https://connhex.com/api/exporter/latest/api.json OpenAPI specification version 1.5.0 ```yaml # connhex-exporter # Version: 1.5.0 OpenAPI specification # Base URL: https://apis. ``` -------------------------------- ### Schema: NotificationDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for NotificationDto ```markdown ## Schema: NotificationDto Schema definition for NotificationDto **Type:** object - **messages** (array (NotificationMessageDto)) (required): Notification messages. For each notification, there must be exactly two notification messages with the two different policies (`onSuccess`, `onFailure`) Array items: - **target** (string): Notification target, whose format depends on the selected `medium`. If not specified, the notification is sent to the user who created the rule. Supported formats: - `email`: email address - `sms`: E.164 phone number (e.g. "+391234567890") - `telegram`: username ("@user") - `slack` / `discord` / `msteams`: webhook URL - `fcm`: device registration token The value must match the expected format for the chosen medium. Invalid or incompatible values may result in notification delivery failure. - **policy** (string (onSuccess|onFailure)) (required): The notification policy: whether it is associated with a success event (export delivered), or a failure event (export failed) ("onSuccess"|"onFailure") - **medium** (string (email|telegram|sms|slack|discord|fcm|msteams)) (required) ("email"|"telegram"|"sms"|"slack"|"discord"|"fcm"|"msteams") - **title** (string) (required) - **text** (string) (required) ``` -------------------------------- ### Schema: ReportElementFormatChartDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ReportElementFormatChartDto ```markdown ## Schema: ReportElementFormatChartDto Schema definition for ReportElementFormatChartDto **Type:** object - **type** (string (bar|line)) (required) ("bar"|"line") - **xAxis** (object) (required) - **key** (string) (required): Defines the key of the object whose value will be plotted in the X axis - **options** (object) (required) - **type** (string (string|datetime)) (required) ("string"|"datetime") - **format** (string): Formatting string. If X axis represents time, this will be used to format the date. - **yAxis** (object) (required) - **key** (string) (required): Defines the key of the object whose value will be plotted in the Y axis - **label** (string): Chart label - **color** (string): Hexadecimal color string - **canvas** (object) - **width** (number) (required) - **height** (number) (required) ``` -------------------------------- ### Schema: LlmReportItemParamsDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for LlmReportItemParamsDto ```markdown ## Schema: LlmReportItemParamsDto Schema definition for LlmReportItemParamsDto **Type:** object - **template** (string) (required): Instructions for the LLM on how to structure and write the report. The following parameters are supported for report metadata hydration: `{{report.period.start}}`, `{{report.period.end}}`, `{{report.length}}`. (example: "The report must include an initial section with the following items:\n- [h1] Title: test\nAfter this, it must contain different sections. Each one must include:\n- [h2] A section title: generate it properly, based on the data you're provided.\n- A chart\n- Some additional statistics (min, max, average, total). You need to format these into a a table.\n- Below the table, add a brief paragraph that provides a commentary on the data\nImportant: The entire report must written in the Italian language.") - **reportMode** (string (llm)) (required): Report mode. ("llm") - **elements** (array (ReportElementDto)) (required) Array items: - **templateFieldId** (string) (required): Identifier of the placeholder associated with this report element. For standard reports, this value must match the placeholder name used in the markdown template, for example `{{energy_chart}}` or `{{total_consumption}}`. For LLM-generated reports, elements with the same `templateFieldId` are grouped together and exposed to the model as a single logical section of the report. (example: "text0") - **type** (string (text|chart|table)) (required) ("text"|"chart"|"table") - **sources** (array (ReportElementDataSourceDto)) (required): Defines the parameters needed to retrieve the data that will be used to fill the template element. Typically, sources has 1 element. However, if you want a chart with multiple plots, you can specify multiple source elements. Array items: - **params** (object) (required) - **target** (object) (required) - **value** (string) (required): Identifier of the resource the be exported: typically a URN. It is possible to export multiple resources by providing a comma separated list of values. - **label** (string): Label that will replace the target `value`. If multiple `values` are provided, you can can pass a comma separated list of labels. The number of labels must match the number of `values`. - **channelId** (string) (required) (example: "0115c85d-ef3e-4de9-9732-d0c5c4f2c482") - **subtopic** (string) (required): Subtopic from which to retrieve data for export (example: "events.data") - **from** (number): Unix timestamp: number of seconds since 1970 UTC - **to** (number): Unix timestamp: number of seconds since 1970 UTC - **period** (string): ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations (example: "P1Y6M4DT12H30M5S") - **decimation** (object) - **ds** (object) (required): Decimation granularity. Only supports positive integer. (example: "15m") - **dsf** (string (avg|max|min|sum|stddev|variance)) (required): Aggregation algotithm ("avg"|"max"|"min"|"sum"|"stddev"|"variance") - **transform** (string (delta)) ("delta") - **outputFormat** (string (long|wide)) (required): Determines how exported data will be formatted in the output file. Check the following link for more info: https://en.wikipedia.org/wiki/Wide_and_narrow_data In the `long` format exported variables are spread across multiple rows. In the `wide` format exported variables are spread across multiple columns, and each row represents a different timestamp. If `wide` format is selected, `request.colums` must be provided. ("long"|"wide") - **service** (string (messages|resources)) (required): The service from which to fetch the data ("messages"|"resources") - **postProc** (array (ProcessingFunctionDto)): The post-processing function(s) to apply to the retrieved data Array items: - **fn** (string (max|min|add|cumSum|mult|avg)) (required) ("max"|"min"|"add"|"cumSum"|"mult"|"avg") - **key** (string) (required): Defines the key of the object whose value will be processed by the function - **params** (object): Function parameters. Not all processing functions require additional parameters. (example: "For `add` or `mult`: {k: 1}\", \"For `avg`: {k: 1.5, decimals: 3}") - **formats** (array (ReportElementFormatDto)) (required): Defines the formatting parameters of the template element. For example, for elements of type `Chart`: the chart type, the chart color, etc. If multiple `sources` elements have been specified, you must define a `formats` element for each source. So, it must be: `len(formats) == len(sources)`. Array items: - **text** (object) - **key** (string) (required): Defines the key of the object whose value will be displayed in the report (example: "value") - **unitKey** (string): Defines the key of the object whose value will be displayed as unit of measurement (example: "unit") - **chart** (object) - **type** (string (bar|line)) (required) ("bar"|"line") - **xAxis** (object) (required) - **key** (string) (required): Defines the key of the object whose value will be plotted in the X axis - **options** (object) (required) - **type** (string (string|datetime)) (required) ("string"|"datetime") - **format** (string): Formatting string. If X axis represents time, this will be used to format the date. - **yAxis** (object) (required) - **key** (string) (required): Defines the key of the object whose value will be plotted in the Y axis - **label** (string): Chart label - **color** (string): Hexadecimal color string - **canvas** (object) - **width** (number) (required) - **height** (number) (required) - **table** (object) - **columns** (array (ColumnDto)) (required) Array items: - **id** (string) (required): Column `id`. When exporting resource items it must be formatted as: `.`. - **label** (string) (required): Column label ``` -------------------------------- ### Schema: ProcessingFunctionDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ProcessingFunctionDto ```markdown ## Schema: ProcessingFunctionDto Schema definition for ProcessingFunctionDto **Type:** object - **fn** (string (max|min|add|cumSum|mult|avg)) (required) ("max"|"min"|"add"|"cumSum"|"mult"|"avg") - **key** (string) (required): Defines the key of the object whose value will be processed by the function - **params** (object): Function parameters. Not all processing functions require additional parameters. (example: "For `add` or `mult`: {k: 1}\", \"For `avg`: {k: 1.5, decimals: 3}") ``` -------------------------------- ### Schema: DecimationDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for DecimationDto ```markdown ## Schema: DecimationDto Schema definition for DecimationDto **Type:** object - **ds** (object) (required): Decimation granularity. Only supports positive integer. (example: "15m") - **dsf** (string (avg|max|min|sum|stddev|variance)) (required): Aggregation algotithm ("avg"|"max"|"min"|"sum"|"stddev"|"variance") ``` -------------------------------- ### Schema: ReportElementFormatDto Source: https://connhex.com/api/exporter/latest/api.json Schema definition for ReportElementFormatDto ```markdown ## Schema: ReportElementFormatDto Schema definition for ReportElementFormatDto **Type:** object - **text** (object) - **key** (string) (required): Defines the key of the object whose value will be displayed in the report (example: "value") - **unitKey** (string): Defines the key of the object whose value will be displayed as unit of measurement (example: "unit") - **chart** (object) - **type** (string (bar|line)) (required) ("bar"|"line") - **xAxis** (object) (required) - **key** (string) (required): Defines the key of the object whose value will be plotted in the X axis - **options** (object) (required) - **type** (string (string|datetime)) (required) ("string"|"datetime") - **format** (string): Formatting string. If X axis represents time, this will be used to format the date. - **yAxis** (object) (required) - **key** (string) (required): Defines the key of the object whose value will be plotted in the Y axis - **label** (string): Chart label - **color** (string): Hexadecimal color string - **canvas** (object) - **width** (number) (required) - **height** (number) (required) - **table** (object) - **columns** (array (ColumnDto)) (required) Array items: - **id** (string) (required): Column `id`. When exporting resource items it must be formatted as: `.`. - **label** (string) (required): Column label ```