> For the complete documentation index, see [llms.txt](https://sheita.gitbook.io/sysmonitoring/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sheita.gitbook.io/sysmonitoring/api/memory.md).

# /memory

#### `/api/memory`

### Overview

The `/api/memory` endpoint returns the current memory usage of the system in the form of a JSON response.

### Endpoint

```bash
GET /api/memory
```

### Example

```js
fetch('/api/memory')
  .then(response => response.json())
  .then(data => {
    console.log(`Memory Usage: ${data.memoryUsage}%`);
  });
```

### Response

The response will return a JSON object containing the `memoryUsage` value:

```json
{
  "memoryUsage": "72.35"
}
```

### Description

* **`/api/memory`** provides the current memory usage as a percentage of active memory.
* It uses the `getMemoryUsage()` function internally to fetch the data.
* The result is returned as a floating-point number with two decimal places, representing the percentage of memory used.
