Problem
In order to consider Fedora's REST API complete (FCREPO-543), we need to have functional equivalents to API-M's relationship management methods.
...
- HTTP Verb: PUT
- URL: /objects/{pid}/fedora-system:SomeBuiltInSDef/updateDatastream?dsID={dsID}&type=sparql-update
- Body: A SPARQL/Update document (UTF-8?) to apply to the datastream
- Successful response:** Code: 201
- Location header: URL to datastream
- Failed response:** If datastream doesn't exist: TBD
- If input document is malformed: TBD
...
- Modifying the entire content of a datastream would still be possible via a POST to the datastream URL as it is today.
- The syntax for invoking disseminations has not yet been decided for the REST API; the URL above with fedora-system:SomeBuiltInSDef assumes an obvious possible syntax.
Outstanding Issues:
- Does SPARQL Update have a mime type? If so that might make sense to use as the value of the type parameter
- The strawman does not yet include a way to get relationships. Perhaps this could also be a built-in function of SomeBuiltInSDef.
- Q: Would it require one to specify which datastream (e.g. RELS-EXT) the relationships reside in?
- Q: What form of query would it accept? A simple S,P,O style query, or SPARQL?
Thoughts?
Please feel free to comment on this proposal here or on the dev list.