---
title: "Get machine history"
method: POST
path: "/v1/machines/history"
tags: ["Industrial"]
---

# Get machine history

`POST /v1/machines/history`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/v1/machines/history`
- Auth: HTTP bearer

> 🚧 This endpoint is still on our legacy API.

Get historical data for machine objects. This method returns a set of historical data for all machines. 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

To use this endpoint, select **Write Industrial** under the Industrial category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

## Request body

- InlineObject3
  - `endMs` integer, required: End of the time range, specified in milliseconds UNIX time.
  - `startMs` integer, required: Beginning of the time range, specified in milliseconds UNIX time.

## Response `200`

List of machine results objects, each containing a time and a datapoint.

- V1MachineHistoryResponse: Contains the results for a machine history request
  - `machines` V1MachineHistoryResponseMachines[]
    - `id` integer: Machine ID
    - `name` string: Machine name
    - `vibrations` V1MachineHistoryResponseVibrations[]: List of vibration datapoints, with timestamp and vibration measurement for x/y/z axis in mm/s
      - `X` number, double
      - `Y` number, double
      - `Z` number, double
      - `time` integer

## Other responses

- `default`: Unexpected error.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
