Registering Information

You can register an IP filter group.

Request Interface

HTTP Request

POST /ip-filter/group

Parameter

Request Parameter

Value

Required

Description

Default Value

ipFilterGroupName string true

IP filter group name.

32 characters or less.

Use alphanumeric characters and symbols (only "-" and "." allowed). You cannot specify "." or ".." by itself.

Duplicate specifications in the same account are not allowed.

Case-sensitive.

-

description

string

false

Description of IP filter group.

256 characters or less.

Blank

allowlist string true

Allowlist of IP addresses.

Array of strings.

Use numeric characters and certain symbols (. /) only.

Empty arrays are not allowed.

-

The number of registered IP filter groups is up to 100 per contractor account.

The number of registered IP addresses is up to 100 per IP filter group.

Response Interface

If the request is processed successfully, the following response is returned in JSON format.

{
	"ipFilterGroupName": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"description": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"allowlist": [
		"xxx.xxx.xxx.xxx",
		"xxx.xxx.xxx.xxx"
	]
}
		

Property Name

Value

Description

ipFilterGroupName

string

IP filter group name

description

string

Description of IP filter group

allowlist

array

Allowlist of IP addresses

 

If the request is processed unsuccessfully, a response is returned in the following JSON format.

{
	"code": "xxxxxxx",
	"message": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"ipAddressError": [
		{
		"code": "xxxxxxx",
		"message": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
		"index": 0
		},
		{
		"code": "xxxxxxx",
		"message": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
		"index": 1
		}
	]
}
		

Property Name

Value

Description

code

string

Error code

message

string

Error message

ipAddressError

array

IP address with an error

code string Error code for the input IP address
message string Error message for the input IP address
index integer Array element number for the input IP address (zero-based)

Examples

public static void main(String[] args) {
	String host = "https://www.webconnect.hulft.com";
	String apiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
	try {
	URL url = new URL(host + "/api/v2/ip-filter/group");
	HttpURLConnection connection = (HttpURLConnection) url.openConnection();
	String postData = "{\"ipFilterGroupName\": \"group1\","
		 +  "\"allowlist\": [\"192.0.2.0/24\"],"
		 +  "\"description\": \"description1\""
		 +  "}";
	connection.setRequestMethod("POST");
	connection.setDoOutput(true);
	connection.setDoInput(true);
	connection.setRequestProperty("Authorization", "Bearer " + apiKey);
	connection.setRequestProperty("Content-Type", "application/json");
	connection.setRequestProperty("Content-Length", Integer.toString(postData.length()));
	try (BufferedWriter writer = 
		new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()))) {
		writer.write(postData);
		}
	try (BufferedReader reader = 
		new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
	String line;
	while ((line = reader.readLine()) != null) {
		System.out.println(line);
		}
	}
	} catch (IOException ex) {
	// error
	}
}

// load jquery
var host = 'https://www.webconnect.hulft.com';
var apiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$.ajax({
	type: 'POST',
	url: host + '/api/v2/ip-filter/group',
	headers: {
			Authorization: 'Bearer ' + apiKey
	},
	contentType: 'application/json',
	data: JSON.stringify({
		"ipFilterGroupName": "group1",
		"allowlist": ["192.0.2.0/24"],
		"description": "description1" 
	})
}).done(function(data, status, xhr) {
	console.log(data);
}).fail(function(data, status, xhr) {
	console.log(data);
});