Search documentation
karat

+

K

User Documentation ↗

Write observations

POST/api/gotham/v1/observations
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Writes Observations directly to Geotime. Returns the Observations that could not be written to Geotime with the reason for why they could not be written. Any Observations not in the response are guaranteed to have been written successfully to Geotime's backing data store.

Query parameters

preview
boolean
optional

Represents a boolean value that restricts an endpoint to preview mode when set to true.

Request body

WriteObservationsRequest
list<Observation>

The list of Observations to write to Geotime.

Hide child attributes

Hide child attributes

Observation
object

A geotemporal object along a Geotime Track (SSID, CID, SpecID, TrackID quadruplet).

Show child attributes

Show child attributes

sourceSystemId
string

Globally unique identifier for the system from which this Observation data is sourced. An example might be the name of a database.

collectionId
string

Identifier for the specific data source within the source system for this Observation data. This is a mandatory qualifier in addition to the Source System ID, and is unique within the source system. To extend the above example, this would identify a specific table within the database.

observationSpecId
string

Globally unique identifier for the Observation Specification. Observation Specs are schemas used to define the shape of an Observation. These schemas contain mandatory fields such as timestamp, position and Track ID, as well as dynamically defined fields exposed as static and live properties.

trackId
string

The ID of a series of location points. This is a shared ID between Observations which forms a Track. These IDs are typically derived from the integrated data. For example, a flight identifier used to distinguish a unique voyage by a plane.

position
object
Show child attributes

Show child attributes

longitude
number
latitude
number
elevation
number
optional
timestamp
string
name
string
optional

The name of the entity associated with the Observation. For example, 'My Plane' or 'Air Force One'.

staticProperties
list<ObservationField>
optional

Properties that are expected to remain constant along a Geotime Track. E.g. A plane's tail number.

Show child attributes

Show child attributes

ObservationField
object

A dynamic field that must match a field defined in the Observation's associated ObservationSpec.

Show child attributes

Show child attributes

propertyType
string
value
any

A string that can represent a plain string, GeoJson string, or numeric value.

liveProperties
list<ObservationField>
optional

Properties that are expected to be updated frequently along a Geotime Track. E.g. A plane's heading.

Show child attributes

Show child attributes

ObservationField
object

A dynamic field that must match a field defined in the Observation's associated ObservationSpec.

Show child attributes

Show child attributes

propertyType
string
value
any

A string that can represent a plain string, GeoJson string, or numeric value.

style
object
optional

Describes styling information about how an individual observation should be displayed on the frontend.

Show child attributes

Show child attributes

blueprintIconName
string
optional

The name of an icon from the open source project "blueprint" to be used in the baseball card view of an observation.

symbology
union
optional

An identifier for a symbology icon to use for display on a map.

Show child attributes

Show child attributes

iconSym
object
optional

A built-in generic icon identifier. The color properties, if specified, must be a 6-character hexadecimal string describing the color to use for the icon. The leading # is required.

Show child attributes

Show child attributes

code
string

The code of an icon allowed on a given deployment.

fillColor
string
optional

A 6-character hexadecimal string describing the color to use to fill the icon (if supported). The leading # is required.

strokeColor
string
optional

A 6-character hexadecimal string describing the color to use for the icon's stroke (if supported). The leading # is required.

milSym
object
optional

A builtin set of identifiers that are built-in and follow the MIL-STD-2525 specification.

Show child attributes

Show child attributes

code
string
geometryStyle
object
optional

Describes styling information to control the appearance of observation geometry.

Show child attributes

Show child attributes

strokeWidth
number
optional
strokeColor
string
optional

A 6 character hexadecimal string describing the color of the border on all geometry. Default is "#FDFF00". The leading # is required.

fillColor
string
optional

A 6 character hexadecimal string describing the color to fill all geometry. The leading # is required. By default, the geometry will not be filled and will instead appear "hollow". If you want to fill a geometry, you must specify both fillColor and fillOpacity for this to have any effect.

fillOpacity
number
optional

A number between 0 and 1 (inclusive) which controls the opacity of the fill of all geometry. By default, this is 0. If you want to fill a geometry, you must specify both fillColor and fillOpacity for this to have any effect.

Response body

WriteObservationsResponse
list<InvalidObservation>

Response with information about any Observations that failed to be written.

Hide child attributes

Hide child attributes

InvalidObservation
object
Show child attributes

Show child attributes

observation
object

A geotemporal object along a Geotime Track (SSID, CID, SpecID, TrackID quadruplet).

Show child attributes

Show child attributes

sourceSystemId
string

Globally unique identifier for the system from which this Observation data is sourced. An example might be the name of a database.

collectionId
string

Identifier for the specific data source within the source system for this Observation data. This is a mandatory qualifier in addition to the Source System ID, and is unique within the source system. To extend the above example, this would identify a specific table within the database.

observationSpecId
string

Globally unique identifier for the Observation Specification. Observation Specs are schemas used to define the shape of an Observation. These schemas contain mandatory fields such as timestamp, position and Track ID, as well as dynamically defined fields exposed as static and live properties.

trackId
string

The ID of a series of location points. This is a shared ID between Observations which forms a Track. These IDs are typically derived from the integrated data. For example, a flight identifier used to distinguish a unique voyage by a plane.

position
object
Show child attributes

Show child attributes

longitude
number
latitude
number
elevation
number
optional
timestamp
string
name
string
optional

The name of the entity associated with the Observation. For example, 'My Plane' or 'Air Force One'.

staticProperties
list<ObservationField>
optional

Properties that are expected to remain constant along a Geotime Track. E.g. A plane's tail number.

Show child attributes

Show child attributes

ObservationField
object

A dynamic field that must match a field defined in the Observation's associated ObservationSpec.

Show child attributes

Show child attributes

propertyType
string
value
any

A string that can represent a plain string, GeoJson string, or numeric value.

liveProperties
list<ObservationField>
optional

Properties that are expected to be updated frequently along a Geotime Track. E.g. A plane's heading.

Show child attributes

Show child attributes

ObservationField
object

A dynamic field that must match a field defined in the Observation's associated ObservationSpec.

Show child attributes

Show child attributes

propertyType
string
value
any

A string that can represent a plain string, GeoJson string, or numeric value.

style
object
optional

Describes styling information about how an individual observation should be displayed on the frontend.

Show child attributes

Show child attributes

blueprintIconName
string
optional

The name of an icon from the open source project "blueprint" to be used in the baseball card view of an observation.

symbology
union
optional

An identifier for a symbology icon to use for display on a map.

Show child attributes

Show child attributes

iconSym
object
optional

A built-in generic icon identifier. The color properties, if specified, must be a 6-character hexadecimal string describing the color to use for the icon. The leading # is required.

Show child attributes

Show child attributes

code
string

The code of an icon allowed on a given deployment.

fillColor
string
optional

A 6-character hexadecimal string describing the color to use to fill the icon (if supported). The leading # is required.

strokeColor
string
optional

A 6-character hexadecimal string describing the color to use for the icon's stroke (if supported). The leading # is required.

milSym
object
optional

A builtin set of identifiers that are built-in and follow the MIL-STD-2525 specification.

Show child attributes

Show child attributes

code
string
geometryStyle
object
optional

Describes styling information to control the appearance of observation geometry.

Show child attributes

Show child attributes

strokeWidth
number
optional
strokeColor
string
optional

A 6 character hexadecimal string describing the color of the border on all geometry. Default is "#FDFF00". The leading # is required.

fillColor
string
optional

A 6 character hexadecimal string describing the color to fill all geometry. The leading # is required. By default, the geometry will not be filled and will instead appear "hollow". If you want to fill a geometry, you must specify both fillColor and fillOpacity for this to have any effect.

fillOpacity
number
optional

A number between 0 and 1 (inclusive) which controls the opacity of the fill of all geometry. By default, this is 0. If you want to fill a geometry, you must specify both fillColor and fillOpacity for this to have any effect.

reason
string

The reason the Observation that failed to be written failed.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/gotham/v1/observations?preview=true" \ -d '[{"sourceSystemId":"foo","collectionId":"bar","observationSpecId":"baz","trackId":"track0","position":{"longitude":-122.16219,"latitude":37.44274},"timestamp":"2023-01-01T22:00:00Z","name":"name0","staticProperties":[],"liveProperties":[]},{"sourceSystemId":"foo","collectionId":"bar","observationSpecId":"baz","trackId":"track1","position":{"longitude":-122.16165,"latitude":37.44215},"timestamp":"fakeInvalidTimestamp","name":"name1","staticProperties":[],"liveProperties":[]}]'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [ { "observation": { "sourceSystemId": "foo", "collectionId": "bar", "observationSpecId": "baz", "trackId": "track1", "position": { "longitude": -122.16165, "latitude": 37.44215 }, "timestamp": "fakeInvalidTimestamp", "name": "name1", "staticProperties": [], "liveProperties": [], "style": {} }, "reason": "Invalid timestamp." } ]