Div | ||
---|---|---|
| ||
Media Service Home | ||
...
Derivative terms and the properties of these terms will eventually be part of the CollectionSpace configuration mechanism -as of v1.5, this configuration does not yet exist. Terms and their properties will be specific to the media type. For example, for image media a term set definition might look something like:
Code Block |
---|
Wiki Markup |
---|
{multi-excerpt:name=current-derivative-terms} {note} As of the v1.7 release, only the following image-related derivative terms exist: * 'Thumbnail' (a JPEG-format derivative, 64 x 64 pixels) * 'Medium' (a JPEG-format derivative, 256 x 256 pixels) * 'OriginalJpeg' (a JPEG-format derivative, with the same pixel resolution as the original image) * 'Original' (the original, full-sized image, in its native format; e.g. JPEG, PNG, TIFF, etc.) {note} {multi-excerpt} |
...
1. Create a new media record -with optional URI to media bits (document/file).
Code Block |
---|
Notes: Returns the csid of a newly created media record as part of the URL in the 'location' header of the response. If the POST payload includes a 'blobUri' query parameter that is set to a valid and accessible URI, then the Media service will attempt to create a corresponding blob record using that URI and will relate it to the newly created media record. See the following link for more details: /wiki/spaces/DOC/pages/2930127799
...
2. Create a new media record AND a blob record
Code Block |
---|
Notes: This creates both a media record and a blob record and also relates the two.
3. Create a new blob record and relate to an existing media record - Option #1
Code Block |
---|
Notes: Returns the csid of the blob record. In addition, this operation has the side-effect of relating the existing media record (with csid) to the newly created blob record.
4. Create a new blob record and relate to an existing media record - Option #2 - URI Source.
Code Block |
---|
Notes: Returns the csid of the blob record. Use the query parameter 'blobUri' to set a URI path to the blob file/document. This operation also has the side-effect of relating the media record with csid to the newly created blob record.
...
1. Get an existing media record.
Code Block |
---|
Notes: Returns the media record corresponding to passed in csid. Also, if there is a related blob record, it returns a set of URL's -pointing to the original media data and any derivatives.
2. Get an existing blob record from the Media service.
Code Block |
---|
Notes: Returns the blob record corresponding to the media record's csid. Also, it returns a set of URL's -pointing to the original media data and any existing derivatives.
3. Get an existing blob's data content (actual bits) from the Media service.
Code Block |
---|
GET to "/media/{csid}/blob/content"
|
Notes: Returns the blob data content corresponding to the media record's csid
4. Get the blob content's raw metadata.
Code Block |
---|
Notes: Returns the full set of raw metadata that exists for the blob's content -for example, EXIF metadata for images.
5. Get an existing blob's derivatives.
Code Block |
---|
Notes: Returns a list of a blob derivatives corresponding to the blob record's csid -each existing derivative will be uniquely identified with a derivative term -see the description of derivative terms at the top of this page. The result payload will also include a URL to each derivative's data bits.
6. Get a specific derivative from an existing blob's derivatives.
Code Block |
---|
Notes: Returns what is essentially a "blob record" for the specified blob derivative. Initially, the derivative term will be one of a small set of controlled terms -i.e., 'thumbnail', 'small', 'medium', etc. Derivative terms will be defined in a CollectionSpace configuration file.
7. Get a specific derivative's content from an existing blob's derivatives.
Code Block |
---|
Notes: Returns the derivative's content data.
8. Get a specific derivative content's raw metadata.
Code Block |
---|
GET to "/media/{csid}/blob/derivatives/{derivative_term}/content/metadata"
|
Notes: Returns the full set of raw metadata that exists for the derivative's content.
...
1. Update an existing media record.
Code Block |
---|
Notes: Returns the csid of the schema record.
2. Update an existing schema record AND blob record - Option #1
Code Block |
---|
PUT to "/media/{csid}/blob" with MIME=application/xml
|
Notes: The payload must include a 'blobUri' parameter that is set to a valid and accessible URI.
...
3. Update an existing media record and blob record - Option #2
Code Block |
---|
Notes: This update will create a new blob record from the embedded file/document include in the POST request. It will relate the new blob record to the media record that has an ID equal to csid. Any existing relationship that the media record has with another blob will be lost.
...