{"_id":"564b86484f06ef2b006b08b8","parentDoc":null,"__v":3,"project":"55773a5ba042551900b002cb","user":"546d17e2eb9cfd1400dd4529","editedParams":true,"version":{"_id":"55773a5ba042551900b002ce","project":"55773a5ba042551900b002cb","__v":17,"createdAt":"2015-06-09T19:11:23.764Z","releaseDate":"2015-06-09T19:11:23.764Z","categories":["55773a5ca042551900b002cf","55773a6ce6063e0d00481380","55773ab007e7110d001043ec","55773abaa042551900b002d5","55773ac207e7110d001043ed","55773acb07e7110d001043ee","55773ad3a042551900b002d6","55773adce6063e0d00481383","55773ae4a042551900b002d7","55773af307e7110d001043ef","55773af907e7110d001043f0","55773b0407e7110d001043f1","563a4f7ad25e8919005f3f39","563a4fcaa19edf0d00972321","564a70dc4cd0521700523edf","564b797bcc472d0d00da9435","564b855b766d4923004e1fd1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Motherboard","version_clean":"1.0.0","version":"1"},"category":{"_id":"564b855b766d4923004e1fd1","project":"55773a5ba042551900b002cb","pages":["564b863dae154821005080cb","564b86484f06ef2b006b08b8","564b865785e4e92b00fb4fa7","564b866bdda79a19000f2677","564b867885e4e92b00fb4fa9","56a9205d3c7e030d00797245","56a9206f1bb4420d004cac97","56a92093bd92180d00e1fc2e","56a92a13c48ee00d0092e2a2"],"version":"55773a5ba042551900b002ce","__v":9,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-11-17T19:51:55.701Z","from_sync":false,"order":11,"slug":"live-api","title":"Live API"},"editedParams2":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-17T19:55:52.598Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"name":null,"code":"{\n    \"code\": 200,\n    \"status\": \"success\",\n    \"data\": {\n        \"date\": \"2017-02-21 21:44:10+09:00\",\n        \"start_time\": \"2016-05-14 06:40:00+09:00\",\n        \"event_id\": \"97640\",\n        \"event_name\": \"2016 ITU World Triathlon Yokohama\",\n        \"prog_id\": \"280981\",\n        \"prog_name\": \"Elite Men\",\n        \"wetsuit\": \"false\",\n        \"sandbox\": \"true\",\n        \"num_athletes\": \"65\",\n        \"status\": \"official\",\n        \"latest\": {\n            \"segment_id\": \"17\",\n            \"segment_name\": \"Finish\",\n            \"num_athletes\": \"54\"\n        },\n        \"conditions\": {\n            \"air_temp\": \"16.5\",\n            \"water_temp\": \"18.4\"\n        },\n        \"athletes\": [\n            {\n                \"id\": \"11402\",\n                \"start_num\": \"1\",\n                \"name\": \"Mario Mola\",\n                \"country\": \"ESP\",\n                \"segment_id\": \"17\",\n                \"time\": \"01:46:26.40\",\n                \"difference\": \"00:00:00.000\",\n                \"position\": \"1\",\n                \"status\": null,\n                \"splits\": [\n                    {\n                        \"id\": \"1\",\n                        \"name\": \"Swim Lap 1\",\n                        \"total_time\": \"00:09:51.990\",\n                        \"time\": \"00:09:51.990\",\n                        \"difference\": \"00:00:23.830\",\n                        \"position\": \"50\"\n                    },\n                    {\n                        \"id\": \"2\",\n                        \"name\": \"Swim Exit\",\n                        \"total_time\": \"00:19:39.290\",\n                        \"time\": \"00:09:47.300\",\n                        \"difference\": \"00:00:33.400\",\n                        \"position\": \"46\"\n                    },\n                    {\n                        \"id\": \"3\",\n                        \"name\": \"Transition 1\",\n                        \"total_time\": \"00:20:30.360\",\n                        \"time\": \"00:00:51.70\",\n                        \"difference\": \"00:00:28.290\",\n                        \"position\": \"45\"\n                    },\n                    {\n                        \"id\": \"4\",\n                        \"name\": \"Bike Lap 1\",\n                        \"total_time\": \"00:26:31.410\",\n                        \"time\": \"00:06:01.50\",\n                        \"difference\": \"00:00:10.390\",\n                        \"position\": \"36\"\n                    },\n                    {\n                        \"id\": \"5\",\n                        \"name\": \"Bike Lap 2\",\n                        \"total_time\": \"00:32:44.140\",\n                        \"time\": \"00:06:12.730\",\n                        \"difference\": \"00:00:01.570\",\n                        \"position\": \"10\"\n                    },\n                    {\n                        \"id\": \"6\",\n                        \"name\": \"Bike Lap 3\",\n                        \"total_time\": \"00:39:06.230\",\n                        \"time\": \"00:06:22.90\",\n                        \"difference\": \"00:00:00.600\",\n                        \"position\": \"4\"\n                    },\n                    {\n                        \"id\": \"7\",\n                        \"name\": \"Bike Lap 4\",\n                        \"total_time\": \"00:45:26.400\",\n                        \"time\": \"00:06:20.170\",\n                        \"difference\": \"00:00:01.690\",\n                        \"position\": \"10\"\n                    },\n                    {\n                        \"id\": \"8\",\n                        \"name\": \"Bike Lap 5\",\n                        \"total_time\": \"00:51:43.890\",\n                        \"time\": \"00:06:17.490\",\n                        \"difference\": \"00:00:01.590\",\n                        \"position\": \"9\"\n                    },\n                    {\n                        \"id\": \"9\",\n                        \"name\": \"Bike Lap 6\",\n                        \"total_time\": \"00:58:00.70\",\n                        \"time\": \"00:06:16.180\",\n                        \"difference\": \"00:00:00.590\",\n                        \"position\": \"4\"\n                    },\n                    {\n                        \"id\": \"10\",\n                        \"name\": \"Bike Lap 7\",\n                        \"total_time\": \"01:04:15.510\",\n                        \"time\": \"00:06:15.440\",\n                        \"difference\": \"00:00:00.590\",\n                        \"position\": \"4\"\n                    },\n                    {\n                        \"id\": \"11\",\n                        \"name\": \"Bike Lap 8\",\n                        \"total_time\": \"01:10:30.240\",\n                        \"time\": \"00:06:14.730\",\n                        \"difference\": \"00:00:00.870\",\n                        \"position\": \"6\"\n                    },\n                    {\n                        \"id\": \"12\",\n                        \"name\": \"Bike End\",\n                        \"total_time\": \"01:16:39.190\",\n                        \"time\": \"00:06:08.950\",\n                        \"difference\": \"00:00:02.10\",\n                        \"position\": \"8\"\n                    },\n                    {\n                        \"id\": \"13\",\n                        \"name\": \"Transition 2\",\n                        \"total_time\": \"01:17:00.520\",\n                        \"time\": \"00:00:21.330\",\n                        \"difference\": \"00:00:00.830\",\n                        \"position\": \"3\"\n                    },\n                    {\n                        \"id\": \"14\",\n                        \"name\": \"Run Lap 1\",\n                        \"total_time\": \"01:23:57.670\",\n                        \"time\": \"00:06:57.150\",\n                        \"difference\": \"00:00:00.000\",\n                        \"position\": \"1\"\n                    },\n                    {\n                        \"id\": \"15\",\n                        \"name\": \"Run Lap 2\",\n                        \"total_time\": \"01:31:15.480\",\n                        \"time\": \"00:07:17.810\",\n                        \"difference\": \"00:00:00.000\",\n                        \"position\": \"1\"\n                    },\n                    {\n                        \"id\": \"16\",\n                        \"name\": \"Run Lap 3\",\n                        \"total_time\": \"01:38:39.550\",\n                        \"time\": \"00:07:24.70\",\n                        \"difference\": \"00:00:00.000\",\n                        \"position\": \"1\"\n                    },\n                    {\n                        \"id\": \"17\",\n                        \"name\": \"Finish\",\n                        \"total_time\": \"01:46:26.40\",\n                        \"time\": \"00:07:46.490\",\n                        \"difference\": \"00:00:00.000\",\n                        \"position\": \"1\"\n                    }\n                ]\n            },\n            {\n                \"id\": \"7503\",\n                \"start_num\": \"5\",\n                \"name\": \"Crisanto Grajales\",\n                \"country\": \"MEX\",\n                \"segment_id\": \"17\",\n                \"time\": \"01:46:41.580\",\n                \"difference\": \"00:00:15.540\",\n                \"position\": \"2\",\n                \"status\": null,\n                \"splits\": [\n                    {\n                        \"id\": \"1\",\n                        \"name\": \"Swim Lap 1\",\n                        \"total_time\": \"00:09:37.800\",\n                        \"time\": \"00:09:37.800\",\n                        \"difference\": \"00:00:09.640\",\n                        \"position\": \"18\"\n                    },\n                    {\n                        \"id\": \"2\",\n                        \"name\": \"Swim Exit\",\n                        \"total_time\": \"00:19:21.300\",\n                        \"time\": \"00:09:43.500\",\n                        \"difference\": \"00:00:15.410\",\n                        \"position\": \"16\"\n                    }\n                    .......\n                ]\n            },\n            .........\n        ]    \n    }\n}","language":"json"}]},"settings":"","examples":{"codes":[]},"method":"get","auth":"required","params":[{"_id":"589e98514e78cf0f00d0c89d","ref":"","in":"path","required":true,"desc":"The prog_id of the race to retrieve timing for","default":"","type":"int","name":"prog_id"}],"url":"/live/timing"},"isReference":true,"order":1,"body":"The **Live Timing** method returns full timing data from the requested `prog_id` (i.e. a single race at an event such as elite men).\n\nThe above example is a curtailed response and a full timing message that corresponds to the final results may be found [here](https://triathlon-data.s3.amazonaws.com/yokohama-final-output.json).\n\nIt is recommended that you use this endpoint to determine the initial state of timing and then receive all future updates through the [Streaming API](https://developers.triathlon.org/docs/leaderboard) or [Subscription API](https://developers.triathlon.org/docs/subscriptions-api-overview).\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Live Timing Standard\",\n  \"body\": \"For a much more detailed explanation of parameters and variables please review the live timing standard documentation [here](https://developers.triathlon.org/v1/page/live-timing-standard-v11).\"\n}\n[/block]\nThe `latest` object contains information about the latest timing point and is used to produce automatically updating leaderboards. As athletes are ordered in position at the latest segment it is trivial to output the timing data for the latest segment using the `num_athletes` variable.\n\n## Pre-race\n\nWhen start lists have been produced an initial timing export will be available. In such circumstances athletes will be ordered via start number and the status will be set as `prerace`. This prerace data may be updated to reflect a change in the status of the athlete i.e. DNS or to a change in the planned start time. Once the race is underway the status will change to `live` and the start_time will reflect the actual start time such that the duration of the race can be determined. Where information is not yet available i.e conditions and wetsuit information a value of `null` will be provided.\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Start lists also available via Program Entries method\"\n}\n[/block]\nThe `status` field contains other information about the athlete during the race such as race incidents or penalties acquired.\n\nFor more information please consult [this post](https://developers.triathlon.org/blog/live-timing-2017) or the [Live Timing Standard](https://developers.triathlon.org/v1/page/live-timing-standard-v11).","excerpt":"","slug":"live-timing","type":"endpoint","title":"Live Timing"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

prog_id:
required
integer
The prog_id of the race to retrieve timing for

Result Format


Documentation

The **Live Timing** method returns full timing data from the requested `prog_id` (i.e. a single race at an event such as elite men). The above example is a curtailed response and a full timing message that corresponds to the final results may be found [here](https://triathlon-data.s3.amazonaws.com/yokohama-final-output.json). It is recommended that you use this endpoint to determine the initial state of timing and then receive all future updates through the [Streaming API](https://developers.triathlon.org/docs/leaderboard) or [Subscription API](https://developers.triathlon.org/docs/subscriptions-api-overview). [block:callout] { "type": "warning", "title": "Live Timing Standard", "body": "For a much more detailed explanation of parameters and variables please review the live timing standard documentation [here](https://developers.triathlon.org/v1/page/live-timing-standard-v11)." } [/block] The `latest` object contains information about the latest timing point and is used to produce automatically updating leaderboards. As athletes are ordered in position at the latest segment it is trivial to output the timing data for the latest segment using the `num_athletes` variable. ## Pre-race When start lists have been produced an initial timing export will be available. In such circumstances athletes will be ordered via start number and the status will be set as `prerace`. This prerace data may be updated to reflect a change in the status of the athlete i.e. DNS or to a change in the planned start time. Once the race is underway the status will change to `live` and the start_time will reflect the actual start time such that the duration of the race can be determined. Where information is not yet available i.e conditions and wetsuit information a value of `null` will be provided. [block:callout] { "type": "success", "title": "Start lists also available via Program Entries method" } [/block] The `status` field contains other information about the athlete during the race such as race incidents or penalties acquired. For more information please consult [this post](https://developers.triathlon.org/blog/live-timing-2017) or the [Live Timing Standard](https://developers.triathlon.org/v1/page/live-timing-standard-v11).

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}