Dry-run validation of a map document; nothing is written (harbor.configure)
curl --request POST \ --url https://example.com/api/admin/v1/marinas/example/maps/example/validate \ --header 'Content-Type: application/json' \ --header 'X-CSRF-Token: <X-CSRF-Token>' \ --cookie porto_session=<porto_session> \ --data '{ "kind": "water", "name": { "it": "example", "en": "example" }, "icon": "example", "width_cm": 1, "height_cm": 1, "grid_cm": 1, "sort_order": 1, "background": { "file_id": "example", "content_type": "image/png", "width_px": 1, "height_px": 1, "origin": { "x": 1, "y": 1 }, "scale_mcm_per_px": 1, "rotation_dd": 1, "opacity_pct": 1, "visible": true }, "georef": { "points": [ { "x": 1, "y": 1, "lat_e7": 1, "lon_e7": 1 } ] }, "concession_outline": [ { "x": 1, "y": 1 } ], "water_polygons": [ [ { "x": 1, "y": 1 } ] ], "land_polygons": [ [ { "x": 1, "y": 1 } ] ], "structures": [ { "id": "example", "key": "example", "kind": "quay", "code": "example", "name": "example", "points": [ { "x": 1, "y": 1 } ], "closed": true, "rect": { "anchor": { "x": 1, "y": 1 }, "width_cm": 1, "length_cm": 1, "rotation_dd": 1 }, "width_cm": 1, "parent_id": "example", "sides": [ "left" ], "floating": true, "depth_profile": [ { "from_cm": 1, "to_cm": 1, "depth_cm": 1 } ], "elevation_cm": 1, "bollard_spacing_cm": 1 } ], "berths": [ { "id": "example", "key": "example", "code": "example", "structure_id": "example", "side": "left", "position": 1, "anchor": { "x": 1, "y": 1 }, "rotation_dd": 1, "width_cm": 1, "length_cm": 1, "max_loa_cm": 1, "max_beam_cm": 1, "depth_cm": 1, "max_air_draft_cm": 1, "max_displacement_kg": 1, "mooring_type": "mooring_line", "swing_radius_cm": 1, "overhang_allowed": true, "pedestal_id": "example", "pedestal_socket": "example", "power_a": 16, "power_phase": "single", "water": true, "wifi": true, "price_class": "example", "attributes": [ "example" ], "online_sellable": true, "active": true, "group_ids": [ "example" ] } ], "dynamic_areas": [ { "id": "example", "key": "example", "kind": "linear", "code": "example", "structure_id": "example", "side": "left", "from_cm": 1, "to_cm": 1, "outline": [ { "x": 1, "y": 1 } ], "mooring_mode": "stern_to", "cell_cm": 1, "margin_cm": 1, "max_loa_cm": 1, "max_beam_cm": 1, "max_height_cm": 1, "max_weight_kg": 1, "supports": [ "cradle" ], "depth_profile": [ { "from_cm": 1, "to_cm": 1, "depth_cm": 1 } ], "blocked_cells": [ 1 ], "exits": [ 1 ], "grid_rotation_dd": 0, "price_class": "example", "online_sellable": true, "active": true, "group_ids": [ "example" ] } ], "land_resources": [ { "id": "example", "key": "example", "kind": "parking", "code": "example", "anchor": { "x": 1, "y": 1 }, "rotation_dd": 1, "width_cm": 1, "length_cm": 1, "price_class": "example", "attributes": [ "example" ], "active": true, "group_ids": [ "example" ] } ], "pedestals": [ { "id": "example", "key": "example", "code": "example", "position": { "x": 1, "y": 1 }, "sockets": [ { "code": "example", "kind": "power", "amps": 16, "phase": "single" } ], "meters": [ { "kind": "power", "serial": "example" } ] } ], "decorations": [ { "id": "example", "key": "example", "kind": "symbol", "asset": "example", "variant": "example", "position": { "x": 1, "y": 1 }, "rotation_dd": 1, "size_cm": 1, "points": [ { "x": 1, "y": 1 } ], "label": { "it": "example", "en": "example" }, "depth_cm": 1 } ] }'Authorizations
Sezione intitolata “Authorizations”Parameters
Sezione intitolata “Parameters”Path Parameters
Sezione intitolata “Path Parameters”Request Bodyrequired
Sezione intitolata “Request Bodyrequired”object
object
object
object
Milli-centimetres per image pixel (integer, at least 1)
Angle in tenths of a degree, 0 = +x, 900 = +y (y down, clockwise on screen)
Simple polygon in map cm (3 to 10 000 vertices, not closed explicitly)
object
object
Saved element id (omit for a new element)
Client key of a new element, unique in the request
Polyline (quay, pier, walkway, breakwater line) or polygon (closed = true)
object
Rotated rectangle; anchor = midpoint of the mooring (or access) side
object
object
Strictly positive length in integer centimetres
Strictly positive length in integer centimetres
Angle in tenths of a degree, 0 = +x, 900 = +y (y down, clockwise on screen)
Strictly positive length in integer centimetres
Reference to a map element inside one document: the id of a saved element or the key of a new element of the same request
Depth along the structure axis, from from_cm to to_cm
object
Length in integer centimetres
Length in integer centimetres
Strictly positive length in integer centimetres
Length in integer centimetres
Strictly positive length in integer centimetres
object
Saved element id (omit for a new element)
Client key of a new element, unique in the request
Reference to a map element inside one document: the id of a saved element or the key of a new element of the same request
Order along the structure
object
Angle in tenths of a degree, 0 = +x, 900 = +y (y down, clockwise on screen)
Side of a berth or land resource rectangle in integer centimetres, at least 2 (layout.MinRectSide)
Side of a berth or land resource rectangle in integer centimetres, at least 2 (layout.MinRectSide)
Strictly positive length in integer centimetres
Strictly positive length in integer centimetres
Strictly positive length in integer centimetres
Strictly positive length in integer centimetres
Strictly positive length in integer centimetres
Reference to a map element inside one document: the id of a saved element or the key of a new element of the same request
object
Saved element id (omit for a new element)
Client key of a new element, unique in the request
Reference to a map element inside one document: the id of a saved element or the key of a new element of the same request
Length in integer centimetres
Length in integer centimetres
Simple polygon in map cm (3 to 10 000 vertices, not closed explicitly)
object
Strictly positive length in integer centimetres
Strictly positive length in integer centimetres
Strictly positive length in integer centimetres
Depth along the structure axis, from from_cm to to_cm
object
Length in integer centimetres
Length in integer centimetres
Strictly positive length in integer centimetres
Computed at save
The area is offered by the public booking page and the channels (default false)
object
Saved element id (omit for a new element)
Client key of a new element, unique in the request
object
Angle in tenths of a degree, 0 = +x, 900 = +y (y down, clockwise on screen)
Side of a berth or land resource rectangle in integer centimetres, at least 2 (layout.MinRectSide)
Side of a berth or land resource rectangle in integer centimetres, at least 2 (layout.MinRectSide)
object
Saved element id (omit for a new element)
Client key of a new element, unique in the request
object
object
object
object
Saved element id (omit for a new element)
Client key of a new element, unique in the request
Illustration kit asset id (kind = symbol)
object
Angle in tenths of a degree, 0 = +x, 900 = +y (y down, clockwise on screen)
Strictly positive length in integer centimetres
object
object
Length in integer centimetres
Responses
Sezione intitolata “Responses”Validation report
object
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Example
{ "errors": [ { "severity": "error" } ], "warnings": [ { "severity": "error" } ]}Malformed request or validation failure
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Not authenticated, or invalid credentials
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Authenticated but not allowed
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Not found (or not visible to the principal)
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Request body above the operation’s limit, or file above 15 MiB (file_too_large)
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Porto è sviluppato da Coste360 SRL. Codice sorgente disponibile con licenza BSL 1.1; il marchio Porto è escluso dalla licenza.