OpenSplitTime API
Posting Raw Times
You can post raw time data in real time to your events using the OpenSplitTime API. This is how OST Remote communicates time data to OpenSplitTime. To post raw times in bulk, you will need to post to the endpoint /api/v1/event_groups/:id/import.
Raw Time Data Format
The body of your POST should look something like this:
{ "data": [ { "type": "raw_time", "attributes": { "source": "my-source-device-with-unique-id", "sub_split_kind": "in", "with_pacer": "false", "entered_time": "2023-08-09 09:16:01-6:00", "split_name": "Telluride", "bib_number": "4", "stopped_here": "false" } }, { "type": "raw_time", "attributes": { "source": "my-source-device-with-unique-id", "sub_split_kind": "out", "with_pacer": "false", "entered_time": "2023-08-09 09:16:06-6:00", "split_name": "Telluride", "bib_number": "4", "stopped_here": "false" } }, { "type": "raw_time", "attributes": { "source": "my-source-device-with-unique-id", "sub_split_kind": "in", "with_pacer": "false", "entered_time": "2023-08-09 09:16:16-6:00", "split_name": "Telluride", "bib_number": "1", "stopped_here": "false" } } ], "data_format": "jsonapi_batch", "limited_response": "true" }
Attributes
The limited_response field is optional. If set to "true", the response will include no body. Otherwise, the response will include a body with the posted Raw Time records.
The data_format field must be set to "jsonapi_batch".
For the attributes, the following rules apply:
Field | Required? | Notes |
---|---|---|
source | Yes | Must be a string. Highly recommended that this be unique to the device posting the data as this will help you diagnose any data issues. |
sub_split_kind | Yes | Must be one of "in" or "out". If the split is set to record only "In" times, then this must always be "in". |
with_pacer | No | Must be one of "true" or "false". |
entered_time | Yes | Must be a string in the format "YYYY-MM-DD HH:MM:SS-6:00". The time zone offset must be included. The time zone offset must be in the format "+HH:MM" or "-HH:MM". |
split_name | Yes | Must be a string. Must exactly match the name of a split that is used in the Event Group. |
bib_number | Yes | Must be a string. This should match the bib number of an existing participant in the Event Group, but any number will be accepted. May include only digits 0-9 or "*". |
stopped_here | No | Must be one of "true" or "false". |