POST api/v3/UnitLocation/SetUnitLocation

Sets the location of a unit

Request Information

URI Parameters

None.

Body Parameters

UnitLocationInput object with the gps information.

UnitLocationInput
NameDescriptionTypeAdditional information
Uid

UnitId of the apparatus that the location is for

integer

None.

Tms

The timestamp of the location in UTC

date

None.

Lat

GPS Latitude of the Unit

string

None.

Lon

GPS Longitude of the Unit

string

None.

Acc

GPS Latitude\Longitude Accuracy of the Unit

string

None.

Alt

GPS Altitude of the Unit

string

None.

Alc

GPS Altitude Accuracy of the Unit

string

None.

Spd

GPS Speed of the Unit

string

None.

Hdn

GPS Heading of the Unit

string

None.

Request Formats

application/json

Sample:
{
  "Uid": 1,
  "Tms": "2017-10-17T21:19:51.046914+00:00",
  "Lat": "sample string 2",
  "Lon": "sample string 3",
  "Acc": "sample string 4",
  "Alt": "sample string 5",
  "Alc": "sample string 6",
  "Spd": "sample string 7",
  "Hdn": "sample string 8"
}

application/xml, text/xml

Sample:
<UnitLocationInput xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Resgrid.Web.Services.Controllers.Version3.Models.UnitLocation">
  <Acc>sample string 4</Acc>
  <Alc>sample string 6</Alc>
  <Alt>sample string 5</Alt>
  <Hdn>sample string 8</Hdn>
  <Lat>sample string 2</Lat>
  <Lon>sample string 3</Lon>
  <Spd>sample string 7</Spd>
  <Tms>2017-10-17T21:19:51.046914+00:00</Tms>
  <Uid>1</Uid>
</UnitLocationInput>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Returns HttpStatusCode Created if successful, BadRequest otherwise.

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.