GuidesAPI Reference
Guides

Manage trace output streams

Tracking service publishes traces to the stream layer in the HERE platform catalog.

Traces are published to tc-traces layer within the catalog.

Messages sent to the stream are in JSON format and contain following properties:

  • type: <string>, Type of the message, identifies the used data format. The only supported value is traces.
  • version: <string>, Data format version. The only supported value is 1.0.
  • traces: <array>, Array of traces objects.
  • correlationId: <uuid>, ID used for tracing requests. Used for logging and error reporting.

The following is an example of a traces message:

{
  "type": "traces",
  "version": "1.0",
  "traces": [
    {
      "timestamp": 1451425708216,
      "position": {
        "lat": "52.4988217",
        "lng": "13.35170005",
        "alt": "86",
        "accuracy": "25",
      },
      "system": {
        "reportedSensorData": {
          "pressureHpa": 994.416,
          "batteryLevel": 100,
          "temperatureC": 24.46,
          "relativeHumidity": 31.37
        }
      },
      "payload": {},
      "serverTimestamp": 1451425710434
    }
  ],
  "correlationId": "06d4f6ef-b323-43f1-b1ca-e5f15df546c7",
  "trackingId": "HERE-626daaf1-cd80-4165-8785-1718cf76bd07"
}

To learn how to enable and receive traces, see Receive traces from output stream.

Traces schema

For specification of traces stream messages, refer to the schema below.

Traces schema
openapi: 3.0.0

info:
  version: 1.0.0
  title: Output stream events
  description: |
    Definition for events sent to output streams. The definition is in outputStreamEvents.

paths: {}

components:
  schemas:
    outputStreamEvents:
      title: Output stream events
      description: Output stream events object
      type: object
      additionalProperties: false
      required:
        - type
        - version
        - events
        - correlationId
      properties:
        type:
          description: Type of the input data, identifies the used data format.
          type: string
          enum:
            - events
        version:
          description: Data format version.
          type: string
          enum:
            - '1.0'
        events:
          type: array
          items:
            oneOf:
              - $ref: 'booleanSensorEvent.yml#/components/schemas/booleanSensorEvent'
              - $ref: 'rangeSensorEvent.yml#/components/schemas/rangeSensorEvent'
              - $ref: 'valueSensorEvent.yml#/components/schemas/valueSensorEvent'
              - $ref: 'geofenceEvent.yml#/components/schemas/geofenceEvent'
              - $ref: 'locationEvent.yml#/components/schemas/locationEvent'
              - $ref: 'stockEvent.yml#/components/schemas/stockEvent'
              - $ref: 'dwellingEvent.yml#/components/schemas/dwellingEvent'
              - $ref: 'detentionEvent.yml#/components/schemas/detentionEvent'
              - $ref: 'utilizationEvent.yml#/components/schemas/utilizationEvent'
              - $ref: 'shipmentEtaChangeEvent.yml#/components/schemas/shipmentEtaChangeEvent'
              - $ref: 'shipmentScheduleEvent.yml#/components/schemas/shipmentScheduleEvent'
              - $ref: 'shipmentStateChangeEvent.yml#/components/schemas/shipmentStateChangeEvent'
        correlationId:
          type: string
          format: uuid
          description: |
              ID used for correlating requests within HERE Tracking.
              Used for logging and error reporting.
              Must be a valid UUIDv4.