schm-green-cip-eapi

(0 reviews)

home

schm-green-cip-eapi

API Description: Compliance validation API for local files, OSS files, and publicly accessible images. It supports compliance checks for multiple files, multiple OSS files, and publicly accessible images (currently, only image file types are supported).
DEV URL (Development Environment): https://schm-api-dev.shiseido.cn/schm-green-cip-eapi
UAT URL (Testing Environment): https://schm-api-test.shiseido.cn/schm-green-cip-eapi
PROD URL (Production Environment): https://schm-api.shiseido.cn/schm-green-cip-eapi

1. Authentication

All request headers must include the following key-value parameters for authentication. You need to request these details from the administrator.

client_id: fa98****3452
client_secret: 108b****41f2

2. API Overview:

API EndpointDescription
/checkCompliance validation API for local files, OSS files, and publicly accessible images. It supports compliance checks for multiple files, multiple OSS files, and publicly accessible images (currently, only image file types are supported).

The full request URL combines the environment URL with the API endpoint, for example:

https://schm-api-test.shiseido.cn/schm-green-cip-eapi/check

3. API Usage Instructions

3.1 Compliance Validation API for Local Files, OSS Files, and Publicly Accessible Images

API Endpoint: /check
API Description: Compliance validation API for local files, OSS files, and publicly accessible images. It supports compliance checks for multiple files, multiple OSS files, and publicly accessible images (currently, only image file types are supported).
Request Method: HTTP POST

3.2 Parameter Description

Headers Parameters: In addition to the client_id and client_secret parameters, the following parameters must also be included (for OSS file validation, the bucket parameter must be included in the headers).

Field DescriptionField NameTypeLengthRequiredRemarks
OSS BucketbucketstringYesTarget OSS bucket

Body Type: multipart/form-data
Note: This API supports compliance validation for local files, OSS files, and publicly accessible images. For local image validation, only the file parameter needs to be provided. For OSS file validation, the bucket parameter must be included in the headers, and the path parameter must be included in the body. For public image validation, only the imageUrl parameter needs to be provided.

Field DescriptionField NameTypeLengthRequiredRemarks
FilefilefileNoSupports uploading multiple files, all passed in a single file parameter. There is no need to define multiple file parameters (local files require this parameter). Non-image files will not undergo compliance validation.
OSS File PathpathstringNoMultiple OSS file paths should be separated by commas, e.g., WMS/SAP/Xuhe/oss信息.txt,WMS/SAP/unknow/让人.png (OSS files require this parameter).
Public Image URLimageUrlstringNoMultiple URLs should be separated by commas, e.g., https://imgs.699pic.com/images/300/914/575.jpg!seo.v1,https://imgs.699pic.com/images/600/121/371.jpg!seo.v1.

3.2 Parameter Examples

headers Parameter:

resources/image-770efb9e-38f2-4fcf-9f45-bac7789fd901.png

Local File:

resources/image-5b50081d-2ff3-46b8-a6dc-fd6bdc161a87.png

OSS File:

resources/image-2076c3eb-4da2-45c3-94eb-b79c15d95ef2.png

Public Images:

resources/image-e38c66a0-359c-4416-b73c-7aef740ae2d4.png

3.3 Response Description

Field DescriptionField NameTypeRequiredRemarks
Response StatusstatusStringYes"success" indicates success
Upload Result InformationresultArrayYesContains file risk violation information

Upload Result Information result:

Field DescriptionField NameTypeLengthRequiredRemarks
MessagemsgStringYesIf the check is successful, this value is "success", otherwise, it contains error messages.
File Namefile_nameStringNoThe file name is returned for both local and OSS files. For network images, this parameter is not included.
Public Image URLimage_urlStringNo
Risk Levelrisk_levelStringNonone indicates no risk. Currently, only image files are supported for risk violation checks; other file types will have this value as null.
Risk Informationrisk_infoArrayNoCurrently, only image files are supported for risk violation checks; other file types will have this value as null.

Risk Information info:

Field DescriptionField NameTypeLengthRequiredRemarks
Risk ValueconfidenceStringNoValue between 1–100. The higher the value, the higher the risk. If no risk is detected, this value is null.
Violation ContentlabelStringYesFor example: political_politicalFigure indicates political figures. If no risk is detected, this value is nonLabel.

3.4 Return Value Example

Local File/OSS File Validation:

{
    "status": "success",
    "result": [
        {
            "msg": "success",
            "file_name": "让人.png",
            "risk_level": "none",
            "risk_info": [
                {
                    "confidence": null,
                    "label": "nonLabel"
                }
            ]
        },
        {
            "msg": "success",
            "file_name": "oss信息.txt",
            "risk_level": "none",
            "risk_info": [
                {
                    "confidence": null,
                    "label": "nonLabel"
                }
            ]
        }
    ]
}

Network image validation

{
    "status": "success",
    "result": [
        {
            "msg": "success",
            "image_url": "https://imgs.699pic.com/images/300/914/575.jpg!seo.v1",
            "risk_level": "none",
            "risk_info": [
                {
                    "confidence": null,
                    "label": "nonLabel"
                }
            ]
        },
        {
            "msg": "success",
            "image_url": "https://imgs.699pic.com/images/600/121/371.jpg!seo.v1",
            "risk_level": "none",
            "risk_info": [
                {
                    "confidence": null,
                    "label": "nonLabel"
                }
            ]
        }
    ]
}

Reviews