🤔 Curious about the Notecard? Want to learn more about Blues Wireless? Join us at Getting Started with the Notecard on July 14th!

Search
Documentation Results
End of results
Community Results
End of results
Support
Blues.io
Notehub.io
Shop
Sign In
Search
Documentation Results
End of results
Community Results
End of results
Support
Blues.io
Notehub.io
Shop
×
HomeReference
Glossary
HardwareNotecard API
Introduction
card Requests
dfu Requests
env Requests
file Requests
hub Requests
note Requests
web Requests
Notehub API
API Introduction
Device API
Environment Variable API
Event API
File API
Fleet APIGet FleetsCreate FleetUpdate FleetDelete FleetGet Fleets by DeviceAdd Device to FleetsRemove Device from Fleets
Note API
Product API
Project API
Rate this page  
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★

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

Get an array of fleets associated with a ProjectUID.

Minimum Notehub project-level role required:

Arguments

authToken

string

A Notehub API authentication token.

projectUID

string

The ProjectUID from a Notehub project.

    curl -X GET
         -L 'https://api.notefile.net/v1/projects/{projectUID}/fleets'
         -H 'X-SESSION-TOKEN: {authToken}'
    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

    Create a new device fleet within a Notehub project.

    Minimum Notehub project-level role required:

    Arguments

    authToken

    string

    A Notehub API authentication 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 'X-SESSION-TOKEN: {authToken}'
           -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

      Update the label of a device fleet.

      Minimum Notehub project-level role required:

      Arguments

      authToken

      string

      A Notehub API authentication 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.

        curl -X PUT
             -L 'https://api.notefile.net/v1/projects/{projectUID}/fleets/{fleetUID}'
             -H 'X-SESSION-TOKEN: {authToken}'
             -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

        Delete a device fleet.

        Minimum Notehub project-level role required:

        Arguments

        authToken

        string

        A Notehub API authentication 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 'X-SESSION-TOKEN: {authToken}'

          Get Fleets by Device

          Get an array of fleets associated with a device.

          Minimum Notehub project-level role required:

          Arguments

          authToken

          string

          A Notehub API authentication token.

          projectUID

          string

          The ProjectUID from a Notehub project.

          deviceUID

          string

          The globally-unique identifier of a device.

            curl -X GET
                 -L 'https://api.notefile.net/v1/projects/{projectUID}/devices/{deviceUID}/fleets'
                 -H 'X-SESSION-TOKEN: {authToken}'
            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"
                }
              ]
            }

            Add Device to Fleets

            Add a device to one or more fleets.

            Minimum Notehub project-level role required:

            Arguments

            authToken

            string

            A Notehub API authentication token.

            projectUID

            string

            The ProjectUID from a Notehub project.

            deviceUID

            string

            The globally-unique identifier of a 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 'X-SESSION-TOKEN: {authToken}'
                   -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

              Removes a device from one or more fleets.

              Minimum Notehub project-level role required:

              Arguments

              authToken

              string

              A Notehub API authentication token.

              projectUID

              string

              The ProjectUID from a Notehub project.

              deviceUID

              string

              The globally-unique identifier of a 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 'X-SESSION-TOKEN: {authToken}'
                     -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 APINote API
                Can we improve this page? Send us feedbackRate this page
                • ★
                  ★
                • ★
                  ★
                • ★
                  ★
                • ★
                  ★
                • ★
                  ★
                © 2022 Blues Inc.Terms & ConditionsPrivacy
                blues.ioTwitterLinkedInGitHubHackster.io
                Disconnected
                Serial Disconnected
                Having trouble connecting?

                Try changing your Micro 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 NotecardClick 'Connect' and select a USB-connected Notecard to start issuing requests from the browser.