This topic describes the structure of the HTTP and HTTPS POST requests sent to call the Content Moderation API.
Request methods
The Content Moderation API supports both HTTP and HTTPS POST requests. The JSON-formatted request parameters are sent to the server in the form of an HTTP request body. The common query parameter clientInfo is available in the URL query parameters.
http://green.cn-shanghai.aliyuncs.com/green/image/scan?clientInfo={"userId":"120234234","userNick":"Mike","userType":"others"}
https
: the protocol used to transmit the request.green.cn-shanghai.aliyuncs.com
specifies the endpoint of the Content Moderation API.green/image/scan
specifies a specific operation. That means the operation for synchronous image moderation.clientInfo={"ip":"127.0.0.2","userId":"120234234","userNick":"Mike","userType":"others"}
specifies the common query parameters.
Communication protocols
You can send requests over HTTP or HTTPS. For a higher level of security, we recommend that you send requests over HTTPS, especially when sensitive data is involved.
Request parameters
In each request, you must specify common request parameters and operation-specific service request parameters. Service parameters are transparently transmitted in the request body. For more information about the body structure, see the description of each operation.
Encoding
All requests and responses are encoded in UTF-8.