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:
- id (required): A string ID (e.g. UUID) that identifies the mark configuration in this course configuration. The ID defined here is used to form the waypoint sequence. The IDs defined here are in no way stored and can freely be regenerated for every API call.
- associatedRoleId (optional): For mark templates that are used in the waypoint sequence, an optional but unique role may be specified by its ID.
- associatedRole (optional): Alternatively to the associatedRoleId the name of a role can be passed. A role with this name will then be created.
- associatedRoleShortName (optional, if associatedRole is provided): Alternatively to the associatedRoleId and additional to associatedRole, this attribute can be used to specify the short name of a new role to be created for this mark configuration in the course template.
- markId (optional): Only applicable if a regatta context is specified (query parameter). The ID of a mark being available in the specified regatta. This mark is used as is regarding the appearance. Any additional properties (excluding positioning) is ignored.
- markTemplateId (optional): The ID of a mark template a mark to create is based on.
- markPropertiesId (optional): Only applicable if no markId is defined. The ID of a mark properties entry a mark to create is based on. If given, available appearance properties overwrite those of a given mark template when creating a mark. If available, the positioning information of the mark properties is used for the created mark.
- freestyleProperties (optional): Only applicable if no markId is defined. Using this, the appearance of the mark to be created can freely be specified. If given, available appearance properties overwrite those of a given mark template or mark properties when creating a mark. The following properties may be given:
- name: the name of the mark to create
- shortName: the short name to set. If not given, the short name defaults to the name.
- tags: Multi value specifying an optional set of tags.
- markType: One of [BUOY, CAMERABOAT, STARTBOAT, UMPIREBOAT, LANDMARK, FINISHBOAT]
- color: RGB color value. Either of the hex color patterns: #RRGGBB, #RGB, RRGGBB, RGB
- shape: For marks with BUOY type, this may be specified as one of [CYLINDER, CONICAL]
- pattern: For marks with BUOY type, this may be specified as CHECKERED
- positioning (optional): Any given positioning is only included in the resulting course configuration. As mark templates can't have positioning information attached this is not saved when creating a mark template. Because the resulting course configuration may be used to update the UI state, the positioning is included in the updated mark configurations. Either of the following properties may be given:
- device_identifier: defines a tracking device by its device identifier.
The identifier is a JSON object that has three attributes:
id, type, and stringRepresentation. Using "smartphoneUUID" for the
"type" attribute and a stringified UUID for both, "id" and
"stringRepresentation" will do the job for identifying a phone
as a tracking device.
- position: object that defines a fixed position for the mark with the required properties 'latitude_deg' and 'longitude_deg'
- storeToInventory (optional): If set to true, this exports a mark properties entry to the inventory.
If the mark configuration already references an existing mark properties entry, this will be updated instead.
The effective appearance (either directly defined by freestyleProperties or indirectly given by a referenced mark or mark template) is used to define the mark properties.
If positioning information is available (either directly or indirectly through a mark) this will also be set for the mark properties.
waypoints: An ordered sequence of waypoints that form the layout of the course template. For each waypoint, the following properties can be specified:
- passingInstruction (required): For single mark waypoints, this can be one of [None, Port, Starboard, Single_Unknown, FixedBearing]. For mark pairs, this can be one of [None, Gate, Line, Offset].
- markConfigurationIds (required): List of UUIDs of the relevant mark templates. May specify one or two mark templates.
- controlPointName (depends): For mark pairs this specifies the control point name. For single mark waypoints this is not used.
- controlPointShortName (depends): For mark pairs this specifies the control point short name. For single mark waypoints this is not used.
|
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
}
|