Global changes

Media /records endpoint

Creation

Media

Uploaded files are now handled differently and do not follow the same flow as REST v1. Instead they are processed via a workflow process. A property workflow is available to start the correct process The default flow for MediaHaven 2.0 is media_upload.

For customers that wish to use the old flow, the workflow property needs to be set to Ingest-1.0. This is needed for customers that have custom plugins in the pretranscoder.

Fragments

Fragments no longer have a dedicated endpoint for creation. Instead they can be created via the records-endpoint.

Fragments documentation

Update

Legacy publish

In rest V1 you could publish a record via media/:id/publish. This endpoint has been replaced with the property publish on the update endpoint.

Refer to Backward compatibility for ingest spaces and publishing for more information.

Specific fields

In rest V1 it’s possible to update fields of a record via the media/:id/<field> endpoint. This endpoint is no longer available. As an alternative you can update the record by sending a POST-request to update the record with a partial sidecar.

Example:

POST https://integration.mediahaven.com/mediahaven-rest-api/v2/records/<id>
{
  "Metadata": {
    "Descriptive": {
      "Title": "My new title"
    }
  }
}

Fragments and children

Rest V1 provided endpoints to request fragments of a video/audio record and children of an ensemble. They are no longer available but can still be requested via the search-api.

Type

Rest v1

Rest v2 (search request)

fragments

/media/<recordid>/fragments

+(Internal.FragmentId:<recordId>*)

Ensemble (set)

/media/<recordId>/children

+(Structural.Sets.Set:<recordId>*)

Ensemble (collection)

/media/<recordId>/children

+(Structural.Collections.Collection:<recordId>*)

Ensemble (newspaper)

/media/<recordId>/children

+(Structural.Newspapers.Newspaper:<recordId>*)

Supported formats

Format

Rest v1

Rest v2

CREATE

GET

application/xml (old style)

not supported

(minus)

(minus)

MHS

application/vnd.mediahaven.v2+xml

application/xml

(tick)

(tick)

MHS

application/vnd.mediahaven.v2+json

application/json

(tick)

(tick)

Dublin core

not supported

application/dc+xml

(minus)

(tick)

METS-MHS

not supported

application/mets+mhs+xml

(minus)

(tick)

Parent/child relations and inheritance

Parent/child via the relations attribute is deprecated and replaced with adoption. During adoption inheritance of values from the parent record is now possible.

Record Type & Status

Records can now have a type & status. Supported type and status is dependent on installation and configuration.

For legacy Mediahaven records, the following applies:

Concurrent update of records

Updating the same record at the same time by 2 users will now throw a 409 Conflict error.

Searching

When executing a search the query sent is now strictly validated. Unknown fields, non-indexed fields or corrupt query syntax will throw a 400 bad request error.

Limits

Number of records per page is now limited to 100.

Count endpoint

It’s now possible to get a count by sending a HEAD-request instead of GET-request → More info

Exports

The export API is rewritten but still supports the same features → Export request

Users

Current user

The current user endpoint no longer returns all the properties of the user. Relations of the user are now sub endpoints of the current user endpoint

New features

Versioning

For metadata-only records it’s now possible to create versions of records. Each version starts with the status DRAFT. This object is not visible in the default search. To make it visible you will have to ACCEPT the draft or in case you don’t want to accept the DRAFT you can REJECT it. The current active version will have the status HEAD. Older version will have the status TAIL.

Profiles

Profiles can now be created and modified → documentation. Note that these profiles are not the same as the profiles in the old Content Uploader. These new profiles are available in MediaHaven 2.0.

Zip tree

Zip tree is a new combination mode for the export API that exports the record with all its children

Batches

A batch API was added to support updating a large amount of records with a single request. These batches are processed asynchronously.

Events

Record events can now be requested via the API

Difference between records

An API was added to view the difference between 2 records

Improved categories/ thesaurus

Categories are replaced with the new and improved thesaurus which is integrated in the search-engine so search queries are automatically enhanced with related terms.

Generating previews on demand

It’s now possible to (re)generate the preview of a file on demand https://integration.mediahaven.com/mediahaven-rest-api/v2/api-docs/index.html#mediahaven-rest-api-manual-batches-tasks