Shape components¶
Components¶
Get components for shape¶
- GET /item/(id)/shape/(shape-id)/component¶
Returns all components for a specified shape. Currently, this call returns the same information as the return shape, but is available for orthogonality.
Status Codes: - 404 Not found – Invalid id
Produces: - application/xml, application/json – ComponentListDocument
Role: _item_shape_read
Get component information¶
- GET /item/(id)/shape/(shape-id)/component/(component-id)¶
Returns all files for a specified component.
Produces: - application/xml, application/json – FileListDocument
- text/plain – List of file URLs
Role: _item_shape_read
Component import¶
Import component using a URI or an existing file¶
- POST /item/(id)/shape/(shape-id)/component¶
Starts a job that imports a component to an existing shape. The shape must be a media shape and must not be a placeholder.
Query Parameters: - uri – The URI to the file containing the new shape.
- fileId – The id of the file that contains the new shape.
- allowReimport –
- true - Import the file to this shape even if the file is already importing or is already part of another item.
- false (default) Reject the request if the file with the given id has already been imported or is currently importing.
- notification – See Notifications . (Optional)
- notificationData – See Notifications . (Optional)
- priority – The priority to assign to the job. Default is MEDIUM .
- jobmetadata – Additional information for the job task. See Special job metadata values
Produces: - application/xml, application/json – JobDocument
Status Codes: - 400 – If the file has already been imported.
Role: _import
Move/copy components¶
Move component to another shape¶
- POST /item/(id)/shape/(shape-id)/component/(component-id)/move/item/(target-id)/shape/(target-shape-id)¶
Move this component to another shape.
Query Parameters: - index – The component index (track) of component. If the target shape has a component with this index, then it will be replaced/removed.
- keepMetadata –
- true - Preserve the metadata from the replaced component.
- false (default) - Discard any metadata from the replaced component.
Produces: - application/xml, application/json – ShapeDocument from the target shape.
Role: _item_shape_write
Move component to another shape/component¶
- POST /item/(id)/shape/(shape-id)/component/(component-id)/move/item/(target-id)/shape/(target-shape-id)/component/(target-component-id)¶
Move this component to another shape, replacing a specific component by id.
Query Parameters: - index – The component index (track) of component.
- keepMetadata –
- true - Preserve the metadata from the replaced component.
- false (default) - Discard any metadata from the replaced component.
Produces: - application/xml, application/json – ShapeDocument from the target shape.
Role: _item_shape_write
Copy component to another shape¶
- POST /item/(id)/shape/(shape-id)/component/(component-id)/copy/item/(target-id)/shape/(target-shape-id)¶
Copy this component to another shape.
Query Parameters: - index – The component index (track) of component. If the target shape has a component with this index, then it will be replaced/removed.
- keepMetadata –
- true - Preserve the metadata from the replaced component.
- false (default) - Discard any metadata from the replaced component.
Produces: - application/xml, application/json – ShapeDocument from the target shape.
Role: _item_shape_write
Copy component to another shape/component¶
- POST /item/(id)/shape/(shape-id)/component/(component-id)/copy/item/(target-id)/shape/(target-shape-id)/component/(target-component-id)¶
Copy this component to another shape, replacing a specific component by id.
Query Parameters: - index – The component index (track) of component.
- keepMetadata –
- true - Preserve the metadata from the replaced component.
- false (default) - Discard any metadata from the replaced component.
Produces: - application/xml, application/json – ShapeDocument from the target shape.
Role: _item_shape_write
Placeholder components¶
Create a placeholder component¶
- POST /item/(id)/shape/(shape-id)/component/placeholder¶
Creates an new placeholder component for a specific shape.
Query Parameters: - type – The type of component. Either audio, video or container.
- index – The component index (track) of new component.
Produces: - application/xml, application/json – ComponentDocument