Click or drag to resize

FileBrowserServicesSearchAssets Method


Retrieves the listing of assets, with filtering of specified search string

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.3.169
Syntax
public XHRServiceResponseGeneric<FileBrowserFileListing> SearchAssets(
	string keywords,
	string type = "",
	string targetId = "",
	string parentFolderId = null,
	bool includeDescendants = true
)

Parameters

keywords
Type: SystemString
The search string
type (Optional)
Type: SystemString

Types of items to return, delimited by "|", name must match of the following enum members:

C#
public enum AssetType
{
    Binary,
    Code,
    Css,
    Json,
    Text,
    Xml,
    XsltStylesheet,
    Document,
    Image,
    Audio,
    Video,
    View,
    Html,
    Js
}
targetId (Optional)
Type: SystemString
Publishing target Id, when specified, only list assets marked for that target
parentFolderId (Optional)
Type: SystemString
Id of the parent asset folder
includeDescendants (Optional)
Type: SystemBoolean
When true, return all descendants, otherwise, direct children only

Return Value

Type: XHRServiceResponseGenericFileBrowserFileListing

Grid data of the search resullt

Examples

Sample JSON return

JavaScript
{
  "ContentFreezeEndTime": "",
  "ContentFreezeStartTime": "",
  "code": 0,
  "error": null,
  "message": {
    "headers": [
      {
        "bodyTextAlign": "left",
        "label": "#",
        "minWidth": "50",
        "type": "fileType"
      },
      {
        "bodyTextAlign": "left",
        "label": "Name",
        "minWidth": "260",
        "type": "string"
      },
      {
        "bodyTextAlign": "left",
        "label": "Size (KB)",
        "minWidth": "90",
        "type": "float"
      },
      {
        "bodyTextAlign": "left",
        "label": "Type",
        "minWidth": "90",
        "type": "string"
      },
      {
        "bodyTextAlign": "left",
        "label": "Date Modified",
        "minWidth": "150",
        "type": "xmldate"
      }
    ],
    "rows": [
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_01(3).jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_01(3).jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/9312"
          },
          {
            "Key": "assetId",
            "Value": "a/9312"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/9312"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_01(3).jpg",
          "262.32",
          "Image",
          "20180108T07:55:52"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_01(3)__1.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_01(3)__1.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/9351"
          },
          {
            "Key": "assetId",
            "Value": "a/9351"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/9351"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_01(3)__1.jpg",
          "262.32",
          "Image",
          "20180108T08:00:56"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_01(3)__2.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_01(3)__2.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/9390"
          },
          {
            "Key": "assetId",
            "Value": "a/9390"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/9390"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_01(3)__2.jpg",
          "262.32",
          "Image",
          "20180108T09:45:28"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_03.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_03.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/481"
          },
          {
            "Key": "assetId",
            "Value": "a/481"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/481"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_03.jpg",
          "1,273.9",
          "Image",
          "20171130T10:49:53"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_03__1.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_03__1.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/525"
          },
          {
            "Key": "assetId",
            "Value": "a/525"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/525"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_03__1.jpg",
          "1,273.9",
          "Image",
          "20171130T15:21:56"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_03__2.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_03__2.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/531"
          },
          {
            "Key": "assetId",
            "Value": "a/531"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/531"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_03__2.jpg",
          "1,273.9",
          "Image",
          "20171130T15:23:17"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_03__3.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_03__3.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/537"
          },
          {
            "Key": "assetId",
            "Value": "a/537"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/537"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_03__3.jpg",
          "1,273.9",
          "Image",
          "20171130T15:25:44"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_03__4.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_03__4.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/543"
          },
          {
            "Key": "assetId",
            "Value": "a/543"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/543"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_03__4.jpg",
          "1,273.9",
          "Image",
          "20171130T15:38:04"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_03__5.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_03__5.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/549"
          },
          {
            "Key": "assetId",
            "Value": "a/549"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/549"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_03__5.jpg",
          "1,273.9",
          "Image",
          "20171130T15:38:23"
        ],
        "isImage": true,
        "markedTargets": null
      },
      {
        "attributes": [
          {
            "Key": "filePath",
            "Value": "americanhustle_04.jpg"
          },
          {
            "Key": "parentHierarchy",
            "Value": "Images/Films/A"
          },
          {
            "Key": "basePath",
            "Value": "Images/Films/A/americanhustle_04.jpg"
          },
          {
            "Key": "imageSrc",
            "Value": "a/482"
          },
          {
            "Key": "assetId",
            "Value": "a/482"
          },
          {
            "Key": "url",
            "Value": "http:///localhost/cmstrunk/a/482"
          }
        ],
        "elements": [
          ".jpg",
          "americanhustle_04.jpg",
          "41.8",
          "Image",
          "20171130T10:49:53"
        ],
        "isImage": true,
        "markedTargets": null
      }
    ]
  }
}
Remarks
This is an expensive operation, due to its exhausitve search nature
See Also