The CAS Curator module exposes a RESTful API that clients can use to interact with the underlying CAS metadata catalog to inspect, add, update or delete product metadata.
Following we are listing the available endpoints, and provide examples of sample requests. We assume that the CAS Curator web application is deployed at the base URL "http://hostname/curator/" and use "curl" as example client to issue HTTP requests.
- Update metadata of an existing product
- URL: *http://hostname/curator/services/metadata/update*
- HTTP method: POST
- Description: use this endpoint to update one or more metadata fields for an existing product, while preserving all the other metadata fields
- Parameters:
- "id": product identifier (either "id" or "name" must be specified)
- "name": product name (either "id" or "name" must be specified)
- "metadata.<field name>=<field value>": name and value of metadata field to insert or update. Product metadata fields need to be pre-pended with "metadata." to be distinguished from other HTTP control flow parameters. More than one metadata field can be specified in the same request. To add more than one value for the same field, use multiple "metadata.<field_name>=..." expressions.
- "replace=false" to add the new value(s) to the existing ones for that metadata field (by default replace=true, meaning the new value(s) will override the existing ones)
- "remove=true" to remove an existing metadata field (by default remove=false, meaning the specified values will be added to the field)
- Response: text/plain of the form "id=<product id>"
- URL: *http://hostname/curator/services/metadata/update*