# Get latest state for all machines (or a specific machine) (/docs/api-reference/monitoring/MonitoringController_getLatestMachineStates)

`GET /api/factories/{factoryId}/monitoring/machine-states/latest`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory ID |
| `machineId` | query | no | string | Filter by machine ID |

## Responses

### 200: Latest machine states