PhotosService_GetObjectMedia
const url = 'https://dictionary.example.invalid/api/json/objects/DEMO_VALUE/media?propertyId=DEMO_VALUE&offset=1&limit=1&tags=1&types=1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://dictionary.example.invalid/api/json/objects/DEMO_VALUE/media?propertyId=DEMO_VALUE&offset=1&limit=1&tags=1&types=1'GetObjectMedia returns photos for a specific room (object) with pagination.
Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»Object (room) identifier
Example
DEMO_VALUEQuery Parameters
Заголовок раздела «Query Parameters»Property UUID for fast-path lookup
Example
DEMO_VALUEPagination offset (default 0)
Example
1Pagination limit (default 20)
Example
1Filter by photo tags (optional)
Example
[ 1]Filter by media types (legacy mdatas type_id values)
Example
[ 1]Responses
Заголовок раздела «Responses»OK
GetObjectMediaResponse - room/object photos response.
object
Media items for current page
MediaItem - A single photo/media item. Analytics spec: Media item with all photo details.
object
Room/object ID (UUID string, empty for hotel-level)
Photo ID (int32 to ensure JSON number serialization)
Photo title/description
Full path to photo (e.g., “https://cdn.example.com/photos/xxx/”)
File name of photo (e.g., “photo1.jpg”)
Photo tags (array of tag objects)
Tag - Photo tag object with id and name. Analytics spec: Tag as object with id and name fields.
object
Tag ID (1-7)
Tag name (BEDROOM, KITCHEN, BATHROOM, YARD, VIEW_FROM_WINDOW, POOL, OTHER)
Aspect ratio as float (e.g., 1.333 for 4:3, 1.778 for 16:9)
Date photo was added (ISO format string, e.g., “2024-01-15”)
Total media count (respects tag filter)
Room type name for requested object ID
Example
{ "media": [ { "roomTypeId": null, "id": null, "title": null, "fullPath": null, "fileName": null, "tags": null, "aspectRatio": null, "dateAdd": null } ], "count": 1, "roomTypeName": "DEMO_VALUE"}default
Заголовок раздела «default»Default error response
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Example
{ "code": 1, "message": "DEMO_VALUE", "details": [ { "@type": null } ]}