-
Notifications
You must be signed in to change notification settings - Fork 212
API : Files
jimsafley edited this page May 22, 2013
·
13 revisions
Return data about the specified file.
GET /files/:id
{
"id": 1,
"url": "/files/1",
"item": {"id": 1, "url": "/items/1"},
"order": null,
"size": 1953540,
"has_derivative_images": true,
"authentication": "f6089bca39470e8c19410242061b1f78",
"mime_type": "audio/mpeg",
"type_os": "MPEG ADTS, v1, 128 kbps, 44.1 kHz, JntStereo",
"filename": "54a21c1552feef92069d504fbaf145a8.mp3",
"original_filename": "1ATwUDzA3SCU.128.mp3",
"added": "2013-03-27T08:17:37+00:00",
"modified": "2013-04-21T15:05:07+00:00",
"stored": true,
"metadata": {},
"element_texts": [
{
"html": false,
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"element_set": {"id": 1, "url": "/element_sets/1", "name": "Dublin Core"},
"element": {"id": 1, "url": "/elements/1", "name": "Title"}
}
]
}The metadata object contains data extracted by the getId3 library, and so its structure and content will vary widely based on the file type, what data the library is able to extract, and what data is embedded in the file.
Possible properties within metadata (if it is not empty) are:
- mime_type
- video
- audio
- comments
- comments_html
- iptc
- jpg
mime_type within metadata is a string, and can differ from the mime_type property in the top level of the response. All other properties will be objects.
Return data about files.
GET /files
- item: integer
- order: integer
- size_greater_than: integer
- has_derivative_image: boolean
- mime_type: string
- added_since: string (ISO 8601)
- modified_since: string (ISO 8601)
An array of JSON file representations (see above).