GET /objects/:pid/profile
URL Syntax | /objects/:pid/profile ? [template] [headers] |
Description | Get digital object profile |
HTTP Method | GET |
:pid | Digital object pernament unique ID |
Return | Digital object profile |
GET request data:
HTTP Response status codes:
Sample request:
GET /cms/srv/api/objects/55c77ea00c60b/datastreams[?format=xml | json]
Sample response (XML):
<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>
Sample response (JSON):
{
"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"
}
}
GET /objects/:pid
URL Syntax | /objects/:pid ? [template] [headers] [format] |
Description | Get digital object profile and datastreams |
HTTP Method | GET |
:pid | Digital object pernament unique ID |
Return | Digital object profile and datastreams list |
GET request data:
HTTP Response status codes:
Sample request:
GET /cms/srv/api/objects/55c77ea00c60b/datastreams[?format=xml | json]
Sample response (XML):
<object>
<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):
{
"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 /objects
URL Syntax | /objects/:pid |
Description | Add digital object profile and datastreams |
HTTP Method | POST |
Return | N/A |
POST /objects/:pid
URL Syntax | /objects/:pid |
Description | Update digital object profile and datastreams |
HTTP Method | POST |
:pid | Digital object pernament unique ID |
Return | N/A |
HTTP Response status codes:
Request data
Sample request:
POST /cms/srv/api/objects
Sample request data:
{
"objectFolder":{
"folderSEQ":"5593ae085f363"
},
"objectProfile":{
"objCode":"ecom.item",
"objModelPID":"model-ecom.item",
"objSamplePID":"55c75db807ae3",
"objLabel":"label aaa",
"objTitle":"title aaa",
"objDescription":"description aaa",
"objKeywords":"keywords aaa",
"objLanguage":"lt",
"objURL":"/eshop/lit/kompiuteriai-ir-ju-komponentai/nesiojami-kompiuteriai/label-aaa"
}
}
Sample response:
{
"id":"561",
"seq":"570d0b94771d2",
"pid":"570d0b9476dfd",
"url":"\/eshop\/lit\/kompiuteriai-ir-ju-komponentai\/nesiojami-kompiuteriai\/label-aaa",
"label":"label aaa",
"path":"\/eshop\/lit\/Kompiuteriai ir j\u0173komponentai\/Ne\u0161iojami kompiuteriai",
"isFolder":"0"
}
GET /objects/:pid/datastreams
URL Syntax | /objects/:pid/datastreams ? [template] [headers] |
Description | Get digital object datastreams list |
HTTP Method | GET |
:pid | Digital object pernament unique ID |
Return | Digital object datastreams list |
GET request data:
HTTP Response status codes:
Sample request:
GET /cms/srv/api/objects/55c77ea00c60b/datastreams[?format=xml | json]
Sample response (XML):
<objectDatastreams>
<datastream type="storage" size="2462" openAccess="1" manage="1">
<dsid><![CDATA[55c77f7442208]]></dsid>
<label><![CDATA[Specification]]></label>
<code><![CDATA[ecom.meta]]></code>
<mimeType><![CDATA[text/xml]]></mimeType>
<size><![CDATA[2462]]></size>
<lastModDate><![CDATA[2015-12-15 19:13:51]]></lastModDate>
<timestamp><![CDATA[1450199631]]></timestamp>
</datastream>
...
<datastream type="storage" size="20310" openAccess="0" manage="1">
<dsid>570b5c78d87a3</dsid>
<label>File</label>
<code>ecom.file</code>
<mimeType>image/png</mimeType>
<size>20310</size>
<lastModDate>2016-04-11 11:13:00</lastModDate>
<timestamp>1460362380</timestamp>
<acl inherit="0">
<item type="user" r="0" e="0" m="0">vk</item>
<item type="role" w="0" e="0" m="0">demo</item>
<item type="role" r="0" e="0" m="0">admin</item>
</acl>
<aclInherit root="0"/>
</datastream>
</objectDatastreams>
Sample response (JSON):
{
"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 /objects/:pid/datastreams
URL Syntax | /objects/:pid/datastreams |
Description | Reorder/Delete digital object datastreams list |
HTTP Method | POST |
:pid | Digital object pernament unique ID |
Return | N/A |
POST request data:
HTTP Response status codes:
Sample request (reorder):
POST /objects/55c77ea00c60b/datastreams
{
"cmd":"reorder",
"data":["55c77f744220b",...,"570b6acdb4480"]
}
Sample request (delete):
POST /objects/55c77ea00c60b/datastreams
{
"cmd":"delete",
"data":["570bc447fd403"]
}
POST /objects/:pid/datastreams/:ds
URL Syntax | /objects/:pid/datastreams/:ds |
Description | Add/update digital object datastream |
HTTP Method | POST |
:pid | Digital object pernament unique ID |
:ds | Digital object datastream ID |
Return | N/A |
POST request data:
POST request data sample:
POST /objects/55c77ea00c60b/datastreams/570bcbc17f5df
{
"id":"570bcbc17f5df",
"label":"File",
"mimeType":"image/png",
"type":"storage",
"path":"/cms/images/sample-2.png",
"code":"ecom.file"
}
HTTP Response status codes:
GET /objects/:pid/datastreams/:ds/profile
URL Syntax | /objects/:pid/datastreams/:ds/profile |
Description | Get digital object datastream profile |
HTTP Method | GET |
:pid | Digital object pernament unique ID |
:ds | Digital object datastream ID |
Return | digital object datastream profile |
GET request data:
HTTP Response status codes:
Sample request:
GET /objects/:pid/datastreams/:ds/profile[?format=xml | json]
Sample response (XML):
<objectDatastreams>
<datastream type="storage" size="20310" openAccess="0" manage="1">
<dsid>570b5c78d87a3</dsid>
<label>File</label>
<code>ecom.file</code>
<mimeType>image/png</mimeType>
<size>20310</size>
<lastModDate>2016-04-11 11:13:00</lastModDate>
<timestamp>1460362380</timestamp>
<acl inherit="0">
<item type="user" r="0" e="0" m="0">vk</item>
<item type="role" w="0" e="0" m="0">demo</item>
<item type="role" r="0" e="0" m="0">admin</item>
</acl>
<aclInherit root="0"/>
</datastream>
</objectDatastreams>
Sample response (JSON):
{
"objectDatastreams":[
{
"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":[]}
}
]
}
/objects/:pid/datastreams/:ds/content
URL Syntax | /objects/:pid/datastreams/:ds/content ? [template] [headers] [download] [url] |
Description | Read digital object datastream content |
HTTP Method | GET |
:pid | Digital object pernament unique ID |
:ds | Digital object datastream unique ID |
Return | Digital object datastream raw content or URL |
GET request data:
HTTP Response status codes:
/objects/:pid/datastreams/:ds/content
URL Syntax | /objects/:pid/datastreams/:ds/content |
Description | Write digital object datastream content |
HTTP Method | POST |
:pid | Digital object pernament unique ID |
:ds | Digital object datastream unique ID |
Return | Nothing |
POST request parameters:
HTTP Response status codes:
/objects/:pid/datastreams/:ds/methods/resize
URL Syntax | /objects/:pid/datastreams/:ds/methods/resize ? width_orig height_orig width height [w h x y] [angle] |
Description | Resize, crop, rotate digital object datastream of image type |
HTTP Method | POST |
:pid | Digital object pernament unique ID |
:ds | Digital object datastream unique ID |
Return | Datastream data size (bytes) in JSON data format, ex. {"size": 5555} |
POST request parameters:
HTTP Response status codes: