Search documentation
karat

+

K

User Documentation ↗

Search observation histories

POST/api/gotham/v1/observations/history/{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 clipped Observation histories along each Geotime Track matching the supplied query. Histories are clipped based on the supplied history window. If no history window is supplied, a default history window of the past 7 days is used. 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

SearchObservationHistoryRequest
object
Hide child attributes

Hide child attributes

query
object

The query to match to Geotime Tracks.

Show child attributes

Show child attributes

historyWindow
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

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

SearchObservationHistoryResponse
object

Success response

Hide child attributes

Hide child attributes

data
list<Track>
optional
Show child attributes

Show child attributes

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/history/baz/search?preview=true" \ -d '{"query":{"time":{"start":"2023-01-01T12:00:00Z","end":"2023-03-07T12:10:00Z"},"historyWindow":{"start":"2023-03-07T12: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 { "data": { "trackRid": "ri.gotham-1.1.foo.bar.baz.track0", "observations": [ { "sourceSystemId": "foo", "collectionId": "bar", "observationSpecId": "baz", "trackId": "track0", "position": { "longitude": 0, "latitude": 0 }, "timestamp": "2023-03-05T17:00:00Z", "name": "name0", "staticProperties": [], "liveProperties": [] }, { "sourceSystemId": "foo", "collectionId": "bar", "observationSpecId": "baz", "trackId": "track0", "position": { "longitude": 11, "latitude": 1 }, "timestamp": "2023-03-05T17:10:00Z", "name": "name0", "staticProperties": [], "liveProperties": [] } ] } }