Extending the rest api with metadata information and more
Now that we have a nice Path based RESTful API for file access clients will be able to access their files more directly and quickly using paths. The next step in providing access to files is by providing ways to access/find files based on meta information about the files.
Also the place to discuss and propose more extensions and usability improvements to our files api.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Lucio Torre
- Definition:
- Superseded
- Series goal:
- None
- Implementation:
-
Unknown
- Milestone target:
- None
- Started by
- Completed by
- Lucio Torre
Whiteboard
---- Music Metadata ----
We may want to create "Libraries" for accessing files based on metadata. A natural place to start may be music files since we already have this
For music we introduce the Music Library based on music tagging information. Here is a suggested REST API:
First a generic way of getting music files:
GET /Libraries/
GET /Libraries/
GET /Libraries/
---To find artist with name like %blue%
GET /Libraries/
--To find albums for a specific Artist
GET /Libraries/
--To find songs on a specific Album and Artist
GET /Libraries/
To enhance the experience, music metadata should be included files in the responses.
For example:
GET <path to file>?include_
Response:
{
... existing file info...
"music_
}
---- File Tagging ----
Another suggestion is to allow users to tag files and then GET them based on the tags.
-- tagging a file
PUT <path to file> {"tags"
PUT <path to file> {favourite: True}
-- finding them.
GET /Library/
GET /Library/
Note in the examples above, PUT uses <path to file>. This would be the existing path to a file node defined by the RESTful Storage API spec.