> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Instances

> Get the instances running for the workspace. Permission required: `view-statistics`

## OpenAPI

````json GET /api/v1/instances.get
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Settings"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "paths": {
    "/api/v1/instances.get": {
      "parameters": [],
      "get": {
        "summary": "Get Instances",
        "operationId": "get-api-v1-instances.get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "instances": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "currentStatus": {
                            "type": "object",
                            "properties": {
                              "connected": {
                                "type": "boolean"
                              },
                              "lastHeartbeatTime": {
                                "type": "integer"
                              },
                              "local": {
                                "type": "boolean"
                              }
                            }
                          },
                          "instanceRecord": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "type": "string"
                              },
                              "_createdAt": {
                                "type": "string"
                              },
                              "_updatedAt": {
                                "type": "string"
                              },
                              "extraInformation": {
                                "type": "object",
                                "properties": {
                                  "host": {
                                    "type": "string"
                                  },
                                  "port": {
                                    "type": "string"
                                  },
                                  "tcpPort": {
                                    "type": "integer"
                                  },
                                  "os": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      },
                                      "platform": {
                                        "type": "string"
                                      },
                                      "arch": {
                                        "type": "string"
                                      },
                                      "release": {
                                        "type": "string"
                                      },
                                      "uptime": {
                                        "type": "number"
                                      },
                                      "loadavg": {
                                        "type": "array",
                                        "items": {
                                          "type": "number"
                                        }
                                      },
                                      "totalmem": {
                                        "type": "integer"
                                      },
                                      "freemem": {
                                        "type": "integer"
                                      },
                                      "cpus": {
                                        "type": "integer"
                                      }
                                    }
                                  },
                                  "nodeVersion": {
                                    "type": "string"
                                  },
                                  "conns": {
                                    "type": "integer"
                                  }
                                }
                              },
                              "name": {
                                "type": "string"
                              },
                              "pid": {
                                "type": "integer"
                              }
                            }
                          },
                          "broadcastAuth": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "x-examples": {
                    "Example": {
                      "instances": [
                        {
                          "address": "localhost",
                          "currentStatus": {
                            "connected": "true",
                            "lastHeartbeatTime": "16",
                            "local": "true"
                          },
                          "instanceRecord": {
                            "_id": "871f8be4-5fdb-45a8-868f-8d3e28a39148",
                            "_createdAt": "2024-05-22T11:14:11.845Z",
                            "_updatedAt": "2024-07-05T02:55:40.526Z",
                            "extraInformation": {
                              "host": "localhost",
                              "port": "3000",
                              "tcpPort": "46443",
                              "os": {
                                "type": "Linux",
                                "platform": "linux",
                                "arch": "x64",
                                "release": "5.10.165-143.735.amzn2.x86_64",
                                "uptime": "8455403.28",
                                "loadavg": [
                                  "0.41",
                                  "0.17",
                                  "0.15"
                                ],
                                "totalmem": "4110323712",
                                "freemem": "198479872",
                                "cpus": "2"
                              },
                              "nodeVersion": "v14.21.3",
                              "conns": "1"
                            },
                            "name": "rocket.chat",
                            "pid": "1"
                          },
                          "broadcastAuth": "true"
                        }
                      ],
                      "success": "true"
                    }
                  }
                },
                "examples": {
                  "Get Instances": {
                    "value": {
                      "instances": [
                        {
                          "address": "localhost",
                          "currentStatus": {
                            "connected": "true",
                            "lastHeartbeatTime": "16",
                            "local": "true"
                          },
                          "instanceRecord": {
                            "_id": "871f8be4-5fdb-45a8-868f-8d3e28a39148",
                            "_createdAt": "2024-05-22T11:14:11.845Z",
                            "_updatedAt": "2024-07-05T02:55:40.526Z",
                            "extraInformation": {
                              "host": "localhost",
                              "port": "3000",
                              "tcpPort": "46443",
                              "os": {
                                "type": "Linux",
                                "platform": "linux",
                                "arch": "x64",
                                "release": "5.10.165-143.735.amzn2.x86_64",
                                "uptime": "8455403.28",
                                "loadavg": [
                                  "0.41",
                                  "0.17",
                                  "0.15"
                                ],
                                "totalmem": "4110323712",
                                "freemem": "198479872",
                                "cpus": "2"
                              },
                              "nodeVersion": "v14.21.3",
                              "conns": "1"
                            },
                            "name": "rocket.chat",
                            "pid": "1"
                          },
                          "broadcastAuth": "true"
                        }
                      ],
                      "success": "true"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "tags": [
          "Instances"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/X-User-Id"
          },
          {
            "$ref": "#/components/parameters/X-Auth-Token"
          }
        ],
        "description": "Get the instances running for the workspace. Permission required: `view-statistics`"
      }
    }
  },
  "components": {
    "responses": {
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      },
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Permission Error": {
                "value": {
                  "success": "false",
                  "error": "User does not have the permissions required for this action [error-unauthorized]"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "X-User-Id": {
        "name": "X-User-Id",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "CkCPNctrgCDfmWLqC",
        "description": "The user ID."
      },
      "X-Auth-Token": {
        "name": "X-Auth-Token",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE",
        "description": "The authentication token."
      }
    }
  }
}
````

