{"_id":"563a4f47f0c29b1700daafdf","version":{"_id":"55773a5ba042551900b002ce","project":"55773a5ba042551900b002cb","__v":18,"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","59cd4b81935249001c77c48e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Motherboard","version_clean":"1.0.0","version":"1"},"__v":36,"parentDoc":null,"project":"55773a5ba042551900b002cb","user":"546d17e2eb9cfd1400dd4529","category":{"_id":"55773ab007e7110d001043ec","project":"55773a5ba042551900b002cb","pages":["563a4f1ddaf1c00d00136dc0","563a4f351846790d0089535b","563a4f47f0c29b1700daafdf","563a4f54c63a22190018dca3","563a4f61daf1c00d00136dc2","563a4fb9d25e8919005f3f3a","56707e6681801f0d00802f7e","56a91a3e2036420d002d234f","56afb741e0b1e40d00c53751","56afc6eb1486990d009c0f1c","56c35c4ba869d017002ea550"],"version":"55773a5ba042551900b002ce","__v":11,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-09T19:12:48.377Z","from_sync":false,"order":0,"slug":"introduction","title":"Introduction"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-04T18:32:39.828Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Creating and Managing Applications\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"API management portal limited functionality\",\n  \"body\": \"During the beta phase the API management portal has limited functionality. This functionality will be extended shortly.\"\n}\n[/block]\nAll users will need to create an application in order to obtain an API key that are required for all requests. To register an application and to get a free API key please visit [the API application management page](https://apps.api.triathlon.org/register).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Adding Authentication Information\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Authentication Quickstart\",\n  \"body\": \"Simply add a header of apikey: [[app:key]] to all requests\"\n}\n[/block]\nAll API calls to the `https://api.triathlon.org` endpoint require authentication. Once you have obtained an access key you must send this key as the value of an apikey key/value pair in the header of every request. The below code illustrates the request with cURL.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --header \\\"apikey: [[app:key]]\\\" https://api.triathlon.org/v1/athletes/5895\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nThe API is only available over SSL to avoid exposing access credentials. Any non-SSL requests will respond with a 301 redirection header to the SSL version of the call.\n\nUnauthenticated and unauthorised requests will respond with a 401 response code.","excerpt":"","slug":"authentication","type":"basic","title":"Authentication"}
[block:api-header] { "type": "basic", "title": "Creating and Managing Applications" } [/block] [block:callout] { "type": "warning", "title": "API management portal limited functionality", "body": "During the beta phase the API management portal has limited functionality. This functionality will be extended shortly." } [/block] All users will need to create an application in order to obtain an API key that are required for all requests. To register an application and to get a free API key please visit [the API application management page](https://apps.api.triathlon.org/register). [block:api-header] { "type": "basic", "title": "Adding Authentication Information" } [/block] [block:callout] { "type": "success", "title": "Authentication Quickstart", "body": "Simply add a header of apikey: [[app:key]] to all requests" } [/block] All API calls to the `https://api.triathlon.org` endpoint require authentication. Once you have obtained an access key you must send this key as the value of an apikey key/value pair in the header of every request. The below code illustrates the request with cURL. [block:code] { "codes": [ { "code": "curl --header \"apikey: [[app:key]]\" https://api.triathlon.org/v1/athletes/5895", "language": "curl" } ] } [/block] The API is only available over SSL to avoid exposing access credentials. Any non-SSL requests will respond with a 301 redirection header to the SSL version of the call. Unauthenticated and unauthorised requests will respond with a 401 response code.