Shape tags

Shape tags define the available presets to use when transcoding.

Managing shape tags

List all shape tags

GET /shape-tag/

Retrieves all shape tags known by the system.

Query Parameters:
  • url (boolean) –
    • true - Return list of URLs.
    • false (default) - Return list of ids.
Produces:
  • application/xml, application/jsonURIListDocument
  • text/plain – A list of the tags.
Role:

_shape_tag_read

Update or create a shape tag

PUT /shape-tag/(tag-name)

Creates a new shape tag with the given tag name. If the tag already exists, its transcode preset will be updated.

Accepts:
Role:

_shape_tag_write

Example

Creating a shape tag that specifies FLV as the container format, FLV as the video codec and AAC as the audio codec and uses the face detect plugin.

PUT /shape-tag/my_flv
Content-Type: application/xml

<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
   <format>flv</format>
   <video>
      <codec>flv</codec>
   </video>
   <audio>
      <codec>aac</codec>
   </audio>
   <faceDetect>true</faceDetect>
</TranscodePresetDocument>

Retrieve a shape tag

GET /shape-tag/(tag-name)

Retrieves the transcode preset of shape tag with the given tag name.

Produces:
Role:

_shape_tag_read

Delete a shape tag

DELETE /shape-tag/(tag-name)

Deletes a shape tag with the given tag name.

Status Codes:
  • 200 OK – Tag deleted successfully.
  • 404 Not found – No tag with that name exists.
Role:

_shape_tag_write

Caution

Note that the tag will also be removed from any existing shapes with which it is associated.

Tags of a shape

See Tags of a shape for how to manage the tags associated with a specific shape.

Transcode preset scripts

Retrieve the script for a shape tag

GET /shape-tag/(tag-name)/script

Retrieves the script of the shape tag.

Produces:
  • application/javascript – A JavaScript
Role:

_shape_tag_read

Update or create the script for a shape tag

PUT /shape-tag/(tag-name)/script

Sets a script for the shape tag.

Accepts:
  • application/javascript – A JavaScript
Role:

_shape-tag_write

Remove the script for a shape tag

DELETE /shape-tag/(tag-name)/script

Unsets the script for the shape tag.

Role:_shape_tag_write

Test a script

GET /shape-tag/(tag-name)/item/(item-id)/shape/(shape-id)

Tests the script of the shape tag with the specified shape as input and returns the resulting preset.

Query Parameters:
  • job (string) – The id of a job to retrieve job metadata from.
Produces:
Role:

_shape_tag_read