schm-nccs-cip-eapi
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 Endpoint | Description |
---|---|
/upload | 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. |
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 Description | Field Name | Type | Length | Required | Remarks |
---|---|---|---|---|---|
File | file | file | Yes | Supports 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
3.3 Response Description
Field Description | Field Name | Type | Required | Remarks |
---|---|---|---|---|
Response Status | status | String | Yes | "success" indicates success |
Upload Result Info | result | Array | Yes | Contains file upload & validation information |
Upload Result Info (result):
Field Description | Field Name | Type | Length | Required | Remarks |
---|---|---|---|---|---|
Message | msg | String | Yes | success - file validation passed, and error messages | |
File Name | file_name | String | Yes | ||
Risk Level | risk_level | String | No | none - no risk, currently only image file violations are checked, other file types will have this value as null | |
Risk Info | info | Array | No | Currently only image file violations are supported, other file types will have this value as null | |
Compliance Status | pass | String | Yes | true - compliant, false - non-compliant | |
OSS Bucket | bucket | String | Yes | ||
File Path | bucket_path | String | Yes | The path where the file is uploaded to OSS | |
OSS Destination | oss_destination | String | Yes |
Risk Info (info):
Field Description | Field Name | Type | Length | Required | Remarks |
---|---|---|---|---|---|
Risk Value | confidence | String | No | 1-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 Content | label | String | Yes | Example: 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"
}
]
}