Create a custom action,up to 5 custom response actions can be configured.
| パラメータ名 | 説明 |
|---|---|
serviceTypeString | Security service type. Please enter a specific service type, if you purchase multiple security services. |
| パラメータ名 | 説明 |
|---|---|
*actionNameString | Action name,maximum 50 characters.
Does not support # and &. |
descriptionString | Description,maximum 200 characters. |
*statusCodeString | Status code.
Valid value range:200,204,206,400,401,403,404,500,501,503. |
*contentTypeString | Response Content-Type type,multiple separated by ; sign. |
*cusBlockCntString | Response content definition, the size of the response content cannot exceed 16KB, if you need to insert static resources such as pictures, it is recommended to use links to import.
The following interception information parameters are supported:
{url} : Displays the URL information when intercepting
{client_ip} : Displays the intercepted user IP information
{time} : Displays the intercepted time point
{event_id} : Displays the ID information of this interception event |
| パラメータ名 | 説明 |
|---|---|
codeString | 選択可能な値:パラメータ値を表示する Please refer to the error code for exceptions. |
msgString | Description. |
dataString | Customize response ID. |
| エラーコード(code) | 説明(message) | HTTPステータスコード | 意味 |
|---|---|---|---|
| 40010 | Request\nparameter\nerror. | 200 | Request\nparameter\nerror. |
| 500 | Server\nerror. | 200 | Server\nerror. |
#!/bin/bash
username="example_username"
# Note that this must be a single quote to avoid the special $ character
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/api/v1/share-action/add-customize-act" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"actionName": "CustomProcessingActionName",
"description": "Custom processing action description",
"statusCode": "500",
"contentType": "application/json",
"cusBlockCnt": "Customize response page content"
}'{
"code" : 200,
"msg" : "Success",
"data" : "1234567890123456789"
}