Daminion Server REST API (0.95)

The REST API lets you integrate external applications with Daminion Server using simple HTTP methods. You can easily fetch various piece of information including: a list of media items, media item properties (tags), thumbnails and previews, list of tags, etc...

By default REST/API is switched off. To enable it you need to open the Daminion Server administration panel, go to the Administration > Catalogs. Right click on a catalog and navigate to Edit. Switch to the API tab and check the "Enable REST API" option.

Base Url

Base url that you need to use in all queries is: http://hostname:8090/api/

Where 8090 is a port that can be changed from the Daminion Server Administration Panel (File > Preferences > API)

GET /tags

Gets list of the tag specifications.

Url Structure:

/api/tags

Example of Usage:

http://localhost:8090/api/tags

Sample Response:

 <tags count="80">
<tag name="Folders" title="Folders" key="0e00cfdf-0892-482d-b92c-3b3256cbe1c8"/>
<tag name="MediaFormat" title="Media Format" key="5c461eeb-7454-4ab2-a6f3-384de7c988e7"/>
<tag name="Software" title="Software" key="2413863d-ac90-49d3-8d3a-ebc003b33edd"/>
<tag name="Rating" name="Rating" key="75c5351c-f18f-4252-aed4-eaf4603b6369"/>
<tag name="Label" name="Label" key="f3dc7b01-24f3-49b4-93d2-5183c677984b"/>
...
</tags>

GET /tags/{tagName}

Gets list of the tag values by tag name

Url Structure:

/api/tags/{tagName}?[parentId=%parentValueId&offset=%offset%&limit=%limit]

Mandatory Query Parameters:

tagName: tag name without spaces. A list of tags can be received by the /api/tags command

Optional Query Parameters:

parentId: id of the parent tag value
offset: 0-based starting index for the list of results.
limit: maximum number of results to return.

Example of Usages:

http://localhost:8090/api/tags/SavedSearches

http://localhost:8090/api/tags/MediaFormat

http://localhost:8090/api/tags/folders?parentId=1

Response:

 <tagValues count="N">
  <tagValue id="%value1%" name="%name1%"/>
  <tagValue id="%value2%" name="%name2%"/>
  …
  <tagValue id="%valueN%" name="%nameN%"/>
  </tagValues>

GET /tags/savedSearches

Gets list of the saved searches

Url Structure:

/api/tags/savedSearches

Example of Usage:

http://localhost:8090/api/tags/savedSearches

Response:

  <tagValues count="N">
  <tagValue id="%value1%" name="%name1%"/>
  <tagValue id="%value2%" name="%name2%"/>
  …
  <tagValue id="%valueN%" name="%nameN%"/>
  </tagValues>

GET mediaitems?savedSearchesId

List media items according to a specified Saved Search. 

Url Structure:

/api/mediaitems?savedSearchesId=%savedSearchId%&offset=%offset%&limit=%limit%&[tags=%tags%]&[sortBy=%sortBy%]

Mandatory Query Parameters:

  • savedSearchId: saved search id (see GET /api/tags/savedSearches)
  • offset: 0-based starting index for the list of results. 
  • limit: maximum number of results to return. 

Optional Query Parameters: 

tags: what tags should be included into the response. Possible values are: none, all. Default is all. 

sortBy:specify a tag name for sorting items (resulted list will be sorted by ascending)

Example of Usage:

http://localhost:8090/api/mediaItems?savedSearchesId=1&offset=0&limit=25&sortBy=rating

Response:

<mediaItems count="N">
<mediaItem id="%id%" uri="http://%host%:%port%/api/mediaitems/%id%">
<tagValues>
<tagValue key="%tagGuid%" name="%tagName%">%value%</tagValue>
<tagValue key="%tagGuid2%" name="%tagName2%">%value2%</tagValue>

<tagValue key="%tagGuidN%" name="%tagNameN%">%valueN%</tagValue>
</tagValues>

 

</mediaItem>…
</mediaItems >

 

GET /mediaitems/search

Search for media items by a tag name

Url Structure:

/api/mediaitems/search?tag=%tagName%&value=%tagValue%&offset=%offset%&limit=%limit%&[sortBy=%sortBy%]

Mandatory Query Parameters:

  • tagName: name of a tag for searching
  • tagValue: tag value for searching
  • offset: 0-based starting index for the list of results.
  • limit: maximum number of results to return.

Optional Query Parameters: 

sortBy: specify a tag name for sorting items (resulted list will be sorted by ascending)

Example of Usage:

http://localhost:8090/api/mediaItems/search?tag=keywords&value=ananas&sortBy=rating

Response:

<mediaItems count="N">
<mediaItem id="%id%" 
uri="http://%host%:%port%/api/mediaitems/%id%">
<tagValues>
<tagValue key="%tagGuid%" name="%tagName%">value%</tagValue>
<
</mediaItem>…
</mediaItems >

 

GET mediaitems/mediaItemId=

Lists tag values of a specified media item.

Url Structure:

/api/mediaitems/%mediaItemId%

Mandatory Query Parameters:

mediaItemId: media item id

Example of Usage:

http://localhost:8090/api/mediaitems/mediaItemId=%itemId%

Response:

<mediaItem id="%id%" uri="http://%host%:%port%/api/mediaitems/%id%">
<tagValues>
<tagValue key="%tagGuid%" name="%tagName%">%value%</tagValue>
<tagValue key="%tagGuid2%" name="%tagName2%">%value2%</tagValue>
…
<tagValue key="%tagGuidN%" name="%tagNameN%">%valueN%</tagValue>
</tagValues>
</mediaItem>

 

GET mediaitems/%itemId%/thumbnail?=

Gets thumbnail of a specified media item

Url Structure:

/api/mediaitems/%itemId%/thumbnail?size=%thumbnailSize%

Mandatory Query Parameters:

itemId:media item id

Optional Query Parameters:

size:size of the output thumbnail. Possible values are: small, medium, large. Default is medium.

Example of Usage:

http://localhost:8090/api/mediaitems/75/thumbnail?size=large

Response:

Returns “image/jpeg” thumbnail.

 

GET /mediaitems/%itemId%/preview

Gets preview of a specified media item

Url Structure:

/api/mediaitems/%itemId%/preview

Mandatory Query Parameters:

itemId: media item id

Example of Usage:

http://localhost:8090/api/mediaitems/75/preview

Response:

Returns “image/jpeg” preview

GET /supportedFileFormats

Get a list of supported formats

Url Structure:

/api/supportedFileFormats

Example of Usage:

http://localhost:8090/api/supportedFileFormats

Sample Response:

<fileFormats count="68">
	<fileFormat name="Unknown" supportedExtensions="" guid="00000000-0000-0000-0000-000000000000"/>
	<fileFormat name="JPEG" supportedExtensions=".jpe.jpg,.jpeg," guid="bdd7e5ff-8740-436b-bd6d-28be2cfe3409"/>
	<fileFormat name="BMP" supportedExtensions=".bmp" guid="605f71bd-15ec-4d25-8015-d48b870e7c09"/>
	<fileFormat name="TIFF" supportedExtensions=".tif.tiff," guid="a8c6b16a-5357-4c39-ac51-c4f5d1c826f7"/>
	<fileFormat name="GIF" supportedExtensions=".gif" guid="8e98be26-9a23-443c-899b-d764ce125523"/>
	<fileFormat name="PSD" supportedExtensions=".psd" guid="8508a8ad-6113-40ea-af3d-64e3dd2ac33c"/>
	<fileFormat name="PSB" supportedExtensions=".psb" guid="6d0aab88-538b-4d15-9820-11761f8b93d1"/>
	<fileFormat name="ICO" supportedExtensions=".ico" guid="3c2ed4f9-ee9c-4670-b5c0-87e80b24e62f"/>
	...
	<fileFormat name="MXF" supportedExtensions=".mxf" guid="959997e6-bfb8-4e59-afba-fbf4158c36fd"/>
</fileFormats>