The service saves a course template using the course configuration model. The course configuration updated with the course template is then returned.
| Webservice Type: | REST |
| Input format: | Json |
| Output format: | Json |
| Mandatory parameters: | name: the name markConfigurations: A set of all mark configurations being part of the course configuration. Any mark configuration being part of at least one waypoint must be included. Additional mark configurations 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: | optionalRepeatablePart: JSON object that if given defines the part of the sequence that can be repeated in lap. The following properties must be given:
optionalImageURL: URL pointing to the desired course template image tags: An set of String tags markPropertiesGroupOwnership: the name of the user group that shall be used as the group owner of MarkProperties objects created while executing the request |
| Request method: | POST |
| Example: | /api/v1/courseconfiguration/createCourseTemplate Example payload:
{
"name": "my-special-course-template",
"markConfigurations": [
{
"id": "f6012c27-8a62-4d46-aede-5ad4584ccd24",
"markTemplateId": "f00e9053-e0ad-430f-a555-73f7ec2e59e1",
"freestyleProperties": {
"name": "green",
"shortName": "green",
"color": "#00FF00",
"shape": "",
"pattern": "",
"markType": "BUOY"
},
"storeToInventory": true
},
{
"id": "43c622d2-46b0-4667-9937-071dec72c0d9",
"markTemplateId": "145f7908-a050-46d6-bd88-8267baa65985",
"positioning": {
"position": {
"latitude_deg": 5.5,
"longitude_deg": 7.1
}
}
},
{
"id": "cd4f9606-493b-422f-8615-6630d8761f4f",
"markTemplateId": "4cd7d7e4-bb8a-4fc2-a075-d47adec335e4"
},
{
"id": "47c22ee7-9150-4f38-a0a2-a23dab5971df",
"markTemplateId": "41034b11-111b-420e-b929-293f5e80d5cc"
},
{
"id": "4c696f87-a703-4b0f-a50a-4979836cacd7",
"freestyleProperties": {
"name": "spare",
"shortName": "spare",
"color": "#00FFFF",
"shape": "",
"pattern": "",
"markType": "BUOY"
},
"positioning": {
"deviceUUID": "a7309f55-a28a-420d-81a8-f85013f91269"
},
"storeToInventory": true
},
{
"id": "57b682af-11c4-4130-970b-0569320af882",
"markPropertiesId": "342ab208-d6de-4485-92f6-34ea8b6a0b39"
}
],
"waypoints": [
{
"passingInstruction": "Line",
"markConfigurationIds": [
"43c622d2-46b0-4667-9937-071dec72c0d9",
"cd4f9606-493b-422f-8615-6630d8761f4f"
],
"controlPointName": "Start\/End",
"controlPointShortName": "S\/E"
},
{
"passingInstruction": "Port",
"markConfigurationIds": [
"47c22ee7-9150-4f38-a0a2-a23dab5971df"
]
},
{
"passingInstruction": "Gate",
"markConfigurationIds": [
"f6012c27-8a62-4d46-aede-5ad4584ccd24",
"57b682af-11c4-4130-970b-0569320af882"
],
"controlPointName": null,
"controlPointShortName": null
},
{
"passingInstruction": "Port",
"markConfigurationIds": [
"47c22ee7-9150-4f38-a0a2-a23dab5971df"
]
},
{
"passingInstruction": "Line",
"markConfigurationIds": [
"43c622d2-46b0-4667-9937-071dec72c0d9",
"cd4f9606-493b-422f-8615-6630d8761f4f"
],
"controlPointName": "Start\/End",
"controlPointShortName": "S\/E"
}
],
"optionalRepeatablePart": {
"zeroBasedIndexOfRepeatablePartStart": 1,
"zeroBasedIndexOfRepeatablePartEnd": 3
},
"numberOfLaps": 2
}
|