Query image libraries
You can call this operation to perform a paged query of all similar image libraries and their metadata.
Usage notes
API operation: /green/similarity/library/list
You can call this operation to query a list of image libraries. For more information about how to construct an HTTP request, see Request structure. You can also use a pre-constructed HTTP request. For more information, see SDK overview.
QPS limit
The queries per second (QPS) limit for this API is 20 per user. Exceeding this limit triggers throttling, which can impact your business. Plan your calls accordingly.
Request parameters
For more information about common request parameters, see Common parameters.
The request body is a JSON object. The following table describes its fields.
| Name | Type | Required | Example | Description |
| pageSize | Integer | Yes | 5 | The number of entries per page. Valid values: (0, 50]. |
| currentPage | Integer | Yes | 1 | The current page number. Valid values: (0, 50]. |
Response data
For more information about response parameters, see Response parameters.
The data field in the response body is a JSON array. Each element contains the following fields:
| Name | Type | Example | Description |
| code | Integer | 200 | The error code. It is the same as the HTTP status code. For more information, see Common error codes. |
| msg | String | OK | The response message for the request. |
| data | JSONArray | The list of similar image libraries. For the structure of each element, see data. | |
| totalCount | Integer | 1 | The total number of image libraries. |
| pageSize | Integer | 5 | Page size |
| currentPage | Integer | 1 | The current page number. |
| requestId | String | 33921869-CF8A-4E62-8C31-44F37341FFC1 | The ID of the request. |
| Name | Type | Example | Description |
| name | String | xxx | The name of the image library. |
| createTime | Integer | xxx | The timestamp of when the image library was created. |
| imageCount | Integer | 0 | The number of sample images in the library. |
| region | String | cn-shanghai | The region where the image library is located. |
Examples
Request example
http(s)://[Endpoint]green/similarity/library/list
&<Common request parameters>
{
"pageSize":5,
"currentPage":1
}Response example
{
"msg": "OK",
"code": 200,
"requestId": "33921869-CF8A-4E62-8C31-44F37341FFC1",
"data":[
{
"name": "xxx",
"createTime":,
"imageCount":0,
"region":"cn-shanghai"
}
],
"totalCount":1,
"pageSize":5,
"currentPage":1
}