A lightweight API for indexing metadata and links to existing derivatives into Avalon.
...
:files – an array masterfile hashes, example below. label and structure are optional. The last five fields must have the specific specified values (for now).
[ { file_location: absolute_location,
label: "Part 1",
file_checksum: "7ae24368ccb7a6c6422a14ff73f33c9a",
file_size: "199160",
duration: "6315",
display_aspect_ratio: "1.7777777777777777",
original_frame_size: "200x110",
file_format: "Moving image",
poster_offset: "0:02",
thumbnail_offset: "0:02",
structure: a string containing xml
workflow_name: "avalon",
percent_complete: "100.0",
percent_succeeded: "100.0",
percent_failed: "0",
status_code: "COMPLETED", } , ...]
...
Bib import failure will result in a JSON response: {errors: ['Bib import failed', e.message]}, status: 422
admin/collections Anchor collections collections
...
- Should we be strict with CRUD? Yes, for now. Exception is PUTS and POST return effected item's pid.
- Regarding the 202 Code, this may not be needed, but I put in place in the event we have to accept API requests and wait to go test streaming (make sure the derivatives are there). This is a worst case if our file storage is too slow (which would be really bad of course).
- Should we let GET items/ return a list of all items? Pagination is in place: :page and :per_page can be specified in request parameters.
- Additionally allow GET to be called without an API key/IP restrictions (public). Would be useful for third parties who want data feeds from us. For now GETs are protected by tokens.
...