Create export request
POST/exports
Create export request.
Authorization Action:
exporter:exports:create
Request
- application/json
Bodyrequired
format objectrequired
typestringrequired
Possible values: [recurring, oneTime]
items object[]required
periodicitystring
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
Possible values: Value must match regular expression durationRegExp
Example:
P1Y6M4DT12H30M5Snotification objectrequired
Responses
- 201
- 400
- 429
- application/json
- Schema
- Example (auto)
Schema
format objectrequired
typestringrequired
Possible values: [recurring, oneTime]
items object[]required
periodicitystring
ISO8601 Duration: https://en.wikipedia.org/wiki/ISO_8601#Durations
Possible values: Value must match regular expression durationRegExp
Example:
P1Y6M4DT12H30M5Snotification objectrequired
idstringrequired
createdAtstring<date-time>required
updatedAtstring<date-time>required
deletedAtstring<date-time>required
{
"format": {
"extension": "csv",
"columns": [
{
"id": "unit",
"label": "unit of measure"
}
],
"timezone": {}
},
"type": "recurring",
"items": [
{
"params": {
"target": {
"value": "urn:cpt:smartdevice:nid:D0CF5EFFFE26FDAB1:onoff",
"label": "onoff"
},
"channelId": "0115c85d-ef3e-4de9-9732-d0c5c4f2c482",
"subtopic": "events.data",
"from": 0,
"to": 0,
"period": "P1Y6M4DT12H30M5S",
"decimation": {
"ds": "15m",
"dsf": "avg"
}
},
"filename": "string"
}
],
"periodicity": "P1Y6M4DT12H30M5S",
"notification": {
"messages": [
{
"policy": "onSuccess",
"medium": "email",
"title": "string",
"text": "string"
}
]
},
"id": "string",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"deletedAt": "2024-07-29T15:51:28.071Z"
}
Missing user identity id
Maximum number of queued exports reached
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://connhex.com/exports");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"format\": {\n \"extension\": \"csv\",\n \"columns\": [\n {\n \"id\": \"unit\",\n \"label\": \"unit of measure\"\n }\n ],\n \"timezone\": {}\n },\n \"type\": \"recurring\",\n \"items\": [\n {\n \"params\": {\n \"target\": {\n \"value\": \"urn:cpt:smartdevice:nid:D0CF5EFFFE26FDAB1:onoff\",\n \"label\": \"onoff\"\n },\n \"channelId\": \"0115c85d-ef3e-4de9-9732-d0c5c4f2c482\",\n \"subtopic\": \"events.data\",\n \"from\": 0,\n \"to\": 0,\n \"period\": \"P1Y6M4DT12H30M5S\",\n \"decimation\": {\n \"ds\": \"15m\",\n \"dsf\": \"avg\"\n }\n },\n \"filename\": \"string\"\n }\n ],\n \"periodicity\": \"P1Y6M4DT12H30M5S\",\n \"notification\": {\n \"messages\": [\n {\n \"policy\": \"onSuccess\",\n \"medium\": \"email\",\n \"title\": \"string\",\n \"text\": \"string\"\n }\n ]\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());