schm-nccs-cip-eapi

(0 reviews)

home

schm-nccs-cip-eapi

API Description: Local file upload & compliance validation interface. Supports uploading multiple files after compliance validation (currently only image files are validated for compliance). Non-image files will not undergo compliance validation and will be uploaded directly to the compliance directory.
DEV Environment URL: https://schm-api-dev.shiseido.cn/schm-nccs-cip-eapi
UAT Environment URL: https://schm-api-test.shiseido.cn/schm-nccs-cip-eapi
PROD Environment URL: https://schm-api.shiseido.cn/schm-nccs-cip-eapi

1. Authentication

All request headers must include the following key-value parameters as authentication information. You need to contact the administrator to request these credentials.

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

2. API Overview:

Request EndpointDescription
/uploadLocal file upload & compliance validation interface. Supports uploading multiple files after compliance validation (currently only image files are validated for compliance). Non-image files will not undergo compliance validation and will be uploaded directly to the compliance directory.

The complete API call URL is the corresponding environment URL + the endpoint, for example:

https://schm-api-test.shiseido.cn/schm-nccs-cip-eapi/upload

3. API Usage Instructions

3.1 File Upload & Validation API

Endpoint: /upload
Description: Local file upload & compliance validation interface. Supports uploading multiple files after compliance validation (currently only image files are validated for compliance). Non-image files will not undergo compliance validation and will be uploaded directly to the compliance directory.
Request Type: HTTP POST

3.2 Parameter Description

Body Type: multipart/form-data

Field DescriptionField NameTypeLengthRequiredRemarks
FilefilefileYesSupports multiple file uploads. All files should be passed into a single file parameter. There is no need to define multiple file parameters.

3.2 Parameter Example

resources/image-f6681ba8-7d51-4bb5-a2c9-bacedbb1a636.png

3.3 Response Description

Field DescriptionField NameTypeRequiredRemarks
Response StatusstatusStringYes"success" indicates success
Upload Result InforesultArrayYesContains file upload & validation information

Upload Result Info (result):

Field DescriptionField NameTypeLengthRequiredRemarks
MessagemsgStringYessuccess - file validation passed, and error messages
File Namefile_nameStringYes
Risk Levelrisk_levelStringNonone - no risk, currently only image file violations are checked, other file types will have this value as null
Risk InfoinfoArrayNoCurrently only image file violations are supported, other file types will have this value as null
Compliance StatuspassStringYestrue - compliant, false - non-compliant
OSS BucketbucketStringYes
File Pathbucket_pathStringYesThe path where the file is uploaded to OSS
OSS Destinationoss_destinationStringYes

Risk Info (info):

Field DescriptionField NameTypeLengthRequiredRemarks
Risk ValueconfidenceStringNo1-100, the higher the score, the higher the risk, null if no risk, the system defaults that files with a score over 50 are considered violating
Violated ContentlabelStringYesExample: political_politicalFigure, involves political figures, null if no risk, nonLabel if no violation

3.4 Example Response

{
    "status": "success",
    "result": [
        {
                  "msg": "success",
            "file_name": "oss信息.txt",
            "risk_level": null,
            "info": null,
            "pass": true,
            "bucket": "jobcenter",
            "bucket_path": "WMS/SAP/Xuhe/oss信息.txt",
            "oss_destination": "https://schm-api-dev.shiseido.cn/schm-oss-processing-sapi/object/view?oss=jobcenter&path=WMS/SAP/Xuhe/oss信息.txt"
        },
        {
                "msg": "success",
            "file_name": "让人.png",
            "risk_level": "high",
            "info": [
                {
                    "confidence": 97.9000015258789,
                    "label": "political_politicalFigure"
                },
                {
                    "confidence": 86.11000061035156,
                    "label": "political_historicalNihility"
                }
            ],
            "pass": false,
            "bucket": "jobcenter",
            "bucket_path": "WMS/SAP/unknow/让人.png",
            "oss_destination": "https://schm-api-dev.shiseido.cn/schm-oss-processing-sapi/object/view?oss=jobcenter&path=WMS/SAP/unknow/让人.png"
        }
    ]
}

Reviews