The service creates a new course template.
| Webservice Type: | REST |
| Input format: | Json |
| Output format: | Json |
| Mandatory parameters: | name: the name to set for the course template allMarkTemplates: A set of all mark templates being part of the course template. Any mark template being part of at least one waypoint must be included. Additional mark templates that are not part of the waypoint sequence may be included as spare marks. For each entry, the following properties can be defined:
|
| Optional parameters: | optionalImageURL: URL pointing to the desired course template image optionalRepeatablePart: JSON object that if given defines the part of the sequence that can be repeated in lap. The following properties must be given:
|
| Request method: | POST |
| Example: | http://www.sapsailing.com/sailingserver/api/v1/coursetemplates Example payload:
{
"name": "my-special-course-template",
"optionalImageURL": "http:\/\/www.sapsailing.com\/my-course-image.jpeg",
"allMarkTemplates": [
{
"id": "9e6061d1-9217-4624-b464-8e2749d6e1c8",
"associatedRole": "Startboat"
},
{
"id": "e881e64b-8bdd-46af-be83-062ac6befd68",
"associatedRole": "Pinend"
},
{
"id": "46186c8e-335e-4c90-8b2d-7cd5ca6d304c",
"associatedRole": "1"
},
{
"id": "c29bdc51-451c-41a1-8d79-4fc986178e2b",
"associatedRole": "4p"
},
{
"id": "def5bd01-3681-4550-8648-894c12ed7d50",
"associatedRole": "4s"
},
{
"id": "73cc7728-b931-4ab1-88a1-684871f27faa"
}
],
"waypoints": [
{
"controlPointName": "Start\/End",
"passingInstruction": "Line",
"markTemplateIds": [
"9e6061d1-9217-4624-b464-8e2749d6e1c8",
"e881e64b-8bdd-46af-be83-062ac6befd68"
]
},
{
"controlPointName": null,
"passingInstruction": "Port",
"markTemplateIds": [
"46186c8e-335e-4c90-8b2d-7cd5ca6d304c"
]
},
{
"controlPointName": null,
"passingInstruction": "Gate",
"markTemplateIds": [
"def5bd01-3681-4550-8648-894c12ed7d50",
"c29bdc51-451c-41a1-8d79-4fc986178e2b"
]
},
{
"controlPointName": null,
"passingInstruction": "Port",
"markTemplateIds": [
"46186c8e-335e-4c90-8b2d-7cd5ca6d304c"
]
},
{
"controlPointName": "Start\/End",
"passingInstruction": "Line",
"markTemplateIds": [
"9e6061d1-9217-4624-b464-8e2749d6e1c8",
"e881e64b-8bdd-46af-be83-062ac6befd68"
]
}
],
"optionalRepeatablePart": {
"zeroBasedIndexOfRepeatablePartStart": 1,
"zeroBasedIndexOfRepeatablePartEnd": 3
},
"tags": ["tag1", "tag2"]
}
|