Get Cluster Information

On This Page

Description

Returns information about the endpoints of the platform cluster, which provide access to the platform's resources. The information includes the IP addresses of the endpoints.

Request

Request Header

Syntax
    GET /api/cluster_info HTTP/1.1
    Host: <management-APIs URL>
    Content-Type: application/json
    Cookie: session=<cookie>
    
    url = "<management-APIs URL>/api/cluster_info"
    headers = {
                "Content-Type": "application/json",
                "Cookie": "session=<cookie>"
              }
    
    HTTP Method

    GET

    URL Resource Parameters

    None

    Request Data

    None

    Response

    Response Header

    Syntax
    HTTP/1.1 <status code; 200 on success> <reason phrase>
    Content-Type: application/json
    ...
    

    Response Data

    Syntax
    {
        "data": [
            {
                "attributes": {
                    "cluster_name": "string",
                    "created_at":   "string",
                    "endpoints": {
                        <cluster-endpoint arrays>
                    }
                },
                "id":   "string",
                "type": "cluster_info"
            }
        ]
    }
    
    Elements

    The data object in the HTTP response body contains the requested cluster information, which includes these elements:

    attributes

    Cluster-information attributes.

    • Type: A JSON object of cluster-information attributes

    The following cluster-information attributes are returned:

    cluster_name

    The name of the cluster.

    • Type: String
    created_at

    The date and time at which the cluster was created.

    • Type: String
    endpoints

    Information about the cluster's endpoints, which provide access to the platform's resources. The returned information includes the endpoints' URLs — the IP addresses and port numbers for accessing the resources.

    • Type: A JSON object containing endpoint-information arrays
    id

    A unique cluster ID.

    • Type: String
    type

    The type of the data object. This value must be set to "cluster_info".

    • Type: String

    Examples

    Request
      GET /api/cluster_info HTTP/1.1
      Host: https://dashboard.default-tenant.app.mycluster.iguazio.com
      Content-Type: application/json
      Cookie: session=j%3A%7B%22sid%22%3A%20%22a9ce242a-670f-47a8-9c8b-c6730f2794dc%22%7D
      
      import requests
      
      url = "https://dashboard.default-tenant.app.mycluster.iguazio.com/api/cluster_info"
      headers = {
                  "Content-Type": "application/json",
                  "Cookie": "session=j%3A%7B%22sid%22%3A%20%22a9ce242a-670f-47a8-9c8b-c6730f2794dc%22%7D"
                }
      
      response = requests.get(url, headers=headers)
      print(response.text)
      
      
      Response
      HTTP/1.1 200 OK
      Content-Type: application/json
      ...
      
      {
          "data": [
              {
                  "attributes": {
                      "cluster_name": "igzc0",
                      "created_at": "2018-01-15T13:26:48.353000+00:00",
                   "endpoints": {
                          "api": [
                              {
                                  "service_id": "igz0.api.0",
                                  "urls": [
                                      "10.0.0.1:8113"
                                  ]
                              }
                          ],
                          "bridge": [
                              {
                                  "rdma_urls": [
                                      "tcp://10.0.0.1:1234"
                                  ],
                                  "service_id": "igz0.bridge.1",
                                  "tcp_urls": [
                                      "10.0.0.1:8100"
                                  ]
                              }
                          ],
                          "ui": [
                              {
                                  "service_id": "igz0.dashboard.0",
                                  "urls": [
                                      "10.0.0.1:8000"
                                  ]
                              }
                          ],
                          "web": []
                      }
                  },
                  "id": "string",
                  "type": "cluster_info"
              }
          ],
          ...
      }