Collections

Retrieve a Single Collection

This endpoint retrieves an individual collection. To retrieve a collection you must provide the collection ID.

http://<publish-url>/public/api/collections/{collectionId}

Parameters

Table 1.

Parameter Parameter Type Data Type Mandatory Description
collectionId Path Long Yes The ID of the collection to be retrieved.
token Query String Yes The token of the account in which the collection resides.

Response:

{ 
    "accountId": 0, 
    "assets": [ 
        { 
            "href": { 
                "authority": "string", 
                "content": {},
                "defaultPort": 0, 
                "file": "string", 
                "host": "string", 
                "path": "string", 
                "port": 0,
                "protocol": "string", 
                "query": "string", 
                "ref": "string", 
                "userInfo": "string" 
            },
            "id": 0 
        } 
    ], 
    "createdDate": "2018-04-05T08:50:33.469Z", 
    "duration": 0,
    "flexSiteUuid": "string", 
    "id": 0, 
    "lastModified": "2018-04-05T08:50:33.469Z",
    "publishedDate": "2018-04-05T08:50:33.469Z", 
    "size": 0, "subAccountId": 0,
    "subCollections": [ 
        { 
            "collectionId": 0, 
            "duration": 0, 
            "flexSiteUuid": "string",
            "masterKeyframeId": 0, 
            "numberOfAssets": 0, 
            "size": 0, 
            "uuid": "string" 
        } 
    ], 
    "tags": [ 
        { 
            "collectionId": 0, 
            "tag": "string", 
            "tagId": 0 
        } 
    ], 
    "title": "string", 
    "uuid": "string" 
}

Retrieve all Collections

This endpoint retrieves all the collections in an account. To retrieve all collections in an account, you must specify the account ID.

http://<publish-url>/public/api/collections

Parameters

Table 2.

Parameter Parameter Type Data Type Mandatory Description
token Query String Yes Shared token used for authentication purposes.
limit Query Integer No The number of results returned.The default is 100.The maximum per page is 100.
page Query Integer No The page for the results.

Search Collections

The search API gives you the ability to carry out flexible searches using the Flex Query Language (FQL). This endpoint enables you to carry out searches against collections using FQL.

http://<publish-url>/public/api/collections/search

For more information about FQL, please consult the FQL guide .

Table 3.

Parameter Parameter Type Data Type Mandatory Description
token Query String Yes The account access token of which the assets belongs.
fql Query String Yes The query in Flex Query Language (for more details about FQL, see the Flex Query Language Library).
limit Query Integer No (default value 100) The limit of assets to be returned.
page Query Integer No (default value 0) The page number.

An example of a response for this call is shown below:

{
"limit": 0,
"message": "string",
"page": 0,
"pageElements": 0,
"resources": [
{
"accountId": 0,
"assets": [
{
"href": {
"authority": "string",
"content": {},
"defaultPort": 0,
"file": "string",
"host": "string",
"path": "string",
"port": 0,
"protocol": "string",
"query": "string",
"ref": "string",
"userInfo": "string"
},
"id": 0
}
],
"createdDate": "2018-06-19T12:15:07.059Z",
"duration": 0,
"flexSiteUuid": "string",
"id": 0,
"keyframe": {
"description": "string",
"height": 0,
"href": {
"authority": "string",
"content": {},
"defaultPort": 0,
"file": "string",
"host": "string",
"path": "string",
"port": 0,
"protocol": "string",
"query": "string",
"ref": "string",
"userInfo": "string"
},
"id": 0,
"master": true,
"mimeType": "string",
"timecode": "string",
"title": "string",
"width": 0
},
"lastModified": "2018-06-19T12:15:07.059Z",
"metadata": {
"array": true,
"bigDecimal": true,
"bigInteger": true,
"binary": true,
"boolean": true,
"containerNode": true,
"double": true,
"float": true,
"floatingPointNumber": true,
"int": true,
"integralNumber": true,
"long": true,
"missingNode": true,
"nodeType": "ARRAY",
"null": true,
"number": true,
"object": true,
"pojo": true,
"short": true,
"textual": true,
"valueNode": true
},
"publishedDate": "2018-06-19T12:15:07.059Z",
"size": 0,
"subAccountId": 0,
"subCollections": [
{
"collectionId": 0,
"duration": 0,
"flexSiteUuid": "string",
"masterKeyframeId": 0,
"numberOfAssets": 0,
"size": 0,
"uuid": "string"
}
],
"tags": [
{
"collectionId": 0,
"tag": "string",
"tagId": 0
}
],
"title": "string",
"uuid": "string",
"variant": "string"
}
],
"totalCount": 0
}