SAP Sailing Analytics Webservices API Version 1.0

URL: /api/v1/regattas/{regattaname}/competitors/createandaddwithboat

Description:

Creates a new competitor and registers it with the regatta. Competitor creation can be controlled by a number of parameter; defaults will be obtained from the authenticated user invoking the service.
This provides functionality

  • for the regatta owner (or any user with update permission on the regatta) to add new competitors to the regatta
  • and for any user (inclusive anonymous) to register himself to an regatta that is explicitly open for self-registrations. In this case a deviceUuid is required to immediately checkin the device.
    User self-registration is restricted to allow only one registration per device. Also a secret is required to make sure that the regatta to register on is correctly referenced. All slashes contained within the {regattaname} parameter must be replaced by "__" (double underscore).


    Webservice Type: POST
    Output format: The competitor as a JSON document
    Mandatory parameters: boatId the string representation of the boat to use
    Additional mandatory parameters for user self-registrations on open regattas:
    deviceUuid the Uuid of the device used for self registration
    secret secret string required for self registration validation purpose
    competitorName the name to use for the newly created/added competitor (if a user is authenticated, this becomes optional if no competitorName is provided in this case, the name of the users is used for the competitor name)
    Optional parameters:
    sailid the sail number to use
    nationalityIOC three-letter IOC country code
    timeontimefactor a double value telling the ToT / TMF / time-on-time factor for handicap racing
    timeondistanceallowancepernauticalmileasmillis distance-based allowance in milliseconds for handicap racing (ToD)
    searchtag a search tag for the competitor
    competitorShortName shortname of the competitor, if not set the shortname is the same as competitorName or the username
    competitorEmail the email to use for the newly created/added competitor
    displayColor display color in RGB format
    flagImageURI URI for the competitor flag image
    teamImageURI URI for the team image
    Request method: POST
    Example: curl -X POST -H "Authorization: Bearer KMTuXevrA0CYyM6O1W2E0QB9gVeP8tIpgjafJOvj/6A=" "http://127.0.0.1:8888/sailingserver/api/v1/regattas/Smartphone%20Tracking%20Test%2022.06/competitors/createandaddwithboat?boatId=95c3ada5-e666-48e4-9dc3-799df41f8264&sailid=GER+123&nationalityIOC=GER&competitorName=Firstname%20Lastname"
    Examples for user self registration: curl -X POST -H "Authorization: Bearer KMTuXevrA0CYyM6O1W2E0QB9gVeP8tIpgjafJOvj/6A=" "http://127.0.0.1:8888/sailingserver/api/v1/regattas/Smartphone%20Tracking%20Test%2022.06/competitors/createandaddwithboat?boatId=95c3ada5-e666-48e4-9dc3-799df41f8264&sailid=GER+123&nationalityIOC=GER&secret=KFJHKH265kJH724KJHKH2374567&deviceUuid=00000000-1111-2222-3333-444444444444"
    curl -X POST "http://127.0.0.1:8888/sailingserver/api/v1/regattas/Smartphone%20Tracking%20Test%2022.06/competitors/createandaddwithboat?boatId=95c3ada5-e666-48e4-9dc3-799df41f8264&sailid=GER+123&nationalityIOC=GER&competitorName=Test%20User&secret=KFJHKH265kJH724KJHKH2374567&deviceUuid=00000000-1111-2222-3333-444444444444"
    Back to Web Service Overview