SAP Sailing Analytics Webservices API Version 1.0

URL: /api/v1/tags

Description: Gets all public and private tags of specified race and current user.
Webservice Type: REST
Output format: HTTP 200 + Json or HTTP 400/500
Mandatory parameters: leaderboard: leaderboard name
racecolumn: race column name
fleet: fleet name
Optional parameters: visibility: public will load only public tags, private will load only private tags, both (default) will load public and private tags
Request method: GET
Example request: GET https://sapsailing.com/sailingserver/api/v1/{leaderboard}/{racecolumn}/{fleet}/tags
Example response:
[
    {
        "tag": "Public tag",
        "comment": "This is a comment!",
        "image": "",
        "username": "admin",
        "public": true,
        "raceTimepoint": 1347452185000,
        "createdAt": 1536742983448,
        "revokedAt": 0
    }, {
        "tag": "Private tag",
        "comment": "",
        "image": "",
        "username": "user",
        "public": false,
        "raceTimepoint": 1347452185000,
        "createdAt": 1536742983448,
        "revokedAt": 1536742994448
    }
]
            

Description: Adds new tag to specified race.
Webservice Type: REST
Output format: HTTP 201 or HTTP 400
Mandatory parameters: leaderboard: leaderboard name
racecolumn: race column name
fleet: fleet name
Mandatory body parameters: tag: title of new tag
raceTimepoint: timepoint in race where tag will be added, format: unix timestamp * 1000 (milliseconds timepoint)
Optional body parameters: comment: content of comment
image: image URL to corresponding image
public: true => tag is visible for every user (requires specific permission), false (default) => tag is only visible for current user
Request method: POST
Example request: POST https://sapsailing.com/sailingserver/api/v1/{leaderboard}/{racecolumn}/{fleet}/tags

tag = "New tag!",
comment = "Optional comment",
image = "localhost:1234/image.jpg",
public = true,
raceTimepoint = 1347452185000

Description: Deletes specified tag.
Webservice Type: REST
Output format: HTTP 204 or HTTP 400
Mandatory query parameters: leaderboard: leaderboard name
racecolumn: race column name
fleet: fleet name
Mandatory body parameters: tag_json: tag to delete as json (may be missing attributes createdAt and revokedAt as they are not required to identify a tag)
Optional parameters: None
Request method: DELETE
Example request: DELETE https://sapsailing.com/sailingserver/api/v1/{leaderboard}/{racecolumn}/{fleet}/tags

tag_json = {
    "tag": "Tag to delete",
    "comment": "This comment will get deleted!",
    "image": "",
    "username": "admin",
    "public": true,
    "raceTimepoint": 1347452185000
}
            

Description: Updates given tag with new values.
Webservice Type: REST
Output format: Json
Mandatory URL parameters: leaderboard: leaderboard name
racecolumn: race column name
fleet: fleet name
Mandatory body parameters: tag_json: tag to update as json (may be missing attributes createdAt and revokedAt as they are not required to identify a tag)
Optional parameters:

When non of these parameters are provided the tag will not be changed. Missing parameters do not affect the tag. To reset a value provide the parameter with the value of an empty string.

tag: new title of tag
comment: new comment
image: new image URL
public: new visibility
Request method: PUT
Example request: PUT https://sapsailing.com/sailingserver/api/v1/{leaderboard}/{racecolumn}/{fleet}/tags

tag_json = {
    "tag": "Tag to update",
    "comment": "This comment will get deleted!",
    "image": "",
    "username": "admin",
    "public": true,
    "raceTimepoint": 1347452185000
},
tag = "Tag is now private",
comment = "Private comment",
image = "",
public = false
            
Back to Web Service Overview