Nautobot Floor Plan API Package¶
nautobot_floor_plan.api
¶
REST API module for nautobot_floor_plan app.
serializers
¶
API serializers for nautobot_floor_plan.
ConvertToFreeformResultSerializer
¶
Bases: Serializer
Result payload for the convert_to_freeform action.
Source code in nautobot_floor_plan/api/serializers.py
FloorPlanCustomAxisLabelSerializer
¶
Bases: NautobotModelSerializer, TaggedModelSerializerMixin
FloorPlanCustomAxisLabel Serializer.
Source code in nautobot_floor_plan/api/serializers.py
FloorPlanObjectTypeSerializer
¶
Bases: NautobotModelSerializer, TaggedModelSerializerMixin
FloorPlanObjectType Serializer.
Source code in nautobot_floor_plan/api/serializers.py
FloorPlanSerializer
¶
Bases: NautobotModelSerializer, TaggedModelSerializerMixin
FloorPlan Serializer.
Source code in nautobot_floor_plan/api/serializers.py
Meta
¶
update(instance, validated_data)
¶
Persist a calibration/opacity-only change without re-running full plan validation.
Dragging the blueprint PATCHes only bg_*/opacity; routing that through full_clean could
reject a pure reposition on unrelated state (e.g. placement_mode), so those writes are direct.
Source code in nautobot_floor_plan/api/serializers.py
FloorPlanTilePlacementSerializer
¶
Bases: Serializer
Input-only serializer that places any registered object type at a normalized position.
Deliberately a plain Serializer (not a ModelSerializer) so the generic API test harness never round-trips it and so the placement fields stay off the main tile serializer's read-only surface.
Source code in nautobot_floor_plan/api/serializers.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
__init__(*args, **kwargs)
¶
Scope the content type choices to registered placeable types.
create(validated_data)
¶
Create a pure-freeform tile placing the object (null grid origins).
Source code in nautobot_floor_plan/api/serializers.py
validate(attrs)
¶
Enforce permissions, registration, resolvable/matching location, and single placement.
Source code in nautobot_floor_plan/api/serializers.py
FloorPlanTileSerializer
¶
Bases: NautobotModelSerializer, TaggedModelSerializerMixin
FloorPlanTile Serializer.
Source code in nautobot_floor_plan/api/serializers.py
Meta
¶
Meta attributes.
Source code in nautobot_floor_plan/api/serializers.py
update(instance, validated_data)
¶
Persist a geometry-only change without re-running full object validation.
A drag/calibrate PATCH touches only position fields. Routing it through full_clean would
re-validate unrelated object assignments against their current (possibly since-changed) state
and reject a pure reposition, so geometry-only writes save the affected fields directly.
Source code in nautobot_floor_plan/api/serializers.py
PlaceableTypeSerializer
¶
Bases: Serializer
Read-only schema for a registered placeable type (drives the object picker).
Source code in nautobot_floor_plan/api/serializers.py
validate_finite(value)
¶
Reject NaN/Infinity, which slip past DRF min_value/max_value comparisons.
urls
¶
Django API urlpatterns declaration for nautobot_floor_plan app.
views
¶
API views for nautobot_floor_plan.
FloorPlanObjectTypeViewSet
¶
Bases: NautobotModelViewSet
FloorPlanObjectType viewset.
Source code in nautobot_floor_plan/api/views.py
FloorPlanTileViewSet
¶
Bases: NautobotModelViewSet
FloorPlanTile viewset.
Source code in nautobot_floor_plan/api/views.py
place(request)
¶
Place any registered object type on a floor plan at a normalized position.
Source code in nautobot_floor_plan/api/views.py
FloorPlanViewSet
¶
Bases: NautobotModelViewSet
FloorPlan viewset.
Source code in nautobot_floor_plan/api/views.py
convert_to_freeform(request, *, pk)
¶
Seed freeform coordinates for this plan's grid tiles and (optionally) switch it to freeform.
Idempotent: pass force=true to re-seed already-positioned tiles. set_mode=false seeds
without changing the placement mode.
Source code in nautobot_floor_plan/api/views.py
placeable_types(request, *, pk)
¶
List the object types that can be placed on this plan, scoped to its location.
Source code in nautobot_floor_plan/api/views.py
svg(request, *, pk)
¶
SVG representation of a FloorPlan.