This topic describes the structure of the HTTP and HTTPS POST requests sent to call the Content Moderation API.

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.

The following is an example of an unencoded synchronous request for moderating images:
http://green.cn-shanghai.aliyuncs.com/green/image/scan?clientInfo={"userId":"120234234","userNick":"Mike","userType":"others"}
Where,
  • http specifies the protocol for transmitting the request.
  • green.cn-shanghai.aliyuncs.com specifies the endpoint of the Content Moderation API.
  • green/image/scan specifies a specific operation, that is, the operation for synchronous image moderation.
  • clientInfo={"ip":"127.0.0.2","userId":"120234234","userNick":"Mike","userType":"others"} specifies the common query parameters.

Protocols

You can send requests over HTTP or HTTPS. With regard to higher security, we recommend that you send requests over HTTPS, especially when sensitive data is involved.

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.