Connection Broker and Secure Gateway Sample

Logon

Request

POST api/Session/logon

Headers

Content-Type: application/json; api-version=1.0

Body

{
  "username":"administrator",
  "password":"11112222"
}

Response

Status:OK (200)

{
  "authToken": "[AUTHENTICATION_TOKEN]"
}

Get All Secure Gateways

Request

GET api/gateway

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:OK (200)

[
  {
    "gwMode": 0,
    "preferredPAId": 0,
    "normalModeForwarding": false,
    "forwardHttpServers": "localhost:81",
    "forwardGatewayServers": "",
    "ipVersion": 0,
    "iPs": "126.0.0.5",
    "bindV4Addresses": "",
    "bindV6Addresses": "",
    "optimizeConnectionIPv4": "",
    "optimizeConnectionIPv6": "",
    "enableGWPort": true,
    "broadcast": true,
    "enableClientManagerPort": true,
    "dosPro": true,
    "enableRDP": false,
    "enableRDPUDP": true,
    "gwPort": 80,
    "rdpPort": 3389,
    "enableSSL": true,
    "minSSLVersion": 2,
    "cipherStrength": 2,
    "sslPort": 443,
    "cipher": "EECDH:!SSLv2:!SSLv3:!aNULL:!RC4:!ADH:!eNULL:!LOW:!MEDIUM:!EXP:+HIGH",
    "privateKeyFile": "SelfSignedCertificate.crt",
    "certificateFile": "SelfSignedCertificate.crt",
    "enableUserPortal": true,
    "UserPortalPort": 20020,
    "launchMethod": 0,
    "allowEmbed": false,
    "allowlaunchMethod": true,
    "allowAppsInNewTab": false,
    "allowFileTransfer": true,
    "allowClipboard": true,
    "usePreWin2000LoginFormat": true,
    "enableHSTS": false,
    "hstsIncludeSubdomains": false,
    "hstsPreload": false,
    "hstsMaxAge": 12,
    "enableWyseSupport": true,
    "securityMode": 0,
    "macAllowExceptLst": [],
    "macAllowOnlyLst": [],
    "webRequestsURL": "",
    "fwGWID": 4294967295,
    "server": "126.0.0.5",
    "enabled": true,
    "description": "",
    "siteId": 1,
    "id": 218
  }
]

New Secure Gateway

Request

POST api/gateway

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Body

{
  "server":"126.0.0.6",
  "siteId":"1"
}

Response

Status:Created (201)

{
  "gwMode": 0,
  "preferredPAId": 0,
  "normalModeForwarding": false,
  "forwardHttpServers": "localhost:81",
  "forwardGatewayServers": "",
  "ipVersion": 0,
  "iPs": "126.0.0.6",
  "bindV4Addresses": "",
  "bindV6Addresses": "",
  "optimizeConnectionIPv4": "",
  "optimizeConnectionIPv6": "",
  "enableGWPort": true,
  "broadcast": true,
  "enableClientManagerPort": true,
  "dosPro": true,
  "enableRDP": false,
  "enableRDPUDP": true,
  "gwPort": 80,
  "rdpPort": 3389,
  "enableSSL": true,
  "minSSLVersion": 2,
  "cipherStrength": 2,
  "sslPort": 443,
  "cipher": "EECDH:!SSLv2:!SSLv3:!aNULL:!RC4:!ADH:!eNULL:!LOW:!MEDIUM:!EXP:+HIGH",
  "privateKeyFile": "SelfSignedCertificate.crt",
  "certificateFile": "SelfSignedCertificate.crt",
  "enableUserPortal": true,
  "UserPortalPort": 20020,
  "launchMethod": 0,
  "allowEmbed": false,
  "allowlaunchMethod": true,
  "allowAppsInNewTab": false,
  "allowFileTransfer": true,
  "allowClipboard": true,
  "usePreWin2000LoginFormat": true,
  "enableHSTS": false,
  "hstsIncludeSubdomains": false,
  "hstsPreload": false,
  "hstsMaxAge": 12,
  "enableWyseSupport": true,
  "securityMode": 0,
  "macAllowExceptLst": [],
  "macAllowOnlyLst": [],
  "webRequestsURL": "",
  "fwGWID": 4294967295,
  "server": "126.0.0.6",
  "enabled": true,
  "description": "",
  "siteId": 1,
  "id": 220
}

Get Secure Gateway

Request

GET api/gateway/220

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:OK (200)

{
  "gwMode": 0,
  "preferredPAId": 0,
  "normalModeForwarding": false,
  "forwardHttpServers": "localhost:81",
  "forwardGatewayServers": "",
  "ipVersion": 0,
  "iPs": "126.0.0.6",
  "bindV4Addresses": "",
  "bindV6Addresses": "",
  "optimizeConnectionIPv4": "",
  "optimizeConnectionIPv6": "",
  "enableGWPort": true,
  "broadcast": true,
  "enableClientManagerPort": true,
  "dosPro": true,
  "enableRDP": false,
  "enableRDPUDP": true,
  "gwPort": 80,
  "rdpPort": 3389,
  "enableSSL": true,
  "minSSLVersion": 2,
  "cipherStrength": 2,
  "sslPort": 443,
  "cipher": "EECDH:!SSLv2:!SSLv3:!aNULL:!RC4:!ADH:!eNULL:!LOW:!MEDIUM:!EXP:+HIGH",
  "privateKeyFile": "SelfSignedCertificate.crt",
  "certificateFile": "SelfSignedCertificate.crt",
  "enableUserPortal": true,
  "UserPortalPort": 20020,
  "launchMethod": 0,
  "allowEmbed": false,
  "allowlaunchMethod": true,
  "allowAppsInNewTab": false,
  "allowFileTransfer": true,
  "allowClipboard": true,
  "usePreWin2000LoginFormat": true,
  "enableHSTS": false,
  "hstsIncludeSubdomains": false,
  "hstsPreload": false,
  "hstsMaxAge": 12,
  "enableWyseSupport": true,
  "securityMode": 0,
  "macAllowExceptLst": [],
  "macAllowOnlyLst": [],
  "webRequestsURL": "",
  "fwGWID": 4294967295,
  "server": "126.0.0.6",
  "enabled": true,
  "description": "",
  "siteId": 1,
  "id": 220
}

Update Secure Gateway

Request

PUT api/gateway/220

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Body

{
  "ipversion":"bothVersions",
  "enableGWPort":"false"
}

Response

Status:No Content (204)

Delete Secure Gateway

Request

DELETE api/gateway/224

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:No Content (204)

Get All Connection Brokers

Request

GET api/broker

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:OK (200)

[
  {
    "priority": 0,
    "ip": "10.226.13.23",
    "alternativeIPs": "",
    "standby": false,
    "markedForDeletion": false,
    "server": "DESKTOP-OAP0DJ2",
    "enabled": true,
    "description": "aekaek",
    "siteId": 1,
    "id": 1
  }
]

Create Connection Broker

Request

POST api/broker

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Body

{
  "server":"192.12.0.8",
  "siteId":"1"
}

Response

Status:Created (201)

{
  "priority": 1,
  "ip": "192.12.0.8",
  "alternativeIPs": "",
  "standby": false,
  "markedForDeletion": false,
  "server": "192.12.0.8",
  "enabled": true,
  "description": "",
  "siteId": 1,
  "id": 133
}

Get All Conection broker Status

Request

GET api/broker/status

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:OK (200)

[
  {
    "cpuLoad": 0,
    "memLoad": 0,
    "diskRead": 0,
    "diskWrite": 0,
    "enabled": true,
    "id": "1",
    "server": "DESKTOP-OAP0DJ2",
    "siteId": 1,
    "agentVer": "17.0 (build 21000) vkoutsomanis 0",
    "serverOS": "Windows 10 Enterprise Edition (x64)",
    "serviceStartTime": "Unknown",
    "systemBootTime": "Tue May 14 12:10:39 2019",
    "unhandledExceptions": 0,
    "agentState": 0,
    "serverType": 7,
    "logLevel": 3
  }
]

Update Connection Broker

Request

PUT api/broker/133

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Body

{
  "enable":"false",
  "description":"alternative publishing agent"
}

Response

Status:No Content (204)

Update Connection Broker Priority

Request

PUT api/broker/133/priority

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Body

{
  "direction":"up"
}

Response

Status:Bad Request (400)

{
  "code": 0,
  "msg": "Cannot move selected Publishing Agent up."
}

Promote Connection Broker To Primary

Request

POST api/broker/133/Promote

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:Bad Request (400)

{
    "code": 0,
    "msg": "Cannot promote RAS Connection Broker - The selected Connection Broker is already set as primary."
}

Delete Connection Broker

Request

DELETE api/broker/133

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:No Content (204)

Apply Settings

Request

POST api/Settings/Apply

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:No Content (204)

LogOff

Request

POST api/Session/logoff

Headers

Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]

Response

Status:OK (200)

Last updated

Other Resources

Feedback

© 2024 Parallels International GmbH. All rights reserved.