Search Assets

The search API is an API that allows for flexible searches using the Flex Query Language (FQL).

    http://<publish-url>/public/api/asssets/search
  
Table 1. Parameters
Parameter Parameter Type Data Type Mandatory Description
token q query string yes The account access token of which the assets belongs.
q query string yes The query in Flex Query Language (for more details about FQL look at Flex Query Language Library)
limit query interger no (default value 100) The limit of assets to be returned.
page query integer no (default value 100) The limit of assets to be returned.
    {
  "asset": {
    "accountId": 0,
    "assetContext": {},
    "assetMetadata": {
      "businessMetadata": "string",
      "genericAttachments": [
        {
          "description": "string",
          "fileName": "string",
          "fileSize": 0,
          "fileUrl": {
            "authority": "string",
            "content": {},
            "defaultPort": 0,
            "file": "string",
            "host": "string",
            "path": "string",
            "port": 0,
            "protocol": "string",
            "query": "string",
            "ref": "string",
            "userInfo": "string"
          },
          "lastModified": "2017-04-19T14:41:15.715Z",
          "mimeType": "string",
          "referenceCount": 0,
          "version": 0
        }
      ],
      "imageAttachments": [
        {
          "description": "string",
          "filePath": "string",
          "fileUri": {
            "absolute": true,
            "authority": "string",
            "fragment": "string",
            "host": "string",
            "opaque": true,
            "path": "string",
            "port": 0,
            "query": "string",
            "rawAuthority": "string",
            "rawFragment": "string",
            "rawPath": "string",
            "rawQuery": "string",
            "rawSchemeSpecificPart": "string",
            "rawUserInfo": "string",
            "scheme": "string",
            "schemeSpecificPart": "string",
            "userInfo": "string"
          },
          "height": 0,
          "id": 0,
          "imageFormat": "PNG",
          "master": true,
          "referenceCount": 0,
          "timecode": "string",
          "title": "string",
          "width": 0
        }
      ]
    },
    "description": "string",
    "documentVersion": 0,
    "externalIdMap": {},
    "flexId": 0,
    "id": 0,
    "lastModified": "2017-04-19T14:41:15.715Z",
    "metadata": {},
    "owner": "string",
    "parentId": 0,
    "players": [
      {
        "definition": {
          "definition": "string",
          "id": 0,
          "instance": "string",
          "name": "string",
          "playerOption": "string"
        },
        "embedCode": "string",
        "flexId": 0,
        "playerConfiguration": {
          "id": 0,
          "playerDefinition": "string",
          "playerInstance": "string",
          "playerOption": "string",
          "playerPlugins": "string"
        },
        "playerDefinitionTemplateId": 0,
        "playerId": 0,
        "publishExternalIds": [
          {
            "key": "string",
            "value": "string"
          }
        ],
        "sources": [
          {
            "assetId": 0,
            "id": 0,
            "media": {
              "authority": "string",
              "content": {},
              "defaultPort": 0,
              "file": "string",
              "host": "string",
              "path": "string",
              "port": 0,
              "protocol": "string",
              "query": "string",
              "ref": "string",
              "userInfo": "string"
            },
            "mimeType": "string"
          }
        ],
        "type": "string"
      }
    ],
    "publishCount": 0,
    "publishExternalIds": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "subAccountId": 0,
    "title": "string",
    "variant": "string"
  },
  "resources": [
    {
      "accountId": 0,
      "assetMetadata": {
        "contentMetadata": {},
        "genericAttachments": [
          {
            "description": "string",
            "fileName": "string",
            "fileSize": 0,
            "fileUrl": {
              "authority": "string",
              "content": {},
              "defaultPort": 0,
              "file": "string",
              "host": "string",
              "path": "string",
              "port": 0,
              "protocol": "string",
              "query": "string",
              "ref": "string",
              "userInfo": "string"
            },
            "lastModified": "2017-04-19T14:41:15.715Z",
            "mimeType": "string",
            "version": 0
          }
        ],
        "imageAttachments": [
          {
            "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
          }
        ]
      },
      "assetOrigin": "COPY",
      "description": "string",
      "externalId": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "href": {
        "authority": "string",
        "content": {},
        "defaultPort": 0,
        "file": "string",
        "host": "string",
        "path": "string",
        "port": 0,
        "protocol": "string",
        "query": "string",
        "ref": "string",
        "userInfo": "string"
      },
      "id": 0,
      "lastModified": "2017-04-19T14:41:15.716Z",
      "owner": "string",
      "parentId": 0,
      "players": [
        {
          "embedCode": "string",
          "href": {
            "authority": "string",
            "content": {},
            "defaultPort": 0,
            "file": "string",
            "host": "string",
            "path": "string",
            "port": 0,
            "protocol": "string",
            "query": "string",
            "ref": "string",
            "userInfo": "string"
          },
          "id": 0,
          "type": "string"
        }
      ],
      "publishCount": 0,
      "subAccountId": 0,
      "title": "string",
      "variant": "string"
    }
  ],
  "totalCount": 0,
  "totalElements": 0,
  "limit": 0,
  "page": 0,
  "message": "string",
}
  

Apart from the assets in the "resources" field, the response includes the following fields:

Table 2.
Field Description
totalCount Total count of elements that matches the provided query.
totalElements Total elements returned on this response.
limit The limit of assets that this response can have.
page The page number of this response.
message  
   

An example of an API:

    http://10.13.1.85:18106/public/api/assets/search?token=w8qZG3GJSR&q=title%3D(Ooyala Flex)
    

Was this article helpful?