Registering Information

You can register new Connection Settings information.

Request Interface

HTTP Request

POST /connections/definition

Parameter

Request Parameter

Value

Required

Description

Default Value

connectionId

string

true

New Connection ID you intend to register (16 characters or less)

 

passwd

string

true

New Connection Password you intend to register (8 characters or more and 256 characters or less)

 

connectableClientType

array

true

Connectable client type you intend to register (Specifiable value: hulft, data_transfer_api, hwc_browser, dclient)

 

ipFilterGroupName(*)

string

false

IP Filter Group Name that is linked to the account (32 characters or less. Use alphanumeric characters and symbols (. -). You cannot specify only '.' or '..' for this value)

(You can omit this parameter itself)

memo

string

false

Note for the settings (256 characters or less)

Blank

*: If you specify only 'hwc_browser' for 'connectableClientType', you cannot set 'ipFilterGroupName'.

Authorization

In the API Key Management screen in Management Console, 'Connection Settings' under the 'Scopes' field must be selected as 'Create'.

Response Interface

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

Also, the URI of the registered resource is stored in the response header 'Location'.

{
    "connectionId":"id1",
    "connectableClientType":["hulft", "data_transfer_api"],
    "ipFilterGroupName":"group1",
    "memo":"memo1"
}

Property Name

Value

Description

connectionId

string

New Connection ID you intend to register

connectableClientType

array

Connectable client type you intend to register

ipFilterGroupName

string

IP Filter Group Name that is linked to the account. This parameter contains null in this response if an IP Filter Group Name is not set to the Connection ID

memo

string

Note for the settings

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/connections/definition");
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        String postData = "{\"connectionId\":\"xxxxxxxx\", \"passwd\":\"xxxxxxxx\", \"connectableClientType\":[\"hulft\"], \"ipFilterGroupName\":\"group1\", \"memo\":\"xxxxxxxx\"}";

        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/connections/definition',
  headers: {
    Authorization: 'Bearer ' + apiKey
  },
  contentType: 'application/json',
  data: JSON.stringify({connectionId: 'xxxxxxxxx', passwd: 'xxxxxxxx', connectableClientType: ["hulft"], ipFilterGroupName: 'group1', memo: 'xxxxxxx'})
}).done(function(data, status, xhr) {
  console.log(data);
}).fail(function(data, status, xhr) {
  console.log(data);
});