Search documentation
karat

+

K

User Documentation ↗

Search latest observations

POST/api/gotham/v1/observations/latest/{observationSpecId}/search
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.

Gets the latest Observation along each Geotime Track matching the supplied query. Only returns Observations conforming to the given Observation Spec.

Path parameters

observationSpecId
string

Search results will be constrained to Observations conforming to this Observation Spec.

Query parameters

preview
boolean
optional

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

Request body

SearchLatestObservationsRequest
object
Hide child attributes

Hide child attributes

query
object

The query to match to Geotime Tracks.

Show child attributes

Show child attributes

time
object
optional

The time range over which Geotime Tracks with most recent Observations with timestamps falling within this inclusive range will be matched to.

Show child attributes

Show child attributes

start
string
end
string
location
list<GeoPoint>
optional

The polygon within which to search for Geotime Tracks. The polygon must be structured in the following manner:

  1. It must be closed. That is, the first and last point in the list of points must be the same.
  2. There must be a minimum of 4 points including the equal first and last points.
  3. The points must be listed in a counter-clockwise manner.
Show child attributes

Show child attributes

GeoPoint
object
Show child attributes

Show child attributes

longitude
number
latitude
number
elevation
number
optional
property
object
optional

Matches observations which have any of the values specified for this property.

Show child attributes

Show child attributes

property
string

The name of the property in the observation schema

values
list<PropertyValue>
optional
Show child attributes

Show child attributes

PropertyValue
any

Represents the value of a property. The following table provides expected representations of scalar data types:

TypeJSON encodingExample
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Integernumber238940
Longstring"58319870951433"
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"
pageToken
string
optional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and populate the next request's pageToken field with it.

Response body

SearchLatestObservationsResponse
object

Success response

Hide child attributes

Hide child attributes

data
list<Observation>
optional
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.

nextPageToken
string
optional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and populate the next request's pageToken field with it.

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/latest/baz/search?preview=true" \ -d '{"query":{"time":{"start":"2023-01-01T12:00:00Z","end":"2023-03-07T12:10:00Z"}}}'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 [ { "sourceSystemId": "foo", "collectionId": "bar", "observationSpecId": "baz", "trackId": "track0", "position": { "longitude": 0, "latitude": 0 }, "timestamp": "2023-03-05T17:00:00Z", "name": "name0", "staticProperties": [], "liveProperties": [ { "propertyType": "liveProperty", "value": 0 } ] }, { "sourceSystemId": "foo", "collectionId": "bar", "observationSpecId": "baz", "trackId": "track1", "position": { "longitude": 11, "latitude": 1 }, "timestamp": "2023-03-05T17:10:00Z", "name": "name1", "staticProperties": [], "liveProperties": [] } ]