# Scroll search for assets Asset scroll searches provide a means of scrolling one way through search results of any number of Asset resources. Page size can stil be specified, but a scroll search will always proceed sequentially once through each page. The AssetScrollSearch.scrollId in the search the response is used to continue the scroll search. Endpoint: POST /asset-scroll-searches Version: 2.0.0 Security: bearerToken ## Request fields (application/json): - `pageSize` (integer) The maximum number of items to return in the result set Example: 100 - `criterion` (any, required) - `sorts` (array, required) Sorts to be applied to the search in order of precedence - `sorts.field` (any, required) - `sorts.order` (string, required) The order of the sort Enum: "ASC", "DESC" - `action` (string) Specifies the context in which the search is being run. For example if you only want to return [Asset](#tag/Assets) resources that the search [User](#tag/Users) has permission to delete then set the action to be SEARCH_FOR_DELETE. Enum: "SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_PENDING_APPROVAL", "SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_LIVE", "SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_BINNED", "SEARCH_FOR_DELETE", "SEARCH_FOR_EDIT", "SEARCH_FOR_PROMOTE_TO_LIVE", "SEARCH_FOR_SEND_FOR_APPROVAL", "SEARCH_FOR_VIEW" ## Response 200 fields (application/json): - `results` (array, required) The requested page of [Asset](#tag/Assets) resources which match the search criterion - `results.result` (object, required) - `results.result.id` (string, required) The unique ID for the [Asset](#tag/Assets) Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `results.result.accountId` (string, required) The ID of the Account the [Asset](#tag/Assets) belongs to Example: "cfb665ca-ce35-4418-b9d5-70ee815db4bd" - `results.result.lifecycleStatus` (any, required) - `results.result.dateLastModified` (string, required) The datetime the asset was modified in ISO datetime format Example: "2021-02-17T09:24:01.417Z" - `results.result.metadata` (object, required) - `results.result.metadata.version` (integer, required) The current version number of the [Asset.metadata](#tag/Assets) Example: 11 - `results.result.metadata.values` (object, required) Example: {"a52b5315-15b8-417f-b742-d6902108bac1":["A view from a mountain"],"f992794c-85db-11eb-8dcd-0242ac130003":["Outdoors","Mountain","Snow"],"219bc1fa-85dc-11eb-8dcd-0242ac130003":["a32fe863-0a1d-4b54-990a-b094139cf81c","0e1bddba-9339-4e6e-b5ae-3adc60ad927a"]} - `results.result.currentAssetFile` (object,null) - `results.result.currentAssetFile.id` (string, required) The unique ID for the [AssetFile](#operation/getAssetFiles) Example: "e2b03444-8c5d-44ed-bd9f-7eee882bdf81" - `results.result.currentAssetFile.assetId` (string, required) The ID of the [Asset](#tag/Assets) this file belongs to Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `results.result.currentAssetFile.size` (integer, required) The size of the file in bytes Example: 44040192 - `results.result.currentAssetFile.filename` (string, required) The filename Example: "a_file.jpg" - `results.result.currentAssetFile.checksum` (string,null) MD5 hash of the file Example: "120EA8A25E5D487BF68B5F7096440019" - `results.result.currentAssetFile.dateAdded` (string, required) The datetime the [AssetFile](#operation/getAssetFiles) was added in ISO datetime format Example: "2021-02-15T09:26:01.417Z" - `results.result.currentAssetFile.fileType` (string, required) Enum: "IMAGE", "GIF", "VIDEO", "AUDIO", "DOCUMENT", "OTHER" - `results.result.currentAssetFile.dimensions` (object,null) The pixel dimensions of the file if applicable - `results.result.currentAssetFile.dimensions.width` (integer, required) The width in pixels Example: 800 - `results.result.currentAssetFile.dimensions.height` (integer, required) The height in pixels Example: 600 - `results.result.currentAssetFile.orientation` (string,null) The orientation of the file Enum: "PORTRAIT", "LANDSCAPE", "SQUARE", "PANORAMIC_LANDSCAPE", "PANORAMIC_PORTRAIT" - `results.result.currentAssetFile.orientationTransformation` (string,null) The transformation that has been applied to the orientation of the file if applicable Enum: "HORIZONTAL", "MIRROR_HORIZONTAL", "ROTATE_180", "MIRROR_VERTICAL", "MIRROR_HORIZONTAL_ROTATE_270", "ROTATE_90", "MIRROR_HORRIZONTAL_ROTATE_90", "ROTATE_270", null - `results.result.currentAssetFile.duration` (integer,null) The duration of the file in seconds if applicable - `results.result.currentAssetFile.usesTransparency` (boolean, required) Whether the file uses transparency - `results.result.currentAssetFile.mediaType` (object, required) - `results.result.currentAssetFile.mediaType.type` (string, required) The main type of the media Example: "image" - `results.result.currentAssetFile.mediaType.subType` (string, required) The sub type of the media Example: "jpeg" - `results.result.currentAssetFile.gpsLocation` (object,null) The GPS location embedded within the file if there is one - `results.result.currentAssetFile.gpsLocation.latitude` (number, required) The latitudinal component of the GPS location in degress Example: 50.8256345 - `results.result.currentAssetFile.gpsLocation.longitude` (number, required) The longitudinal component of the GPS location in degress Example: -0.143761 - `results.result.currentAssetFile.previewUrl` (string, required) A signed URL used get previews for an [AssetFile](#operation/getAssetFiles). The type of preview is specified in the format /[WIDTH]x[HEIGHT].EXTENSION This is then appended to the path part of the [AssetFile.previewUrl](#operation/getAssetFiles). Note, the URL signature is present as a query parameter so clients must ensure the URL query part remains as is. e.g. Given an [Asset.previewURL](#tag/Assets) of http://123.cloudfront.net/account-1/asset-1/file-1?signature=safe in order to get a 100 by 200 PNG preview the modified URL would be: http://123.cloudfront.net/account-1/asset-1/file-1/100x200.png?signature=safe The preview is not guaranteed to be ready immediately. If the request to the preview URL returns a 202 accepted response clients will need to periodically request again until a 200 success response is received, and the preview is ready. If a 404 response is returned the requested preview cannot be generated for an [AssetFile](#operation/getAssetFiles). Current supported image preview extension are jpg, png, webp and webm. An image preview can be generated for most file types Current supported video preview extensions are mp4. A video preview can only be generated for videos. Example: "https://d7h9v39iheghu.cloudfront.net/previews/7af90a8b-7ccd-430f-a85d-e8614015bc47/e2b03444-8c5d-44ed-bd9f-7eee882bdf81?Policy=OTU0MjAwfX19XX0_&Signature=begSbvwpYg&Key-Pair-Id=APKAJXJN6VNR3OLZJ" - `results.result.stats` (object, required) - `results.result.stats.downloadCount` (integer, required) The number of times the asset has been downloaded Example: 42 - `results.result.contextComments` (object, required) Property names: property1, property2, etc. are contextIds. For the given contextId, the property value is an object of comment properties. If there are no comments, then this object has no properties, eg. {} - `results.result.origin` (any) - `results.permittedActions` (array, required) Permitted actions for [Asset](#tag/Assets) resources: * ASSET : DELETE_ASSET - Whether the user can delete this [Asset](#tag/Assets) resource - `results.permittedActions.resourceType` (string, required) Defines the type of the resource that is being permitted to act on Enum: "ACCOUNT", "ASSET", "ASSET_SHARES", "ASSETS", "ASSETS_IN_NO_FOLDERS", "CLOUD_CONNECTION", "CLOUD_CONNECTIONS", "COLLECTION", "COLLECTIONS", "COMMENT", "CUSTOM_TERMS_AND_CONDITIONS", "EMAILS", "FIELD_OPTION", "FIELDS", "INDESIGN_EXTENSION", "INTELLIGENCE_SETTINGS", "METADATA_SCHEMA", "PORTALS", "PRESET_SIZES", "REFERRAL", "SAVED_SEARCHES", "SHOPIFY_INTEGRATION_V2", "SUBSCRIPTION", "THEME", "TOP_LEVEL_FIELD_OPTIONS", "USER_GROUPS", "WEB_USAGE" - `results.permittedActions.resourceId` (string) The ID of the resource that is being permitted to act on. This may be null if the permission is on the resource type as a whole rather than an individual instance. Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `results.permittedActions.action` (string, required) Defines the action that is being permitted Enum: "ADD_ASSET_TO_COLLECTION", "ADD_COLLABORATOR_TO_COLLECTION", "APPROVE_ASSETS", "CONFIGURE_SHOPIFY_INTEGRATION", "CREATE_ASSET_SHARES", "CREATE_ASSETS", "CREATE_CHILD_FIELD_OPTIONS", "CREATE_CLOUD_CONNECTIONS", "CREATE_COLLECTIONS", "CREATE_COLLECTION_COMMENTS", "CREATE_COMMENTS", "CREATE_EMBEDDABLE_LINKS", "CREATE_PORTALS", "CREATE_SAVED_SEARCHES", "CREATE_SUBSCRIPTION", "CREATE_TOP_LEVEL_FIELD_OPTIONS", "CUSTOMISE_EMAILS", "DELETE_ASSET", "DELETE_CLOUD_CONNECTION", "DELETE_COLLECTION", "DELETE_COMMENT", "DOWNLOAD_ASSET", "DOWNLOAD_INDESIGN_EXTENSION", "EDIT_ACCOUNT", "EDIT_ASSET", "EDIT_CLOUD_CONNECTION", "EDIT_COLLECTION", "EDIT_COMMENT", "EDIT_FIELDS", "EDIT_INTELLIGENCE_SETTINGS_ADDRESS_LOOKUP", "EDIT_INTELLIGENCE_SETTINGS_IMAGE_AUTO_TAGGING", "EDIT_INTELLIGENCE_SETTINGS_IMAGE_FACIAL_REC", "EDIT_INTELLIGENCE_SETTINGS_TEXT_IN_IMAGE", "EDIT_INTELLIGENCE_SETTINGS_VIDEO_AUTO_TAGGING", "EDIT_INTELLIGENCE_SETTINGS_VIDEO_FACIAL_REC", "EDIT_METADATA_SCHEMA", "EDIT_PRESET_SIZES", "EDIT_THEME", "EDIT_USER_GROUPS", "EXPORT_TO_SHOPIFY", "IMPORT_ASSETS_OR_METADATA", "IMPORT_FROM_CLOUD", "MAKE_REFERRAL", "MANAGE_CUSTOM_TERMS_AND_CONDITIONS", "PROMOTE_ASSETS_TO_LIVE", "PUT_ASSETS_IN_NO_FOLDER", "REMOVE_ASSET_FROM_COLLECTION", "REMOVE_COLLABORATOR_FROM_COLLECTION", "RUN_NATURAL_LANGUAGE_SEARCH", "SEARCH_FOR_VIEW", "SET_ASSETS_LIFECYCLE_STATUS_BINNED", "SET_ASSETS_LIFECYCLE_STATUS_LIVE", "UPDATE_METADATA_WITH_FIELD_OPTION", "USE_CANVA_INTEGRATION", "USE_CLOUD_CONNECTION", "USE_COLLECTIONS", "USE_EMBEDDABLE_LINKS", "VIEW_ASSET", "VIEW_ASSET_EVENTS", "VIEW_ASSET_FACES", "VIEW_ASSETS_IN_NO_FOLDER", "VIEW_CLOUD_CONNECTION", "VIEW_COLLECTION", "VIEW_COMMENTS", "VIEW_WEB_USAGE" - `totalResults` (integer, required) The total number of [Asset](#tag/Assets) resources which match the search criterion Example: 1337 - `scrollId` (string, required) The ID used to continue the [AssetScrollSearch](#operation/postAssetScrollSearch) Example: "58b0d88b-d0c9-47fc-9038-7195b234cc0b" ## Response 4XX fields (application/json): - `timestamp` (string) The datetime that the error occurred in ISO offset format Example: "2021-02-16T16:21:58.640+00:00" - `status` (integer) The HTTP status code of the error Example: 401 - `error` (string) The title of the error Example: "Unauthorized" - `message` (string) A more detailed error message - `path` (string) The path that was called which led to the error Example: "/folder-settings"