Skip to main content
Omnitracs Knowledge Base


GetObservations (Notification function)

The Notification web service includes data about a number of operations, some of which existed elsewhere and were moved here. Examples: unassigned driving and odometer jumps.

XML Request

The GetObservations function takes the following input parameters:

Parameter Type Optional Description
LastObservationID Int Yes Used for successive calls. Next response will include all records after the LastObservationID speicified. (Max records returned is 1000.) If not preesnt or a value of 0 is provided, the StartTime specified will be used
StartTime dateTime Yes Earliest possible time (in GMT) for the first returned observation. Used if the LastObservationID is 0 or not specified
ObservationTypeFilter List of strings Yes A list of strings corresponding to observation types. If omitted, all present observations are returned
ObservationType string Yes A type of observation to be returned. currently supported: UNASSIGNED_DRIVING_STARTED, UNASSIGNED_DRIVING_ENDED and ODOMETER_JUMP


  • One valied value of LastObservationID or StartTime needs to be present in the request.
  • ObservationType contents are strings and not ENUM values, which makes it easier to add new types.
            <!--Zero or more repetitions:-->  
  • Note that there may be name-space related prefix with the tags, for example, <GetObservationsRequest> will show as <xyz:GetObservationsRequest>, where xyz is an abbreviation of the name-space.

XML Response

The XML response will have the following parameters

Parameter Type Optional Description
Observation object Yes A squence of observatinos is returned, each contains the following parameters
ObservationID Long No The (unique) ID of the observation
ObservationType String No The type of the observation
StartTime dateTime No The start time of the observation in UTC
EndTime dateTime Yes The end time of the observation in UTC. Certain observations will not have this value set
ServerProcessedTime dateTime No The time that the sever processed the event that created this observation in UTC
Identifier String Yes An indicator of which entity the observation is about. It varies based on the observation type
Attributes String Yes A base64 encoded string that contains an XML structure containing attributes for the observation. The format of the XML varies by observation type

The following table specifies te type of Identifier and presence of EndTime for each supported observation type:

_ObservationType _ Identifier EndTime present?

Attributes included in the Attributes decoded string, in order, including type and optional. Example: Lattitude (float, Y) means it is a float and optional:

ObservationType Attribute 1 Attribute 2 Attribute 3 Attribute 4
UNASSIGNED_DRIVING_STARTED Latitude (float, Y) Longitude (float, Y) Odometer (float, Y) Co-DriverID (string, Y)
UNASSIGNED_DRIVING_ENDED Latitude (float, Y) Longitude (float, Y) Odometer (float, Y) Co-DriverID (string, Y)
ODOMETER_JUMP UA (Int, N) StartOdometer (Float, N) EndOdometer (Float, N)  
      <ns3:GetObservationsResponse xmlns:ns2="" xmlns:ns3="">  

Decoding the base64 encoded value for the UNASSIGNED_DRIVING_STARTED observation would result in an XML like the following example (and similar for the UNASSIGNED_DRIVING_ENDED observation):

      <Location>5 mi SSE of San Diego, CA</Location>  

Decoding the base64 encoded value for the ODOMETER_JUMP observation would result in an XML like the following example:

      <EndOdometer>5 mi SSE of San Diego, CA</EndOdometer>  

You can download the XSD for each observation base64 encoded value from the attachments for this page. (Tools -> Attachments)

  • Was this article helpful?