Versions Compared

Key

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

...

To create a new EditorialObject class instance, send a POST request using the following curl command. Ensure that the namedGraph key and value (namedGraph specifies the graph in the triplestore where your information is preserved), are included in the POST body with the information you want to create. Passing the namedGraph is necessary when using ENAPSO together with the free version. Additionally, you

...

You can include an optional namespace variable, which is used to create a unique IRI iri by attaching it to the IRI before the UUID.

...

languagebash

iri before the UUID. If you pass both namespace and iri in the variables object, it will use the iri you provide. If you pass only the namespace and not 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 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://ontwww.enapso.com/sparql-template#EditorialObject_2f9b1462-e937-4416-8c23-ce96fc42dc55ebu.ch/metadata/ontologies/ebucoreplus/demodata\", \"titlenamespace\": \"Never Look Away\", \"http://www.ebu.ch/metadata/ontologies/ebucoreplus/demodata#\",\"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!Sure! Here is the updated text with the additional chapter on setting up CORS and configuring the

CORS

...

Setting Up CORS for Your Web Client

...