I am new with OpenCast and I am having some problems modifying the event metadata.
Specifically with the API call, PUT/{eventId}/metadata.
I have seen in the forum a post similar to my problem but I can't solve it by following the recommendations :
What I am doing:
1. I get the event metadata with GET/{eventId}/metadata, with type dublincore/episode.
I get the following data:
[
{
"readOnly": false,
"id": "title",
"label": "EVENTS.EVENTS.DETAILS.METADATA.TITLE",
"type": "text",
"value": "Demo event",
"required": true
},
{
"readOnly": false,
"id": "subjects",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SUBJECT",
"type": "text",
"value": [
"demo"
],
"required": false
},
{
"readOnly": false,
"id": "description",
"label": "EVENTS.EVENTS.DETAILS.METADATA.DESCRIPTION",
"type": "text_long",
"value": "demo",
"required": false
},
{
"translatable": true,
"readOnly": false,
"id": "language",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LANGUAGE",
"type": "text",
"value": "spa",
"required": false
},
{
"readOnly": false,
"id": "rightsHolder",
"label": "EVENTS.EVENTS.DETAILS.METADATA.RIGHTS",
"type": "text",
"value": "public",
"required": false
},
{
"translatable": true,
"readOnly": false,
"id": "license",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LICENSE",
"type": "text",
"value": "",
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "isPartOf",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SERIES",
"type": "text",
"value": "",
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "creator",
"label": "EVENTS.EVENTS.DETAILS.METADATA.PRESENTERS",
"type": "mixed_text",
"value": [
"demo"
],
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "contributor",
"label": "EVENTS.EVENTS.DETAILS.METADATA.CONTRIBUTORS",
"type": "mixed_text",
"value": [
"demo"
],
"required": false
},
{
"readOnly": false,
"id": "startDate",
"label": "EVENTS.EVENTS.DETAILS.METADATA.START_DATE",
"type": "date",
"value": "2022-05-19",
"required": false
},
{
"readOnly": false,
"id": "startTime",
"label": "EVENTS.EVENTS.DETAILS.METADATA.START_TIME",
"type": "time",
"value": "08:52",
"required": false
},
{
"readOnly": false,
"id": "duration",
"label": "EVENTS.EVENTS.DETAILS.METADATA.DURATION",
"type": "text",
"value": "00:01:00",
"required": false
},
{
"readOnly": false,
"id": "location",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LOCATION",
"type": "text",
"value": "pyca",
"required": false
},
{
"readOnly": false,
"id": "source",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SOURCE",
"type": "text",
"value": "local",
"required": false
},
{
"readOnly": true,
"id": "created",
"label": "EVENTS.EVENTS.DETAILS.METADATA.CREATED",
"type": "date",
"value": "2022-05-19T08:52:00.000Z",
"required": false
},
{
"readOnly": true,
"id": "publisher",
"label": "EVENTS.EVENTS.DETAILS.METADATA.PUBLISHER",
"type": "text",
"value": "",
"required": false
},
{
"readOnly": true,
"id": "identifier",
"label": "
EVENTS.EVENTS.DETAILS.METADATA.ID",
"type": "text",
"value": "79a44174-10ae-469d-9719-bc67a5d5f0a5",
"required": false
}
]
2. I execute the call, PUT/{eventId}/metadata, with type dublincore/episode and the metadata I just got, modifying only the title.
I get a 400 response with the following error: Unable to parse type 'null' as a flavor so unable to find the matching catalog.
I have also tried executing the call, GET /{eventId}/metadata, without specifying the type and I get this metadata:
[
{
"flavor": "dublincore/episode",
"title": "EVENTS.EVENTS.DETAILS.CATALOG.EPISODE",
"fields": [
{
"readOnly": false,
"id": "title",
"label": "EVENTS.EVENTS.DETAILS.METADATA.TITLE",
"type": "text",
"value": "Demo event",
"required": true
},
{
"readOnly": false,
"id": "subjects",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SUBJECT",
"type": "text",
"value": [
"demo"
],
"required": false
},
{
"readOnly": false,
"id": "description",
"label": "EVENTS.EVENTS.DETAILS.METADATA.DESCRIPTION",
"type": "text_long",
"value": "demo",
"required": false
},
{
"translatable": true,
"readOnly": false,
"id": "language",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LANGUAGE",
"type": "text",
"value": "spa",
"required": false
},
{
"readOnly": false,
"id": "rightsHolder",
"label": "EVENTS.EVENTS.DETAILS.METADATA.RIGHTS",
"type": "text",
"value": "public",
"required": false
},
{
"translatable": true,
"readOnly": false,
"id": "license",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LICENSE",
"type": "text",
"value": "",
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "isPartOf",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SERIES",
"type": "text",
"value": "",
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "creator",
"label": "EVENTS.EVENTS.DETAILS.METADATA.PRESENTERS",
"type": "mixed_text",
"value": [
"demo"
],
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "contributor",
"label": "EVENTS.EVENTS.DETAILS.METADATA.CONTRIBUTORS",
"type": "mixed_text",
"value": [
"demo"
],
"required": false
},
{
"readOnly": false,
"id": "startDate",
"label": "EVENTS.EVENTS.DETAILS.METADATA.START_DATE",
"type": "date",
"value": "2022-05-19",
"required": false
},
{
"readOnly": false,
"id": "startTime",
"label": "EVENTS.EVENTS.DETAILS.METADATA.START_TIME",
"type": "time",
"value": "08:52",
"required": false
},
{
"readOnly": false,
"id": "duration",
"label": "EVENTS.EVENTS.DETAILS.METADATA.DURATION",
"type": "text",
"value": "00:01:00",
"required": false
},
{
"readOnly": false,
"id": "location",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LOCATION",
"type": "text",
"value": "pyca",
"required": false
},
{
"readOnly": false,
"id": "source",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SOURCE",
"type": "text",
"value": "local",
"required": false
},
{
"readOnly": true,
"id": "created",
"label": "EVENTS.EVENTS.DETAILS.METADATA.CREATED",
"type": "date",
"value": "2022-05-19T08:52:00.000Z",
"required": false
},
{
"readOnly": true,
"id": "publisher",
"label": "EVENTS.EVENTS.DETAILS.METADATA.PUBLISHER",
"type": "text",
"value": "",
"required": false
},
{
"readOnly": true,
"id": "identifier",
"label": "
EVENTS.EVENTS.DETAILS.METADATA.ID",
"type": "text",
"value": "79a44174-10ae-469d-9719-bc67a5d5f0a5",
"required": false
}
]
}
]
Then I execute the call, PUT /{eventId}/metadata, with type dublincore/episode and the metadata I just got, modifying only the title.
In this case I get a 400 error: One of the metadata fields is missing an id or value. The id was '' and the value was ''.
I have tried to send only one field in the metadata to modify only that field. But I get the same response saying that an id or value is missing (all fields I specify have value...)
Do all metadata fields have to have a value to be able to update them?
Or must all the metadata be modified at once, and cannot be done individually? I have read the documentation and it says that the metadata that is not included in the form will not be updated.
Any help on why I can't update the data and why I'm getting these errors? I don't understand these errors.
Best regards, Ferran.