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, or the complete component information, for a specified component.
Query Parameters: - full –
true
- Return the component information.false
- Return all files.
Produces: - application/xml, application/json – ComponentDocument if
full=true
,else a FileListDocument. - text/plain – List of file URLs
Role: _item_shape_read
- full –
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 – The placeholder job notification to use for this job. (Optional)
- notificationData – Any additional data to include for notifications on this job. (Optional)
- priority – The priority to assign to the job. Default is
MEDIUM
. - jobmetadata – Additional information for the job task.
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
Delete component¶
-
DELETE
/item/
(id)/shape/
(shape-id)/component/
(component-id)¶ Removes the component from the shape. Any files belonging to the component is not Copy this component to another shape, replacing a specific component by id.
New in version 4.12.
Query Parameters: - keepFiles –
true
- Keep the files belong to this shape.false
(default) - Remove the files belong to this shape.
Role: _item_shape_write
- keepFiles –
Component files¶
Associate a file with a component¶
-
PUT
/item/
(id)/shape/
(shape-id)/component/
(component-id)/file/
(file-id)¶ Attaches the specified file to the specified component
New in version 4.12.
Query Parameters: - allowReimport –
true
- Associate the file regardless of whether it already belongs to a component.false
(default) - Only files that do not already belong to a component can be associated.
Produces: - application/xml, application/json – ComponentDocument
Role: _item_shape_write
- allowReimport –
Disassociate a file from a component¶
-
DELETE
/item/
(id)/shape/
(shape-id)/component/
(component-id)/file/
(file-id)¶ Removes the specified file from the specified component
New in version 4.12.
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
,container
orbinary
. - index – The component index (track) of new component.
Produces: - application/xml, application/json – ComponentDocument
- type – The type of component. Either