Get all resources
POST /api/connector/v1/resources/getAll
Returns all resources of an enterprise associated with the connector integration. Note that when any of the extents is set to true
, the response contains the entities that are associated to a resource. If the extent is not associated to a resource (e.g. resource category not assigned to any resource), this information is not returned.
Note this operation uses Pagination and supports Portfolio Access Tokens.
Request Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
Limitation on the quantity of data returned and optional Cursor for the starting point of data.
object
Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
Unique identifiers of the requested Resources.
Extent of data to be returned.
object
object
object
Example
{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "EnterpriseIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "4d0201db-36f5-428b-8d11-4f0a65e960cc" ], "ResourceIds": [ "5ee074b1-6c86-48e8-915f-c7aa4702086f", "c32386aa-1cd2-414a-a823-489325842fbe" ], "CreatedUtc": { "StartUtc": "2022-10-15T00:00:00Z", "EndUtc": "2022-10-20T00:00:00Z" }, "UpdatedUtc": { "StartUtc": "2022-10-15T00:00:00Z", "EndUtc": "2022-10-20T00:00:00Z" }, "Extent": { "Resources": true, "ResourceCategories": false, "ResourceCategoryAssignments": false, "ResourceCategoryImageAssignments": false, "ResourceFeatures": false, "ResourceFeatureAssignments": false, "Inactive": false }, "Limitation": { "Count": 10 }}
Responses
Section titled “ Responses ”OK
object
The resources of the enterprise.
object
Unique identifier of the resource.
Unique identifier of the Enterprise.
Whether the resource is still active.
Identifier of the parent Resource (e.g. room of a bed).
Name of the resource (e.g. room number).
State of the resource.
All translations of the description.
object
Creation date and time of the resource in UTC timezone in ISO 8601 format.
Last update date and time of the resource in UTC timezone in ISO 8601 format.
All translations of external name.
object
All translations of direction.
object
Categories of resources in the enterprise. Deprecated!
object
Unique identifier of the category.
Unique identifier of the Enterprise.
Unique identifier of the Service of the resource category.
Whether the category is still active.
All translations of the name.
object
All translations of the short name.
object
All translations of the description.
object
Extra capacity that can be served (e.g. extra bed count).
Identifier of the resource category from external system.
Assignments of resources to categories. Deprecated!
object
Unique identifier of the assignment.
Whether the assignment is still active.
Unique identifier of the Resource assigned to the Resource category.
Unique identifier of the Resource category.
Creation date and time of the assignment in UTC timezone in ISO 8601 format.
Last update date and time of the assignment in UTC timezone in ISO 8601 format.
Assignments of images to categories. Deprecated!
object
Unique identifier of the assignment.
Whether the assignment is still active.
Unique identifier of the Resource category.
Unique identifier of the image assigned to the Resource category.
Creation date and time of the assignment in UTC timezone in ISO 8601 format.
Last update date and time of the assignment in UTC timezone in ISO 8601 format.
Features of resources in the enterprise. Deprecated!
object
Unique identifier of the feature.
Unique identifier of the Service.
Whether the resource feature is still active.
All translations of the name.
object
All translations of the short name.
object
All translations of the description.
object
Assignments of resource features to resources. Deprecated!
object
Unique identifier of the assignment.
Whether the assignment is still active.
Unique identifier of the Resource.
Unique identifier of the Resource feature assigned to the Resource.
Creation date and time of the assignment in UTC timezone in ISO 8601 format.
Last update date and time of the assignment in UTC timezone in ISO 8601 format.
Unique identifier of the item one newer in time order than the items to be returned. If Cursor is not specified, i.e. null, then the latest or most recent items will be returned.
Example
{ "Resources": [ { "Id": "5ee074b1-6c86-48e8-915f-c7aa4702086f", "EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "IsActive": true, "Name": "101", "ParentResourceId": null, "State": "Dirty", "Descriptions": {}, "Data": { "Discriminator": "Space", "Value": { "FloorNumber": "3", "LocationNotes": "A1" } }, "CreatedUtc": "2016-03-29T15:14:06Z", "UpdatedUtc": "2016-03-29T15:14:06Z" }, { "Id": "c32386aa-1cd2-414a-a823-489325842fbe", "EnterpriseId": "4d0201db-36f5-428b-8d11-4f0a65e960cc", "IsActive": true, "Name": "102", "ParentResourceId": null, "State": "Inspected", "Descriptions": { "en-US": "Resource description" }, "Data": { "Discriminator": "Space", "Value": { "FloorNumber": "3", "LocationNotes": "B2" } }, "CreatedUtc": "2016-03-29T15:14:06Z", "UpdatedUtc": "2016-03-29T15:14:06Z" } ], "ResourceCategories": [ { "Id": "aaed6e21-1c1f-4644-9872-e53f96a21bf9" }, { "ServiceId": "24e2ead5-65a8-4ed9-8286-abdb00f08a1f" }, { "IsActive": true }, { "Names": { "en-US": "Best Room" } }, { "ShortNames": { "en-US": "BR" } }, { "Descriptions": {} }, { "Ordering": 0 }, { "Capacity": 2 }, { "ExtraCapacity": 0 }, { "ExternalIdentifier": "RT001-BestRoom" } ], "ResourceCategoryAssignments": [ { "Id": "032298ad-b1b8-4936-9420-415a2152304a", "IsActive": true, "ResourceId": "5ee074b1-6c86-48e8-915f-c7aa4702086f", "CategoryId": "aaed6e21-1c1f-4644-9872-e53f96a21bf9", "CreatedUtc": "2016-03-29T15:14:06Z", "UpdatedUtc": "2016-03-29T15:14:06Z" } ], "ResourceCategoryImageAssignments": [ { "Id": "f3475243-5962-4fb5-bdfd-958f9c65520e", "IsActive": true, "CategoryId": "aaed6e21-1c1f-4644-9872-e53f96a21bf9", "ImageId": "8cd435e0-f024-44a0-84fd-abe300b8ae1c", "CreatedUtc": "2016-03-29T15:14:06Z", "UpdatedUtc": "2016-03-29T15:14:06Z" } ], "ResourceFeatures": [ { "Id": "a693dd8c-21fe-4dae-b450-ea3bd9ab3bb0", "ServiceId": "24e2ead5-65a8-4ed9-8286-abdb00f08a1f", "IsActive": true, "Classification": "AccessibleBathroom", "Names": { "en-US": "Accessible Bathroom" }, "ShortNames": { "en-US": "AccessBath" }, "Descriptions": {} } ], "ResourceFeatureAssignments": [ { "Id": "ca2b5bf9-24f5-4faa-95ef-b65d38598b08", "IsActive": true, "ResourceId": "18019693-c66f-4be8-a893-c3d89fd291cc", "FeatureId": "a693dd8c-21fe-4dae-b450-ea3bd9ab3bb0", "CreatedUtc": "2016-03-29T15:14:06Z", "UpdatedUtc": "2016-03-29T15:14:06Z" } ], "Cursor": "c32386aa-1cd2-414a-a823-489325842fbe"}
Server has successfully fulfilled the request and there is no additional information to send back.
object
Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
object
Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
object
Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
object
Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see Request timeouts
object
Error caused by too many requests sent in a given amount of time. Response contains Retry-After
header indicating how long the user agent should wait before making a follow-up request. For more information, see Request limits.
object
Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our documentation repository.