1 /** 2 * Endpoint to return the version of this api. 3 * version < 1 original REST api v2 4 * 1: Created version workflow. everything should still be backwards compatible at this point. 5 * 2: Modified Directories endpoint with breaking changes 6 * 3: Added Properties Endpoint 7 * 4: Added checkIn endpoint 8 * 5: Added saved searches endpoint 9 * 6: Added support for directory id's as the upload destination & enable directory obfuscation in the angular app 10 * 7: Added support to combine saved searches and custom searches 11 * 8: Included new properties in the verbose asset object for "replaceDate" and "versionNumber" 12 */ 13 var REST = library.REST.REST(); 14 (function main() { 15 // these are flags that represent patch fixes. if we need a patch on an old branch but we don't wan't to backport everything, add a flag here for that change 16 var aMods = [ 17 "documentReportProperty", // we now exclude the document report by default 18 "checkoutWorkflow", // Added a workflow to checkout and cancel checkouts of workflows 19 "getCompletedAssetsWorkflow" // Workflow to get completed assets 20 ]; 21 22 try { 23 new XmpCriterion( 24 new Property("http://mediabeacon.com/ns/default/1.0/", "format") 25 ).setCondition("member"); 26 aMods.push("hierarchyMemberCondition"); // Hierarchy searches should use the 'member' condition instead of 'is' 27 } catch (anE) { 28 //failed to set the member conditions so this MB build doesn't have that change 29 logger.fine("hierarchyMemberCondition is not enabled due to " + anE); 30 } 31 var aV = system.getMajorVersion(); 32 return REST.formatResponse({ 33 version: 8, //REST v2 version 34 mods: aMods, 35 majorVersion: aV >= 2018 || aV <= 8 ? aV : 2000 + aV, //MB major version (ex. 8, 2018, 2019) 36 buildNumber: system.getBuildNumber(), // Build number for the MB build. 37 }); 38 })(); 39