SAP Sailing Analytics Webservices API Version 1.0

URL: /api/v1/leaderboards/{name}/device_mappings/start

Description:

Tracking App Device Checkin on leaderboard


Webservice Type: REST
Input format: JSON (application/json)
Output format: HTTP 200
Mandatory parameters: None
Optional parameters: None
Request method: POST
Payload:

either of:
    *competitorId ID of the competitor to map the device to.
    *boatId ID of the boat to map the device to.
    *markId ID of the boat to map the device to.
deviceType: Either android or ios. Needed for selecting correct push notification service.
deviceUuid: UUID generated by the app on first run. Not an identifier that globally identifies the piece of hardware such UDID under iOS, IMEI, or other.
pushDeviceId: On Android the GCM regId, on iOS the APNS push token. This is needed for sending push notifications to the device.
fromMillis: Milliseconds timestamp from which to map the device to the competitor.
secret: The regatta registration link secret can be included as an alternative to a bearertoken, if it is equal to the one stored in the regatta associated to the leaderboard, the caller will be permitted ignoring all normal permission checks
        
Example competitor tracking via secret: POST http://sapsailing.com/api/v1/leaderboards/{name}/device_mappings/start

{
    "competitorId" : "af855a56-9726-4a9c-a77e-da955bd289bg",
    "deviceType" : "ios",
    "deviceUuid" : "af855a56-9726-4a9c-a77e-da955bd289bf",
    "pushDeviceId" : "0f744707bebcf74f9b7c25d48e3358945f6aa01da5ddb387462c7eaf61bbad78",
    "fromMillis" : 1415624564718,
    "secret": "myRegattaSecret"
}
        
Example boat tracking (without secret, this means that a valid bearertoken is required with a user that has the correct permissions): POST http://sapsailing.com/api/v1/leaderboards/{name}/device_mappings/start

{
    "boatId" : "af855a56-9726-4a9c-a77e-da955bd289bg",
    "deviceType" : "ios",
    "deviceUuid" : "af855a56-9726-4a9c-a77e-da955bd289bf",
    "pushDeviceId" : "0f744707bebcf74f9b7c25d48e3358945f6aa01da5ddb387462c7eaf61bbad78",
    "fromMillis" : 1415624564718
}
            
Example mark tracking (without a secret as well, see note above): POST http://sapsailing.com/api/v1/leaderboards/{name}/device_mappings/start

{
    "markId" : "af855a56-9726-4a9c-a77e-da955bd289bg",
    "deviceType" : "ios",
    "deviceUuid" : "af855a56-9726-4a9c-a77e-da955bd289bf",
    "pushDeviceId" : "0f744707bebcf74f9b7c25d48e3358945f6aa01da5ddb387462c7eaf61bbad78",
    "fromMillis" : 1415624564718
}
            
Back to Web Service Overview