Skip to content

Overview

Globe Tracker utilizes the Flowcore CLI for data access and management. This guide will help you set up and start using the CLI tool.

Prerequisite: You need a GitHub account to sign up for Flowcore. If you do not have one, please create a GitHub account first at github.com/join.

To use the Flowcore CLI or API, you need an account on flowcore.io. The account is free to use. You can sign up directly on the website. Access to Globe Tracker data must be granted by Globe Tracker—contact your Globe Tracker representative to request access. Example data is open, but your own data requires explicit access.

Install the Flowcore CLI using npm:

Terminal window
npm install -g @flowcore/cli

For more details, see the official CLI install guide.

  1. Log in to get your access token:
Terminal window
flowcore login
  1. Follow the interactive prompts to complete authentication

The primary way to retrieve data is using the flowcore stream command. Below is an example for retrieving asset creation events from the example data:

Terminal window
flowcore stream https://flowcore.io/globe-tracker-aps/example-data/asset.0/created.0.stream --no-live -s first --json --payload

The output will be:

Terminal window
{"whenCreated":"2017-06-13T14:38:07.842Z","whenUpdated":"2017-06-13T14:39:03.751Z","assetTags":"REEFER,TK","ownerId":"c29a854d-b98f-4ecc-ad18-ecfb91025067","id":"3f16d4c6-adeb-45e5-a539-4f989ce612ed","name":"ASSET-80049"}
{"whenCreated":"2015-01-27T13:27:58.437Z","whenUpdated":"2015-01-29T12:41:42.830Z","assetTags":"REEFER,TK,MP4000,MP4000","ownerId":"c29a854d-b98f-4ecc-ad18-ecfb91025067","id":"89249552-160e-45c0-91e7-ca0c8eb173c0","name":"STRU581950-8"}
{"whenCreated":"2017-06-13T14:39:52.635Z","whenUpdated":"2020-08-13T00:10:04.125Z","assetTags":"REEFER,CARRIER","ownerId":"c29a854d-b98f-4ecc-ad18-ecfb91025067","id":"85e5ae99-f722-4633-b40e-48eeff445008","name":"ASSET-80050"}

Replace the stream URL and options as needed for your use case.

For full usage details and advanced options, see the official Flowcore CLI documentation.

Note: To access your own or Globe Tracker-specific data, your account must be granted access by Globe Tracker.

You can set these environment variables to avoid passing them as command-line arguments:

Terminal window
export FLOWCORE_TENANT=globe-tracker-aps
export FLOWCORE_OUTPUT_FORMAT=json