# Get Tree Status

### Retrieve the status of all trees

> Code samples

```javascript

const headers = {
  'Accept':'application/json'
};

fetch('/tree/status',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

```

`GET /tree/status`

> Example responses

> 200 Response

```json
{
  "code": 0,
  "message": "string",
  "data": {
    "trees": [
      {
        "index": 0,
        "root_hash": "string",
        "height": 0,
        "version": 0
      }
    ]
  }
}
```

#### Responses <a href="#get__tree_status-responses" id="get__tree_status-responses"></a>

| Status | Meaning                                                 | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none        | Inline |

#### Response Schema <a href="#get__tree_status-responseschema" id="get__tree_status-responseschema"></a>

Status Code **200**

| Name           | Type           | Required | Restrictions | Description               |
| -------------- | -------------- | -------- | ------------ | ------------------------- |
| » code         | integer(int)   | false    | none         | Error code                |
| » message      | string(string) | false    | none         | Error message             |
| » data         | object         | false    | none         | Result data               |
| »» trees       | object         | false    | none         | List of all tree statuses |
| »»» index      | integer(int)   | false    | none         | Index of the tree         |
| »»» root\_hash | string(string) | false    | none         | Root hash of the tree     |
| »»» height     | integer(int64) | false    | none         | Height of the tree        |
| »»» version    | integer(int64) | false    | none         | Version of the tree       |
