Updating Information

You can update D-Client Settings information.

Request Interface

HTTP Request

PUT /dclient/definition/{dclientUuid}

Parameter

Path Parameter

Value

Required

Description

Default Value

dclientUuid

string

true

ID of the D-Client to update.(32 alphanumeric character)

-

Request Parameter

Value

Required

Description

Default Value

connectionId

string

false

Connection ID

No update

accountId

string

false

Account ID (UUID of the account)

No update

memo

string

false

Note (Character string)

No update

useable

boolean

false

Availability (true/false)

No update

Response Interface

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

{
	"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"dclientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"connectionId": "xxxxxxxxxxxxxxxx",
		"account":
		{
			"id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
			"mailAddress":"sample@example.com"
		},
	"memo": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"useable": true,
	"clientVersion": "1,0,0",
	"connectionStatus": "online"
}

Property Name

Value

Description

id

string

D-Client UUID (UUID)

dclientId

string

D-Client ID

connectionId string Connection ID

account

object

Accounts that is assigned to the D-Client settings.

memo string Note (Character string)
useable boolean Availability (true/false)
clientVersion string Client version (Version information in x.y.z. format)
connectionStatus string Connection status (online/offline)

Examples

public static void main(String[] args) {
    String host = "https://www.webconnect.hulft.com";
    String apiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    String dclientUuid = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    try {
        URL url = new URL(host + "/api/v2/dclient/definition/" + dclientUuid);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        String putData = "{\"connectionId\": \"connectionId\","
                    + "\"accountId\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\","
                    + "\"memo\": \"memo\","
                    + "\"useable\": true}";
        connection.setRequestMethod("PUT");
        connection.setDoOutput(true);
        connection.setDoInput(true);
        connection.setRequestProperty("Authorization", "Bearer " + apiKey);
        connection.setRequestProperty("Content-Type", "application/json");
        connection.setRequestProperty("Content-Length", Integer.toString(putData.length()));
        try (BufferedWriter writer = 
	    new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()))) {
            writer.write(putData);
           }
        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';
var dclientUuid = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$.ajax({
    type: 'PUT',
    url: host + '/api/v2/dclient/definition/' + dclientUuid,
    headers: {
      Authorization: 'Bearer ' + apiKey
    },
    contentType: 'application/json',
    data: JSON.stringify({
              "connectionId": "connectionId",
              "accountId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
              "memo": "memo",
              "useable": true
          })
  }).done(function(data, status, xhr) {
    console.log(data);
  }).fail(function(data, status, xhr) {
    console.log(data);
  });