SAP Sailing Analytics Webservices API Version 2.0

URL: /api/v2/leaderboards/{name}

Description:

The service gets the details of a leaderboard

The service can be parameterized to return only the values of certain leaderboard columns.
Furthermore it's possible to control which calculated values should be returned on race level.
The supported race detail constants right now are:
- RACE_GAP_TO_LEADER_IN_SECONDS
- RACE_AVERAGE_SPEED_OVER_GROUND_IN_KNOTS
- RACE_DISTANCE_TRAVELED
- RACE_TIME_TRAVELED
- RACE_CURRENT_SPEED_OVER_GROUND_IN_KNOTS
- RACE_CURRENT_COURSE_OVER_GROUND_IN_TRUE_DEGREES
- RACE_CURRENT_POSITION_LAT_DEG
- RACE_CURRENT_POSITION_LNG_DEG
- RACE_DISTANCE_TO_COMPETITOR_FARTHEST_AHEAD_IN_METERS
- NUMBER_OF_MANEUVERS
- CURRENT_LEG
- LEG_VELOCITY_MADE_GOOD_IN_KNOTS
- LEG_WINDWARD_DISTANCE_TO_GO_IN_METERS
- LEG_CURRENT_ABSOLUTE_CROSS_TRACK_ERROR_IN_METERS
- LEG_CURRENT_SIGNED_CROSS_TRACK_ERROR_IN_METERS
- LEG_AVERAGE_SPEED_OVER_GROUND_IN_KNOTS
- OVERALL_MAXIMUM_SPEED_OVER_GROUND_IN_KNOTS - OVERALL_TIME_ON_TIME_FACTOR
- OVERALL_TIME_ON_DISTANCE_ALLOWANCE_IN_SECONDS_PER_NAUTICAL_MILE
There is also the 'ALL' shortcut constant which can be used to get all available race details without the need to enumerate them.

Webservice Type: REST
Output format: Json
Mandatory parameters: secret: in case the given secret is equal to the one stored in a regatta with the same name as the {name}, further security checks will be skipped
Optional parameters: resultState [Default = Live, Final]
  columnNames [Default = all columns or what showOnlyActiveRacesForCompetitorIds specifies]: can be specified multiple times to request more than one column; columns specified with this parameter are added to the ones inferred from showOnlyActiveRacesForCompetitorIds.
 
showOnlyActiveRacesForCompetitorIds: specify a competitor ID, and the result will contain the race column holding that competitor's "active" race at the time requested; see also the time and timeasmillis parameters. A race is active if it is currently live or is the last race for which the competitor has a result. The parameter can be specified multiple times, thus providing more than one competitor ID. In case multiple competitor IDs are given, all race columns that contain an active race of any of the competitors specified will be added to the result. It is possible that no such race is found, e.g., because racing has not started yet and the leaderboard is empty. No race column will be delivered then. In case the columnNames parameter is used, too, the combined set of race columns from the columnNames parameter and this parameter will be delivered. If this parameter is used but columnNames is not, only the columns specified by this parameter will be delivered.
 
showOnlyCompetitorsWithIdsProvided: if true, only the competitors whose stringified IDs have been provided by one of the showOnlyActiveRacesForCompetitorIds parameters will be added to the result document; otherwise, all competitors in the fleets selected will be represented in the result.
  raceDetails [Default = RACE_GAP_TO_LEADER_IN_SECONDS, RACE_AVERAGE_SPEED_OVER_GROUND_IN_KNOTS, RACE_CURRENT_SPEED_OVER_GROUND_IN_KNOTS, RACE_DISTANCE_TO_COMPETITOR_FARTHEST_AHEAD_IN_METERS, CURRENT_LEG]; use "ALL" to get all detail types supported. Specify multiple times to select more than one detail field.
 
competitorAndBoatIdsOnly [Default = false, true] if true, only IDs and no further attributes will be delivered for competitor and boat JSON objects in the result document. This can help save bandwidth if the competitor and boat data have been received already during previous calls and the current call is only an update. Note, however, that competitor and boat data may change, so every now and then it is advisable to still set this to false to obtain the full up-to-date fields for all competitors and boats again.
 
time (ISO format, such as 2014-02-14T10:12:03Z)
timeasmillis
  maxCompetitorsCount [Default = 1000]
Request method: GET
Example: http://www.sapsailing.com/sailingserver/api/v2/leaderboards/505 Worlds 2013
Back to Web Service Overview