Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
rest [2016/05/18 22:56]
webadmin [Access the data for a specific Marked Individual]
rest [2016/07/15 06:34]
webadmin [Access the media file for a specific SinglePhotoVideo]
Line 50: Line 50:
 [[http://​www.splashcatalog.org/​mmuwildbook/​rest/​demo/​org.ecocean.SinglePhotoVideo?​correspondingEncounterNumber=="​562"​]] [[http://​www.splashcatalog.org/​mmuwildbook/​rest/​demo/​org.ecocean.SinglePhotoVideo?​correspondingEncounterNumber=="​562"​]]
  
-====Access the media file for a specific SinglePhotoVideo==== 
  
-Here is how you could build a URL to get the actual media file for a SinglePhotoVideo object (its uploaded media) for Encounter 462 from Wildbook'​s REST interface in the JSON data format. 
- 
-First get the media SinglePhotoVideo objects: 
- 
-[[http://​www.splashcatalog.org/​mmuwildbook/​rest/​demo/​org.ecocean.SinglePhotoVideo?​correspondingEncounterNumber=="​562"​]] 
- 
-Next, parse out its path on the server. For this attribute: 
- 
-<​code>​ 
-fullFileSystemPath":"/​opt/​tomcat6/​webapps/​shepherd_data_dir/​encounters/​562/​KR011404-008.jpg 
-</​code>​ 
- 
-you can obtain its storage location and its path relative to Tomcat and Tomcat'​s URLs: 
- 
-<​code>​ 
-shepherd_data_dir/​encounters/​562/​KR011404-008.jpg 
-</​code>​ 
- 
-Now you can build a URL to get that image: 
- 
-<​code>​ 
-http://<​your_wildbook_url>/​shepherd_data_dir/​encounters/​562/​KR011404-008.jpg 
-</​code>​ 
- 
-Note the shepherd_data_dir path. This is the directory under Tomcat'​s webapps directory that is defined in commonConfiguration.properties with the dataDirectoryName property. 
- 
-For example: 
- 
-<​code>​ 
-dataDirectoryName = shepherd_data_dir 
-</​code>​ 
- 
-Example constructed media URL: 
- 
-[[http://​www.splashcatalog.org/​shepherd_data_dir/​encounters/​562/​KR011404-008.jpg]] 
  
 =====Securing the REST data access point in Wildbook===== =====Securing the REST data access point in Wildbook=====