All Products
Search
Document Center

Intelligent Media Management:QuerySimilarImageClusters

Last Updated:Dec 11, 2024

You can call this operation to query the list of similar image clusters.

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, you must call the CreateSimilarImageClusteringTask operation to cluster similar images in the dataset.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
imm:QuerySimilarImageClusterslist
*Dataset
acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/dataset/{#DatasetName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the project. For more information, see CreateProject .

test-project
DatasetNamestringYes

The name of the dataset. For more information, see Create a dataset.

test-dataset
NextTokenstringNo

The pagination token.

If the total number of clusters is greater than the value of MaxResults, you must specify this parameter. The next call to the operation returns results lexicographically after the NextToken parameter value.

Note The first time you call this operation in a query, set this parameter to null.
CAESEgoQCg4KClVwZGF0ZVRpbWUQARgBIs8ECgkAAJLUwUCAQ****
MaxResultsintegerNo

The number of entries per page. Value range: 0 to 100. Default value: 100.

20
CustomLabelsstringNo

The custom tags, which are used to filter tasks.

{"key": "val"}
SortstringNo

The sorting field.

  • CreateTime: the time when the clusters were created.
  • UpdateTime: the time when the clusters were updated. This is the default value.
UpdateTime
OrderstringNo

The sorting order. Valid values:

  • asc: ascending order.
  • desc: descending order. This is the default value.
asc

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

CA995EFD-083D-4F40-BE8A-BDF75FFF****
SimilarImageClustersarray

The list of similar image clusters.

SimilarImageClustersSimilarImageCluster

The information about similar image clusters.

NextTokenstring

The pagination token. If the total number of clusters is greater than the value of MaxResults, this token can be used to retrieve the next page. This parameter has a value only if not all the clusters that meet the condition are returned.

Pass this value as the value of NextToken in the next query to return the subsequent clusters.

CAESEgoQCg4KClVwZGF0ZVRpbWUQARgBIs8ECgkAAJLUwUCAQ****

Examples

Sample success responses

JSONformat

{
  "RequestId": "CA995EFD-083D-4F40-BE8A-BDF75FFF****\n",
  "SimilarImageClusters": [
    {
      "ObjectId": "SimilarImageCluster-748a041e-4ebc-4487-9e74-9c89b1****",
      "UpdateTime": "2023-02-08T09:42:34.354969088+08:00",
      "CreateTime": "2023-02-08T09:42:34.354969088+08:00",
      "CustomLabels": {
        "test": "test",
        "test2": 1
      },
      "Files": [
        {
          "URI": "oss://test-bucket/test-object",
          "ImageScore": 0.709
        }
      ]
    }
  ],
  "NextToken": "CAESEgoQCg4KClVwZGF0ZVRpbWUQARgBIs8ECgkAAJLUwUCAQ****"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-19The internal configuration of the API is changed, but the call is not affectedView Change Details