POST api/v3/UnitState/CommitUnitStates

Sets the status/action for the current user.

Request Information

URI Parameters

None.

Body Parameters

StatusInput object with the Status/Action to set.

Collection of UnitStateInputV3
NameDescriptionTypeAdditional information
Uid

UnitId of the apparatus that the state is being set for

integer

None.

Typ

The UnitStateType of the Unit

integer

None.

Rto

The Call/Station the unit is responding to

integer

None.

Tms

The timestamp of the status event in UTC

date

None.

Lts

The timestamp of the status event in the local time of the device

date

None.

Not

User provided note for this event

string

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.

Eid

The event id used for queuing on mobile applications

integer

None.

Roles

The accountability roles filed for this event

Collection of RoleV3

None.

Request Formats

application/json

Sample:
[
  {
    "Uid": 1,
    "Typ": 2,
    "Rto": 3,
    "Tms": "2017-03-22T14:02:48.1491515+00:00",
    "Lts": "2017-03-22T14:02:48.1648064+00:00",
    "Not": "sample string 4",
    "Lat": "sample string 5",
    "Lon": "sample string 6",
    "Acc": "sample string 7",
    "Alt": "sample string 8",
    "Alc": "sample string 9",
    "Spd": "sample string 10",
    "Hdn": "sample string 11",
    "Eid": 12,
    "Roles": [
      {
        "Id": 1,
        "Eid": 2,
        "Uid": "sample string 3",
        "Rid": 4,
        "Nme": "sample string 5"
      },
      {
        "Id": 1,
        "Eid": 2,
        "Uid": "sample string 3",
        "Rid": 4,
        "Nme": "sample string 5"
      }
    ]
  },
  {
    "Uid": 1,
    "Typ": 2,
    "Rto": 3,
    "Tms": "2017-03-22T14:02:48.1491515+00:00",
    "Lts": "2017-03-22T14:02:48.1648064+00:00",
    "Not": "sample string 4",
    "Lat": "sample string 5",
    "Lon": "sample string 6",
    "Acc": "sample string 7",
    "Alt": "sample string 8",
    "Alc": "sample string 9",
    "Spd": "sample string 10",
    "Hdn": "sample string 11",
    "Eid": 12,
    "Roles": [
      {
        "Id": 1,
        "Eid": 2,
        "Uid": "sample string 3",
        "Rid": 4,
        "Nme": "sample string 5"
      },
      {
        "Id": 1,
        "Eid": 2,
        "Uid": "sample string 3",
        "Rid": 4,
        "Nme": "sample string 5"
      }
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfUnitStateInput xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Resgrid.Web.Services.Controllers.Version3.Models.Units">
  <UnitStateInput>
    <Acc>sample string 7</Acc>
    <Alc>sample string 9</Alc>
    <Alt>sample string 8</Alt>
    <Eid>12</Eid>
    <Hdn>sample string 11</Hdn>
    <Lat>sample string 5</Lat>
    <Lon>sample string 6</Lon>
    <Lts>2017-03-22T14:02:48.1648064+00:00</Lts>
    <Not>sample string 4</Not>
    <Roles>
      <Role>
        <Eid>2</Eid>
        <Id>1</Id>
        <Nme>sample string 5</Nme>
        <Rid>4</Rid>
        <Uid>sample string 3</Uid>
      </Role>
      <Role>
        <Eid>2</Eid>
        <Id>1</Id>
        <Nme>sample string 5</Nme>
        <Rid>4</Rid>
        <Uid>sample string 3</Uid>
      </Role>
    </Roles>
    <Rto>3</Rto>
    <Spd>sample string 10</Spd>
    <Tms>2017-03-22T14:02:48.1491515+00:00</Tms>
    <Typ>2</Typ>
    <Uid>1</Uid>
  </UnitStateInput>
  <UnitStateInput>
    <Acc>sample string 7</Acc>
    <Alc>sample string 9</Alc>
    <Alt>sample string 8</Alt>
    <Eid>12</Eid>
    <Hdn>sample string 11</Hdn>
    <Lat>sample string 5</Lat>
    <Lon>sample string 6</Lon>
    <Lts>2017-03-22T14:02:48.1648064+00:00</Lts>
    <Not>sample string 4</Not>
    <Roles>
      <Role>
        <Eid>2</Eid>
        <Id>1</Id>
        <Nme>sample string 5</Nme>
        <Rid>4</Rid>
        <Uid>sample string 3</Uid>
      </Role>
      <Role>
        <Eid>2</Eid>
        <Id>1</Id>
        <Nme>sample string 5</Nme>
        <Rid>4</Rid>
        <Uid>sample string 3</Uid>
      </Role>
    </Roles>
    <Rto>3</Rto>
    <Spd>sample string 10</Spd>
    <Tms>2017-03-22T14:02:48.1491515+00:00</Tms>
    <Typ>2</Typ>
    <Uid>1</Uid>
  </UnitStateInput>
</ArrayOfUnitStateInput>

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.