The request body for aa:asset-selective and aa:asset-selective-by-id specifies exactly what kind of information is returned for the asset. A client should always request the smallest amount of data that it needs. This gives the service the opportunity to optimize the information retrieval and, for example, reduce the calls to the database or backend systems and to reduce the size of the payloads that are sent over the network.
The client can request an arbitrary combination of:
-
attributes in different forms:
-
as embedded aa:attributes resource with single-value and multi-value attributes
-
as embedded aa:multi-value-attribute resources for multi-value attributes
-
as embedded aa:multi-value-attribute-range resources for multi-value attributes
-
-
time-based Meta data as embedded aa:time-based resource
As a convenience, a client can also ask for attributes and time-based Meta data needed to render a layout returned as part of an datamodel:asset-model resource.
aa:attributes
A client can request getting an embedded aa:attributes resource with a set of attributes (single-value and multi-value).
In this case, the request body contains a property aa:attributes with an array of attribute names:
{ "aa:attributes": [ "COMMENT", "VIDEO_ANALYSIS_STATUS", "CONTRIBUTIONS" ] }
aa:multi-value-attribute
A client can request getting embedded aa:multi-value-attribute resources for a set of multi-value attributes.
In this case, the request body contains a property aa:multi-value-attribute with an array of multi-value attributes to query:
{ "aa:multi-value-attribute": [ { "name": "CONTRIBUTIONS", "subattributes": [ "ROLE", "REALNAME" ] }, { "name": "ATHLETES" } ] }
Each element of the array requests one multi-value attribute and has the following properties:
Property |
Description |
---|---|
name |
The name of the multi-value attribute. |
subattributes |
(optional) An array of sub attributes to return. If not given, all sub attributes are returned. |
aa:multi-value-attribute-range
A client can request getting embedded aa:multi-value-attribute-range resources for a set of multi-value attributes.
In this case, the request body contains a property aa:multi-value-attribute-range with an array of multi-value attributes to query:
{ "aa:multi-value-attribute-range": [ { "name": "CONTRIBUTIONS", "subattributes": [ "ROLE", "REALNAME" ], "offset": 0, "limit": 10 }, { "name": "ATHLETES" } ] }
Each element of the array requests one multi-value attribute and has the following properties:
Property |
Description |
---|---|
name |
The name of the multi-value attribute. |
subattributes |
(optional) An array of sub attributes to return. If not given, all sub attributes are returned. |
offset |
(optional) Zero-based number of the first row to return. If not given, the query parameter offset is used. If that is not given, the response starts with the first row (offset=0). |
limit |
(optional) Maximum number of rows to return. If not given, the query parameter limit is used. If that is not given, the maximum number of rows is determined by the CTC service. |
aa:time-based
A client can request getting an embedded aa:time-based resource with a set of layers.
In this case, the request body contains a property aa:time-based with an array of layers to query:
{ "aa:time-based": [ { "name": "CONTRIBUTOR", "start": 25, "end": 50, "attributes": [ "SEGMENT_CONTRIBUTOR_REALNAME", "SEGMENT_CONTRIBUTOR_ROLE", "SEGMENT_CONTRIBUTOR_ROLENAME" ] }, { "name": "VISUAL_CONTENT", "segmentids": [ "adfsd", "2132", "dfdfs" ] }, { "name": "EDITORIAL_CONTENT" } ] }
Each element of the array requests one layer and has the following properties:
Property |
Description |
---|---|
name |
The name of the layer. |
attributes |
(optional) An array of attributes to return for the segments of the layer. If not given, all attributes are returned. |
start, end, segmentids, username |
(optional) Filter the segments that are returned for the layer. If the properties are not given for a layer, the corresponding URL query parameters are used. See Query parameters for aa:time-based for details. |
asset-model-layouts
A client can request getting all necessary information to render a layout as returned by datamodel:asset-model.
In this case, the request body contains a property asset-model-layouts with the layouts to query. Currently, the following layouts are supported:
-
attributeGroupLayout
-
simpleTimeBasedLayout
The property name defines the requested layout.
attributeGroupLayout
{ "asset-model-layouts": [ { "name": "attributeGroupLayout", "multiValueMode": "aa:multi-value-attribute-range", "subAttributeMode": "visible" } ] }
The following properties are supported for attributeGroupLayout:
Property | Description |
---|---|
name |
The name of the layout: "attributeGroupLayout". |
multiValueMode |
(optional) Defines how multi-value attributes are returned. Supported values:
The default is "aa:multi-value-attribute-range" if multiValueMode is not given. |
subAttributeMode |
(optional) Defines which sub attributes to return for multi-value compound attributes. Supported values:
The default is "visible" if subAttributeMode is not given. |
simpleTimeBasedLayout
{ "asset-model-layouts": [ { "name": "simpleTimeBasedLayout", "layerAttributeMode": "visible", "layers": [ "VISUAL_CONTENT", "EDITORIAL_CONTENT" ] } ] }
The following properties are supported for simpleTimeBasedLayout:
Property | Description |
---|---|
name |
The name of the layout: "simpleTimeBasedLayout". |
layers |
(optional) An array of names of layers to return. If not given, all layers are returned. It’s highly recommended to request only layers that are really needed. |
layerAttributeMode |
(optional) Defines which attributes to return for the segments of the layers. Supported values:
The default is "visible" if layerAttributeMode is not given. |