Post:
https://api.clickcease.com/api/domain/block-ip
Example request
curl --location --request POST "https://api.clickcease.com/api/domain/block-ip/{INSERT-YOUR-API-KEY-HERE}" \
--header "Content-Type: application/json" \
--data "{\"domain\":\"your-domain.com\",\"ips\":[\"117.72.37.18\",\"117.72.39.*\",\"152.982.725.0/22\"]}"
var settings = {
"url": "https://api.clickcease.com/api/domain/block-ip/{INSERT-YOUR-API-KEY-HERE}",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": "{\"domain\":\"your-domain.com\",\"ips\":[\"117.72.37.18\",\"117.72.39.*\",\"152.982.725.0/22\"]}",
};
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://api.clickcease.com/api/domain/block-ip/{INSERT-YOUR-API-KEY-HERE}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\"domain\":\"your-domain.com\",\"ips\":[\"117.72.37.18\",\"117.72.39.*\",\"152.982.725.0/22\"]}"
response = http.request(request)
puts response.read_body
import requests
url = 'https://api.clickcease.com/api/domain/block-ip/{INSERT-YOUR-API-KEY-HERE}'
payload = "{\"domain\":\"your-domain.com\",\"ips\":[\"117.72.37.18\",\"117.72.39.*\",\"152.982.725.0/22\"]}"
headers = {
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
print(response.text)
var http = require('http');
var options = {
'method': 'POST',
'hostname': 'api.clickcease.com',
'path': '/api/domain/block-ip/{INSERT-YOUR-API-KEY-HERE}',
'headers': {
"Content-Type": "application/json"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = "{\"domain\":\"your-domain.com\",\"ips\":[\"117.72.37.18\",\"117.72.39.*\",\"152.982.725.0/22\"]}";
req.write(postData);
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.clickcease.com/api/domain/block-ip/{INSERT-YOUR-API-KEY-HERE}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>"{\"domain\":\"your-domain.com\",\"ips\":[\"117.72.37.18\",\"117.72.39.*\",\"152.982.725.0/22\"]}",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
} ?>
package main
import (
"fmt"
"strings"
"os"
"path/filepath"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.clickcease.com/api/domain/block-ip/{INSERT-YOUR-API-KEY-HERE}"
method := "POST"
payload := strings.NewReader("{\"domain\":\"your-domain.com\",\"ips\":[\"117.72.37.18\",\"117.72.39.*\",\"152.982.725.0/22\"]}")
client := &http.Client {
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}