GET /catalogue/tree ? [folders] [seq] [id]

URL Syntax/catalogue/tree ? [folders] [seq] [id]
DescriptionGet catalogue tree data
HTTP MethodGET
ReturnCatalogue tree data in JSON format compatible with Fancytree jQuere plugin

GET request data:

  • folders=true - get only type of folder tree nodes
  • seq=XXXXXXX - get catalogue subtree with root node having this SEQ
  • id=nn - get catalogue subtree with root node having this internal ID

HTTP Response status codes:

  • 200 (OK)

Sample request:

GET catalogue/tree?id=61

Sample response:

[ { "key":"55927f2084b99", "id":"61", "pid":"55927f04ab055", "title":"\/Catalogue\/eShop", "editor":"CMS", "timestamp":"2016-04-11 18:43:48", "folder":true,"hideCheckbox":true, "tooltip":"Catalogue Tree", "childCounter":36, "children":[ { "key":"5592814b5618c", "id":"531", "pid":"559281070d163", "title":"lit", "url":"\/eshop\/lit", "childCounter":18, "editor":"CMS", "timestamp":"2016-04-11 18:43:48", "folder":true, "children":[ ... ] }, { "key":"5592818f2037f", "id":"292", "pid":"55928116d8da6", "title":"eng", "url":"\/eshop\/eng", "childCounter":18, "editor":"CMS", "timestamp":"2016-04-11 18:43:48", "folder":true, "children":[ ... { "key":"566ee3a7d6b99", "id":"106", "pid":"566c7693196b4", "title":"Computers and components", "url":"\/eshop\/eng\/computers-and-their-components", "childCounter":11, "editor":"CMS", "timestamp":"2016-04-11 18:43:48", "folder":true, "children":[ { "key":"566fff84a0672", "id":"92", "pid":"566d6c7aeeeb8", "title":"Laptops", "url":"\/eshop\/eng\/computers-and-their-components\/laptops", "childCounter":5, "editor":"CMS", "timestamp":"2016-04-11 18:43:48", "folder":true, "children":[ { "key":"56704c12eccd6", "id":"95", "pid":"56704a4f8293f", "title":"Fujitsu Ultrabook VFY:U9040M25R1NC", "url":"\/eshop\/eng\/computers-and-their-components\/laptops\/fujitsu-ultrabook-vfy-u9040m25r1nc", "editor":"CMS", "timestamp":"2016-04-11 18:43:48", "folder":false }, { "key":"56704c00041e1", "id":"94", "pid":"56704a4f8145b", "title":"Fujitsu Notebook VFY:E5540M15B1GB", "url":"\/eshop\/eng\/computers-and-their-components\/laptops\/fujitsu-notebook-vfy-e5540m15b1gb", "editor":"CMS", "timestamp":"2016-04-11 18:43:48", "folder":false}, }, ... ] }, ... ] }, ... ] } ] } ]

POST /catalogue/list

URL Syntax /catalogue/list
DescriptionGet catalogue tree node items list
HTTP MethodPOST
ReturnCatalogue node list in jQuery DataTable server side backend response format

POST request data:

  • folder=XXXXXXXXX - tree node SEQ, default: root node
  • jQuery DataTable server side backend request variables

HTTP Response status codes:

  • 200 (OK)

Sample request:

POST /catalogue/list

Sample request POST variables:

  • draw=4
  • ...
  • folder=566fff84a0672

Sample response:

{ "draw":4, "recordsTotal":"5", "recordsFiltered":"5", "data":[ ["",1,"56704c12eccd6","","Fujitsu Ultrabook VFY:U9040M25R1NC","\/eshop\/eng\/computers-and-their-components\/laptops\/fujitsu-ultrabook-vfy-u9040m25r1nc","56704a4f8293f","CMS","2016-04-11 18:43:48"], ["",2,"56704c00041e1","","Fujitsu Notebook VFY:E5540M15B1GB","\/eshop\/eng\/computers-and-their-components\/laptops\/fujitsu-notebook-vfy-e5540m15b1gb","56704a4f8145b","CMS","2016-04-11 18:43:48"], ["",3,"56704c22a01ce","","Asus Notebook UX301LA","\/eshop\/eng\/computers-and-their-components\/laptops\/asus-notebook-ux301la","56704a4f7fd17","CMS","2016-04-11 18:43:48"], ["",4,"56704c3291e97","","HP Notebook K1W80EA","\/eshop\/eng\/computers-and-their-components\/laptops\/hp-notebook-k1w80ea","56704a4f83b4c","CMS","2016-04-11 18:43:48"], ["",5,"56704c4385398","","MSI Notebook GS60 2PL-008NL","\/eshop\/eng\/computers-and-their-components\/laptops\/msi-notebook-gs60-2pl-008nl","56704b15e4b59","CMS","2016-04-11 18:43:48"] ], "rc":"0"," msg":"success" }

GET/POST /catalogue/model

URL Syntax /catalogue/model
DescriptionGet catalogue model list
HTTP MethodGET/POST
ReturnCatalogue model list in jQuery DataTable server side backend response format

POST request data:

  • jQuery DataTable server side backend request variables

HTTP Response status codes:

  • 200 (OK)

Sample request:

POST /catalogue/model

Sample request POST variables:

  • draw=1
  • ...

Sample response:

{ "draw":1, "recordsTotal":"7", "recordsFiltered":"7", "data":[ ["",1,"2","565d832aafe66","model-ecom-home"], ["",2,"3","model-ecom.category","model-ecom.category"], ["",3,"4","560597c90278e","model-ecom.checkout"], ["",4,"5","55e5843490488","model-ecom.compare"], ["",5,"6","model-ecom.item","model-ecom.item"], ["",6,"7","5624ec904e68d","model-ecom.purchase"], ["",7,"8","56237766b04ed","model-ecom.register-confirm"] ], "rc":"0", "msg":"success" }

GET/POST /catalogue/sample

URL Syntax /catalogue/sample
DescriptionGet catalogue sample list
HTTP MethodGET/POST
ReturnCatalogue sample list in jQuery DataTable server side backend response format

POST request data:

  • jQuery DataTable server side backend request variables

HTTP Response status codes:

  • 200 (OK)

Sample request:

POST /catalogue/model

Sample request POST variables:

  • draw=1
  • ...

Sample response:

{ "draw":1, "recordsTotal":"9", "recordsFiltered":"9", "data":[ ["",1,"17","559237460cc91","sample-eshop-category-eng"], ["",2,"18","55923a5ed1632","sample-eshop-category-lit"], ["",3,"19","55923a898ad79","sample-eshop-category-rus"], ["",4,"20","55c75e27d4a57","sample-eshop-item-eng"], ["",5,"21","55c75db807ae3","sample-eshop-item-lit"], ["",6,"22","55c75e31c6356","sample-eshop-item-rus"], ["",7,"23","53e8ca4124edc","sample-page-eng"], ["",8,"24","53e8b32b68b66","sample-page-lit"], ["",9,"25","53e8ca674d536","sample-page-rus"] ], "rc":"0", "msg":"success" }

GET /catalogue/item/:seq

URL Syntax/catalogue/item/:seq ? [template] [headers] [format]
DescriptionGet catalogue item data
HTTP MethodGET
:seqCatalogue item SEQ
ReturnCatalogue item data, digital object profile and datastreams list

GET request data:

  • template=true - run Smarty template fetch on data stream label, title, description
  • headers=true - send HTTP headers
  • format=[ xml | json ] - response format (default=xml)

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Sample request:

GET /catalogue/item/56704c22a01ce ? [format=xml | json]

Sample response (XML):

<object> <catalogueItem> <itemID>445</itemID> <itemSEQ>56704c22a01ce</itemSEQ> <itemLabel>Asus Notebook UX301LA</itemLabel> <itemIsFolder>0</itemIsFolder> <itemFolderID>442</itemFolderID> <itemFolderSEQ>566fff84a0672</itemFolderSEQ> <itemFolderPath>/Catalogue/eShop/eng/Computers and components/Laptops</itemFolderPath> <itemEditor>CMS</itemEditor> <itemEditorName>CMS</itemEditorName> <itemLastModDate>2016-04-11 18:43:48</itemLastModDate> <itemOpenAccess>1</itemOpenAccess> </catalogueItem> <objectProfile> <objLabel>Asus Notebook UX301LA</objLabel> <objCreator>CMS</objCreator> <objCreatorName>CMS</objCreatorName> <objEditor>CMS</objEditor> <objEditorName>CMS</objEditorName> <objTitle>Asus Notebook UX301LA - 13.3" - Intel Core i7 - Windows 8 Pro 64-bit - 8 GB RAM - 128 GB SSD</objTitle> <objDescription>Display diagonal: 13.3"; CPU: Intel Core i7; OS: Windows 8 Pro 64-bit; Internal memory: 8 GB RAM; Total storage capacity: 128 GB SSD</objDescription> <objKeywords>asus, notebook, Product code UX301LA</objKeywords> <objLanguage>lt</objLanguage> <objID>358</objID> <objPID>55c77ea00c60b</objPID> <objSEQ>55c77ea00c84f</objSEQ> <objFolderID>291</objFolderID> <objFolderSEQ>5593ae085f363</objFolderSEQ> <objFolderPath>/eshop/lit/Kompiuteriai ir jų komponentai/Nešiojami kompiuteriai</objFolderPath> <objModelID>6</objModelID> <objModelPID>model-ecom.item</objModelPID> <objModelSEQ>544cb8b2e7926</objModelSEQ> <objModelTitle>model-ecom.item</objModelTitle> <objCode>ecom.item</objCode> <objURL>http://test.kusoftas.lt/eshop/lit/kompiuteriai-ir-ju-komponentai/nesiojami-kompiuteriai/asus-notebook-ux301la</objURL> <objURLOriginal>/eshop/lit/kompiuteriai-ir-ju-komponentai/nesiojami-kompiuteriai/asus-notebook-ux301la</objURLOriginal> <objCreateDate>2015-12-30 00:28:42</objCreateDate> <objLastModDate>2015-12-30 00:28:42</objLastModDate> <objTimestamp>1451428122</objTimestamp> <objTopClass> <objTopClassItem>lit</objTopClassItem> </objTopClass> <objOpenAccess>1</objOpenAccess> <objManage>1</objManage> </objectProfile> <objectDatastreams> <datastream type="storage" size="2462" openAccess="1" manage="1"> <dsid>55c77f7442208</dsid> <label>Specification</label> <code>ecom.meta</code> <mimeType>text/xml</mimeType> <size>2462</size> <lastModDate>2015-08-19 13:08:29</lastModDate> <timestamp>1439978909</timestamp> </datastream> ... <datastream type="storage" size="23969" openAccess="1" manage="1"> <dsid>570bcbc17f5df</dsid> <label>File</label> <code>ecom.file</code> <mimeType>image/png</mimeType> <size>23969</size> <lastModDate>2016-04-11 19:07:45</lastModDate> <timestamp>1460390865</timestamp> </datastream> </objectDatastreams> </object>

Sample response (JSON):

{ "catalogueItem":{ "itemID":"445", "itemSEQ":"56704c22a01ce", "itemLabel":"Asus Notebook UX301LA", "itemName":null, "itemClass":null, "itemClassList":null, "itemIsFolder":"0", "itemIsPath":"1", "itemIsActive":"0", "itemIsDefault":"0", "itemIsLoggedOn":"0", "itemIsLoggedOff":"0", "itemIsHidden":"0", "itemFolderID":"442", "itemFolderSEQ":"566fff84a0672", "itemFolderPath":"\/Catalogue\/eShop\/eng\/Computers and components\/Laptops", "itemEditor":"CMS", "itemEditorName":"CMS", "itemLastModDate":"2016-04-11 18:43:48", "itemOpenAccess":"1", "itemManage":"1" }, "objectProfile":{ "objLabel":"Asus Notebook UX301LA", "objCreator":"CMS", "objCreatorName":"CMS", "objEditor":"CMS", "objEditorName":"CMS", "objTitle":"Asus Notebook UX301LA - 13.3\" - Intel Core i7 - Windows 8 Pro 64-bit - 8 GB RAM - 128 GB SSD", "objDescription":"Display diagonal: 13.3\"; CPU: Intel Core i7; OS: Windows 8 Pro 64-bit; Internal memory: 8 GB RAM; Total storage capacity: 128 GB SSD", "objKeywords":"asus, notebook, Product code UX301LA", "objLanguage":"lt", "objID":"358", "objPID":"55c77ea00c60b", "objSEQ":"55c77ea00c84f", "objFolderID":"291", "objFolderSEQ":"5593ae085f363", "objFolderPath":"\/eshop\/lit\/Kompiuteriai ir j\u0173 komponentai\/Ne\u0161iojami kompiuteriai", "objModelID":"6", "objModelPID":"model-ecom.item", "objModelSEQ":"544cb8b2e7926", "objModelTitle":"model-ecom.item", "objCode":"ecom.item", "objURL":"http:\/\/test.kusoftas.lt\/eshop\/lit\/kompiuteriai-ir-ju-komponentai\/nesiojami-kompiuteriai\/asus-notebook-ux301la", "objURLOriginal":"\/eshop\/lit\/kompiuteriai-ir-ju-komponentai\/nesiojami-kompiuteriai\/asus-notebook-ux301la", "objCreateDate":"2015-12-30 00:28:42", "objLastModDate":"2015-12-30 00:28:42", "objTimestamp":1451428122, "objTopClass":["lit"], "objOpenAccess":"1", "objManage":"1" }, "objectDatastreams":[ { "type":"storage", "id":"55c77f7442208", "label":"Specification", "code":"ecom.meta", "mimeType":"text\/xml", "size":"2462", "lastModDate":"2015-08-19 13:08:29", "timestamp":1439978909, "openAccess":"1", "manage":"1" }, ... { "type":"storage", "id":"570b5c78d87a3", "label":"File", "code":"ecom.file", "mimeType":"image\/png", "size":"20310", "lastModDate":"2016-04-11 11:13:00", "timestamp":1460362380, "openAccess":"0", "manage":"1", "acl":{ "inherit":"0", "items":[ {"type":"user","id":"vk","r":"0","e":"0","m":"0"}, {"type":"role","id":"demo","w":"0","e":"0","m":"0"}, {"type":"role","id":"admin","r":"0","e":"0","m":"0"} ] }, "aclInherit":{"root":"0","items":[]} } ] }

POST /catalogue/item

URL Syntax/catalogue/item
DescriptionAdd catalogue item
HTTP MethodPOST
ReturnN/A

POST /catalogue/item/:seq

URL Syntax/catalogue/item/:seq
DescriptionUpdate catalogue item data
HTTP MethodPOST
:pidCatalogue item SEQ
ReturnN/A

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Request data

  • catalogueItem - catalogue item data:
    • itemLabel - item label, optional for update
    • itemName - item name, optional
    • itemClass - item class for LI tag, optional
    • itemClassList - item class for UL tag, optional
    • itemSEQ - item SEQ, require only for update
    • itemID - item internal ID, require only for update
    • itemIsFolder - item is folder [0 | 1], default: 0, optional
    • itemIsHidden - item is hidden [0 | 1], default: 0, optional
    • itemIsLoggedOn - item is available for only logged on users [0 | 1], default: 0, optional
    • itemIsLoggedOff - item is available foronly logged off users [0 | 1], default: 0, optional
    • itemIsActive - item is active [0 | 1], default: 0, optional
    • itemIsDefault - item is default [0 | 1], default: 0
    • itemIsPath - item must be included into menu path [0 | 1], default: 1, optional
    • itemFolderID - internal ID of folder containing item, require only for adding
    • itemFolderSEQ - SEQ of folder containing item, require only for adding
    • itemLastModDate - item last update date, optional
    • itemTimestamp - item last update timestamp, optional
    • itemOpenAccess - item open access [0 | 1], default: 1, optional
    • itemPublic - item public availability [0 | 1], default: 1, optional
    • itemPublicStart - date of interval begining [yyyy-mm-dd], optional - default: 0000-00-00, optional
    • itemPublicStop - date of interval ending [yyyy-mm-dd], optional - default: 9999-00-00, optional
    • itemACL - item access control list
      • inherit - inheritance [0 | 1|, default: 1
      • items[] - array of access control list items:
        • id - subject ID (user or role)
        • type - type of item ['user' | 'role']
        • r - datastream read access property [0 | 1], default: 1, optional
        • w - datastream write access property [0 | 1], default: 1, optional
        • e - datastream exec property [0 | 1], default: 1, optional
        • m - datastream management exec property [0 | 1], default: 1, optional
    • itemEditor - last editor, default: CMS, optional
    • itemLastModDate - last update date yyyy-mm-dd, optional
    • itemTimestamp - last update timestamp, yyyy-mm-dd hh:mm:ss, optional
  • objectFolder - optional if object update:
    • folderUPID - up folder ID, allowed only for adding
    • folderUPSEQ - up folder SEQ, allowed only for adding
    • folderID - folder ID, allowed only for update
    • folderSEQ - folder SEQ, allowed only for update
    • folderLabel - folder label
    • folderACL - folder access control list
      • inherit - inheritance [0 | 1|, default: 1
      • items[] - array of access control list items:
        • id - subject ID (user or role)
        • type - type of item ['user' | 'role']
        • r - datastream read access property [0 | 1], default: 1
        • w - datastream write access property [0 | 1], default: 1
        • e - datastream exec property [0 | 1], default: 1
        • m - datastream management exec property [0 | 1], default: 1
    • folderEditor - editor user ID, default: 'CMS'
  • objectProfile - optional:
    • objLabel - object label, optional for update
    • objTitle - object title, optional
    • objDescription - object description, optional
    • objKeywords - object keywords, optional
    • objLanguage - object language ID, optional
    • objPID - object PID, optional
    • objSEQ - object SEQ, allowed only for update
    • objID - object internal ID, allowed only for update
    • objFolderID - folder internal ID, allowed only for adding
    • ,
    • objFolderSEQ - folder SEQ, allowed only for adding
    • objModelID - object model internal ID, optional
    • objModelPID - object model PID, optional
    • objModelSEQ - object model SEQ, optional
    • objSampleID - object sample internal ID, optional, allowed only for adding
    • objSamplePID - object sample PID, optional, allowed only for adding
    • objSampleSEQ - object sample SEQ, optional, allowed only for adding
    • objCode - object code, optional
    • objURL - object URL
    • objCreateDate - object create date, [yyyy-mm-dd hh:mm:ss], optional
    • objLastModDate - object last update, [yyyy-mm-dd hh:mm:ss], optional
    • objTopClass - object top classification items array
    • objOpenAccess - object open access [0 | 1], default: 1
    • objPublic - object public availability [0 | 1], default: 1
    • objPublicStart - object availability interval start date [yyyy-mm-dd], default '0000-00-00'
    • objPublicStop - object availability interval end date [yyyy-mm-dd], default '9999-00-00'
    • objACL - object access control list
      • inherit - inheritance [0 | 1|, default: 1
      • items[] - array of access control list items:
        • id - subject ID (user or role)
        • type - type of item ['user' | 'role']
        • r - datastream read access property [0 | 1], default: 1
        • w - datastream write access property [0 | 1], default: 1
        • e - datastream exec property [0 | 1], default: 1
        • m - datastream management exec property [0 | 1], default: 1
    • objCreator
    • objEditor
  • objectDatastreams - array of items, optional:
    • id - datastream ID
    • code - datastream classification code, optional
    • label - datastream label
    • path - file/redirect path or url
    • mimeType - datastream mimeType
    • size - datastream size in bytes
    • meta - datastream metadata in XML format, optional
    • type - datastream type: ['inline' | 'storage' | 'inline' | 'file' | 'redirect']
    • public - public availability [0 | 1], optional - default: 1
    • publicStart - date of interval begining [yyyy-mm-dd], optional - default: 0000-00-00
    • publicStop - date of interval ending [yyyy-mm-dd], optional - default: 9999-00-00
    • acl - access control list, optional:
      • inherit - access control inheritance [0 | 1], optional - default: 1
      • items[] - array of access control list items:
        • id - subject ID (user or role)
        • type - type of item ['user' | 'role']
        • r - datastream read access property [0 | 1], default: 1
        • w - datastream write access property [0 | 1], default: 1
        • e - datastream exec property [0 | 1], default: 1
        • m - datastream management exec property [0 | 1], default: 1

Sample request:

POST /cms/srv/api/objects

Sample request data:

{ "catalogueItem":{ "itemName":"name", "itemSEQ":"56704c22a01ce" } }

Sample response:

{ "id":"445", "seq":"56704c22a01ce", "pid":"56704a4f7fd17", "url":"\/eshop\/eng\/computers-and-their-components\/laptops\/asus-notebook-ux301la", "label":"Asus Notebook UX301LA", "path":"\/Catalogue\/eShop\/eng\/Computersand components\/Laptops","isFolder":"0" }

POST /catalogue/remove

URL Syntax/catalogue/remove
DescriptionRemove catalogue items
HTTP MethodPOST
ReturnN/A

POST request data:

  • array of item objects:
    • seq - item SEQ
    • obj - related object deletion [0 | 1], default: 0

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Sample request

POST /catalogue/remove [ { "seq":"570fae8ace671", "obj":"1" } ]

POST /catalogue/update

URL Syntax/catalogue/update
DescriptionUpdate catalogue item label
HTTP MethodPOST
ReturnN/A

POST request data:

  • seq - item SEQ
  • label - item label

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Sample request

POST /catalogue/update [ { "seq":"56704c22a01ce", "label":"Asus Notebook UX301LA" } ]

POST /catalogue/drop

URL Syntax/catalogue/drop
DescriptionDrag and drop catalogue item
HTTP MethodPOST
ReturnN/A

POST request data:

  • source:
    • seq - source item SEQ
  • target:
    • seq - target item SEQ
  • hitMode - drop hit mode [after | before | over]

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Sample request

POST /catalogue/drop { "source":{ "seq":"56704c4385398" }, "target":{ "seq":"566fff84a0672" }, "hitMode":"after" }

POST /catalogue/reorder

URL Syntax/catalogue/reorder
DescriptionReorder catalogue tree node items list
HTTP MethodPOST
ReturnN/A

POST request data:

  • source:
    • seq - source item SEQ
  • target:
    • from - source item position before
    • to - source item position after

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Sample request

POST /catalogue/reorder { "source":{ "seq":"56704c22a01ce" }, "target":{ "from":3, "to":1 } }

POST /catalogue/paste

URL Syntax/catalogue/paste
DescriptionPaste catalogue item
HTTP MethodPOST
ReturnN/A

POST request data:

  • source (array):
    • seq - source item SEQ
    • ...
    • seq - source item SEQ
  • target:
    • seq - target item SEQ

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Sample request

POST /catalogue/paste { "target":{ "seq":"566fff84a0672" }, "source":[ { "seq":"56704c22a01ce" } ] }

GET /catalogue/info/:seq

URL Syntax/catalogue/info:seq
DescriptionGet catalogue item info
HTTP MethodGET
:seqCatalogue item SEQ
ReturnCatalogue item info in JSON format

HTTP Response status codes:

  • 200 (OK)
  • 401 - Authorization denied
  • 403 - Forbidden: You don't have permission to access
  • 404 - Not found

Sample request/response:

GET /catalogue/info/55927f2084b99 { "itemID":"61", "itemUPID":"0", "itemSEQ":"55927f2084b99", "itemLabel":"eShop", "itemFolder":"1", "itemFolderPath":"\/Catalogue", "objID":"532", "objSEQ":"55927f04ab4e4", "objPID":"55927f04ab055", "objLabel":".eshop", "folderID":7, "folderSEQ":"552a4a63cbc58", "folderLabel":"eshop", "folderPath":"\/eshop" }