切断
指定した Agent を強制的に切断します。
切断できる Agent のバージョンは 1.2.0 以降です。
注意
ファイル転送中に切断すると、転送が異常終了するのでご注意ください。
Request Interface
HTTP Request
POST /agent/disconnection
Parameter
Request Parameter |
Value |
Required |
Description |
Default Value |
---|---|---|---|---|
sessionId |
string |
true |
Session ID between Agent and HULFT-WebConnect |
|
endpoint |
string |
true |
Access point of HULFT-WebConnect that Agent currently connecting to |
|
Authorization
Management Console の [API キー管理] 画面の「スコープ」で、 「接続 Agent」の「切断」を選択する必要があります。
Response Interface
リクエストが正常に処理された場合、レスポンスボディは返却されません。
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/agent/disconnection"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); String postData = "{\"sessionId\":\"xxxxxxxxxxxxxxxx\", \"endpoint\":\"california-service1.webconnect.hulft.com\"}"; connection.setRequestMethod("POST"); connection.setDoOutput(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); } System.out.println(connection.getResponseMessage()); // The response does not contain the response body. } catch (IOException ex) { // error } }
// load jquery var host = 'https://www.webconnect.hulft.com'; var apiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; $.ajax({ type: 'POST', url: host + '/api/v2/agent/disconnection', headers: { Authorization: 'Bearer ' + apiKey }, contentType: 'application/json', data: JSON.stringify({sessionId: 'xxxxxxxxxxxxxxxx', endpoint: 'california-service1.webconnect.hulft.com'}) }).done(function(data, status, xhr) { console.log(data); }).fail(function(data, status, xhr) { console.log(data); });