openapi: 3.2.0 info: title: Measurabl Core Spaces API version: v0 description: '## Quick Start Guide 1. Authorize using your client credentials (key and secret). 2. Make a `GET /core/v0/portfolios` request (under the Portfolios section) to get a list of available portfolios. 3. Obtain the proper portfolio_id (id) in which you need to get/create data for. 4. This `portfolio_id` will be required for all other reoccurring requests. * [Authentication](https://support.measurabl.com/hc/en-us/articles/15889532915085-How-do-I-authenticate-with-Measurabl-s-Core-API-) * [Release Notes](https://api.measurabl.com/release_notes) * [Usage/Rate Limits](https://support.measurabl.com/hc/en-us/articles/15889355100429-Core-API-Usage-Rate-Limits) * [Pagination & Filtering](https://support.measurabl.com/hc/en-us/articles/15889550313101-Core-API-Pagination-Filtering-Requests) * [Code Examples](https://github.com/Measurabl/measurabl_api_code_samples) ### Response Format Each endpoint response complies with the [JSON-API Specification](https://jsonapi.org/) which has many available [client libraries](https://jsonapi.org/implementations/#client-libraries). ' servers: - url: https://api.measurabl.com/core/v0 description: Base URL declared by the provider in apis.yml (roadmap#122). tags: - name: Spaces paths: /core/v0/portfolios/{portfolio_id}/buildings/{building_id}/spaces: post: summary: Creates space for a specified building tags: - Spaces security: - OAuth2: [] parameters: - name: portfolio_id in: path description: 'Example: a5b8cf61-c294-4e59-b1fa-b4732511ef57' required: true schema: type: string - name: building_id in: path description: 'Example: 1a9e7262-8f03-46e2-96de-e384ef56175f' required: true schema: type: string responses: '200': description: Portfolio/Building specific space content: application/vnd.api+json: example: data: id: 8a698998-ec63-419b-8123-b85238facd48 type: spaces attributes: propertyType: Financial Office name: Office Space common: true floorAreaSqFt: 8639 allocation: 62 estarSpaceId: 17829744 customized: false relationships: building: data: id: 9eb479f9-2d84-4049-bd00-41c618822908 type: buildings links: self: /portfolios/9ce9e831-df37-4def-8332-d949c3bce210/buildings/9eb479f9-2d84-4049-bd00-41c618822908 links: self: /portfolios/9ce9e831-df37-4def-8332-d949c3bce210/buildings/9eb479f9-2d84-4049-bd00-41c618822908/spaces/8a698998-ec63-419b-8123-b85238facd48 schema: $ref: '#/components/schemas/json_api' '404': description: Not Found content: application/vnd.api+json: example: errors: - status: '404' title: Not Found detail: Could not find building ed29233f-1f93-4423-bc6e-34099beda236 in portfolio 8e9abf2c-80cc-4deb-9a5d-4428eac3ea3a schema: $ref: '#/components/schemas/json_api' '401': description: Unauthorized Request content: application/vnd.api+json: example: errors: - status: '401' title: Unauthorized detail: Unauthorized Request schema: $ref: '#/components/schemas/json_api' '400': description: Bad Request content: application/vnd.api+json: example: errors: - status: '400' title: Bad Request detail: An invalid UUID parameter was submitted with the request (portfolio_id) schema: $ref: '#/components/schemas/json_api' '502': description: Internal Error content: application/vnd.api+json: example: errors: - status: '502' title: Bad Gateway detail: A Measurabl Server is down, please try again later schema: $ref: '#/components/schemas/json_api' '500': description: Internal Error content: application/vnd.api+json: example: errors: - status: '500' title: Internal Server Error detail: An error occurred with the request schema: $ref: '#/components/schemas/json_api' '503': description: Service Unavailable content: application/vnd.api+json: example: errors: - status: '503' title: Service Unavailable detail: A Measurabl Server is currently unavailable, please try again later schema: $ref: '#/components/schemas/json_api' '408': description: Request Timeout content: application/vnd.api+json: example: errors: - status: '408' title: Request Timeout detail: The request you made has timed out schema: $ref: '#/components/schemas/json_api' '429': description: Too many requests content: application/vnd.api+json: example: errors: - status: '429' title: Too Many Requests detail: Rate Limit Exceeded schema: $ref: '#/components/schemas/json_api' '403': description: unauthorized request content: application/vnd.api+json: example: errors: - status: '403' title: Forbidden detail: 'A valid auth token is required. POST to ''/token'' with a valid ''key'' and ''secret'' to get an auth token. ' schema: $ref: '#/components/schemas/json_api' requestBody: content: application/vnd.api+json: schema: type: object properties: data: type: object properties: attributes: type: object properties: name: type: string propertyType: type: string common: type: boolean floorAreaSqFt: type: number required: - name - propertyType - common - floorAreaSqFt example: data: type: spaces attributes: name: New Space propertyType: Financial Office common: false floorAreaSqFt: 4108 required: true description: Request body used to create a space associated with a building get: summary: Returns a list of spaces for a specified building tags: - Spaces security: - OAuth2: [] parameters: - name: portfolio_id in: path description: "UUID of either the parent portfolio or fund
\n Example: ad838cbe-650a-4e93-8d84-58e8abd3f272" required: true schema: type: string - name: building_id in: path description: 'Example: ecc01f7d-2732-4ddf-900a-c4cc40959727' required: true schema: type: string - name: page in: query default: 1 schema: type: integer - name: size in: query description: The max page size is limited to 200 returned results default: 25 schema: type: integer responses: '200': description: Portfolio/Building specific space content: application/vnd.api+json: example: data: - id: f4b41ff0-c657-45c7-9c9c-4650d34fcb6e type: spaces attributes: propertyType: Financial Office name: Our Office Space common: true floorAreaSqFt: 6765 allocation: 50 estarSpaceId: 1905762 customized: false relationships: building: data: id: 9fea95f2-3b8b-4b0b-99e7-627e612506a6 type: buildings links: self: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6 links: self: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6/spaces/f4b41ff0-c657-45c7-9c9c-4650d34fcb6e - id: 5786ebf4-bc31-4c91-b3b6-7ca5db0fe51e type: spaces attributes: propertyType: Office name: Another Office Building common: false floorAreaSqFt: 920 allocation: 78 estarSpaceId: 29901759 customized: true relationships: building: data: id: 9fea95f2-3b8b-4b0b-99e7-627e612506a6 type: buildings links: self: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6 links: self: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6/spaces/5786ebf4-bc31-4c91-b3b6-7ca5db0fe51e links: self: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6/spaces/?size=2&page=1 first: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6/spaces/?size=2&page=1 last: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6/spaces/?size=2&page=2 next: /portfolios/06e3edd1-cbad-44f2-8d8e-16b016844def/buildings/9fea95f2-3b8b-4b0b-99e7-627e612506a6/spaces/?size=2&page=2 meta: page: number: 1 size: 2 totalPages: 2 totalElements: 3 schema: $ref: '#/components/schemas/json_api' '404': description: Not Found content: application/vnd.api+json: example: errors: - status: '404' title: Not Found detail: Could not find building e17dbb60-5400-4789-ac7e-10ed885ce4f5 in portfolio f986a801-1d04-4a71-b9d7-4b23ff865bec schema: $ref: '#/components/schemas/json_api' '401': description: Unauthorized Request content: application/vnd.api+json: example: errors: - status: '401' title: Unauthorized detail: Unauthorized Request schema: $ref: '#/components/schemas/json_api' '400': description: Bad Request content: application/vnd.api+json: example: errors: - status: '400' title: Bad Request detail: An invalid UUID parameter was submitted with the request (portfolio_id) schema: $ref: '#/components/schemas/json_api' '502': description: Internal Error content: application/vnd.api+json: example: errors: - status: '502' title: Bad Gateway detail: A Measurabl Server is down, please try again later schema: $ref: '#/components/schemas/json_api' '500': description: Internal Error content: application/vnd.api+json: example: errors: - status: '500' title: Internal Server Error detail: An error occurred with the request schema: $ref: '#/components/schemas/json_api' '503': description: Service Unavailable content: application/vnd.api+json: example: errors: - status: '503' title: Service Unavailable detail: A Measurabl Server is currently unavailable, please try again later schema: $ref: '#/components/schemas/json_api' '408': description: Request Timeout content: application/vnd.api+json: example: errors: - status: '408' title: Request Timeout detail: The request you made has timed out schema: $ref: '#/components/schemas/json_api' '429': description: Too many requests content: application/vnd.api+json: example: errors: - status: '429' title: Too Many Requests detail: Rate Limit Exceeded schema: $ref: '#/components/schemas/json_api' '403': description: unauthorized request content: application/vnd.api+json: example: errors: - status: '403' title: Forbidden detail: 'A valid auth token is required. POST to ''/token'' with a valid ''key'' and ''secret'' to get an auth token. ' schema: $ref: '#/components/schemas/json_api' /core/v0/portfolios/{portfolio_id}/buildings/{building_id}/spaces/{space_id}: delete: summary: Deletes a specific space for a specified building tags: - Spaces security: - OAuth2: [] parameters: - name: portfolio_id in: path description: "UUID for the parent portfolio
\n Example: 3e6c2f1a-20f5-4b95-bafe-2d771b1d8b60" required: true schema: type: string - name: building_id in: path description: 'Example: bbd04c49-64a6-45f1-9b97-0b05f90d4914' required: true schema: type: string - name: space_id in: path description: 'Example: 8356a90d-bce3-447d-bb50-4eb2c70ddf7f' required: true schema: type: string responses: '204': description: Space Deleted Successfully content: application/vnd.api+json: example: '' '400': description: Bad Request content: application/vnd.api+json: example: errors: - status: '400' title: Bad Request detail: An invalid UUID parameter was submitted with the request (portfolio_id) schema: $ref: '#/components/schemas/json_api' '404': description: Not Found content: application/vnd.api+json: example: errors: - status: '404' title: Not Found detail: Could not find space 04109d30-5910-4262-9787-3ceb5e29a112 in building 47f404e1-5751-459e-9389-c75a54bb3a49 in portfolio 7fcbad76-f1c7-42ea-aecc-fa060731aee2 schema: $ref: '#/components/schemas/json_api' '401': description: Unauthorized Request content: application/vnd.api+json: example: errors: - status: '401' title: Unauthorized detail: Unauthorized Request schema: $ref: '#/components/schemas/json_api' '502': description: Internal Error content: application/vnd.api+json: example: errors: - status: '502' title: Bad Gateway detail: A Measurabl Server is down, please try again later schema: $ref: '#/components/schemas/json_api' '500': description: Internal Error content: application/vnd.api+json: example: errors: - status: '500' title: Internal Server Error detail: An error occurred with the request schema: $ref: '#/components/schemas/json_api' '503': description: Service Unavailable content: application/vnd.api+json: example: errors: - status: '503' title: Service Unavailable detail: A Measurabl Server is currently unavailable, please try again later schema: $ref: '#/components/schemas/json_api' '408': description: Request Timeout content: application/vnd.api+json: example: errors: - status: '408' title: Request Timeout detail: The request you made has timed out schema: $ref: '#/components/schemas/json_api' '429': description: Too many requests content: application/vnd.api+json: example: errors: - status: '429' title: Too Many Requests detail: Rate Limit Exceeded schema: $ref: '#/components/schemas/json_api' '403': description: unauthorized request content: application/vnd.api+json: example: errors: - status: '403' title: Forbidden detail: 'A valid auth token is required. POST to ''/token'' with a valid ''key'' and ''secret'' to get an auth token. ' schema: $ref: '#/components/schemas/json_api' get: summary: Returns details of a specific space for a specified building tags: - Spaces security: - OAuth2: [] parameters: - name: portfolio_id in: path description: "UUID of either the parent portfolio or fund
\n Example: b3488eca-a284-4c56-bdcf-a94709a49717" required: true schema: type: string - name: building_id in: path description: 'Example: 1c00f770-1600-42a9-a335-881b5b48772e' required: true schema: type: string - name: space_id in: path description: 'Example: 3e57bf30-caad-4f51-ae39-ea9a448c38ae' required: true schema: type: string responses: '200': description: Portfolio or Fund / Building specific space content: application/vnd.api+json: example: data: id: 127af6c6-c3ee-4957-aab0-85a20394e1a8 type: spaces attributes: propertyType: Financial Office name: Office Space common: false floorAreaSqFt: 3795 allocation: 63 estarSpaceId: 44844188 customized: true relationships: building: data: id: 79059bb2-6fb7-4f39-b5e2-c02f941918aa type: buildings links: self: /portfolios/fafa1342-6ecc-4a4a-a9fe-7199513b9f12/buildings/79059bb2-6fb7-4f39-b5e2-c02f941918aa links: self: /portfolios/fafa1342-6ecc-4a4a-a9fe-7199513b9f12/buildings/79059bb2-6fb7-4f39-b5e2-c02f941918aa/spaces/127af6c6-c3ee-4957-aab0-85a20394e1a8 schema: $ref: '#/components/schemas/json_api' '404': description: Not Found content: application/vnd.api+json: example: errors: - status: '404' title: Not Found detail: Could not find space 54397974-809d-4b0d-bbfc-425562857be8 in building abf30b41-8877-4249-b163-ef303b5d324e in portfolio 4782f3cd-3f21-46e4-82d4-5be44f4ae0ac schema: $ref: '#/components/schemas/json_api' '401': description: Unauthorized Request content: application/vnd.api+json: example: errors: - status: '401' title: Unauthorized detail: Unauthorized Request schema: $ref: '#/components/schemas/json_api' '400': description: Bad Request content: application/vnd.api+json: example: errors: - status: '400' title: Bad Request detail: An invalid UUID parameter was submitted with the request (portfolio_id) schema: $ref: '#/components/schemas/json_api' '502': description: Internal Error content: application/vnd.api+json: example: errors: - status: '502' title: Bad Gateway detail: A Measurabl Server is down, please try again later schema: $ref: '#/components/schemas/json_api' '500': description: Internal Error content: application/vnd.api+json: example: errors: - status: '500' title: Internal Server Error detail: An error occurred with the request schema: $ref: '#/components/schemas/json_api' '503': description: Service Unavailable content: application/vnd.api+json: example: errors: - status: '503' title: Service Unavailable detail: A Measurabl Server is currently unavailable, please try again later schema: $ref: '#/components/schemas/json_api' '408': description: Request Timeout content: application/vnd.api+json: example: errors: - status: '408' title: Request Timeout detail: The request you made has timed out schema: $ref: '#/components/schemas/json_api' '429': description: Too many requests content: application/vnd.api+json: example: errors: - status: '429' title: Too Many Requests detail: Rate Limit Exceeded schema: $ref: '#/components/schemas/json_api' '403': description: unauthorized request content: application/vnd.api+json: example: errors: - status: '403' title: Forbidden detail: 'A valid auth token is required. POST to ''/token'' with a valid ''key'' and ''secret'' to get an auth token. ' schema: $ref: '#/components/schemas/json_api' patch: summary: Updates a specific space for a specified building tags: - Spaces security: - OAuth2: [] parameters: - name: portfolio_id in: path description: "UUID for the parent portfolio
\n Example: 02cbb0a6-ce94-42ba-919d-6cdb26f90482" required: true schema: type: string - name: building_id in: path description: 'Example: fc170ca8-d19a-4f36-b92d-7deab59a074e' required: true schema: type: string - name: space_id in: path description: 'Example: 6aef4b6d-d054-4979-a9ff-e7f80519e648' required: true schema: type: string responses: '200': description: Portfolio / Building Specific Space Updated content: application/vnd.api+json: example: data: id: d526fa46-f3ef-4b81-acd1-6fe7f603f1a1 type: spaces attributes: propertyType: Financial Office name: Office Space common: true floorAreaSqFt: 6191 allocation: 15 estarSpaceId: 32647979 customized: false relationships: building: data: id: 9903057f-e608-4a14-b67b-da92a918f0d8 type: buildings links: self: /portfolios/0871952b-6f18-4243-8396-1dbd7edd204f/buildings/9903057f-e608-4a14-b67b-da92a918f0d8 links: self: /portfolios/0871952b-6f18-4243-8396-1dbd7edd204f/buildings/9903057f-e608-4a14-b67b-da92a918f0d8/spaces/d526fa46-f3ef-4b81-acd1-6fe7f603f1a1 schema: $ref: '#/components/schemas/json_api' '404': description: Not Found content: application/vnd.api+json: example: errors: - status: '404' title: Not Found detail: Could not find space 50bc0cb5-fc13-40d0-b205-74ffb88aa709 for building b4a307db-abf7-408d-b92a-8e5cef727a58 in portfolio 18cbe890-7d32-42af-a1f6-ac8240156c13 schema: $ref: '#/components/schemas/json_api' '401': description: Unauthorized Request content: application/vnd.api+json: example: errors: - status: '401' title: Unauthorized detail: Unauthorized Request schema: $ref: '#/components/schemas/json_api' '400': description: Bad Request content: application/vnd.api+json: example: errors: - status: '400' title: Bad Request detail: An invalid UUID parameter was submitted with the request (portfolio_id) schema: $ref: '#/components/schemas/json_api' '502': description: Internal Error content: application/vnd.api+json: example: errors: - status: '502' title: Bad Gateway detail: A Measurabl Server is down, please try again later schema: $ref: '#/components/schemas/json_api' '500': description: Internal Error content: application/vnd.api+json: example: errors: - status: '500' title: Internal Server Error detail: An error occurred with the request schema: $ref: '#/components/schemas/json_api' '503': description: Service Unavailable content: application/vnd.api+json: example: errors: - status: '503' title: Service Unavailable detail: A Measurabl Server is currently unavailable, please try again later schema: $ref: '#/components/schemas/json_api' '408': description: Request Timeout content: application/vnd.api+json: example: errors: - status: '408' title: Request Timeout detail: The request you made has timed out schema: $ref: '#/components/schemas/json_api' '429': description: Too many requests content: application/vnd.api+json: example: errors: - status: '429' title: Too Many Requests detail: Rate Limit Exceeded schema: $ref: '#/components/schemas/json_api' '403': description: unauthorized request content: application/vnd.api+json: example: errors: - status: '403' title: Forbidden detail: 'A valid auth token is required. POST to ''/token'' with a valid ''key'' and ''secret'' to get an auth token. ' schema: $ref: '#/components/schemas/json_api' requestBody: content: application/vnd.api+json: schema: type: object properties: data: type: object properties: attributes: id: type: string type: object properties: name: type: string propertyType: type: string floorAreaSqFt: type: number required: - name - propertyType - common - floorAreaSqFt example: data: id: 3066bcef-b5ac-4027-9e38-f35baea768b7 type: spaces attributes: propertyType: Financial Office name: New Space floorAreaSqFt: 9840 required: true description: Request body used to create a space associated with a building components: schemas: success: type: object required: - data properties: data: $ref: '#/components/schemas/data' included: description: To reduce the number of HTTP requests, servers **MAY** allow responses that include related resources along with the requested primary resources. Such responses are called 'compound documents'. type: array items: $ref: '#/components/schemas/resource' uniqueItems: true meta: $ref: '#/components/schemas/meta' links: description: Link members related to the primary data. allOf: - $ref: '#/components/schemas/links' - $ref: '#/components/schemas/pagination' jsonapi: $ref: '#/components/schemas/jsonapi' additionalProperties: false relationshipToOne: description: References to other resource objects in a to-one ('relationship'). Relationships can be specified by including a member in a resource's links object. anyOf: - $ref: '#/components/schemas/empty' - $ref: '#/components/schemas/linkage' relationshipLinks: description: A resource object **MAY** contain references to other resource objects ('relationships'). Relationships may be to-one or to-many. Relationships can be specified by including a member in a resource's links object. type: object properties: self: $ref: '#/components/schemas/link' related: $ref: '#/components/schemas/link' additionalProperties: true relationshipToMany: description: An array of objects each containing 'type' and 'id' members for to-many relationships. type: array items: $ref: '#/components/schemas/linkage' uniqueItems: true data: description: The document's 'primary data' is a representation of the resource or collection of resources targeted by a request. anyOf: - $ref: '#/components/schemas/resource' - description: An array of resource objects, an array of resource identifier objects, or an empty array ([]), for requests that target resource collections. type: array items: $ref: '#/components/schemas/resource' uniqueItems: true - description: null if the request is one that might correspond to a single resource, but doesn't currently. pagination: type: object properties: first: description: The first page of data type: string format: uri-reference x-nullable: true last: description: The last page of data type: string format: uri-reference x-nullable: true prev: description: The previous page of data type: string format: uri-reference x-nullable: true next: description: The next page of data type: string format: uri-reference x-nullable: true meta: description: Non-standard meta-information that can not be represented as an attribute or relationship. type: object additionalProperties: true failure: type: object required: - errors properties: errors: type: array items: $ref: '#/components/schemas/error' uniqueItems: true meta: $ref: '#/components/schemas/meta' jsonapi: $ref: '#/components/schemas/jsonapi' links: $ref: '#/components/schemas/links' additionalProperties: false json_api: oneOf: - $ref: '#/components/schemas/success' - $ref: '#/components/schemas/failure' - $ref: '#/components/schemas/info' link: description: 'A link **MUST** be represented as either: a string containing the link''s URL or a link object.' oneOf: - description: A string containing the link's URL. type: - string - 'null' format: uri-reference - type: object required: - href properties: href: description: A string containing the link's URL. type: string format: uri-reference meta: $ref: '#/components/schemas/meta' links: type: object additionalProperties: $ref: '#/components/schemas/link' empty: description: Describes an empty to-one relationship. linkage: description: The 'type' and 'id' to non-empty members. type: object required: - type - id properties: type: type: string id: type: string meta: $ref: '#/components/schemas/meta' additionalProperties: false error: type: object properties: id: description: A unique identifier for this particular occurrence of the problem. type: string links: $ref: '#/components/schemas/links' status: description: The HTTP status code applicable to this problem, expressed as a string value. type: string code: description: An application-specific error code, expressed as a string value. type: string title: description: A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. type: string detail: description: A human-readable explanation specific to this occurrence of the problem. type: string source: type: object properties: pointer: description: A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. '/data' for a primary data object, or '/data/attributes/title' for a specific attribute]. type: string parameter: description: A string indicating which query parameter caused the error. type: string meta: $ref: '#/components/schemas/meta' additionalProperties: false jsonapi: description: An object describing the server's implementation type: object properties: version: type: string meta: $ref: '#/components/schemas/meta' additionalProperties: false attributes: description: Members of the attributes object ('attributes') represent information about the resource object in which it's defined. type: object additionalProperties: true info: type: object required: - meta properties: meta: $ref: '#/components/schemas/meta' links: $ref: '#/components/schemas/links' jsonapi: $ref: '#/components/schemas/jsonapi' additionalProperties: false relationships: description: Members of the relationships object ('relationships') represent references from the resource object in which it's defined to other resource objects. type: object properties: links: $ref: '#/components/schemas/relationshipLinks' data: description: Member, whose value represents 'resource linkage'. oneOf: - $ref: '#/components/schemas/relationshipToOne' - $ref: '#/components/schemas/relationshipToMany' meta: $ref: '#/components/schemas/meta' additionalProperties: true resource: description: '''Resource objects'' appear in a JSON:API document to represent resources.' type: object required: - type - id properties: type: type: string id: type: string attributes: $ref: '#/components/schemas/attributes' relationships: $ref: '#/components/schemas/relationships' links: $ref: '#/components/schemas/links' meta: $ref: '#/components/schemas/meta' additionalProperties: false securitySchemes: OAuth2: type: oauth2 flows: clientCredentials: tokenUrl: https://api.measurabl.com/token scopes: {}