image_pdfimage_print

REST API Interface

Daminion Server Rest API (0.9 Beta)

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/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 imported into Daminion Server catalog according to a specified Saved Search.

Url Structure:

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

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.

Example of Usage:

http://localhost:8090/api/mediaitems?savedSearchesId=1&offset=0&limit=25

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/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 /tags

Gets list of the tag specifications.

Url Structure:

/api/tags

Example of Usage:

http://localhost:8090/api/tags

Response:


 

<tags count=”N”>
<tag key=”%tagGuid1%” name=”%tagName1%”/>
<tag key=”%tagGuid2%” name=”%tagName2%”/>

<tag key=”%tagGuidN%” name=”%tagNameN%”/>
</tags>


 

 

image_pdfimage_print