Skip to main content
POST
/
v1
/
machines
/
history
Get machine history
curl --request POST \
  --url https://api.samsara.com/v1/machines/history \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "endMs": 1462881998034,
  "startMs": 1462878398034
}
'
{
  "machines": [
    {
      "id": 1,
      "name": "1/3 HP Motor",
      "vibrations": [
        {
          "X": 0.01,
          "Y": 1.23,
          "Z": 2.55,
          "time": 1453449599999
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Time range to query for events

endMs
integer
required

End of the time range, specified in milliseconds UNIX time.

Example:

1462881998034

startMs
integer
required

Beginning of the time range, specified in milliseconds UNIX time.

Example:

1462878398034

Response

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

Contains the results for a machine history request

machines
object[]