Scaling an IoT deployment? Join our webinar on May 28th where we dive into real-world scaling pain points and how to overcome them.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
Docs Home
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
API Reference
Glossary
System Notefiles
Notecard API
Introduction
card Requests
dfu Requests
env Requests
file Requests
file.changesfile.changes.pendingfile.deletefile.stats
hub Requests
note Requests
ntn Requests
var Requests
web Requests
Notehub API
API Introduction
Authorization API
Billing Account API
Device API
Event API
Monitor API
Project API
Route API
homechevron_rightDocschevron_rightAPI Referencechevron_rightNotecard APIchevron_rightfile Requests - API Reference

file Requests

The file set of requests enable developers to work with all types of Notefiles.

The requests in this section are available on the Notecard API. Consult the Notehub Device API to manage inbound and DB Notefiles from Notehub.

Notecard Firmware Version:
7.x
Latest (9.x)8.x LTS7.x6.x LTS5.x4.x LTS3.x2.x LTS

file.changes CellCell+WiFiLoRaWiFi

Used to perform queries on a single or multiple files to determine if new Notes are available to read, or if there are unsynced Notes in local Notefiles.

Note: This request is a Notefile API request, only. .qo Notes in Notehub are automatically ingested and stored, or sent to applicable Routes.

Arguments

files

array of strings (optional)

One or more files to obtain change information from. Omit to return changes for all Notefiles.

tracker

string (optional)

ID of a change tracker to use to determine changes to Notefiles.

Change trackers are not supported on Notecard LoRa.

{
  "req": "file.changes",
  "tracker": "multi-file-tracker",
  "files": ["my-settings.db", "other-settings.db"]
}
J *req = NoteNewRequest("file.changes");
JAddStringToObject(req, "tracker", "multi-file-tracker");

J *files = JAddArrayToObject(req, "files");
JAddItemToArray(files, JCreateString("other-settings.db"));
JAddItemToArray(files, JCreateString("my-settings.db"));

NoteRequest(req);
req = {"req": "file.changes"}
req["tracker"] = "multi-file-tracker"
req["files"] = ["my-settings.db", "other-settings.db"]
rsp = card.Transaction(req)
Response Members

total

integer

The total of local Notes across all Notefiles. This includes Inbound Notes that have not been deleted, as well as outbound Notes that have yet to sync.

changes

integer

If a change tracker is used, the number of changes across all files.

info

JSON object

An object with a key for each Notefile that matched the request parameters, and value object with the changes and total for each file.

Example Response
{
  "changes": 5,
  "total": 5,
  "info": {
    "my-settings.db": { "changes": 3, "total": 3 },
    "other-settings.db": { "changes": 2, "total": 2 }
  }
}
More information:
  • Handling Inbound Notes
  • Using a Change Tracker Across Notefiles

file.changes.pending CellCell+WiFiLoRaWiFi

Returns info about file changes that are pending upload to Notehub.

Arguments
None
{
  "req": "file.changes.pending"
}
J *req = NoteNewRequest("file.changes.pending");

NoteRequest(req);
req = {"req": "file.changes.pending"}
rsp = card.Transaction(req)
Response Members

total

integer

The total of unsynced notes across all Notefiles.

changes

integer

The number of changes across all files.

pending

boolean

true if there are pending changes.

info

JSON object

An object with a key for each Notefile and value object with the changes and total for each file.

Example Response
{
  "total": 3,
  "changes": 3,
  "pending": true,
  "info": {
    "sensors.qo": { "changes": 3, "total": 3 }
  }
}

file.delete CellCell+WiFiLoRaWiFi

Deletes Notefiles and the Notes they contain.

Arguments

files

array of strings

One or more files to delete.

{
  "req": "file.delete",
  "files": ["my-settings.db", "other-settings.db"]
}
J *req = NoteNewRequest("file.delete");

J *files = JAddArrayToObject(req, "files");
JAddItemToArray(files, JCreateString("other-settings.db"));
JAddItemToArray(files, JCreateString("my-settings.db"));

NoteRequest(req);
req = {"req": "file.delete"}
req["files"] = ["my-settings.db", "other-settings.db"]
card.Transaction(req)
Response Members
None: an empty object {} means success.

file.stats CellCell+WiFiLoRaWiFi

Gets resource statistics about local Notefiles.

Arguments

file

string (optional)

Returns the stats for the specified Notefile only.

{
  "req": "file.stats"
}
J *req = NoteNewRequest("file.stats");

NoteRequest(req);
req = {"req": "file.stats"}
rsp = card.Transaction(req)
Response Members

total

integer

The total number of Notes across all Notefiles.

changes

integer

The number of Notes across all Notefiles pending sync.

sync

boolean

true if a sync is recommended based on the number of pending notes.

Example Response
{
  "total":   83,
  "changes": 78,
  "sync":    true
}
env Requests hub Requests
Can we improve this page? Send us feedback
© 2025 Blues Inc.
© 2025 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