Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

tony_empiredev
New Contributor II

How can I know the active nodes of the system using QRS API REST?

How can I know the real nodes that the system is using at any given moment?
I made a call to QRS using:

 

https://host:4242/qrs/virtualproxyconfig?xrfkey=9251596621723463

And I get the installed virtual proxies perfectly and their relationship with the nodes for the load balance distributed among the 4 existing nodes, but at 5:30 PM two (2) nodes are turned off to save resources and when making the request again, the data remain the same.

Also, I tried using the endpoint

https://host:4242/qrs/engineservice/count?xrfkey=9251596621723463


and gives me 4 engines when I expected to return only the 2 that are on. Please, if someone could help me, I am very grateful.

 

1 Solution

Accepted Solutions
Employee
Employee

Re: How can I know the active nodes of the system using QRS API REST?

Hey @tony_empiredev,

For the high level schema:

GET /qrs/virtualproxyconfig/0722cc73-738d-4ba2-a5f4-001590de57e8

Sample Response:

 

{
  "id": "0722cc73-738d-4ba2-a5f4-001590de57e8",
  "createdDate": "2017-05-06T00:54:59.921Z",
  "modifiedDate": "2018-10-11T12:20:46.36Z",
  "modifiedByUserName": "DOMAIN\\USERID",
  "customProperties": [],
  "prefix": "",
  "description": "Central Proxy (Default)",
  "authenticationModuleRedirectUri": "",
  "sessionModuleBaseUri": "",
  "loadBalancingModuleBaseUri": "",
  "useStickyLoadBalancing": false,
  "loadBalancingServerNodes": [
    {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    }
  ],
  "authenticationMethod": 0,
  "headerAuthenticationMode": 0,
  "headerAuthenticationHeaderName": "",
  "headerAuthenticationStaticUserDirectory": "",
  "headerAuthenticationDynamicUserDirectory": "",
  "anonymousAccessMode": 0,
  "windowsAuthenticationEnabledDevicePattern": "Windows",
  "sessionCookieHeaderName": "X-Qlik-Session-win",
  "sessionCookieDomain": "",
  "additionalResponseHeaders": "",
  "sessionInactivityTimeout": 71582,
  "extendedSecurityEnvironment": false,
  "websocketCrossOriginWhiteList": [
    "levi.qlik.com",
    "view"
  ],
  "defaultVirtualProxy": true,
  "tags": [],
  "samlMetadataIdP": "",
  "samlHostUri": "",
  "samlEntityId": "",
  "samlAttributeUserId": "",
  "samlAttributeUserDirectory": "",
  "samlAttributeSigningAlgorithm": 0,
  "samlAttributeMap": [],
  "jwtAttributeUserId": null,
  "jwtAttributeUserDirectory": null,
  "jwtPublicKeyCertificate": null,
  "jwtAttributeMap": [],
  "magicLinkHostUri": "https://sense.company.com",
  "magicLinkFriendlyName": "LTU",
  "samlSlo": false,
  "privileges": null,
  "schemaPath": "VirtualProxyConfig"
}

 

 

In this, we can see a loadBalancingServerNodes > id (f206bf30-1e5c-498a-8f73-f1f9e2120863). With this ID (or set of IDs) to keep a focus on, we call  GET/qrs/servicestatus/full

Sample Response:

 

[
  {
    "id": "cc4cbb9b-5461-4a5f-9f0c-09515368986e",
    "createdDate": "2017-05-06T00:55:21.402Z",
    "modifiedDate": "2018-12-03T12:49:12.061Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 0,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:12.045Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "e55fe86c-ceed-4680-bd71-fc95b5cfab52",
    "createdDate": "2017-05-06T00:55:35.987Z",
    "modifiedDate": "2018-12-03T12:49:32.159Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 3,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.128Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "5662a64b-0259-43a2-bc7f-c2a30cb0ab3f",
    "createdDate": "2017-05-06T00:56:21.11Z",
    "modifiedDate": "2018-12-03T12:49:32.189Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 2,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.165Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "9cbfee9e-e7a0-44f6-87b8-6d17d7977369",
    "createdDate": "2017-05-06T00:55:36.065Z",
    "modifiedDate": "2018-12-03T12:49:32.224Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 1,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.209Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "6f6b6254-6729-421f-8c78-b8760cbe3c9f",
    "createdDate": "2017-05-06T00:55:38.231Z",
    "modifiedDate": "2018-12-03T12:49:32.827Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 5,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.811Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  }
]

In the response, we see two elements which we need to take note of:

  • serviceType
  • serviceState

To get the enum mapping, call GET /qrs/about/openapi/main

Abridged response:

"serverNodeConfiguration": {
  "$ref": "#/definitions/ServerNodeConfigurationCondensed"
},
"serviceType": {
  "type": "integer",
  "enum": [
    0,
    1,
    2,
    3,
    4,
    5
  ],
  "x-enumNames": [
    "Repository",
    "Proxy",
    "Scheduler",
    "Engine",
    "AppMigration",
    "Printing"
  ]
},
"serviceState": {
  "type": "integer",
  "enum": [
    0,
    1,
    2,
    3,
    4,
    5
  ],
  "x-enumNames": [
    "Initializing",
    "CertificatesNotInstalled",
    "Running",
    "NoCommunication",
    "Disabled",
    "Unknown"
  ]
}...

Hope that helps.

 

4 Replies
Employee
Employee

Re: How can I know the active nodes of the system using QRS API REST?

Hey @tony_empiredev,

For the high level schema:

GET /qrs/virtualproxyconfig/0722cc73-738d-4ba2-a5f4-001590de57e8

Sample Response:

 

{
  "id": "0722cc73-738d-4ba2-a5f4-001590de57e8",
  "createdDate": "2017-05-06T00:54:59.921Z",
  "modifiedDate": "2018-10-11T12:20:46.36Z",
  "modifiedByUserName": "DOMAIN\\USERID",
  "customProperties": [],
  "prefix": "",
  "description": "Central Proxy (Default)",
  "authenticationModuleRedirectUri": "",
  "sessionModuleBaseUri": "",
  "loadBalancingModuleBaseUri": "",
  "useStickyLoadBalancing": false,
  "loadBalancingServerNodes": [
    {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    }
  ],
  "authenticationMethod": 0,
  "headerAuthenticationMode": 0,
  "headerAuthenticationHeaderName": "",
  "headerAuthenticationStaticUserDirectory": "",
  "headerAuthenticationDynamicUserDirectory": "",
  "anonymousAccessMode": 0,
  "windowsAuthenticationEnabledDevicePattern": "Windows",
  "sessionCookieHeaderName": "X-Qlik-Session-win",
  "sessionCookieDomain": "",
  "additionalResponseHeaders": "",
  "sessionInactivityTimeout": 71582,
  "extendedSecurityEnvironment": false,
  "websocketCrossOriginWhiteList": [
    "levi.qlik.com",
    "view"
  ],
  "defaultVirtualProxy": true,
  "tags": [],
  "samlMetadataIdP": "",
  "samlHostUri": "",
  "samlEntityId": "",
  "samlAttributeUserId": "",
  "samlAttributeUserDirectory": "",
  "samlAttributeSigningAlgorithm": 0,
  "samlAttributeMap": [],
  "jwtAttributeUserId": null,
  "jwtAttributeUserDirectory": null,
  "jwtPublicKeyCertificate": null,
  "jwtAttributeMap": [],
  "magicLinkHostUri": "https://sense.company.com",
  "magicLinkFriendlyName": "LTU",
  "samlSlo": false,
  "privileges": null,
  "schemaPath": "VirtualProxyConfig"
}

 

 

In this, we can see a loadBalancingServerNodes > id (f206bf30-1e5c-498a-8f73-f1f9e2120863). With this ID (or set of IDs) to keep a focus on, we call  GET/qrs/servicestatus/full

Sample Response:

 

[
  {
    "id": "cc4cbb9b-5461-4a5f-9f0c-09515368986e",
    "createdDate": "2017-05-06T00:55:21.402Z",
    "modifiedDate": "2018-12-03T12:49:12.061Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 0,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:12.045Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "e55fe86c-ceed-4680-bd71-fc95b5cfab52",
    "createdDate": "2017-05-06T00:55:35.987Z",
    "modifiedDate": "2018-12-03T12:49:32.159Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 3,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.128Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "5662a64b-0259-43a2-bc7f-c2a30cb0ab3f",
    "createdDate": "2017-05-06T00:56:21.11Z",
    "modifiedDate": "2018-12-03T12:49:32.189Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 2,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.165Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "9cbfee9e-e7a0-44f6-87b8-6d17d7977369",
    "createdDate": "2017-05-06T00:55:36.065Z",
    "modifiedDate": "2018-12-03T12:49:32.224Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 1,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.209Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  },
  {
    "id": "6f6b6254-6729-421f-8c78-b8760cbe3c9f",
    "createdDate": "2017-05-06T00:55:38.231Z",
    "modifiedDate": "2018-12-03T12:49:32.827Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "serverNodeConfiguration": {
      "id": "f206bf30-1e5c-498a-8f73-f1f9e2120863",
      "name": "Central",
      "hostName": "sense.company.com",
      "roles": [
        {
          "id": "265c41c5-ee84-4435-9ae1-9ae556aa6cb0",
          "definition": 3,
          "privileges": null
        },
        {
          "id": "4b52e61b-2020-41fd-b1c8-446c8cfd9d59",
          "definition": 4,
          "privileges": null
        },
        {
          "id": "5238fa48-522b-48e9-9fd0-962b164ade1b",
          "definition": 1,
          "privileges": null
        },
        {
          "id": "ba2e555b-8ed1-4151-9914-da0472af7521",
          "definition": 0,
          "privileges": null
        },
        {
          "id": "d5700278-4c37-4f4e-a397-65a196556c5e",
          "definition": 5,
          "privileges": null
        },
        {
          "id": "f34481f5-cb50-4d81-9799-5be829df7a3c",
          "definition": 2,
          "privileges": null
        }
      ],
      "serviceCluster": {
        "id": "e0c584b4-0cb9-4d52-8112-27651e855ae8",
        "name": "ServiceCluster",
        "privileges": null
      },
      "privileges": null
    },
    "serviceType": 5,
    "serviceState": 2,
    "timestamp": "2018-12-03T12:49:32.811Z",
    "privileges": null,
    "schemaPath": "ServiceStatus"
  }
]

In the response, we see two elements which we need to take note of:

  • serviceType
  • serviceState

To get the enum mapping, call GET /qrs/about/openapi/main

Abridged response:

"serverNodeConfiguration": {
  "$ref": "#/definitions/ServerNodeConfigurationCondensed"
},
"serviceType": {
  "type": "integer",
  "enum": [
    0,
    1,
    2,
    3,
    4,
    5
  ],
  "x-enumNames": [
    "Repository",
    "Proxy",
    "Scheduler",
    "Engine",
    "AppMigration",
    "Printing"
  ]
},
"serviceState": {
  "type": "integer",
  "enum": [
    0,
    1,
    2,
    3,
    4,
    5
  ],
  "x-enumNames": [
    "Initializing",
    "CertificatesNotInstalled",
    "Running",
    "NoCommunication",
    "Disabled",
    "Unknown"
  ]
}...

Hope that helps.

 

tony_empiredev
New Contributor II

Re: How can I know the active nodes of the system using QRS API REST?

Hey @LeviTurner

Thanks very much, with your answer, you can change the script and I hope it works. Once tested,  I will mark your answer as an accepted solution.

I'm going to post another very interesting question about the tasks, maybe you can help me.

 

Employee
Employee

Re: How can I know the active nodes of the system using QRS API REST?

Sounds good. If I don't see it do @ me.

Highlighted
Employee
Employee

Re: How can I know the active nodes of the system using QRS API REST?

Thank you for sharing, great post!