SAP Sailing Analytics Webservices API Version 1.0

URL: /api/v1/wind/putWind

Description:

Stores wind data for one or more races.

Note that while nautically wind is usually specified in the direction it's coming from, for
computational purposes internally we measure the wind in the direction to which it blows. If the regattaNamesAndRaceNames parameter is provided, wind data is ingested only into the races specified by the regatta/race name combinations. Otherwise, wind is ingested into all races into whose tracking interval the fixes fall.
The set of races into which wind is ingested is additionally filtered by the TRACKED_RACE:UPDATE permission. Wind data will only be added if the user has this permission for the race(s) in question.
Webservice Type: REST PUT
Output format: Json
Mandatory parameters: windData, windSourceType (either "WEB" or "EXPEDITION"), windSourceId (any string identifying the sensor)
Optional parameters: regattaNamesAndRaceNames: can be used to specify into which races to ingest the wind data; if omitted, the wind data will be sent to all races for which the user making the request has the TRACKED_RACE:UPDATE permissions. Example: "regattaNamesAndRaceNames":[{"regattaName":"ESS 2016 Cardiff","raceName":"Race 1"}]
Examples: Request:
{"windData":[{"position":{"latitude_deg":1,"longitude_deg":1},"timepoint":1234,"direction":120,"speedinknots":60}],"regattaNamesAndRaceNames":[{"regattaName":"ESS 2016 Cardiff","raceName":"Race 1"}],"windSourceType":"WEB","windSourceId":"tracker02"}
Answer:
[{"regattaNameAndRaceName":{"regattaName":"ESS 2016 Cardiff","raceName":"Race 1"},"answer":[true]}]

Request to insert a wind fix for the venue of Enoshima for date 9/15/18 7:38:00 AM UTC+2 with 17.4 knots of true wind from geographical direction 300 degrees (blowing to geographical direction 120 degrees):
curl -i -X PUT -d '{"windData":[{"position":{"latitude_deg":35.299495,"longitude_deg":139.493689},"timepoint":1536989880000,"direction":120,"speedinknots":17.4}],"regattaNamesAndRaceNames":[{"regattaName":"WCS 2019 Enoshima - 49er","raceName":"M Medal (49er)"}],"windSourceType":"WEB","windSourceId":"tracker02"}' -H 'Content-Type: application/json' http://user:pass@host.sapsailing.com/sailingserver/api/v1/wind/putWind
Answer:
[{"regattaNameAndRaceName":{"regattaName":"WCS 2019 Enoshima - 49er","raceName":"M Medal (49er)"},"answer":[true]}]

Back to Web Service Overview