---
title: "List buildings | Elenca edifici"
method: GET
path: "/v2/sites/{siteId}/buildings"
tags: ["Places"]
---

# List buildings | Elenca edifici

`GET /v2/sites/{siteId}/buildings`

## Request

- Base URL: `https://app.didattica.polito.it/api`
- URL: `https://app.didattica.polito.it/api/v2/sites/{siteId}/buildings`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/polito/apis/polito-students-api/docs/v2/sites/:siteId/buildings/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `siteId` string, required

## Query parameters

- `search` string
- `placeCategoryId` string
- `placeSubCategoryId[]` string[]

## Response `200`

The request has succeeded.

- object
  - `data` Building[], required
    - `id` string, required
    - `name` string, required
    - `siteId` string, required
    - `category` PlaceCategoryOverview, required
      - `id` string, required
      - `name` string, required
      - `showInMenu` boolean
      - `color` string
      - `markerUrl` string, url
      - `priority` number: A MapBox style priority number. 0 means most important, larger numbers are less important
      - `highlighted` boolean: If true, markers of this category should be shown initially on the map
      - `subCategory` PlaceCategory
        - `id` string, required
        - `name` string, required
        - `showInMenu` boolean
        - `color` string
        - `markerUrl` string, url
        - `priority` number: A MapBox style priority number. 0 means most important, larger numbers are less important
        - `highlighted` boolean: If true, markers of this category should be shown initially on the map
    - `geoJson` GeoJsonPolygon
      - `type` 'Feature', required
      - `geometry` object, required
        - `type` 'Polygon', required
        - `coordinates` array[], required
          - array[]
            - number[]
    - `latitude` number, required
    - `longitude` number, required

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `500`: Server error

---

[API](https://skmtc.dev/polito/apis/polito-students-api.md) - [All operations](https://skmtc.dev/polito/apis/polito-students-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polito/apis/polito-students-api/revisions/9d87728aaa56?raw)
