Queries metadata of a file whose metadata is indexed into the dataset.
Operation description
- Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****
- Before you call this operation, make sure that you have indexed file metadata into the dataset automatically by calling the CreateBinding operation or manually by calling the IndexFileMeta or BatchIndexFileMeta operation.
- The sample response is provided for reference only. The metadata type and content in your response may differ based on factors such as the workflow template configurations. For any inquiries, join the DingTalk chat group (ID: 31690030817) and share your questions with us.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| imm:GetFileMeta | get | *Dataset acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/dataset/{#DatasetName} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ProjectName | string | Yes | test-project | |
| DatasetName | string | Yes | test-dataset | |
| URI | string | Yes | The URI of the file. Make sure that the file is indexed****. Specify the OSS URI in the oss://${Bucket}/${Object} format, where Specify the URI of the file in Photo and Drive Service in the pds://domains/${domain}/drives/${drive}/files/${file}/revisions/${revision} format. | oss://test-bucket/test-object |
| WithFields | array | No | The metadata fields that you want to include in the response. You can use this parameter to reduce the size of the response. If you do not specify this parameter or leave this parameter empty, the operation returns all metadata fields of the file. | |
| string | No | The metadata fields that you want to include in the response. If this parameter is omitted or left empty, all available metadata fields are returned. | Size |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "7F84C6D9-5AC0-49F9-914D-F02678E3****",
"Files": [
{
"ProduceTime": "",
"Timezone": "",
"Artist": "",
"ObjectACL": "",
"FileStatus": "",
"ContentType": "",
"AccessControlRequestMethod": "",
"Size": 0,
"Album": "",
"ContentLanguage": "",
"OSSTagging": {
"test": "test",
"test2": 1
},
"Addresses": [
{
"Language": "",
"AddressLine": "",
"Country": "",
"Province": "",
"City": "",
"District": "",
"Township": ""
}
],
"StreamCount": 0,
"CustomLabels": {
"test": "test",
"test2": 1
},
"VideoHeight": 0,
"ImageWidth": 0,
"Subtitles": [
{
"Index": 0,
"Language": "",
"CodecName": "",
"CodecLongName": "",
"CodecTagString": "",
"CodecTag": "",
"StartTime": 0,
"Duration": 0,
"Bitrate": 0,
"Content": "",
"Width": 0,
"Height": 0
}
],
"OSSStorageClass": "",
"SequenceNumber": 0,
"MediaType": "",
"OSSDeleteMarker": "",
"Insights": {
"Video": {
"Description": "",
"Caption": ""
},
"Image": {
"Caption": "",
"Description": ""
}
},
"FormatLongName": "",
"ProgramCount": 0,
"StartTime": 0,
"Filename": "",
"Labels": [
{
"Language": "",
"LabelName": "",
"LabelLevel": 0,
"LabelConfidence": 0,
"ParentLabelName": "",
"CentricScore": 0
}
],
"Duration": 0,
"Orientation": 0,
"CroppingSuggestions": [
{
"AspectRatio": "",
"Confidence": 0,
"Boundary": {
"Width": 0,
"Height": 0,
"Left": 0,
"Top": 0,
"Polygon": [
{
"X": 0,
"Y": 0
}
]
}
}
],
"EXIF": "",
"Performer": "",
"ImageHeight": 0,
"PageCount": 0,
"FigureCount": 0,
"ImageScore": {
"OverallQualityScore": 0
},
"ETag": "",
"DatasetName": "",
"FileHash": "",
"CacheControl": "",
"SmartClusters": [
{
"SmartClusterId": "",
"Similarity": 0
}
],
"ClusterStatus": {
"key": {
"key": [
""
]
}
},
"OSSVersionId": "",
"FileAccessTime": "",
"VideoStreams": [
{
"Index": 0,
"Language": "",
"CodecName": "",
"CodecLongName": "",
"Profile": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"Width": 0,
"Height": 0,
"HasBFrames": 0,
"SampleAspectRatio": "",
"DisplayAspectRatio": "",
"PixelFormat": "",
"Level": 0,
"FrameRate": "",
"AverageFrameRate": "",
"TimeBase": "",
"StartTime": 0,
"Duration": 0,
"Bitrate": 0,
"FrameCount": 0,
"Rotate": "",
"BitDepth": 0,
"ColorSpace": "",
"ColorRange": "",
"ColorTransfer": "",
"ColorPrimaries": ""
}
],
"ProjectName": "",
"VideoWidth": 0,
"AudioCovers": [
{
"ImageWidth": 0,
"ImageHeight": 0,
"EXIF": "",
"ImageScore": {
"OverallQualityScore": 0
},
"CroppingSuggestions": [
{
"AspectRatio": "",
"Confidence": 0,
"Boundary": {
"Width": 0,
"Height": 0,
"Left": 0,
"Top": 0,
"Polygon": [
{
"X": 0,
"Y": 0
}
]
}
}
],
"OCRContents": [
{
"Language": "",
"Contents": "",
"Confidence": 0,
"Boundary": {
"Width": 0,
"Height": 0,
"Left": 0,
"Top": 0,
"Polygon": [
{
"X": 0,
"Y": 0
}
]
}
}
]
}
],
"ContentEncoding": "",
"Elements": [
{
"ElementContents": [
{
"Type": "",
"Content": "",
"URL": "",
"TimeRange": [
0
]
}
],
"ObjectId": "",
"ElementType": "",
"SemanticSimilarity": 0,
"ElementRelations": [
{
"Type": "",
"ObjectId": ""
}
]
}
],
"URI": "",
"Reason": "",
"AudioStreams": [
{
"Index": 0,
"Language": "",
"CodecName": "",
"CodecLongName": "",
"CodecTimeBase": "",
"CodecTagString": "",
"CodecTag": "",
"TimeBase": "",
"StartTime": 0,
"Duration": 0,
"Bitrate": 0,
"FrameCount": 0,
"Lyric": "",
"SampleFormat": "",
"SampleRate": 0,
"Channels": 0,
"ChannelLayout": ""
}
],
"ObjectStatus": "",
"ObjectType": "",
"SceneElements": [
{
"TimeRange": [
0
],
"FrameTimes": [
0
]
}
],
"ClusterModifications": {
"key": {
"key": [
""
]
}
},
"ServerSideEncryptionKeyId": "",
"OwnerId": "",
"FileModifiedTime": "",
"Language": "",
"FileCreateTime": "",
"SemanticTypes": [
""
],
"ServerSideEncryption": "",
"FormatName": "",
"Composer": "",
"ObjectId": "",
"CreateTime": "",
"Title": "",
"TravelClusterId": "",
"OSSExpiration": "",
"Figures": [
{
"FigureId": "",
"FigureConfidence": 0,
"FigureClusterId": "",
"FigureClusterConfidence": 0,
"FigureType": "",
"Age": 0,
"AgeSD": 0,
"Gender": "",
"GenderConfidence": 0,
"Emotion": "",
"EmotionConfidence": 0,
"FaceQuality": 0,
"Mouth": "",
"MouthConfidence": 0,
"Beard": "",
"BeardConfidence": 0,
"Hat": "",
"HatConfidence": 0,
"Mask": "",
"MaskConfidence": 0,
"Glasses": "",
"GlassesConfidence": 0,
"Sharpness": 0,
"Attractive": 0,
"HeadPose": {
"Pitch": 0,
"Roll": 0,
"Yaw": 0
}
}
],
"ServerSideEncryptionCustomerAlgorithm": "",
"Bitrate": 0,
"AlbumArtist": "",
"ContentMd5": "",
"OCRTexts": "",
"ContentDisposition": "",
"CustomId": "",
"UpdateTime": "",
"OSSUserMeta": {
"test": "test",
"test2": 1
},
"OCRContents": [
{
"Language": "",
"Contents": "",
"Confidence": 0
}
],
"AccessControlAllowOrigin": "",
"OSSCRC64": "",
"OSSTaggingCount": 0,
"SemanticSimilarity": 0,
"OSSURI": "",
"ServerSideDataEncryption": "",
"LatLong": "",
"OSSObjectType": ""
}
]
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-07-30 | The request parameters of the API has changed | View Change Details |
| 2021-06-15 | Add Operation | View Change Details |
