📶 Get help choosing the right antenna for your IoT product! Join our webinar with Ignion on December 5th.

Blues Developers
What’s New
Resources
Accelerators
Fully documented reference applications
Blog
Technical articles for developers
Community
Community projects and resources
Terminal
Connect to a Notecard in your browser
Blues.ioNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our ForumContact Support
Button IconSign In
Sign In
Sign In
Docs Home
What’s New
Resources
Accelerators
Fully documented reference applications
Blog
Technical articles for developers
Community
Community projects and resources
Terminal
Connect to a Notecard in your browser
Blues.ioNotehub.io
Shop
Docs
API Reference
Glossary
System Notefiles
Notecard API
Introduction
card Requests
dfu Requests
env Requests
file Requests
hub Requests
note Requests
web Requests
Notehub API
API Introduction
Billing Account API
Device API
Environment Variable API
Event API
File API
Fleet API
Get FleetsCreate FleetUpdate FleetDelete FleetGet Fleets by DeviceGet Devices by FleetAdd Device to FleetsRemove Device from Fleets
Note API
Product API
Project API
Route API
Route Logs API
homechevron_rightDocschevron_rightAPI Referencechevron_rightNotehub APIchevron_rightFleet API - Notehub API Reference

Fleet API

The Notehub fleet API provides RESTful methods that can be used to GET, POST, PUT, and DELETE data related to fleets.

Get Fleets This request can be performed using the Notehub API.Notehub

Get an array of fleets associated with a ProjectUID.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID from a Notehub project.

curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
Response Members

uid

string

The globally-unique identifier of the fleet.

label

string

The user-defined label of the fleet.

created

string

The date and time the fleet was created.

Example Response
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}

Create Fleet This request can be performed using the Notehub API.Notehub

Create a new device fleet within a Notehub project.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID of a Notehub project.

label

string

The requested label for the fleet.

curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
    -d '{"label":"<label>"}'
Response Members

uid

string

The globally-unique identifier for the fleet.

label

string

The user-defined label of the fleet.

created

time stamp

The date/time the fleet was created.

Example Response
{
  "uid": "fleet:00000000-0000-0000-0000-000000000000",
  "label": "My Fleet Label",
  "created": "2021-10-12T16:21:54Z"
}

Update Fleet This request can be performed using the Notehub API.Notehub

Update the label of a device fleet.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID of a Notehub project.

fleetUID

string

The FleetUID of a Notehub device fleet.

label

string

The updated label for the fleet.

addDevices

array (optional)

A list of DeviceUIDs to add to the fleet.

removeDevices

array (optional)

A list of DeviceUIDs to remove from the fleet.

curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>'
    -H 'Authorization: Bearer <access_token>'
    -d '{"label":"<label>"}'
Response Members

uid

string

The globally-unique identifier for the fleet.

label

string

The user-defined label of the fleet.

created

time stamp

The date/time the fleet was created.

Example Response
{
  "uid": "fleet:00000000-0000-0000-0000-000000000000",
  "label": "My Fleet Label",
  "created": "2021-10-12T16:21:54Z"
}

Delete Fleet This request can be performed using the Notehub API.Notehub

Delete a device fleet.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID of a Notehub project.

fleetUID

string

The FleetUID of a Notehub device fleet.

curl -X DELETE
     -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>'
     -H 'Authorization: Bearer <access_token>'

Get Fleets by Device This request can be performed using the Notehub API.Notehub

Get an array of fleets associated with a device.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID from a Notehub project.

deviceUID

string

The globally-unique identifier of a device.

You may alternatively provide a device serial number by prefixing this argument with sn:, for example sn:my-device.

curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
Response Members

uid

string

The globally-unique identifier of the fleet.

label

string

The user-defined label of the fleet.

created

string

The date and time the fleet was created.

Example Response
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}

Get Devices by Fleet This request can be performed using the Notehub API.Notehub

Get an array of devices associated with a fleet.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID from a Notehub project.

fleetUID

string

The globally-unique identifier of a fleet.

curl -X GET
   -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>/devices'
   -H 'Authorization: Bearer <access_token>'
Response Members

uid

string

The globally-unique identifier of the device.

serial_number

string

The user-defined serial number of the device.

provisioned

string

The date and time this device was first provisioned, or put into use.

last_activity

string

The date and time this device was last seen by Notehub.

contact

object

Contact information for this device, specified via environment variables.

product_uid

string

The ProductUID this device is associated with.

fleet_uids

array

An array of globally-unique identifiers for the fleet(s) this device is associated with.

tower_info

object

An object containing data about the cellular tower last accessed by this device.

tower_info.mcc

int

The mobile country code of the cell tower.

tower_info.mnc

int

The mobile network code of the cell tower, which identifies the mobile operator.

tower_info.lac

int

The location area code of the cell tower, which is a unique identifier of the current location area.

tower_info.cell_id

int

The Cell ID or CID of the cell tower. This is a unique number used to identify each Base Transceiver Station (BTS) or sector of a BTS within a location area code.

tower_location

object

An object containing information about the physical location of the cell tower.

gps_location

object

An object containing information about the physical location of the device, based on GPS coordinates.

triangulated_location

object

An object containing information about the physical location of the device based on triangulated data calculated by multiple cell towers.

voltage

decimal

The most recent measure of the voltage from the onboard voltage monitor.

temperature

decimal

The most recent temperature measure in celsius from the onboard temperature sensor.

has_more

boolean

Defines whether or not there are additional devices beyond this list.

Example Response
{
   "devices":[
      {
         "uid":"dev:000000000000000",
         "serial_number":"",
         "provisioned":"2021-02-11T02:37:16Z",
         "last_activity":"2021-05-11T19:37:08Z",
         "contact":null,
         "product_uid":"product:com.your-company.your-name:project",
         "fleet_uids":"[fleet:00000000-0000-0000-0000-000000000000]",
         "tower_info":{
            "mcc":310,
            "mnc":410,
            "lac":12345,
            "cell_id":12345678
         },
         "tower_location":{
            "when":"2021-05-11T19:34:23Z",
            "name":"Cassville MO",
            "country":"US",
            "timezone":"America/Chicago",
            "latitude":36.665537500000006,
            "longitude":-93.850109375
         },
         "gps_location":{
            "same properties as tower_location"
         },
         "triangulated_location":{
            "same properties as tower_location"
         },
         "voltage":5.15,
         "temperature":23.75
      }
   ],
   "has_more":false
}

Add Device to Fleets This request can be performed using the Notehub API.Notehub

Add a device to one or more fleets.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID from a Notehub project.

deviceUID

string

The globally-unique identifier of a device.

You may alternatively provide a device serial number by prefixing this argument with sn:, for example sn:my-device.

fleet_uids

string

A comma-separated list of globally-unique FleetUIDs.

curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
    -d '{"fleet_uids":[<fleet_uids>]}'
Response Members

uid

string

The globally-unique identifier of the fleet.

label

string

The user-defined label of the fleet.

created

string

The date and time the fleet was created.

Example Response
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}

Remove Device from Fleets This request can be performed using the Notehub API.Notehub

Removes a device from one or more fleets.

Minimum Notehub project-level role required:

Arguments

access_token

string

A Notehub API bearer token.

projectUID

string

The ProjectUID from a Notehub project.

deviceUID

string

The globally-unique identifier of a device.

You may alternatively provide a device serial number by prefixing this argument with sn:, for example sn:my-device.

fleet_uids

string array

An array of globally-unique FleetUIDs.

curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
    -d '{"fleet_uids":[<fleet_uids>]}'
Response Members

uid

string

The globally-unique identifier of the fleet.

label

string

The user-defined label of the fleet.

created

string

The date and time the fleet was created.

Example Response
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}
File API Note API
Can we improve this page? Send us feedback
© 2023 Blues Inc.
© 2023 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up