# Media

The media API is presented as an Umbraco API controller. Therefore the media API i not accessible on the same URL as the PIM API.

E.g: ~/Umbraco/Api/Media/{endpoint}


POST /GetMediaItemInfo

This endpoint returns info on a specified media item.

Request

Body parameters: MediaIdsModel
MediaIdsModel
Property name Type Description
MediaIds int[] Array of media ids for the media items
Hash string md5 hash string consistent of the media API secret key + the count of the MediaIds array.

Response status OK (200)

Return value: MediaItem[]
MediaItem
Property name Type Description
Id int id of the media item
Name string name of the media item
Url string URL of the media item
Extension string The extension of the media item
FileType string File type of the media item

GET /GetFolder

Gets entire media folder with media items

Request

Query parameters:
Property name Type Description
folderId int Id of the folder in question
hash string md5 hash string consistent of the media API secret key + the id of the folder

Response status OK (200)

Return value: Folder
Folder
Property name Type Description
Id int Id of the folder
ParentId int Id of the parent to the folder
Name string Name of the folder
MediaItems MediaItems[] Array of media items contained with the folder
MediaItem
Property name Type Description
Id int id of the media item
Name string name of the media item
Url string URL of the media item
Extension string The extension of the media item
FileType string File type of the media item


© 2024 Struct - All rights reserved.