Versions Compared

Key

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

...

Following we are listing the available endpoints, and provide examples of sample requests. All listed URLs must be pre-pended by "http://hostname:port/curator" where "hostname" and "port" are the fully qualified domain name and port where the Curator web application is deployed. We use "curl" as example client to issue HTTP requests.

  • URL: /services/metadata/catalog
    • Description: retrieves the available metadata for a catalog product
    • HTTP method: GET
    • Parameters:
      • "id": product identifier (required)
      • "format=json": to return the metadata in JSON format (optional - by default format=html i.e. the metadata is returned wrapped within an HTML table)
    • Response: text/html (default) or application/json
    • Examples:
  • URL: /services/metadata/update
    • Description: updates one or more metadata fields for an existing product, while preserving all the other metadata fields
    • HTTP method: POST
    • Parameters:
      • "id": product identifier (either "id" or "name" is required)
      • "name": product name (either "id" or "name" is required)
      • "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. (optional, but must me specified for the request to be meaningful)
      • "replace=false" to add the new value(s) to the existing ones for that metadata field (optional: by default replace=true, meaning the new value(s) will override the existing ones)
      • "remove=true" to remove an existing metadata field (optional: by default remove=false, meaning the specified values will be added to the field)
    • Response: text/plain with content of the form "id=<product id>"
    • Examples:

...