Get Score Average

<< Click to Display Table of Contents >>

Navigation:  Support > REST API > Athlete API Calls >

Get Score Average

Description

Returns the running average based on public scores shot, by the passed in athletes for the passed in date range, for the passed in Event Styles or Stage Styles. Athletes are identified by there user-id.

Invoke URL

https://api.orionscoringsystem.com/athlete/score/average

https://api.orionscoringsystem.com/athlete/score/average/{user-id}

Method Type

GET

Parameters

Parameter

Type

Required

Description

user-id

String

True, either as part of the invoke URL or as a query string parameter.

The UUID formatted user-id to return the score history.

Multiple values are allowed.

end-date

String formatted as a Date

False.

The end date of the date range to return scores for. Default value is value of start-date.

start-date

String formatted as a Date

False.

The start date of the date range to return scores for. Default value is today's date.

stage-style-def

String formatted as a Set Name

Either stage-style-def or event-style-def is required, but not both.

The Set Name of the stage style to return scores form.

Multiple values are allowed.

event-style-def

String formatted as a Set Name

Either stage-style-def or event-style-def is required, but not both.

The Set Name of the event style to return scores for. Will also return scores of all stage-styles that make up the event style.

format

String

False

The time format of the returned data. Must be one of:

DAY, WEEK, MONTH, QUARTER, YEAR

Defaults to DAY.

Values of WEEK, MONTH, QUARTER, YEAR return the sum of all scores fired in the date range.

continuation-token

String

False

The "ContinuationToken" attribute provided by a previous API response

This value should only be included if the total response of the API call is being spread across multiple smaller responses

"ContinuationToken" will only be included in the response if there is more data to return

If the data set is too large and a continuation token is being used, the data is returned in the same format.

The data for a single UserID may be split across multiple calls, however a single date will never be separated

Response

{

   "Title": "",

   "Message": [],

   "ResponseCodes": [],

   "EventStyle": "v1.0:ntparc:Three-Position Sporter Air Rifle",   //event-style-def if it was included in parameters

   "ContinuationToken": "1234-1234-1234::3::4", //Continuation token; may or may not be included; if included, use this value for 'continuation-token' in the next API call

   "StageStyles": [

       "v1.0:ntparc:Sporter Air Rifle Prone",

       "v1.0:ntparc:Sporter Air Rifle Standing",

       "v1.0:ntparc:Sporter Air Rifle Kneeling",

       "v1.0:ntparc:Sporter Air Rifle Final"

   ],   //stage styles found using event-style or the value of stage-style-def if included

   "Format": "DAY", //value of format

   "StartDate": "2019-01-01", //start-date

   "EndDate": "2019-01-01", //end-date

   "ScoreAverage": {

       "1234-1234-1234": {   //userID

           "2019-01-01": {   //date of calculated avg

               "v1.0:ntparc:Sporter Air Rifle Final": {   //stage style set name

                   "D": 0.0,   //decimal score avg

                   "I": 0.0,   //integer score avg

                   "X": 0.0   //x count avg

               },

               "v1.0:ntparc:Sporter Air Rifle Kneeling": {

                   "D": 8.52,

                   "I": 8.07,

                   "X": 0.1

               },

               "v1.0:ntparc:Sporter Air Rifle Prone": {

                   "D": 9.06,

                   "I": 8.62,

                   "X": 0.21

               },

               "v1.0:ntparc:Sporter Air Rifle Standing": {

                   "D": 8.61,

                   "I": 8.16,

                   "X": 0.07

               }

           }

       }

       

   }

}

Response Example

{

   "Title": "",

   "Message": [],

   "ResponseCodes": [],

   "EventStyle": "v1.0:ntparc:Three-Position Sporter Air Rifle",

   "StageStyles": [

       "v1.0:ntparc:Sporter Air Rifle Prone",

       "v1.0:ntparc:Sporter Air Rifle Standing",

       "v1.0:ntparc:Sporter Air Rifle Kneeling",

       "v1.0:ntparc:Sporter Air Rifle Final"

   ],

   "Format": "MONTH",

   "StartDate": "2019-01-01",

   "EndDate": "2019-03-01",

   "ScoreAverage": {

       "1234-1234-1234": {

           "2019-01-01": {

               "v1.0:ntparc:Sporter Air Rifle Final": {

                   "D": 0.0,

                   "I": 0.0,

                   "X": 0.0

               },

               "v1.0:ntparc:Sporter Air Rifle Kneeling": {

                   "D": 8.52,

                   "I": 8.07,

                   "X": 0.1

               },

               "v1.0:ntparc:Sporter Air Rifle Prone": {

                   "D": 9.06,

                   "I": 8.62,

                   "X": 0.21

               },

               "v1.0:ntparc:Sporter Air Rifle Standing": {

                   "D": 8.61,

                   "I": 8.16,

                   "X": 0.07

               }

           },

           "2019-01-31": {

               "v1.0:ntparc:Sporter Air Rifle Final": {

                   "D": 0.0,

                   "I": 0.0,

                   "X": 0.0

               },

               "v1.0:ntparc:Sporter Air Rifle Kneeling": {

                   "D": 8.49,

                   "I": 8.04,

                   "X": 0.1

               },

               "v1.0:ntparc:Sporter Air Rifle Prone": {

                   "D": 9.08,

                   "I": 8.64,

                   "X": 0.22

               },

               "v1.0:ntparc:Sporter Air Rifle Standing": {

                   "D": 8.63,

                   "I": 8.17,

                   "X": 0.06

               }

           }

       },

       "0000-0000-0000": {

           "2019-01-01": {

               "v1.0:ntparc:Sporter Air Rifle Final": {

                   "D": 0.0,

                   "I": 0.0,

                   "X": 0.0

               },

               "v1.0:ntparc:Sporter Air Rifle Kneeling": {

                   "D": 8.11,

                   "I": 7.65,

                   "X": 0.13

               },

               "v1.0:ntparc:Sporter Air Rifle Prone": {

                   "D": 8.31,

                   "I": 7.86,

                   "X": 0.19

               },

               "v1.0:ntparc:Sporter Air Rifle Standing": {

                   "D": 8.36,

                   "I": 7.89,

                   "X": 0.19

               }

           },

           "2019-01-31": {

               "v1.0:ntparc:Sporter Air Rifle Final": {

                   "D": 0.0,

                   "I": 0.0,

                   "X": 0.0

               },

               "v1.0:ntparc:Sporter Air Rifle Kneeling": {

                   "D": 8.13,

                   "I": 7.67,

                   "X": 0.14

               },

               "v1.0:ntparc:Sporter Air Rifle Prone": {

                   "D": 8.36,

                   "I": 7.91,

                   "X": 0.21

               },

               "v1.0:ntparc:Sporter Air Rifle Standing": {

                   "D": 8.42,

                   "I": 7.94,

                   "X": 0.21

               }

           }

       },

       "5432-5432-5432": {

           "2019-01-01": {

               "v1.0:ntparc:Sporter Air Rifle Final": {

                   "D": 0.0,

                   "I": 0.0,

                   "X": 0.0

               },

               "v1.0:ntparc:Sporter Air Rifle Kneeling": {

                   "D": 8.51,

                   "I": 8.03,

                   "X": 0.09

               },

               "v1.0:ntparc:Sporter Air Rifle Prone": {

                   "D": 8.5,

                   "I": 8.05,

                   "X": 0.1

               },

               "v1.0:ntparc:Sporter Air Rifle Standing": {

                   "D": 8.28,

                   "I": 7.81,

                   "X": 0.04

               }

           },

           "2019-01-31": {

               "v1.0:ntparc:Sporter Air Rifle Final": {

                   "D": 0.0,

                   "I": 0.0,

                   "X": 0.0

               },

               "v1.0:ntparc:Sporter Air Rifle Kneeling": {

                   "D": 8.51,

                   "I": 8.02,

                   "X": 0.09

               },

               "v1.0:ntparc:Sporter Air Rifle Prone": {

                   "D": 8.5,

                   "I": 8.05,

                   "X": 0.1

               },

               "v1.0:ntparc:Sporter Air Rifle Standing": {

                   "D": 8.28,

                   "I": 7.81,

                   "X": 0.04

               }

           }

       }

   }

}