{"_id":"564a63974721851900a675e4","editedParams":true,"__v":0,"category":{"_id":"55773a6ce6063e0d00481380","pages":["55773a9fe6063e0d00481381","5638e57daaddb90d00c75fd1","564a61684cd0521700523ebf","564a629ceed7de0d003671d3","564a631a4721851900a675dc","564a63974721851900a675e4","564a63e8eed7de0d003671d7","564a9eb4e5d9d61700d57fe7","566731f5d784a70d00397cd4"],"project":"55773a5ba042551900b002cb","version":"55773a5ba042551900b002ce","__v":9,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-06-09T19:11:40.967Z","from_sync":false,"order":9,"slug":"statistics-api","title":"Statistics API"},"project":"55773a5ba042551900b002cb","user":"546d17e2eb9cfd1400dd4529","editedParams2":true,"parentDoc":null,"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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-16T23:15:35.893Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","examples":{"codes":[]},"method":"post","auth":"required","params":[{"_id":"564a63974721851900a675ea","ref":"","in":"body","required":false,"desc":"What type of analysis to perform","default":"count","type":"string","name":"analysis"},{"_id":"564a63974721851900a675e9","ref":"","in":"body","required":false,"desc":"The name of the property you are analysing","default":"","type":"string","name":"target_property"},{"_id":"564a63974721851900a675e8","ref":"","in":"body","required":false,"desc":"The name of a property by which you would like to group the results","default":"","type":"string","name":"group_by"},{"_id":"564a63974721851900a675e7","ref":"","in":"body","required":false,"desc":"A list of filters to narrow down the events used in an analysis request based on event property values","default":"","type":"string","name":"filters"},{"_id":"564a63974721851900a675e6","ref":"","in":"body","required":false,"desc":"A timeframe to narrow down the events used in an analysis request based on the time that the event occurred","default":"","type":"string","name":"timeframe"},{"_id":"564a63974721851900a675e5","ref":"","in":"body","required":false,"desc":"The length of time block to break a response into","default":"","type":"string","name":"interval"}],"url":"/statistics/results"},"isReference":true,"order":3,"body":"The  POST method of the results endpoint is functionally identical to the [GET method](http://statistics.triathlon.org/v1.0/docs/results). For certain use-cases it may be advantageous to make a query from a POST method instead of a GET e.g. when you are using a large number of filters.\n\nYou should send data as a JSON string in the POST body with an accompanying 'Content-Type' header of application/json.\n\nFor example given this GET request:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --header \\\"apikey: [[app:key]]\\\" \\\"https://api.triathlon.org/v1/statistics/results?analysis=minimum&target_property=position&filters=athlete.country%2Ceq%2CJPN%7Cathlete.gender%2Ceq%2Cmale\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nThe corresponding body of a POST request with a 'Content Type' header of application/json would be:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"analysis\\\": \\\"minimum\\\",\\n    \\\"target_property\\\": \\\"position\\\",\\n    \\\"filters\\\": \\\"athlete.country,eq,JPN|athlete.gender,eq,male\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nSee the [GET method](http://statistics.triathlon.org/v1.0/docs/results) for a full listing of event properties that you may use in your analysis.","excerpt":"","slug":"results-post","type":"endpoint","title":"Results"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

analysis:
stringcount
What type of analysis to perform
target_property:
string
The name of the property you are analysing
group_by:
string
The name of a property by which you would like to group the results
filters:
string
A list of filters to narrow down the events used in an analysis request based on event property values
timeframe:
string
A timeframe to narrow down the events used in an analysis request based on the time that the event occurred
interval:
string
The length of time block to break a response into

Documentation

The POST method of the results endpoint is functionally identical to the [GET method](http://statistics.triathlon.org/v1.0/docs/results). For certain use-cases it may be advantageous to make a query from a POST method instead of a GET e.g. when you are using a large number of filters. You should send data as a JSON string in the POST body with an accompanying 'Content-Type' header of application/json. For example given this GET request: [block:code] { "codes": [ { "code": "curl --header \"apikey: [[app:key]]\" \"https://api.triathlon.org/v1/statistics/results?analysis=minimum&target_property=position&filters=athlete.country%2Ceq%2CJPN%7Cathlete.gender%2Ceq%2Cmale\"", "language": "curl" } ] } [/block] The corresponding body of a POST request with a 'Content Type' header of application/json would be: [block:code] { "codes": [ { "code": "{\n \"analysis\": \"minimum\",\n \"target_property\": \"position\",\n \"filters\": \"athlete.country,eq,JPN|athlete.gender,eq,male\"\n}", "language": "json" } ] } [/block] See the [GET method](http://statistics.triathlon.org/v1.0/docs/results) for a full listing of event properties that you may use in your analysis.

User Information

Try It Out

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