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

C_Items

Natasa Bulatovic edited this page Jul 9, 2015 · 11 revisions

Items

##Path /items

#v1 ##Format All responses are in JSON format. From version V1 of the REST API, two JSON formats for items are supported: *default (simple)format *raw format

Except for **PATCH **operation, all operations on Items resource are enabled for both formats. Default and raw format differ in the representation of the metadata. While raw format represents the Item metadata with full metadata information (metadata URI, label, etc.), raw format represents and accepts the item metadata as a "key:value" pairs. See examples below.

###Default format (simple)

 {  
"id":"MzNF1E5iJogKnG99",
"createdBy":{  
    "fullname":"Shi, Allen",
    "userId":"VVP5wGtYQMzvQUQ3"
},
"modifiedBy":{  
    "fullname":"Shi, Allen",
    "userId":"VVP5wGtYQMzvQUQ3"
},
"createdDate":"2015-06-23T11:16:04 +0200",
"modifiedDate":"2015-06-23T11:16:04 +0200",
"versionDate":"",
"status":"RELEASED",
"version":0,
"discardComment":"",
"visibility":"PUBLIC",
"collectionId":"DCQVKA8esikfRTWi",
"filename":"20150623_111553.wav",
"mimetype":"audio/x-wav",
"checksumMd5":"0d67ea9c14806b2b0dc0fadd0ec831f3",
"webResolutionUrlUrl":"https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/91/0e/f6/38-d071-42d9-a100-ee933c93393b/0/web/eb35833b12507d068708b71d4ec66b40.jpg",
"thumbnailUrl":"https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/91/0e/f6/38-d071-42d9-a100-ee933c93393b/0/thumbnail/eb35833b12507d068708b71d4ec66b40.jpg",
"fileUrl":"https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/91/0e/f6/38-d071-42d9-a100-ee933c93393b/0/original/eb35833b12507d068708b71d4ec66b40.wav",
"fileSize":132652,
/* Metadata in key:value pair form - default format */
"metadata":{  
    "tags":"test",
    "author":"Allen",
    "title":"Amalienstraße 33-37, 80799 München, Germany",
    "location":{  
        "name":"Amalienstraße 33-37, 80799 München, Germany",
        "longitude":11.5768219,
        "latitude":48.1480312
    },
    "deviceID":"1",
    "accuracy":21.21299934387207
}
 }

###Raw format (more complex)

{  
"id":"MzNF1E5iJogKnG99",
"createdBy":{  
    "fullname":"Shi, Allen",
    "userId":"VVP5wGtYQMzvQUQ3"
},
"modifiedBy":{  
    "fullname":"Shi, Allen",
    "userId":"VVP5wGtYQMzvQUQ3"
},
"createdDate":"2015-06-23T11:16:04 +0200",
"modifiedDate":"2015-06-23T11:16:04 +0200",
"versionDate":"",
"status":"RELEASED",
"version":0,
"discardComment":"",
"visibility":"PUBLIC",
"collectionId":"DCQVKA8esikfRTWi",
"filename":"20150623_111553.wav",
"mimetype":"audio/x-wav",
"checksumMd5":"0d67ea9c14806b2b0dc0fadd0ec831f3",
"webResolutionUrlUrl":"https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/91/0e/f6/38-d071-42d9-a100-ee933c93393b/0/web/eb35833b12507d068708b71d4ec66b40.jpg",
"thumbnailUrl":"https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/91/0e/f6/38-d071-42d9-a100-ee933c93393b/0/thumbnail/eb35833b12507d068708b71d4ec66b40.jpg",
"fileUrl":"https://dev-faces.mpdl.mpg.de/file/DCQVKA8esikfRTWi/91/0e/f6/38-d071-42d9-a100-ee933c93393b/0/original/eb35833b12507d068708b71d4ec66b40.wav",
"metadata":[  
    {  
        "value":{  
            "text":"Amalienstraße 33-37, 80799 München, Germany"
        },
        "statementUri":"http://dev-faces.mpdl.mpg.de/imeji/statement/iNUP1SRHR9OSZGy",
        "typeUri":"http://imeji.org/terms/metadata#text",
        "labels":[  
            {  
                "language":"en",
                "value":"title"
            }
        ]
    },
    {  
        "value":{  
            "text":"Allen"
        },
        "statementUri":"http://dev-faces.mpdl.mpg.de/imeji/statement/_HTF9UJTnH4SvZRr",
        "typeUri":"http://imeji.org/terms/metadata#text",
        "labels":[  
            {  
                "language":"en",
                "value":"author"
            }
        ]
    },
    {  
        "value":{  
            "name":"Amalienstraße 33-37, 80799 München, Germany",
            "longitude":11.5768219,
            "latitude":48.1480312
        },
        "statementUri":"http://dev-faces.mpdl.mpg.de/imeji/statement/vxKbKv5mNxKjueid",
        "typeUri":"http://imeji.org/terms/metadata#geolocation",
        "labels":[  
            {  
                "language":"en",
                "value":"location"
            }
        ]
    },
    {  
        "value":{  
            "number":21.21299934387207
        },
        "statementUri":"http://dev-faces.mpdl.mpg.de/imeji/statement/DCAGIb3A1pcu1Nmj",
        "typeUri":"http://imeji.org/terms/metadata#number",
        "labels":[  
            {  
                "language":"en",
                "value":"accuracy"
            }
        ]
    },
    {  
        "value":{  
            "text":"1"
        },
        "statementUri":"http://dev-faces.mpdl.mpg.de/imeji/statement/ntXvuGrRf_705f_",
        "typeUri":"http://imeji.org/terms/metadata#text",
        "labels":[  
            {  
                "language":"en",
                "value":"deviceID"
            }
        ]
    },
    {  
        "value":{  
            "text":"test"
        },
        "statementUri":"http://dev-faces.mpdl.mpg.de/imeji/statement/VwC_f_NcbS8vQhjV",
        "typeUri":"http://imeji.org/terms/metadata#text",
        "labels":[  
            {  
                "language":"en",
                "value":"tags"
            }
        ]
    }
],
"fileSize":132652
}

##GET /items/

  • Retrieves a list of items created by the user or shared explicitly with the user.
  • Method description
  • Status: Implemented

##GET /items/:id

##POST /items

  • Creates a new item
  • Method description
  • Status: Implemented (metadata supported, file upload, fetch or reference from external URL supported)

##PUT /items/:id

  • Updates an existing item
  • Method description
  • Status: Implemented (metadata supported, file upload, fetch or reference from external URL supported)

##DELETE /items/:id

#Future versions (optional, not implemented) ##GET /items/:id/versions

##GET /items/:id/shares

##POST /items/:id/shares

##DELETE /items/:id/shares/:shareid

Clone this wiki locally