Skip to main content

Time Series Data API

General

The Koherent Time Series Data API is used for retrieving historical measurement data, via a HTTP REST API.

API Base URL

The base URL for all API calls is

https://api.koherent.io

Firewalls

If using corporate firewalls or similar software, it might be necessary to whitelist the above base URL and the URL used for downloading measurement data:

https://koherent-reservoir-analytics-prod.s3.eu-north-1.amazonaws.com

Authentication

Auth is required for all API endpoints and is done by sending the provided API key in the Authorization header in the format

"Authorization": "Bearer your-api-key"

Koherent Management & Data API keys are long strings beginning with the identifier kma_. The keys are user and use-case specific and should be considered confidential. If you suspect that your API key has been compromised, please contact Koherent to have it reset.

Endpoints

Measurement data

Used for retrieving historical measurement data for a specific Grid.

Due to technical constraints, there may be a delay of up to 24 hours between measurement and the data being available to query via this API.

Get measurements in time range

GET /grids/:gridUid/data/measurements

Fetch measurements in a time range at a specific granularity. Depending on the Grid configuration, the data may be either of position or distance type.

Query limits: Currently, the time range between query start and end date is limited to a maximum of 25 hours. The maximum number of query requests is also limited per day.

Path parameters
NameTypeData typeDescription
gridUidrequiredstringThe UID of the Grid to query data for
Query parameters
NameTypeData typeDescription
startTimeMsrequired*int32Time range start value (Unix time in milliseconds, e.g. 1724773826000)
endTimeMsrequired*int32Time range end value (Unix time in milliseconds)
startTimeISOrequired*stringTime range start value (ISO 8601 UTC date-time string, e.g. 2024-08-27T15:50:26.000Z)
endTimeISOrequired*stringTime range end value (ISO 8601 UTC date-time string)
granularityMsoptionalint32Aggregate data to desired time interval between data points (milliseconds). Defaults to no aggregation
columnsoptionalstringThe data columns to include. Separate multiple values with commas. The available columns are listed in the data types section. Defaults to all.
targetsoptionalstringThe IDs of the targets to retrieve data for. Separate multiple values with commas. Defaults to all
dataTypeoptionalstringThe type of data to retrieve. Either position or distance. Defaults to position.

*) Time range endpoints must always be provided. I.e. either startTimeMs and endTimeMs OR startTimeISO and endTimeISO must be included in all requests.

Responses
HTTP statusStatuscontent-typeResponse
200Successtext/csvA CSV formatted table of either position or distance data
400Invalid requestapplication/jsonError
404Grid not foundapplication/jsonError
429Too many requestsapplication/jsonError

Data Types

Position Data (CSV)

ColumnData typeDescription
target_idstringThe ID of the target
timestampstringThe time of the measurement in UTC (ISO 8601 date-time string)
xfloat64Target x coordinate
yfloat64Target y coordinate
zfloat64Target z coordinate
yawfloat64Target yaw angle in degrees
pitchfloat64Target pitch angle in degrees
rollfloat64Target roll angle in degrees
error_xfloat64Target x coordinate error estimate
error_yfloat64Target y coordinate error estimate
error_zfloat64Target z coordinate error estimate
error_yawfloat64Target yaw angle error estimate in degrees
error_pitchfloat64Target pitch angle error estimate in degrees
error_rollfloat64Target roll angle error estimate in degrees

Example

"timestamp","x","y"
"2024-09-27T13:04:57.850255286Z","61.448910842784292","-0.1233040417274127"
"2024-09-27T13:04:57.950255286Z","61.448901621545484","-0.12332864493494869"

Distance Data (CSV)

FieldTypeData typeDescription
target_idstringThe ID of the target
timestamprequiredstringThe time of the measurement (ISO 8601 timestamp)
drequiredfloat64The distance in meters
error_drequiredfloat64The distance error estimate in meters

Example

"timestamp","d"
"2025-01-14T22:56:01.5782653Z","84.298151721545321"

Error

FieldData typeDescription
statusintA HTTP status code
messagestringA human-readable error description

Example

{
"status": 400, "message": "Bad request: Requested non-existent column 'foo'"
}

Examples

Using cURL.

Fetch measurement data and write it to the file data.csv:

curl --location 'https://api.koherent.io/grids/some-grid-uid/data/measurements' \
--url-query 'startTimeISO=2024-10-01T00:00:00Z' \
--url-query 'endTimeISO=2024-10-02T00:00:00Z' \
--url-query 'columns=timestamp,target_id,x,y,z' \
--url-query 'granularityMs=1000' \
--fail \
--header 'Authorization: Bearer <your-api-key>' \
> data.csv