Summary

Learn how to set up our API. We have an API service that, when a token is generated, an authorized third party can pull data from our API. This is typically done in cases where someone is trying to ingest raw datapoints collected in Samsara to their own platform/program/reporting.

We have some cases where some users want to push (or post) data via API to our systems so that they can add data from some third-party service/hardware into our system. This requires additional API data licenses on our end. The end result is that you will be able to create Data Inputs that are based off API data. Talk with your Samsara Account Executive for pricing and more details.

Full API Documentation

https://www.samsara.com/api

 List of Unique APIs

Asset Management

  • List all assets

  • Create an asset

  • Delete an existing asset

  • Update an asset

GET Industrial Data

  • List most recent data points for data inputs

  • Follow a real-time feed of data points for data inputs

  • List historical data points for data inputs

Data Input Management

  • List all data inputs

POST Industrial Data

  • Ingest data points

    • separate license, talk with your Samsara representative

API Introduction

APIs allow other programs to communicate with our Samsara dashboards which means automation, integration, and improved efficiency! See below to go through the steps to set it up. Samsara administrators can utilize the Samsara API to customize control and monitoring of their Samsara products and data outside of their cloud.samsara.com environment. 

Initial API Set-Up: Endpoints related to Industrial can be discovered here. It is recommended to have experience with REST APIs and review our documentation before setting up your API solution. Please work with your developer to help set up your API with this documentation.

This guide will briefly cover an example Industrial API call using Postman.

 Requirements:

  • API Tokens with appropriate permissions

  • Knowledge of developer API protocols. Resources available at developers.samsara.com

  • Platform or program to interface with API calls

    • API functionality can be tested from a CLI interface (ex. Bash, terminal, etc)

    • A recommended program for extended API testing and implementation is Postman. Available to download for free here.

Test with Postman

  • Upon opening Postman, navigate to New > Request. Feel free to name this call and add it to a Collection (project directory).

  • Click Send to test out your endpoint and access token. When data is available, a JSON should be received with information from this endpoint.

Set up API Outputs

  1. Go to Settings → I/O → New Output

  2. Fill in the Output information for REST API type

Helpful API Resources