PA GW 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 GWs

Request
GET api/gw
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",
    "enableHTML5": true,
    "htmL5Port": 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 GW

Request
POST api/gw
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",
  "enableHTML5": true,
  "htmL5Port": 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 GW

Request
GET api/gw/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",
  "enableHTML5": true,
  "htmL5Port": 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 GW

Request
PUT api/gw/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 GW

Request
DELETE api/gw/224
Headers
Content-Type: application/json; api-version=1.0
auth_token: [AUTHENTICATION_TOKEN]


Response
Status:No Content (204)


Get All PAs

Request
GET api/pa
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 PA

Request
POST api/pa
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 PA Status

Request
GET api/pa/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 PA

Request
PUT api/pa/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 PA Priority

Request
PUT api/pa/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 PA To Master

Request
POST api/pa/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 Publishing Agent - The selected PA is already set as master."
}


Delete PA

Request
DELETE api/pa/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)