GET api/sites/{sid}/defaultmeasurement

Gets the default measurement for a site.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
sid

The site id.

integer

Required

Body Parameters

None.

Response Information

Resource Description

MeasurementViewModel
NameDescriptionTypeAdditional information
SiteId

integer

Required

Id

integer

None.

UnitId

integer

Required

TypeId

integer

None.

Name

string

Required

Invalid Chars: .!@#$%^&*\|`~=+/?<>()[],"

Leading or trailing white spaces are not allowed

Max length: 30

CompressionMethod

MeasurementCompressionMethod

None.

Notes

string

None.

EventOnIndicator

integer

Range: inclusive between 0 and 1

IsHidden

boolean

None.

IsAutoCalculated

boolean

None.

IsRaw

boolean

None.

IsImported

boolean

None.

IsAsync

boolean

None.

IsVirtual

boolean

None.

color

string

None.

DataStart

date

None.

DataEnd

date

None.

Formulas

Collection of FormulaViewModel

None.

Links

Gets the links.

Collection of LinkModel

None.

Response Formats

application/json, text/json

Sample:
{
  "siteId": 1,
  "id": 2,
  "unitId": 3,
  "typeId": 4,
  "name": "sample string 5",
  "compressionMethod": 0,
  "notes": "sample string 6",
  "eventOnIndicator": 1,
  "isHidden": true,
  "isAutoCalculated": true,
  "isRaw": true,
  "isImported": true,
  "isAsync": true,
  "isVirtual": true,
  "color": "#000000",
  "dataStart": "2024-11-21T08:53:30.3374105+00:00",
  "dataEnd": "2024-11-21T08:53:30.3374105+00:00",
  "formulas": [
    {
      "id": 1,
      "measId": 2,
      "timestamp": "2024-11-21T08:53:30.3374105+00:00",
      "intervalLength": 1,
      "formula": "sample string 4",
      "notes": "sample string 5",
      "nullZero": true,
      "fillGap": true,
      "activationDwellTime": 1,
      "deactivationDwellTime": 1,
      "alertActive": true
    },
    {
      "id": 1,
      "measId": 2,
      "timestamp": "2024-11-21T08:53:30.3374105+00:00",
      "intervalLength": 1,
      "formula": "sample string 4",
      "notes": "sample string 5",
      "nullZero": true,
      "fillGap": true,
      "activationDwellTime": 1,
      "deactivationDwellTime": 1,
      "alertActive": true
    }
  ]
}

application/xml, text/xml

Sample:
<MeasurementViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TelogWebAPI.Models">
  <CompressionMethod>Default</CompressionMethod>
  <DataEnd xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>2024-11-21T08:53:30.3374105Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </DataEnd>
  <DataStart xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>2024-11-21T08:53:30.3374105Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </DataStart>
  <EventOnIndicator>1</EventOnIndicator>
  <Formulas>
    <FormulaViewModel>
      <ActivationDwellTime>1</ActivationDwellTime>
      <AlertActive>true</AlertActive>
      <DeactivationDwellTime>1</DeactivationDwellTime>
      <FillGap>true</FillGap>
      <Formula>sample string 4</Formula>
      <Id>1</Id>
      <IntervalLength>1</IntervalLength>
      <MeasId>2</MeasId>
      <Notes>sample string 5</Notes>
      <NullZero>true</NullZero>
      <Timestamp xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>2024-11-21T08:53:30.3374105Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </Timestamp>
    </FormulaViewModel>
    <FormulaViewModel>
      <ActivationDwellTime>1</ActivationDwellTime>
      <AlertActive>true</AlertActive>
      <DeactivationDwellTime>1</DeactivationDwellTime>
      <FillGap>true</FillGap>
      <Formula>sample string 4</Formula>
      <Id>1</Id>
      <IntervalLength>1</IntervalLength>
      <MeasId>2</MeasId>
      <Notes>sample string 5</Notes>
      <NullZero>true</NullZero>
      <Timestamp xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>2024-11-21T08:53:30.3374105Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </Timestamp>
    </FormulaViewModel>
  </Formulas>
  <Id>2</Id>
  <IsAsync>true</IsAsync>
  <IsAutoCalculated>true</IsAutoCalculated>
  <IsHidden>true</IsHidden>
  <IsImported>true</IsImported>
  <IsRaw>true</IsRaw>
  <IsVirtual>true</IsVirtual>
  <Name>sample string 5</Name>
  <Notes>sample string 6</Notes>
  <SiteId>1</SiteId>
  <TypeId>4</TypeId>
  <UnitId>3</UnitId>
  <color>#000000</color>
</MeasurementViewModel>