Create export request
POST/exports
Create export request.
Authorization Action:
exporter:exports:create
Request
- application/json
Body
required
- Array [
- ]
- Array [
- MessageExportItemParamsDto
- ResourceExportItemParamsDto
- ReportItemParamsDto
- Array [
- Array [
- MessageExportItemParamsDto
- ResourceExportItemParamsDto
- Array [
- ]
- ]
- Array [
- Array [
- ]
- ]
- ]
- ]
- Array [
- ]
format objectrequired
Possible values: [csv
, xlsx
, pdf
]
columns object[]
Define how exported data fields are mapped to the output file
Column id
.
When exporting resource items it must be formatted as: <type>.<attribute>
.
Column label
Default value: utc
Target timezone: all data field will be remapped to this timezone
Possible values: [tabular
, expanded
]
Default value: tabular
Possible values: [recurring
, oneTime
]
items object[]required
params objectrequired
target objectrequired
Identifier of the resource the be exported: typically a URN
Label that will replace the target value
Subtopic from which to retrieve data for export
Unix timestamp: number of seconds since 1970 UTC
Unix timestamp: number of seconds since 1970 UTC
Possible values: Value must match regular expression durationRegExp
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
decimation object
Decimation granularity. Only supports positive integer.
Possible values: [avg
, max
, min
, sum
, stddev
, variance
]
Aggregation algotithm
Possible values: [delta
]
Resource type (e.g. installations, devices, customers, etc.)
IDs of the resources to be exported
Associated resources to be included.
For example, if a resource installation
has an association to a device
resource,
by settings include=devices
you create export the installations data together with their associated devices.
page object
Template object in JSON format
elements object[]required
ID of template key associated to the report element
Possible values: [text
, chart
, table
]
sources object[]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.
params objectrequired
The parameters associated to the service request
target objectrequired
Identifier of the resource the be exported: typically a URN
Label that will replace the target value
Subtopic from which to retrieve data for export
Unix timestamp: number of seconds since 1970 UTC
Unix timestamp: number of seconds since 1970 UTC
Possible values: Value must match regular expression durationRegExp
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
decimation object
Decimation granularity. Only supports positive integer.
Possible values: [avg
, max
, min
, sum
, stddev
, variance
]
Aggregation algotithm
Possible values: [delta
]
Resource type (e.g. installations, devices, customers, etc.)
IDs of the resources to be exported
Associated resources to be included.
For example, if a resource installation
has an association to a device
resource,
by settings include=devices
you create export the installations data together with their associated devices.
page object
Possible values: [messages
, resources
]
The service from which to fetch the data
postProc object[]
The post-processing function(s) to apply to the retrieved data
Possible values: [max
, min
, add
, cumSum
, mult
, avg
]
Defines the key of the object whose value will be processed by the function
Function parameters. Not all processing functions require additional parameters.
formats object[]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)
.
text object
Defines the key of the object whose value will be displayed in the report
Defines the key of the object whose value will be displayed as unit of measurement
chart object
Possible values: [bar
, line
]
xAxis objectrequired
X axis chart parameters
Defines the key of the object whose value will be plotted in the X axis
options objectrequired
Possible values: [string
, datetime
]
Formatting string. If X axis represents time, this will be used to format the date.
yAxis objectrequired
Y axis chart parameters
Defines the key of the object whose value will be plotted in the Y axis
Chart label
Hexadecimal color string
canvas object
table object
columns object[]required
Column id
.
When exporting resource items it must be formatted as: <type>.<attribute>
.
Column label
Name of the output file (without extension)
Possible values: Value must match regular expression durationRegExp
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
Period start expressed in Unix timestamp. If not specified, the creation date of the request will be used.
notification objectrequired
messages object[]required
Notification messages. For each notification, there must be exactly two notification
messages with the two different policies (onSuccess
, onFailure
)
Possible values: [onSuccess
, onFailure
]
The notification policy: whether it is associated with a success event (export delivered), or a failure event (export failed)
Possible values: [email
, telegram
, slack
, discord
]
Responses
- 201
- 400
- 429
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- MessageExportItemParamsDto
- ResourceExportItemParamsDto
- ReportItemParamsDto
- Array [
- Array [
- MessageExportItemParamsDto
- ResourceExportItemParamsDto
- Array [
- ]
- ]
- Array [
- Array [
- ]
- ]
- ]
- ]
- Array [
- ]
format objectrequired
Possible values: [csv
, xlsx
, pdf
]
columns object[]
Define how exported data fields are mapped to the output file
Column id
.
When exporting resource items it must be formatted as: <type>.<attribute>
.
Column label
Default value: utc
Target timezone: all data field will be remapped to this timezone
Possible values: [tabular
, expanded
]
Default value: tabular
Possible values: [recurring
, oneTime
]
items object[]required
params objectrequired
target objectrequired
Identifier of the resource the be exported: typically a URN
Label that will replace the target value
Subtopic from which to retrieve data for export
Unix timestamp: number of seconds since 1970 UTC
Unix timestamp: number of seconds since 1970 UTC
Possible values: Value must match regular expression durationRegExp
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
decimation object
Decimation granularity. Only supports positive integer.
Possible values: [avg
, max
, min
, sum
, stddev
, variance
]
Aggregation algotithm
Possible values: [delta
]
Resource type (e.g. installations, devices, customers, etc.)
IDs of the resources to be exported
Associated resources to be included.
For example, if a resource installation
has an association to a device
resource,
by settings include=devices
you create export the installations data together with their associated devices.
page object
Template object in JSON format
elements object[]required
ID of template key associated to the report element
Possible values: [text
, chart
, table
]
sources object[]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.
params objectrequired
The parameters associated to the service request
target objectrequired
Identifier of the resource the be exported: typically a URN
Label that will replace the target value
Subtopic from which to retrieve data for export
Unix timestamp: number of seconds since 1970 UTC
Unix timestamp: number of seconds since 1970 UTC
Possible values: Value must match regular expression durationRegExp
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
decimation object
Decimation granularity. Only supports positive integer.
Possible values: [avg
, max
, min
, sum
, stddev
, variance
]
Aggregation algotithm
Possible values: [delta
]
Resource type (e.g. installations, devices, customers, etc.)
IDs of the resources to be exported
Associated resources to be included.
For example, if a resource installation
has an association to a device
resource,
by settings include=devices
you create export the installations data together with their associated devices.
page object
Possible values: [messages
, resources
]
The service from which to fetch the data
postProc object[]
The post-processing function(s) to apply to the retrieved data
Possible values: [max
, min
, add
, cumSum
, mult
, avg
]
Defines the key of the object whose value will be processed by the function
Function parameters. Not all processing functions require additional parameters.
formats object[]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)
.
text object
Defines the key of the object whose value will be displayed in the report
Defines the key of the object whose value will be displayed as unit of measurement
chart object
Possible values: [bar
, line
]
xAxis objectrequired
X axis chart parameters
Defines the key of the object whose value will be plotted in the X axis
options objectrequired
Possible values: [string
, datetime
]
Formatting string. If X axis represents time, this will be used to format the date.
yAxis objectrequired
Y axis chart parameters
Defines the key of the object whose value will be plotted in the Y axis
Chart label
Hexadecimal color string
canvas object
table object
columns object[]required
Column id
.
When exporting resource items it must be formatted as: <type>.<attribute>
.
Column label
Name of the output file (without extension)
Possible values: Value must match regular expression durationRegExp
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
Period start expressed in Unix timestamp. If not specified, the creation date of the request will be used.
notification objectrequired
messages object[]required
Notification messages. For each notification, there must be exactly two notification
messages with the two different policies (onSuccess
, onFailure
)
Possible values: [onSuccess
, onFailure
]
The notification policy: whether it is associated with a success event (export delivered), or a failure event (export failed)
Possible values: [email
, telegram
, slack
, discord
]
{
"format": {
"extension": "csv",
"columns": [
{
"id": "string",
"label": "string"
}
],
"timezone": "utc",
"template": "tabular"
},
"type": "recurring",
"items": [
{
"params": {},
"filename": "string"
}
],
"periodicity": "P1Y6M4DT12H30M5S",
"periodStart": 0,
"notification": {
"messages": [
{
"policy": "onSuccess",
"medium": "email",
"title": "string",
"text": "string"
}
]
},
"id": "string",
"createdAt": "2025-01-13T15:42:36.049Z",
"updatedAt": "2025-01-13T15:42:36.049Z",
"deletedAt": "2025-01-13T15:42:36.049Z"
}
Missing user identity id
Maximum number of queued exports reached