Fleet logo
Menu An icon indicating that interacting with this button will open the navigation menu.
Fleet logo An 'X' icon indicating that this can be interacted with to close the navigation menu.

Solutions

a small chevron
Device management

Device management

Remotely manage, and protect laptops and mobile devices.

Orchestration

Orchestration

Automate tasks across devices, from app installs to scripts.

Software management

Software management

Inventory, patch, and manage installed software.

Extend Fleet

Extend Fleet

Integrate your favorite tools with Fleet.


Customers

a small chevron
Stripe + Fleet

Stripe + Fleet

Stripe consolidates multiple tools with Fleet.

Foursquare + Fleet

Foursquare + Fleet

Foursquare quickly migrates to Fleet for device management.

What people are saying

What people are saying

Stories from the Fleet community.


Pricing

More

a small chevron
Docs

Docs

Guides

Guides

Support

Support

News

News

Get your license

Get your license

The handbook

The handbook

Fleet @ Meow Wolf

Kick off JNUC with Fleet at Meow Wolf Denver's Convergence Station.

Join us
Get a demo Try it yourself
Solutions A small chevron
Device management

Device management

Remotely manage, and protect laptops and mobile devices.

Orchestration

Orchestration

Automate tasks across devices, from app installs to scripts.

Software management

Software management

Inventory, patch, and manage installed software.

Extend Fleet

Extend Fleet

Integrate your favorite tools with Fleet.

Customers A small chevron
Stripe + Fleet

Stripe + Fleet

Stripe consolidates multiple tools with Fleet.

Foursquare + Fleet

Foursquare + Fleet

Foursquare quickly migrates to Fleet for device management.

What people are saying

What people are saying

Stories from the Fleet community.

Pricing
More A small chevron
Docs

Docs

Guides

Guides

Support

Support

News

News

Get your license

Get your license

The handbook

The handbook

Fleet @ Meow Wolf

Kick off JNUC with Fleet at Meow Wolf Denver's Convergence Station.

Join us
Try it yourself Get a demo
{{categoryFriendlyName}}/
{{thisPage.meta.articleTitle}}
search

Building an effective dashboard with Fleet's REST API, Flask, and Plotly: A step-by-step guide

{{articleSubtitle}}

| The author's GitHub profile picture

Dave Herder

Share

Share this article on Hacker News Share this article on LinkedIn Share this article on Twitter

On this page

{{topic.title}}
Docs Docs REST API REST API Guides Guides Get a demoGet a demo
Suggest an editSuggest an edit

Try it out

See what Fleet can do

Start now
macOS Windows Linux

Building an effective dashboard with Fleet's REST API, Flask, and Plotly: A step-by-step guide

{{articleSubtitle}}

| The author's GitHub profile picture

Dave Herder

Building an effective dashboard with Fleet's REST API, Flask, and Plotly: A step-by-step guide

Building an effective dashboard with Fleet's REST API, Flask, and Plotly: A step-by-step guide

Background

Everything you can do in the Fleet UI, you can do via the Fleet REST API. Sometimes, though, you just want to do more. What is a concrete use case that we can use in order to exercise the usage of the Fleet REST API? In the past, we’ve explored connecting to the Fleet REST API via Tines workflows. How about another example, but this time, let’s work on a dashboard!

There are several commercially available data visualization solutions on the market, but instead of focusing on any one particular solution, this article intends to show how easy it is to connect to the Fleet API and collect telemetry data for the purpose of data visualization. To that end, we will use open-source elements to accomplish this goal.

The core of the code and concepts covered in this article originate from https://realpython.com/python-dash/. Essentially, with the content from this nice article, we can make small adjustments to the code to allow for styling differences as well as data source changes. Even though avocados are great and they taste yummy on toast, we care about host data from Fleet more.

Tech stack

Fleet API (of course, this is our data source)

Flask (python web application framework)

Plotly and Dash (open source (MIT licensed) graphing library)

Prerequisites and base setup

  • Local macOS dev workstation
  • Python installed
  • Git repository

Local environment setup

When developing web apps with Python, it helps to configure a virtual environment to load the libraries and dependencies required for our little dashboard. In order to get your local environment set up check out this article.

What are we going to do?

  • Create a Flask application with data from a single Fleet REST API endpoint
  • Use Dash core components and HTML components
  • Use callbacks to interactively filter the online/offline status of hosts

The juicy bits

After you have cloned the repo above, there are some dependencies that you will have to install in your local Python environment. To do this, run the following at your terminal:

(venv) % pip install requests json pandas plotly dash datetime numpy

After the required dependencies are installed, navigate to the directory where you have cloned the sample “fleetdash” repo. If everything goes as expected, running the following will launch the Flask app:

(venv) % python3 ./fleetdash.py

The app should launch as follows:

(venv) % python3 ./fleetdash.py

Dash is running on http://127.0.0.1:8050/

* Serving Flask app ‘fleetdash’
* Debug mode: on

When you navigate to http://127.0.0.1:8050/ in a browser, you should see something like the following:

Example Dashboard

What can we do next?

  • What other endpoints can we leverage? Maybe list all Software?
  • Add some authentication on the Flask app.
  • Deploy the Flask app to AWS or Heroku.
  • Explore other open-source dashboarding solutions. Maybe via Grafana?

Want more examples?

Here’s a cool example of using the Fleet API with Okta Workflows.

Summary

Hopefully, this article sparked your interest in the Fleet REST API and potential use cases around leveraging the API for different use cases. If you would like to contribute to the dashboarding sample code, please feel free to submit a PR! Or if you just want to say hi 👋 or compare notes you can find me as @dherder in the osquery or MacAdmins Slack.

Fleet logo
Multi platform Device management Orchestration Software management Integrations Pricing
Documentation Support Docs API Release notes Get your license
Company About News Jobs Logos/artwork Why open source?
ISO 27001 coming soon a small checkmarkSOC2 Type 2 Creative Commons Licence CC BY-SA 4.0
© 2025 Fleet Inc. Privacy
Slack logo GitHub logo LinkedIn logo X (Twitter) logo Youtube logo Mastadon logo
Tried Fleet yet?

Get started with Fleet

Start
continue
×