继续获取搜索结果

最近更新时间:2025-10-24 15:25:21

我的收藏

功能描述

用于继续获取搜索结果。

请求

请求示例

GET /api/v1/search/{LibraryId}/{SpaceId}/{SearchId}?marker={Marker}&access_token={AccessToken}&user_id={UserId}

请求参数

请求参数
描述
类型
是否必选
LibraryId
媒体库 ID,在媒体托管控制台创建媒体库后获取,请参见 创建媒体库
String
SpaceId
空间 ID,必须指定该参数,如果媒体库为单租户模式,则该参数固定为连字符(-)
String
SearchId
搜索任务 ID,获取请参见 搜索目录与文件
String
Marker
分页标识,创建搜索任务时或继续获取搜索结果时返回的 nextMarker 字段,获取请参见 创建搜索任务
String
AccessToken
访问令牌,获取请参见 生成访问令牌
String
UserId
用户身份识别,当访问令牌对应的权限为管理员权限且申请访问令牌时的用户身份识别为空时用来临时指定用户身份,详情请参阅 生成访问令牌接口
String

请求体

该请求无请求体。

响应

响应码

获取成功,返回 HTTP 200 OK。

响应体

application/json
响应体示例:
{
"searchId": "FnMwV3NweXJOU2hTOTRpTnF0TW9EZVEeVUFhYUl5TGFSaTZtZUpDcEpUcEtxdzo3NjQ3NjU1",
"searchFinished": true,
"hasMore": true,
"nextMarker": 20,
"contents": [
{
"type": "file",
"inode": "xx11",
"name": "api.zip",
"creationTime": "2021-08-19T04:40:01.000Z",
"modificationTime": "2021-08-19T04:40:01.000Z",
"contentType": "application/zip",
"size": "67084",
"eTag": "\\"52c2d19d61fae57d11caabe87f71de73\\"",
"isFavorite": true,
"crc64": "8970780629994048831",
"versionId":2,
"metaData": {
"x-smh-meta-creation-date": "Thu, 19 Aug 2021 04:39:59 GMT"
},
"path": ["api.zip"],
"userId": "12",
"localCreationTime": "2020-09-22T07:44:45.000Z",
"localModificationTime": "2020-09-22T07:44:45.000Z"
},
{
"type": "file",
"inode": "xx12",
"name": "bmw (1).PDF",
"creationTime": "2021-08-21T07:56:32.000Z",
"modificationTime": "2021-08-21T07:56:32.000Z",
"contentType": "application/pdf",
"size": "241674",
"eTag": "\\"030ca96f0af3b3d3cfbf31c2be3129d6\\"",
"isFavorite": false,
"crc64": "12098979488941977387",
"metaData": {
"x-smh-meta-creation-date": "Sat, 21 Aug 2021 07:56:30 GMT"
},
"path": ["abc", "bmw (1).PDF"],
"userId": "12",
"localCreationTime": "2020-09-22T07:44:45.000Z",
"localModificationTime": "2020-09-22T07:44:45.000Z"
},
{
"type": "file",
"inode": "xx111",
"name": "bmw.pdf",
"creationTime": "2021-08-17T13:19:07.000Z",
"modificationTime": "2021-08-17T13:19:07.000Z",
"contentType": "application/pdf",
"size": "241674",
"eTag": "\\"030ca96f0af3b3d3cfbf31c2be3129d6\\"",
"isFavorite": false,
"crc64": "12098979488941977387",
"metaData": {
"x-smh-meta-creation-date": "Tue, 17 Aug 2021 13:19:06 GMT"
},
"path": ["abc", "bmw.pdf"],
"userId": "12",
"localCreationTime": "2020-09-22T07:44:45.000Z",
"localModificationTime": "2020-09-22T07:44:45.000Z"
},
{
"type": "dir",
"inode": "bbb",
"name": "fysn",
"creationTime": "2021-08-20T10:01:40.000Z",
"modificationTime": "2021-08-21T07:30:25.000Z",
"path": ["fysn"],
"userId": "12",
"isFavorite": false
},
{
"type": "file",
"inode": "123333",
"name": "智能媒资托管-144px (1).png",
"creationTime": "2021-08-20T09:59:25.000Z",
"modificationTime": "2021-08-20T09:59:25.000Z",
"contentType": "image/png",
"size": "7199",
"eTag": "\\"7d9ce6ef46c00d3924702b7b4224d029\\"",
"isFavorite": true,
"crc64": "13076174829147183381",
"metaData": {
"x-smh-meta-creation-date": "Fri, 20 Aug 2021 09:59:22 GMT"
},
"path": ["fysn", "智能媒资托管-144px (1).png"],
"previewByDoc": true,
"previewByCI": true,
"previewAsIcon": true,
"fileType": "powerpoint",
"userId": "12",
"localCreationTime": "2020-09-22T07:44:45.000Z",
"localModificationTime": "2020-09-22T07:44:45.000Z",
"authorityList": {
"canView": true,
"canPreview": true,
"canDownload": true,
"canPrint": true,
"canUpload": true,
"canDelete": true,
"canModify": true,
"canAuthorize": true,
"canShare": true,
"canPreviewSelf": true,
"canDownloadSelf": true
},
"authorityButtonList": {
"showViewButton": true,
"showPreviewButton": true,
"showDownloadButton": true,
"showUploadButton": true,
"showDeleteButton": true,
"showAuthorizeButton": true,
"showShareButton": true,
"showModifyButton": true,
"showMoveButton": true,
"showRenameButton": true,
"showCopyButton": true,
"showRestoreButton": true
}
}
/* ... */
]
}
响应体字段说明:
响应参数
描述
类型
searchId
搜索任务 ID,用于异步获取搜索结果
String
searchFinished
搜索是否已完成
Boolean
hasMore
是否有更多搜索结果
Boolean
nextMarker
用于获取后续页的分页标识,仅当 hasMore 为 true 时才返回该字段
Int
contents
第一页搜索结果,可能为空数组,有关异步搜索的说明请参阅【接口说明】
Int
contents 中包含以下内容:
响应参数
描述
类型
type
条目类型,支持以下类型:
dir: 目录或相簿;
file: 文件,仅用于文件类型媒体库;
image: 图片,仅用于媒体类型媒体库;
video: 视频,仅用于媒体类型媒体库;
symlink: 符号链接;
String
inode
文件目录ID
String
name
目录或相簿名或文件名
Boolean
creationTime
ISO 8601格式的日期与时间字符串,表示目录或相簿的创建时间或文件的上传时间,例如:2020-10-14T10:17:57.953Z
String
modificationTime
文件最近一次被覆盖的时间,或者目录内最近一次增删子目录或文件的时间
String
contentType
媒体类型
String
versionId
版本号
String
size
文件大小,为了避免数字精度问题,这里为字符串格式
String
isFavorite
布尔值,是否被收藏,当 WithFavoriteStatus = 1 时返回
Boolean
eTag
文件 eTag
String
crc64
文件的 CRC64-ECMA182 校验值,为了避免数字精度问题,这里为字符串格式
String
metaData
文件元数据信息
Object
path
当前项目所在的目录,包含当前项目的 name
String
userId
创建/更新者 用户 ID
String
previewByDoc
是否可通过 WPS 预览
Boolean
previewByCI
是否可通过万象预览
Boolean
previewAsIcon
是否可使用预览图当做 icon
Boolean
fileType
文件类型:Excel、PowerPoint 等
String
labels
简易文件标签
String Array
category
自定义文件分类,比如image、video、doc等
String
localCreationTime
文件对应的本地创建时间
String
localModificationTime
文件对应的本地修改时间
String
authorityList
权限列表
Array
authorityButtonList
按钮权限列表
Array
authorityList 包含以下参数:
响应参数
描述
类型
canView
是否可查看
Boolean
canPreview
是否可预览
Boolean
canDownload
是否可下载
Boolean
canPrint
是否可打印
Boolean
canUpload
是否可上传
Boolean
canDelete
是否可删除
Boolean
canModify
是否可编辑
Boolean
canAuthorize
是否可授权
Boolean
canShare
是否可分享
Boolean
canPreviewSelf
是否可自预览
Boolean
canDownloadSelf
是否可自下载
Boolean
authorityButtonList 包含以下参数:
响应参数
描述
类型
showViewButton
是否展示查看按钮
Boolean
showPreviewButton
是否展示预览按钮
Boolean
showDownloadButton
是否展示下载按钮
Boolean
showUploadButton
是否展示上传按钮
Boolean
showDeleteButton
是否展示删除按钮
Boolean
showAuthorizeButton
是否展示授权按钮
Boolean
showShareButton
是否展示分享按钮
Boolean
showModifyButton
是否展示编辑按钮
Boolean
showMoveButton
是否展示移动按钮
Boolean
showRenameButton
是否展示重命名按钮
Boolean
showCopyButton
是否展示复制按钮
Boolean
showRestoreButton
是否展示恢复按钮
Boolean

错误码

该请求操作无特殊错误信息,常见的错误信息请参见 错误码 文档。