# Stats Management

Un ejemplo de cómo realizar un llamado a este endpoint desde el lado del cliente. Supongamos que el endpoint está en un servidor con la URL base `http://tu-servidor.com` y el endpoint específico es `/management/stats/endpoints`. Aquí tienes un ejemplo de cómo podrías hacer una solicitud HTTP a este endpoint utilizando JavaScript con `fetch` para obtener registros con paginación y filtrado por fecha:

#### Ejemplo de Llamada al Endpoint

**1. Sin Paginación ni Filtro de Fecha:**

```javascript
fetch('http://tu-servidor.com/management/stats/endpoints')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

**2. Con Paginación (Por ejemplo, limit = 10, offset = 0):**

```javascript
fetch('http://tu-servidor.com/management/stats/endpoints?limit=10&offset=0')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

**3. Con Filtro de Fecha (Por ejemplo, desde 2024-01-01 hasta 2024-01-31):**

```javascript
fetch('http://tu-servidor.com/management/stats/endpoints?startDate=2024-01-01&endDate=2024-01-31')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

**4. Con Paginación y Filtro de Fecha:**

```javascript
fetch('http://tu-servidor.com/management/stats/endpoints?limit=10&offset=0&startDate=2024-01-01&endDate=2024-01-31')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

#### Explicación:

* **Sin parámetros**: Obtiene todos los registros sin paginación ni filtro de fecha.
* **Con Paginación**: Limita los resultados a 10 registros, comenzando desde el primer registro.
* **Con Filtro de Fecha**: Obtiene registros que tienen una fecha entre el 1 de enero de 2024 y el 31 de enero de 2024.
* **Con Paginación y Filtro de Fecha**: Combina ambos, limitando los registros a 10 y filtrando por el rango de fechas especificado.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://agustin-fernandez.gitbook.io/monointegrator/primeros-pasos/stats-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
