GET - Get all clusters

Purpose

This API is used to gain information about all the clusters, DNS, DHCP, or both, in a network environment to provide a complete overview of each cluster's configuration.

Request URL 

Method: GET

https://{appconsole_IP}:{9443}/api/cluster_settings/cluster/

Request Headers

The following headers must be included in the API request for successful authentication and data submission:

Authorization: DDI Central's OAuth implementation uses the Bearer authentication scheme. Hence, while making API calls, access_token obtained via the OAuth 2.0 Client Credentials Grant must be included in the Authorization header of API requests. This token verifies the client’s identity and ensures appropriate permissions for accessing resources.

The Authorization Header follows the format below:

headers = { "Authorization": "Bearer {bearer_tk}" }


Content-Type: Required in the header to indicate the media type of the resource being sent. It helps the server at the receiving end understand how to process the transmitted request body.

The Content-Type Header follows the format below:

headers ={ "Content-Type": "application/json" }

 

Sample Response

Copied
Copied[
   {
      "id":1,
      "cluster_name":"chennai",
      "cluster_type":"both",
      "windows_cluster":false,
      "zone_count":4,
      "subnet_count":2,
      "dns_count":1,
      "dhcp_count":1,
      "server_count":1,
      "servers":[
         {
            "server_location":"local1",
            "server_ip":"192.168.56.10",
            "http_port":9090,
            "https_port":9443,
            "http_url":null,
            "https_url":null,
            "master_server":true,
            "master_server_ip":null,
            "master_server_http_port":9090,
            "master_server_https_port":9443,
            "status":"up",
            "server_type":"both"
         }
      ]
   },
   {
      "id":5,
      "cluster_name":"wincluster2",
      "cluster_type":"both",
      "windows_cluster":true,
      "zone_count":3,
      "subnet_count":0,
      "dns_count":1,
      "dhcp_count":1,
      "server_count":1,
      "servers":[
         {
            "server_location":"ddnsdhcp",
            "server_ip":"192.168.56.29",
            "http_port":null,
            "https_port":null,
            "http_url":null,
            "https_url":null,
            "master_server":false,
            "master_server_ip":null,
            "master_server_http_port":null,
            "master_server_https_port":null,
            "status":"up",
            "server_type":"both"
         }
      ]
   }
]