SAP Sailing Analytics Webservices API Version 1.0

URL: /api/v1/compareservers

Description:

Compares two SAP Sailing Analytics servers based on the content. The response contains either the missing leaderboardgroup name and id or if the leaderboardgroupnames match on both servers the missing parts within the leaderboardgroups. If the servers contain the exact same content the return will just have the given server hostnames in it. You may also query for a specific leaderboardgroup id; there the same logic applies. The HTTP return code will be 409 if a mismatch is detected in your query, if equal content is present on both servers the response code will be 200. Authorization must be provided in case content is to be compared that is not publicly readable.


Webservice Type: POST
Output format: json
Mandatory query parameters:
server2, the hostname for the second server.
Optional form parameters:
server1, the hostname for the first server. Defaults to the target of your request
leaderboardgroupUUID[], the leaderboardgroup UUID you want to compare. Use multiple times if you need to compare more than one leaderboardgroup. Don't specify if you'd like to compare all leaderboard groups of both servers with each other.
user1, the user to authenticate against server1. If provided, password1 must be provided, too.
password1, password for user1.
bearer1, you might provide a bearer token instead of user1 and password1. If neither this bearer token nor user/password is provided, the request's authentication information is used to infer user credentials. If no user can be authenticated, only publicly readable content will be considered.
user2, see user1.
password2, see password1.
bearer2, see bearer1.
Request method: POST
Example: curl localhost:8888/sailingserver/api/v1/compareservers -d "server2=localhost:8889" -H "Authorization: Basic YWRtaW46YWRtaW4="
produces output:
        {
          "localhost:8888": [
            {
              "name": "World Cup Series 2019 - Genoa, Italy",
              "id": "1f07d1cf-0652-4fc3-83bc-a79612a5aa68",
              "leaderboards": [
                {
                  "name": "WCS 2019 Genoa - 49er",
                  "series": [
                    {
                      "name": "Qualifying Series",
                      "fleets": [
                        {
                          "name": "Blue",
                          "races": [
                            {
                              "name": "R1",
                              "isTracked": true,
                              "regattaName": "WCS 2019 Genoa - 49er",
                              "trackedRaceName": "R1 Blue (49er)",
                              "hasGpsData": true,
                              "hasWindData": true
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "id": "75e86618-8b0f-4291-9661-6b2a1fa47dff",
              "name": "MyTestEventWithStrangeCharact/er*s"
            }
          ],
          "localhost:8889": [
            {
              "name": "World Cup Series 2019 - Genoa, Italy",
              "id": "1f07d1cf-0652-4fc3-83bc-a79612a5aa68",
              "leaderboards": [
                {
                  "name": "WCS 2019 Genoa - 49er",
                  "series": [
                    {
                      "name": "Qualifying Series",
                      "fleets": [
                        {
                          "name": "Blue",
                          "races": [
                            {
                              "name": "R1",
                              "isTracked": false,
                              "trackedRaceName": null,
                              "hasGpsData": false,
                              "hasWindData": false
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
        
Example: curl localhost:8888/sailingserver/api/v1/compareservers -d "server2=localhost:8889" -d "leaderboardgroupUUID[]=1f07d1cf-0652-4fc3-83bc-a79612a5aa68" -d "leaderboardgroupUUID[]=75e86618-8b0f-4291-9661-6b2a1fa47dff" -H "Authorization: Basic YWRtaW46YWRtaW4="
produces output:
        {
         "localhost:8888": [],
         "localhost:8889": []
        }
        
Back to Web Service Overview