openapi: 3.0.0 info: title: Polito Faculty Announcements Places API version: 0.0.1 license: name: CC BY-NC 4.0 url: https://creativecommons.org/licenses/by-nc/4.0/ servers: - url: https://app.didattica.polito.it/api description: Production server variables: {} - url: https://app.didattica.polito.it/mock/api description: Mock server (uses example data) variables: {} security: - BearerAuth: [] tags: - name: Places paths: /departments: get: operationId: Departments_getDepartments summary: List departments | Elenca dipartimenti parameters: - name: siteId in: query required: false schema: type: string explode: false - name: departmentType in: query required: false schema: type: string explode: false responses: '200': description: The request has succeeded. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Department' required: - data example: data: - id: DAUIN name: Dipartimento di Automatica e Informatica type: DIP. - id: DIMEAS name: Dipartimento di Ingegneria Meccanica e Aerospaziale type: DIP. '400': description: The server could not understand the request due to invalid syntax. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Places /v2/place-categories: get: operationId: PlaceCategories_getPlaceCategories summary: List place categories | Elenca categorie luoghi parameters: - name: siteId in: query required: false schema: type: string explode: false responses: '200': description: The request has succeeded. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/RootPlaceCategory' required: - data '400': description: The server could not understand the request due to invalid syntax. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Places /v2/places: get: operationId: Places_getPlaces summary: Search places | Cerca luoghi parameters: - name: search in: query required: false description: Filter places containing 'search' in their name schema: type: string explode: false - name: placeCategoryId in: query required: false schema: type: string explode: false - name: placeSubCategoryId[] in: query required: false schema: type: array items: type: string - name: siteId in: query required: false schema: type: string explode: false - name: buildingId in: query required: false schema: type: string explode: false - name: floorId in: query required: false schema: type: string explode: false - name: departmentId in: query required: false schema: type: string explode: false responses: '200': description: The request has succeeded. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlaceOverview' required: - data '400': description: The server could not understand the request due to invalid syntax. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Places /v2/places/{placeId}: get: operationId: Places_getPlace summary: Show place | Mostra luogo parameters: - name: placeId in: path required: true schema: type: string responses: '200': description: The request has succeeded. content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/Place' required: - data '400': description: The server could not understand the request due to invalid syntax. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Places /v2/sites: get: operationId: Sites_getSites summary: List sites | Elenca sedi parameters: [] responses: '200': description: The request has succeeded. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Site' required: - data '400': description: The server could not understand the request due to invalid syntax. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Places /v2/sites/{siteId}/buildings: get: operationId: Sites_getBuildings summary: List buildings | Elenca edifici parameters: - name: siteId in: path required: true schema: type: string - name: search in: query required: false description: Filter buildings containing 'search' in their name schema: type: string explode: false - name: placeCategoryId in: query required: false schema: type: string explode: false - name: placeSubCategoryId[] in: query required: false schema: type: array items: type: string responses: '200': description: The request has succeeded. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Building' required: - data '400': description: The server could not understand the request due to invalid syntax. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Places /v2/sites/{siteId}/free-rooms: get: operationId: Sites_getFreeRooms summary: List free rooms | Elenca aule libere parameters: - name: date in: query required: true description: Date schema: type: string explode: false - name: timeFrom in: query required: true description: Start time schema: type: string explode: false - name: timeTo in: query required: true description: End time schema: type: string explode: false - name: siteId in: path required: true schema: type: string responses: '200': description: The request has succeeded. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/FreeRoom' required: - data '400': description: The server could not understand the request due to invalid syntax. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Places components: schemas: Site: type: object required: - id - name - latitude - longitude - floors - city - extent properties: id: type: string name: type: string latitude: type: number example: 45.064254 longitude: type: number example: 7.657823 floors: type: array items: $ref: '#/components/schemas/Floor' city: type: object properties: id: type: string name: type: string required: - id - name extent: type: number description: 'A delta in degrees that applied to the centroid coordinates of the site determines its extent' PlaceCategory: type: object required: - id - name properties: id: type: string example: AULA name: type: string example: Aula showInMenu: type: boolean color: type: string example: lightBlue default: gray markerUrl: type: string format: url priority: type: number description: A MapBox style priority number. 0 means most important, larger numbers are less important example: 60 default: 100 highlighted: type: boolean description: If true, markers of this category should be shown initially on the map example: false example: id: AULA name: Aula showInMenu: false color: lightBlue priority: 60 highlighted: false Floor: type: object required: - id - name - level properties: id: type: string name: type: string level: type: number FreeRoom: type: object required: - buildingId - floorId - roomId - siteId - name - freeFrom - freeTo properties: buildingId: type: string floorId: type: string roomId: type: string siteId: type: string name: type: string id: type: string freeFrom: type: string format: date-time freeTo: type: string format: date-time RootPlaceCategory: type: object required: - id - name properties: id: type: string example: AULA name: type: string example: Aula showInMenu: type: boolean color: type: string example: lightBlue default: gray markerUrl: type: string format: url priority: type: number description: A MapBox style priority number. 0 means most important, larger numbers are less important example: 60 default: 100 highlighted: type: boolean description: If true, markers of this category should be shown initially on the map example: false subCategories: type: array items: $ref: '#/components/schemas/PlaceCategory' PlaceCategoryOverview: type: object required: - id - name properties: id: type: string example: AULA name: type: string example: Aula showInMenu: type: boolean color: type: string example: lightBlue default: gray markerUrl: type: string format: url priority: type: number description: A MapBox style priority number. 0 means most important, larger numbers are less important example: 60 default: 100 highlighted: type: boolean description: If true, markers of this category should be shown initially on the map example: false subCategory: $ref: '#/components/schemas/PlaceCategory' BuildingOverview: type: object required: - id - name - siteId - category properties: id: type: string name: type: string siteId: type: string category: $ref: '#/components/schemas/PlaceCategoryOverview' geoJson: $ref: '#/components/schemas/GeoJsonPolygon' Department: type: object required: - id - name - type properties: id: type: string name: type: string nullable: true type: type: string Building: type: object required: - id - name - siteId - category - latitude - longitude properties: id: type: string name: type: string siteId: type: string category: $ref: '#/components/schemas/PlaceCategoryOverview' geoJson: $ref: '#/components/schemas/GeoJsonPolygon' latitude: type: number example: 45.064254 longitude: type: number example: 7.657823 ErrorResponse: type: object properties: code: type: integer message: type: string GeoJsonPolygon: type: object required: - type - geometry properties: type: type: string enum: - Feature geometry: type: object properties: type: type: string enum: - Polygon coordinates: type: array items: type: array items: type: array items: type: number required: - type - coordinates Place: type: object required: - latitude - longitude - id - room - category - site - building - floor - department - geoJson - capacity - structure - resources properties: latitude: type: number example: 45.064254 longitude: type: number example: 7.657823 id: type: string room: type: object properties: id: type: string name: type: string required: - id - name category: $ref: '#/components/schemas/PlaceCategoryOverview' site: type: object properties: id: type: string name: type: string required: - id - name building: $ref: '#/components/schemas/BuildingOverview' floor: $ref: '#/components/schemas/Floor' department: $ref: '#/components/schemas/Department' geoJson: $ref: '#/components/schemas/GeoJsonPolygon' capacity: type: integer example: 300 structure: type: object properties: name: type: string shortName: type: string email: type: string nullable: true phone: type: string nullable: true required: - name - shortName - email - phone nullable: true resources: type: array items: type: object properties: name: type: string description: type: string category: type: string required: - name - description - category PlaceOverview: type: object required: - latitude - longitude - id - room - category - site - building - floor - department properties: latitude: type: number example: 45.064254 longitude: type: number example: 7.657823 id: type: string room: type: object properties: id: type: string name: type: string required: - id - name category: $ref: '#/components/schemas/PlaceCategoryOverview' site: type: object properties: id: type: string name: type: string required: - id - name building: $ref: '#/components/schemas/BuildingOverview' floor: $ref: '#/components/schemas/Floor' department: $ref: '#/components/schemas/Department' securitySchemes: BearerAuth: type: http scheme: Bearer