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
Get component information for specified storage¶
- GET /item/(id)/shape/(shape-id)/component/(component-id)/storage/(storage-id)¶
Returns the status for specified component on specified storage. See File States.
Produces: - application/xml, application/json – FileListDocument
- text/plain – Status information of component
Role: _item_shape_read
Create/remove component on storage¶
Add component location¶
- PUT /item/(id)/shape/(shape-id)/component/(component-id)/storage/(storage-id)¶
Creates a transfer of specified component of item to storage.
Query Parameters: - from –
- timestamp - ISO8601 timestamp. Schedule transfer so that file is available on storage at specified time.
- now (default) - Schedule transfer so that file is available on storage as soon as possible.
- until –
- timestamp - ISO8601 timestamp. After this point of time, file may be removed from storage.
- forever - File may never be removed from storage.
- none (default) - Do not automatically retransfer file if deleted
Produces: - application/xml, application/json – JobRuleDocument
- text/plain – job-id / CR LF {rule-id}
Role: _item_shape_write
- from –
Semantics¶
The transfer may create an immediate job (if from=now) and/or a rule (unless from=now and until=none). If a new PUT request is performed, it will override the rule for the old one. An ongoing job is not affected, though.
Remove component from storage¶
- DELETE /item/(id)/shape/(shape-id)/component/(component-id)/storage/(storage-id)¶
Deletes the rules for the specified component and storage. Also marks the file for deletion.
Produces: - application/xml, application/json – empty JobRuleDocument
- text/plain – OK
Role: _item_shape_write
Import component using a URI or an existing file¶
- POST /item/(id)/shape/(shape-id)/component¶
Query Parameters: - uri – The URI to the file containing the new shape.
- fileId – The id of the file that contains the new shape.
- 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
- settings – Pre-configured import settings. See Import settings
Produces: - application/xml, application/json – JobDocument
Role: _import