tencent cloud

Cloud Infinite

Creating a Metadata Index

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-09-08 16:24:27
AI 번역

Feature Description

When you build a metadata index for a COS file in a dataset, metadata is extracted based on the dataset's search template to build the index, and custom metadata can be added additionally.

Authorization Description

When using a sub-account, add the ci:CreateFileMetaIndex permission to the action of the authorization policy. For all APIs supported by Cloud Infinite, see CI action.

Usage Notes

For the list of supported file metadata indexing data processing operations, see Search Template and Operators.
File metadata indexing has limits on the total number of files and encrypted files. For details on usage parameter limits, see Create Dataset.
After metadata indexes are built for files, you can search data through the query API.
This API is asynchronous. After you submit a request, it takes some time to process the submitted files. Metadata is stored in the dataset only after processing is complete. This process can take from seconds to minutes or longer, depending on the search template used by the dataset and the file content.

Use Limits

Before using this API, confirm the relevant restrictions. For details, see Usage Limits.

Request

Request sample

POST /filemeta HTTP/1.1
Host: <AppId>.ci.ap-jakarta.myqcloud.com
Authorization: Auth String
Content-Length: xxx
Content-Type: application/json
Accept: application/json
Note:
Authorization: Auth String. For details, see Request Signature.

Request header

This API only uses common request headers. For details, see Common Request Headers.

Request body

The implementation of this request operation requires the following request body.
{
"DatasetName": "test001",
"File": {
"URI": "cos://examplebucket-1250000000/test.jpg",
"CustomId": "001",
"CustomLabels": {
"age": "18",
"level": "18"
},
"MediaType": "image",
"ContentType": "image/jpeg",
"MaxFaceNum": 20,
"Persons": [{
"PersonId": "xxxxx"
}]
}
}
The specific parameters are as follows:
Parameter Name
Description
Type
Required
DatasetName
Dataset name, unique within the same account. You can query it through the console or API.
String
Yes
File
File information and custom metadata content for which metadata indexes are to be created
Container
Yes
File node content:
Parameter Name
Description
Type
Required
URI
Resource identifier field, indicating the file address for which an index needs to be created. Currently, only files on COS are supported. Field rule: cos://<BucketName>/<ObjectKey>, where BucketName indicates the COS Bucket name and ObjectKey indicates the complete file path. Example: cos://examplebucket-1250000000/test1/img.jpg
Note:
Only COS files within the current account are supported.
Addresses starting with HTTP are not supported.
String
Yes
CustomId
Custom ID. After the file is indexed into the dataset, it is stored as an attribute of the metadata in that row for association and mapping with your business system. You can pass in this value based on your business requirements, for example, associating a URI with an ID in your system. It is recommended to pass in a globally unique value. During queries, this field supports prefix search and sorting. For details, see Scalar Search Expression Syntax.
String
No
CustomLabels
Custom tag. You can add custom tag key-value pair information based on your business needs, which can be used as filter criteria for search during queries. For details, see Scalar Search Expression Syntax.
Object
No
MediaType
Optional. File media type. Enumerated values:
image: image
document: document
archive: archive
video: video
audio: audio
other: other
String
No
ContentType
Optional. File content type (MIME Type), such as image/jpeg
String
No
MaxFaceNum
Number of faces to search for in the input image. Default value: 20. Maximum value: 20. This parameter takes effect only when the dataset search template ID is Official:FaceSearch.
Integer
No
Persons
Custom character attributes (effective only when the dataset search template ID is Official:FaceSearch)
Container Array
No
Persons node content:
Parameter Name
Description
Type
Required
PersonId
Custom character ID
String
No

Response

Response Headers

This API only returns common response headers. For details, see Common Response Headers.

Response Body

{
"EventId": "wie3580c6ca88dd83382cf52540067****",
"RequestId": "NWFjMzQ0MDZfOTBmYTUwXzZkZV8z****"
}
The specific data content of the response body is as follows:
Parameter Name
Type
Description
RequestId
String
Request ID.
EventId
String
Task ID for Creating Metadata Index

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백