Implement a POST request to create fedora resources, exposing an endpoint at http://localhost:8000/fedora_resource/ that has the following behaviour:
Possible responses:
@whikloj @ajs6f What do you think about this?
Expects the bundle as a header, X-Islandora-Bundle, so the resource can be unambiguously created (only required when _format=jsonld)
For the MVP, this would limit the use of the bundle resolver significantly. Basically just for data coming from fcrepo that's not in drupal yet.
馃憤 I like this. It also needs to respect JWTs.
I'm not sure what you would use the _format for as I can only think of sending your data as JSON-LD?
@dannylamb, can you please confirm the following steps to implement this endpoint:
islandora.post:
path: 'fedora_resource'
defaults: { _controller: '\Drupal\islandora\Controller\FedoraResourcePOSTController::processPost' }
methods: [POST]
requirements:
_access: 'TRUE'
(Where should the actual implementation class go?)
@Natkeeran just a heads up, @dannylamb is on vacation until the 22nd.
@ruebot thank you for the info.
@Natkeeran I think you are on the right path. I'd say that you only need to verify the checksum if one exists (RFC 3230). But otherwise I think if you can make the rest work you'll have done a 馃憤 .
I have some questions around what @dannylamb needs here.
But as I said, if you move forward and get something working. We can adjust it later.
@Natkeeran also: drop the checksum verification in case of someone POSTing just RDF variants (said differently, only binaries should have/allow checksum options). Mainly because there is just one known to me canonical-representation-algorithm-that-could-allow-checksums-for-RDF and it works just for JSON-LD and it is just too complex.
Also, Fedora 4 does not support checksumming for not binaries.
@whikloj @ruebot @DiegoPino
Thank you for the feedback. I'll give it a shot.
@Natkeeran @whikloj @DiegoPino I'd say we just drop the checksum altogether then, since we're just creating metadata with FedoraResource entities. You'd have to post seperately to create Media entities for the binaries themselves, with a FedoraResource being like the fcr:metadata elbow.
I think it's fairly safe to assume it would only be JSON-LD, but if you're clever with how you set things up, you'd get the standard Drupal JSON and XML for free. There's no plans on supporting any other RDF format than JSON-LD.
The real hole you'll get sucked down when attempting this is you'll have to add denormalizing capabilities to https://github.com/Islandora-CLAW/claw-jsonld.
Most helpful comment
@Natkeeran @whikloj @DiegoPino I'd say we just drop the checksum altogether then, since we're just creating metadata with FedoraResource entities. You'd have to post seperately to create Media entities for the binaries themselves, with a FedoraResource being like the fcr:metadata elbow.
I think it's fairly safe to assume it would only be JSON-LD, but if you're clever with how you set things up, you'd get the standard Drupal JSON and XML for free. There's no plans on supporting any other RDF format than JSON-LD.
The real hole you'll get sucked down when attempting this is you'll have to add denormalizing capabilities to https://github.com/Islandora-CLAW/claw-jsonld.