Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can include an optional namespace variable, which is used to create a unique IRI iri by attaching it to the IRI iri before the UUID. If you pass both namespace and iri in the variables object, it will use the IRI iri you provide. If you pass only the namespace and not iri, it will generate the IRI the iri will be generated using the namespace. If you do not pass either iri or namespace, it will use the default namespace (http://ont.enapso.com/dotnetpro#)and create the IRIthe iri. The namespace should end with a separator # or /, with # being the more practical choice.

Code Block
languagebash
curl -X POST "http://localhost/enapso-dev/view-management/v1/editorialObject" -H "Content-Type: application/json" -d "{\"namedGraph\": \"http://www.ebu.ch/metadata/ontologies/ebucoreplus/demodata\",\"namespace\": \"http://www.ebu.ch/metadata/ontologies/ebucoreplus/demodata/customdemodata#\",\"variables\": {\"iri\": \"http://ont.enapso.com/sparql-template#EditorialObject_2f9b1462-e937-4416-8c23-ce96fc42dc55\", \"title\": \"Never Look Away\", \"shotLog\": \"Visual storytelling that captures the protagonist artistic journey and the tumultuous history of Germany.\"}}"

...

Code Block
languagesh
curl --get "http://localhost/enapso-dev/view-management/v1/editorialObject"    --data-urlencode "filter.%3Chttp%3A%2F%2Fwww.ebu.ch%2Fmetadata%2Fontologies%2Febucoreplus%23hasRelatedEditorialObject%3E=http://www.ebu.ch/metadata/ontologies/ebucoreplus/data/Assetdata#Asset_37f6d90c-87c9-4c1f-9a46-ff1102f9bd8a"

...

  • The property title is Run Lola Run.

  • The child-to-parent (Asset to EditorialObject) property <http://www.ebu.ch/metadata/ontologies/ebucoreplus#hasRelatedEditorialObject> is http://www.ebu.ch/metadata/ontologies/ebucoreplus/data/Assetdata#Asset_37f6d90c-87c9-4c1f-9a46-ff1102f9bd8a.

Code Block
languagebash
curl --get "http://localhost/enapso-dev/view-management/v1/editorialObject"   --data-urlencode "filter.title=Run Lola Run"    --data-urlencode "filter.%3Chttp%3A%2F%2Fwww.ebu.ch%2Fmetadata%2Fontologies%2Febucoreplus%23hasRelatedEditorialObject%3E=http://www.ebu.ch/metadata/ontologies/ebucoreplus/data/Assetdata#Asset_37f6d90c-87c9-4c1f-9a46-ff1102f9bd8a"

...

To update an existing EditorialObject, use the following curl command to send a PATCHrequest with the IRI and new values. Make sure to include the namedGraph key and value in the post body with the information you want to update. The namedGraph specifies the graph in the triplestore where your information is preserved. Passing the namedGraph is necessary when using ENAPSO together free version. otherwiseOtherwise, the update operation will not perform.

...

These curl commands provide a direct way to interact with your RESTful API, enabling you to perform create, read, update, and delete operations on EditorialObject

CORS

Here we need to talk about:

Adding the CORS Plugin for Firefox, Chrome, Edge and Safari.

Configuring the CORS plugin. Here we need also to talk about that we need to support ALL HTTP Methods. In the default Config PATCH is not included!

...

Setting Up CORS for Your Web Client

...