Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Items: Get accessible items

Natasa Bulatovic edited this page Feb 2, 2016 · 11 revisions

##GET /items/

  • Retrieves a list of items accessible to the user (authorization optional).

###Parameters

  • q - Search query for Items (see Search Query Syntax)
  • offset - display next items in the search result
  • size - size of the list (20 is default)

####Example request *All items accessible to user

`curl http://<base-url-rest-api>/items`

*Items with "test" in their metadata which retrieve list of maximum 20 results starting from the 21 result

`curl http://<base-url-rest-api>/items?q=test&offset=20&size=20`

####Response JSON Formatted list of items

####Response status codes

  • 200 OK Successful GET and a list of items contains at least one item
  • 204 No content Successful GET and an empty list of items is returned

####Response example

{

"query": "test", "totalNumberOfResults": 47, "numberOfResults": 20, "offset": 21, "size": 20, "results": [ { "id": "IN4hcv6c9ZnAW3pN", "createdBy": { "fullname": "Shi, Allen", "userId": "VVP5wGtYQMzvQUQ3" }, "modifiedBy": { "fullname": "Shi, Allen", "userId": "VVP5wGtYQMzvQUQ3" }, "createdDate": "2015-05-08T10:29:27 +0200", "modifiedDate": "2015-05-08T10:29:27 +0200", "versionDate": "", "status": "RELEASED", "version": 0, "discardComment": "", "visibility": "PUBLIC", "collectionId": "DCQVKA8esikfRTWi", "filename": "DataCollector_20150508_102740.jpg", "mimetype": "image/jpeg", "checksumMd5": "e43aeff3e6a1fa3cad08f3db84453646", "webResolutionUrlUrl": "https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/33/b8/1c/fa-1028-4245-a368-41d7c21ccaa6/0/web/12c6fb0afd8fb4278dafc0d66ad5f3ab.jpg", "thumbnailUrl": "https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/33/b8/1c/fa-1028-4245-a368-41d7c21ccaa6/0/thumbnail/12c6fb0afd8fb4278dafc0d66ad5f3ab.jpg", "fileUrl": "https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/33/b8/1c/fa-1028-4245-a368-41d7c21ccaa6/0/original/12c6fb0afd8fb4278dafc0d66ad5f3ab.jpg", "fileSize": 2543925, "metadata": { "title": "line@Christoph-Probst-Straße 14, 80805 München, Germany", "author": "Allen", "location": { "name": "Christoph-Probst-Straße 14, 80805 München, Germany", "longitude": 11.6106342, "latitude": 48.1840287 }, "accuracy": 49.417999267578125, "deviceID": "1", "tags": [ "test" ] } }, { "id": "QwD_51aCpQhlXQ46", "createdBy": { "fullname": "Shi, Allen", "userId": "VVP5wGtYQMzvQUQ3" }, "modifiedBy": { "fullname": "Shi, Allen", "userId": "VVP5wGtYQMzvQUQ3" }, "createdDate": "2015-05-12T09:54:33 +0200", "modifiedDate": "2015-05-12T09:54:33 +0200", "versionDate": "", "status": "RELEASED", "version": 0, "discardComment": "", "visibility": "PUBLIC", "collectionId": "DCQVKA8esikfRTWi", "filename": "DataCollector_20150512_095312.jpg", "mimetype": "image/jpeg", "checksumMd5": "1437634c75f1160c5dc98e2b51cdc1b7", "webResolutionUrlUrl": "https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/04/32/45/af-f831-4b5d-8adf-f6345272bf45/0/web/09e3211e7ce1523ea38e5565363e24dc.jpg", "thumbnailUrl": "https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/04/32/45/af-f831-4b5d-8adf-f6345272bf45/0/thumbnail/09e3211e7ce1523ea38e5565363e24dc.jpg", "fileUrl": "https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/04/32/45/af-f831-4b5d-8adf-f6345272bf45/0/original/09e3211e7ce1523ea38e5565363e24dc.jpg", "fileSize": 972281, "metadata": { "title": "heliostat@null", "author": "Allen", "location": { "name": "", "longitude": 11.6710348, "latitude": 48.2639932 }, "accuracy": 33, "deviceID": "1", "tags": [ "test" ] } } ] }

Clone this wiki locally