Query image libraries

Updated at:

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.

NameTypeRequiredExampleDescription
pageSizeIntegerYes5The number of entries per page. Valid values: (0, 50].
currentPageIntegerYes1The 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:

NameTypeExampleDescription
codeInteger200

The error code. It is the same as the HTTP status code.

For more information, see Common error codes.

msgStringOKThe response message for the request.
dataJSONArrayThe list of similar image libraries. For the structure of each element, see data.
totalCountInteger1The total number of image libraries.
pageSizeInteger5Page size
currentPageInteger1The current page number.
requestIdString33921869-CF8A-4E62-8C31-44F37341FFC1The ID of the request.
Table 1. data
NameTypeExampleDescription
nameStringxxxThe name of the image library.
createTimeIntegerxxxThe timestamp of when the image library was created.
imageCountInteger0The number of sample images in the library.
regionStringcn-shanghaiThe 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 
}