Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
try{let result = await SMHSearchApis.initSearchTask({libraryId:"libraryId",spaceId:"spaceId",keyword:"1"});}catch(e){// Exception handling}
Request parameters. | Description | Type | Required or Not |
libraryId | Media Library ID, obtained after creating a media library in the media hosting console. Please see create media library | String | Yes |
spaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as hyphen (`-`). If the media library is in multi-tenant mode, you must specify this parameter. Please refer to create tenant space. | String | No |
keyword | Search keywords. Use spaces to separate multiple keywords. The relationship between keywords is "OR" with priority display for items matching more keywords. | String | No |
scope | Search scope, specify the directory to search (optional parameter). For example, to search the root directory, specify an empty string, "/", or leave this field unspecified. | String | No |
extname | Get the file extension | String array | No |
type | Search type, with negation support (!). Supported types include: all: Search all types of files and folders. Defaults to all when type is not specified or empty. Use !all to exclude. dir: Search directories only, excluding files. Use !dir to exclude. file: Search files only, excluding directories. Use !file to exclude. doc, xls, or ppt: Search Word, Excel, or PowerPoint documents only, with corresponding file extensions .doc(x), .xls(x), or .ppt(x). Use !doc, !xls, or !ppt to exclude. pdf or txt: Search PDF or plain text documents only, with file extensions .pdf or .txt. Use !pdf or !txt to exclude. image, video, or audio: Only search for files of image, video, or audio type. The corresponding file MIME (Content Type) are image/, video/, or audio/*. For exclusion, use !image, !video, or !audio. PowerPoint: Search presentation files only, such as .ppt, .pptx, .pot, .potx. Use !powerpoint to exclude. excel: Search spreadsheet files only, such as .xls, .xlsx, .ett, .xltx, .csv. Use !excel to exclude. word: Search document files only, such as .doc, .docx, .dot, .wps, .wpt. Use !word to exclude. text: Search plain text files only, such as .txt, .asp, .htm. Use !text to exclude. | SMHFileInfoSelectType array | No |
minFileSize | Search file size range (minimum), unit Byte | Number | No |
maxFileSize | Search file size range (maximum), unit Byte | Number | No |
modificationTimeStart | Search update time range (starting), irrelevant to time zone | | No |
modificationTimeEnd | Search update time range (ending), irrelevant to time zone | | No |
orderBy | Sorting field, currently supported by name, modification time, file size, creation time. Specific type as follows: name: sort by name modificationTime: sort by last modified size: sort by file size creationTime: sort by creation time localCreationTime: sort by local creation time localModificationTime: sort by local modification time | SMHFileListOrderBy | No |
orderByType | Sorting method, ascending as asc, descending as desc | SMHOrderByType | No |
searchMode | Search method, fast for fast, normal for normal, default normal | SMHSearchMode | No |
labels | Search file tag | String array | No |
categories | Search file custom category info | String array | No |
withInode | Whether to return the inode (file directory ID) after upload | Bool | No |
withFavoriteStatus | Whether to return the favorite status | Bool | No |
try{let result = await SMHSearchApis.resumeSearchTask({libraryId:"libraryId",spaceId:"spaceId",searchId:"searchId",marker:"marker"});}catch(e){// Exception handling}
Request parameters. | Description | Type | Required or Not |
libraryId | Media Library ID, obtained after creating a media library in the media hosting console. Please see create media library | String | Yes |
spaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as hyphen (`-`). If the media library is in multi-tenant mode, you must specify this parameter. Please refer to create tenant space. | String | No |
searchId | Search task ID | String | Yes |
marker | pagination identifier, the nextMarker field returned when creating a search task or continuing to retrieve search results, required parameter | String | Yes |
withInode | Whether to return the inode (file directory ID) after upload | Bool | No |
withFavoriteStatus | Whether to return the favorite status | Bool | No |
try{let result = await SMHSearchApis.deleteSearchTask({libraryId:"libraryId",spaceId:"spaceId",searchId:"searchId"});}catch(e){// Exception handling}
Request parameters. | Description | Type | Required or Not |
libraryId | Media Library ID, obtained after creating a media library in the media hosting console. Please see create media library | String | Yes |
spaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as hyphen (`-`). If the media library is in multi-tenant mode, you must specify this parameter. Please refer to create tenant space. | String | No |
searchId | Search task ID | String | Yes |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan