Zum Inhalt springen
Web APIBuildings

Buildings

Buildings, their floors, and the floor plans positions are drawn on.

16 operationsBase https://api.staging.locantra.de

Get one building

GEThttps://api.staging.locantra.de/building
Permission buildings.read

Returns a single building of your organisation. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first.

Create a building

POSThttps://api.staging.locantra.de/building
Permission buildings.manageIdempotent

Creates a building from its footprint. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first. A ring must be closed, its last pair repeating its first. The footprint is required and must not overlap another building of your organisation, which is rejected with 409. Set IsSynthetic for an indoor venue that has no real footprint; two synthetic buildings cannot share a SlotIndex, which is rejected with 409 as well.

Update a building

PATCHhttps://api.staging.locantra.de/building
Permission buildings.manage

Changes the name or the footprint of one building. Those are the only fields this operation can change — IsSynthetic and SlotIndex are fixed at creation — and an omitted field is left unchanged. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first. The footprint cannot be emptied, and a new one that overlaps another building of your organisation is rejected with 409.

Delete a building

DELETEhttps://api.staging.locantra.de/building
Permission buildings.manage

Deletes a building together with every floor it has and every floor plan on those floors, including the stored floor plan images. Anchors placed in the building are kept and lose their placement.

Get one building floor

GEThttps://api.staging.locantra.de/building/floor
Permission buildings.read

Returns a single building floor of your organisation. FloorIndex is the storey number: 0 is ground level and a basement is negative.

Create a building floor

POSThttps://api.staging.locantra.de/building/floor
Permission buildings.manageIdempotent

Adds a floor to a building of your organisation. FloorIndex is the storey number: 0 is ground level and a basement is negative. FloorIndex is fixed at creation and cannot be changed afterwards, and the floor cannot be moved to another building — delete it and create it where it belongs instead.

Rename a building floor

PATCHhttps://api.staging.locantra.de/building/floor
Permission buildings.manage

Changes a building floor's name. Name is the only field this operation can change: FloorIndex is immutable and a floor cannot be moved to another building.

Delete a building floor

DELETEhttps://api.staging.locantra.de/building/floor
Permission buildings.manage

Deletes a building floor together with its floor plan and the stored floor plan image. Anchors placed on the floor are kept and lose their placement.

Get one floor plan

GEThttps://api.staging.locantra.de/building/floorplan
Permission buildings.read

Returns a single floor plan of your organisation: the image's dimensions and its placement, not the image itself. GeoReference places the floor plan image on the map, as a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first; GeoReferenceOffsetX and GeoReferenceOffsetY shift the image against it in pixels.

Upload a floor plan

POSThttps://api.staging.locantra.de/building/floorplan
Permission buildings.manage

Creates a floor plan for a building floor by uploading its image, as a multipart/form-data request. The image is PNG, JPEG or WebP, at most 10 MB and roughly 50 megapixels; an SVG is rejected to prevent stored XSS. A building floor has at most one floor plan, which is rejected with 409.

Update a floor plan

PATCHhttps://api.staging.locantra.de/building/floorplan
Permission buildings.manage

Changes a floor plan's name, its scale or its placement on the map. Those are the only fields this operation can change, and an omitted field is left unchanged; the image itself cannot be replaced — delete the floor plan and upload a new one. GeoReference places the floor plan image on the map, as a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first; GeoReferenceOffsetX and GeoReferenceOffsetY shift the image against it in pixels. A GeoReference with empty coordinates drops the placement.

Delete a floor plan

DELETEhttps://api.staging.locantra.de/building/floorplan
Permission buildings.manage

Deletes a floor plan and the stored image with it. Its building floor is kept and can take a new floor plan.

Get a floor plan's image

GEThttps://api.staging.locantra.de/building/floorplan/image
Permission buildings.read

Streams the stored image of a floor plan belonging to your organisation. The response Content-Type follows the stored image — image/png, image/jpeg or image/webp, see FloorPlan's ImageMimeType.

List floor plans

GEThttps://api.staging.locantra.de/building/floorplans
Permission buildings.read

Lists the floor plans of your organisation; a building floor has at most one. A floor plan carries the image's dimensions and its placement, not the image itself — read the bytes from GET /building/floorplan/image. GeoReference places the floor plan image on the map, as a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first; GeoReferenceOffsetX and GeoReferenceOffsetY shift the image against it in pixels. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count.

List building floors

GEThttps://api.staging.locantra.de/building/floors
Permission buildings.read

Lists the building floors of your organisation, across every building unless BuildingID narrows it. FloorIndex is the storey number: 0 is ground level and a basement is negative. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count.

List buildings

GEThttps://api.staging.locantra.de/buildings
Permission buildings.read

Lists the buildings of your organisation. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count.