😌 Learn How to Simplify Host Firmware Updates with the Notecard on February 2nd !

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
Hardware
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 APIGet Environment VariablesSet Environment VariablesDelete Environment VariableGet Environment Variables by FleetSet Environment Variables by FleetDelete Environment Variable by FleetGet Environment Variables by DeviceSet Environment Variables by DeviceDelete Environment Variable by Device
Event API
File API
Fleet API
Note API
Product API
Project API
Route API
Rate this page  
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
Can we improve this page? Send us feedbackRate this page
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
© 2023 Blues Inc.Terms & ConditionsPrivacy
blues.ioTwitterLinkedInGitHubHackster.io
Disconnected
Notecard 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 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

Environment Variable API

The Notehub environment variable API provides RESTful methods that can be used to GET, PUT, and DELETE data related to environment variables.

Get Environment Variables

Get all project-level environment variables by 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>/environment_variables'
         -H 'X-SESSION-TOKEN: <authToken>'
    Response Members

    environment_variables

    object

    JSON object containing environment variables in "key":"value" format.

    Example Response
    {
      "environment_variables": {
        "project_humidity": "33.4",
        "project_temp": "24.1"
      }
    }

    Set Environment Variables

    Set project-level environment variables by ProjectUID.

    Minimum Notehub project-level role required:

    Arguments

    authToken

    string

    A Notehub API authentication token.

    projectUID

    string

    The ProjectUID from a Notehub project.

    env_vars

    object

    A JSON object containing the key/value pair(s) of environment variable(s) to add. For example: {"key1":"value1","key2":"value2"}.

      curl -X PUT
           -L 'https://api.notefile.net/v1/projects/<projectUID>/environment_variables'
           -H 'X-SESSION-TOKEN: <authToken>'
           -d '{"environment_variables":<env_vars>}'
      Response Members

      environment_variables

      object

      JSON object containing environment variables in "key":"value" format.

      Example Response
      {
        "environment_variables": {
          "project_humidity": "33.4",
          "project_temp": "24.1"
        }
      }

      Delete Environment Variable

      Delete a project-level environment variable by ProjectUID and environment variable key.

      Minimum Notehub project-level role required:

      Arguments

      authToken

      string

      A Notehub API authentication token.

      projectUID

      string

      The ProjectUID from a Notehub project.

      key

      string

      The key from the key/value pair of the environment variable to be deleted.

        curl -X DELETE
             -L 'https://api.notefile.net/v1/projects/<projectUID>/environment_variables/<key>'
             -H 'X-SESSION-TOKEN: <authToken>'
        Response Members

        environment_variables

        object

        JSON object containing environment variables in "key":"value" format.

        Example Response
        {
          "environment_variables": {
            "project_humidity": "33.4",
            "project_temp": "24.1"
          }
        }

        Get Environment Variables by Fleet

        Get all fleet-level environment variables by ProjectUID and FleetUID.

        Minimum Notehub project-level role required:

        Arguments

        authToken

        string

        A Notehub API authentication token.

        projectUID

        string

        The ProjectUID from a Notehub project.

        fleetUID

        string

        The FleetUID of a Notehub device fleet.

          curl -X GET
               -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>/environment_variables'
               -H 'X-SESSION-TOKEN: <authToken>'
          Response Members

          environment_variables

          object

          JSON object containing environment variables in "key":"value" format.

          Example Response
          {
            "environment_variables": {
              "fleet_humidity": "33.4",
              "fleet_temp": "24.1"
            }
          }

          Set Environment Variables by Fleet

          Set fleet-level environment variables by ProjectUID and FleetUID.

          Minimum Notehub project-level role required:

          Arguments

          authToken

          string

          A Notehub API authentication token.

          projectUID

          string

          The ProjectUID from a Notehub project.

          fleetUID

          string

          The FleetUID of a Notehub device fleet.

          env_vars

          object

          A JSON object containing the key/value pair(s) of environment variable(s) to be added to the fleet. For example: {"key1":"value1","key2":"value2"}.

            curl -X PUT
                 -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>/environment_variables'
                 -H 'X-SESSION-TOKEN: <authToken>'
                 -d '{"environment_variables":<env_vars>}'
            Response Members

            environment_variables

            object

            JSON object containing environment variables in "key":"value" format.

            Example Response
            {
              "environment_variables": {
                "fleet_humidity": "33.4",
                "fleet_temp": "24.1"
              }
            }

            Delete Environment Variable by Fleet

            Delete a fleet-level environment variable on a Notehub project by ProjectUID, FleetUID, and environment variable key.

            Minimum Notehub project-level role required:

            Arguments

            authToken

            string

            A Notehub API authentication token.

            projectUID

            string

            The ProjectUID from a Notehub project.

            fleetUID

            string

            The FleetUID of a Notehub device fleet.

            key

            string

            The key from the key/value pair of the environment variable to be deleted.

              curl -X DELETE
                   -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>/environment_variables/<key>'
                   -H 'X-SESSION-TOKEN: <authToken>'
              Response Members

              environment_variables

              object

              JSON object containing environment variables in "key":"value" format.

              Example Response
              {
                "environment_variables": {
                  "fleet_humidity": "33.4",
                  "fleet_temp": "24.1"
                }
              }

              Get Environment Variables by Device

              Get all device-level environment variables by ProjectUID and DeviceUID.

              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 DeviceUID of a Notehub device.

              It can also accept a serial number by prefixing the serial number with sn:. Please note that the serial number must be URL encoded.

                curl -X GET
                     -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/environment_variables'
                     -H 'X-SESSION-TOKEN: <authToken>'
                Response Members

                environment_variables

                object

                JSON object containing device-level environment variables in "key":"value" format.

                environment_variables_env_default

                object

                JSON object containing any default environment variables in "key":"value" format.

                Example Response
                {
                  "environment_variables": {
                    "_tags": "",
                    "device_humidity": "55.9",
                    "device_temp": "79.0"
                  },
                  "environment_variables_env_default": {}
                }

                Set Environment Variables by Device

                Set device-level environment variables by ProjectUID and DeviceUID.

                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 DeviceUID of a Notehub device.

                It can also accept a serial number by prefixing the serial number with sn:. Please note that the serial number must be URL encoded.

                env_vars

                object

                A JSON object containing the key/value pair(s) of environment variable(s) to be added. For example: {"key1":"value1","key2":"value2"}.

                  curl -X PUT
                       -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/environment_variables'
                       -H 'X-SESSION-TOKEN: <authToken>'
                       -d '{"environment_variables":<env_vars>}'
                  Response Members

                  environment_variables

                  object

                  JSON object containing environment variables in "key":"value" format.

                  Example Response
                  {
                    "environment_variables": {
                      "_tags": "",
                      "device_humidity": "55.9",
                      "device_temp": "79.0"
                    }
                  }

                  Delete Environment Variable by Device

                  Delete an environment variable by ProjectUID, DeviceUID, and environment variable key.

                  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 DeviceUID of a Notehub device.

                  It can also accept a serial number by prefixing the serial number with sn:. Please note that the serial number must be URL encoded.

                  key

                  string

                  The key from the key/value pair of the environment variable to be deleted.

                    curl -X DELETE
                         -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/environment_variables/<key>'
                         -H 'X-SESSION-TOKEN: <authToken>'
                    Response Members

                    environment_variables

                    object

                    JSON object containing environment variables in "key":"value" format.

                    Example Response
                    {
                      "environment_variables": {
                        "_tags": "",
                        "device_humidity": "55.9",
                        "device_temp": "79.0"
                      }
                    }
                    Device APIEvent API