POST api/v1/exports/device/{deviceId}/measurements

Request export of measurements for the device.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
deviceId

globally unique identifier

Required

Body Parameters

ExportMeasurementsRequestDto
NameDescriptionTypeAdditional information
StartDate

date

None.

EndDate

date

None.

Format

ExportFormat

None.

Request Formats

application/json, text/json, application/senml+json

Sample:
{
  "StartDate": "2017-08-20T15:26:54.8318539+00:00",
  "EndDate": "2017-08-20T15:26:54.8318539+00:00",
  "Format": 0
}

application/xml, text/xml

Sample:
<ExportMeasurementsRequestDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.ExportMeasurements">
  <EndDate>2017-08-20T15:26:54.8318539+00:00</EndDate>
  <Format>Csv</Format>
  <StartDate>2017-08-20T15:26:54.8318539+00:00</StartDate>
</ExportMeasurementsRequestDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ExportSettingDto
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

DateCreated

date

None.

Deleted

boolean

None.

EndDate

date

None.

FailureReason

string

None.

Format

string

None.

StartDate

date

None.

Status

string

None.

Links

Collection of LinkDto

None.

Actions

Collection of LinkDto

None.

TimeTaken

time interval

None.

DataPoints

integer

None.

OwnerId

The user who requested the export

globally unique identifier

None.

DeviceId

The device/user this export is for.

globally unique identifier

None.

DeviceIds

List of deviceId's covered by this export

Collection of globally unique identifier

None.

Response Formats

application/json, text/json, application/senml+json

Sample:
{
  "Id": "be87169a-2e52-45a8-86c9-a990dcfa896c",
  "DateCreated": "2017-08-20T15:26:54.8318539+00:00",
  "Deleted": true,
  "EndDate": "2017-08-20T15:26:54.8318539+00:00",
  "FailureReason": "sample string 5",
  "Format": "sample string 6",
  "StartDate": "2017-08-20T15:26:54.8318539+00:00",
  "Status": "sample string 8",
  "Links": [
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    },
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    }
  ],
  "Actions": [
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    },
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    }
  ],
  "TimeTaken": "00:00:00.1234567",
  "DataPoints": 10,
  "OwnerId": "adbbb4fc-185e-4b9b-b8e8-f72b352eddc8",
  "DeviceId": "39f91ef2-346a-4984-807d-ea3e9c0c6cd3",
  "DeviceIds": [
    "7fed508a-6fd4-471a-b79c-b368bcc19a35",
    "c0afe053-befb-4a50-8678-f14162dfa63e"
  ]
}

application/xml, text/xml

Sample:
<ExportSettingDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.ExportMeasurements">
  <Actions xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
  </Actions>
  <DataPoints>10</DataPoints>
  <DateCreated>2017-08-20T15:26:54.8318539+00:00</DateCreated>
  <Deleted>true</Deleted>
  <DeviceId>39f91ef2-346a-4984-807d-ea3e9c0c6cd3</DeviceId>
  <DeviceIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:guid>7fed508a-6fd4-471a-b79c-b368bcc19a35</d2p1:guid>
    <d2p1:guid>c0afe053-befb-4a50-8678-f14162dfa63e</d2p1:guid>
  </DeviceIds>
  <EndDate>2017-08-20T15:26:54.8318539+00:00</EndDate>
  <FailureReason>sample string 5</FailureReason>
  <Format>sample string 6</Format>
  <Id>be87169a-2e52-45a8-86c9-a990dcfa896c</Id>
  <Links xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
  </Links>
  <OwnerId>adbbb4fc-185e-4b9b-b8e8-f72b352eddc8</OwnerId>
  <StartDate>2017-08-20T15:26:54.8318539+00:00</StartDate>
  <Status>sample string 8</Status>
  <TimeTaken>PT0.1234567S</TimeTaken>
</ExportSettingDto>