Get a list of image libraries

更新时间:
复制 MD 格式

Call the DescribeImageLib API operation to retrieve a list of custom image libraries.

Usage notes

API operation: DescribeImageLib

You can call this API operation to retrieve a list of custom image libraries.For 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.

Billing: This is a free API operation.

QPS limits

You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Request parameters

NameTypeRequiredExampleDescription
ServiceModuleStringYesopen_api

The name of the service module. Set the value to open_api.

Returned data

NameTypeExampleDescription
IdInteger1279The primary key ID.
ModifiedTimeString2018-03-19 10:45:44 +0800Last modified
NameStringtestThe name of the image library.
CodeString808003055The code of the image library.
Note This is the code displayed in the console. In API operations, the image library is identified by its primary key ID.
ImageCountString191231231230The number of images in the image library.
CategoryStringBLACKThe type of the image library. Valid values:
  • BLACK: blacklist
  • WHITE: whitelist
SourceStringMANUALThe source of the image library. Valid values:
  • MANUAL: Manual creation
  • FEEDBACK: Automated creation driven by user feedback
ServiceModuleStringopen_apiThe name of the service module. The value open_api indicates an image library used for the content moderation API feature.
SceneStringPORNThe scenario where the image library is used. Valid values:
  • PORN: pornography detection
  • AD: ad detection
  • ILLEGAL: terrorism and politically sensitive content detection
BizTypesStringArray ["bizTypeA", "bizTypeB","bizTypeC"]The business scenario. For more information, see Create a business scenario.
EnableBooleantrueIndicates whether the image library is enabled.
  • true (default): Enabled
  • false: disabled

Examples

Request example:
http(s)://green.cn-shanghai.aliyuncs.com/?
Action=DescribeImageLib&ServiceModule=open_api
&<Common request parameters>
{
    "ServiceModule": "open_api"
}
Response example:
{
    "requestId": "6CF2815C-C8C7-4A01-B52E-FF6E24F53492",
    "data": {
        "TotalCount": 5,
        "ImageLibList": [
            {
                "Name": "test a",
                "Source": "MANUAL",
                "ImageCount": 191231231230,
                "BizTypes": [
                             "bizTypeA", 
                             "bizTypeB",
                             "bizTypeC"
                 ],
                "Category": "BLACK",
                "ServiceModule": "open_api",
                "Scene": "PORN",
                "ModifiedTime": "2018-03-19 10:45:44 +0800",
                "Id": 1279,
                "Code": "808003055",
                "Enable": true
            },
            {
                "Name": "aa hello",
                "Source": "MANUAL",
                "ImageCount": 0,
                "BizTypes": [
                             "bizTypea", 
                             "bizTypeb",
                             "bizTypec"
                 ],
                "Category": "BLACK",
                "ServiceModule": "open_api",
                "Scene": "PORN",
                "ModifiedTime": "2018-03-01 19:20:37 +0800",
                "Id": 1222,
                "Code": "808003043",
                "Enable": true
            }
        ]
    },
    "code": 200,
    "success": true
}