Access session information outside _session.qo

I have some code which adds a new note and syncs it to Notehub. This note includes some information about my device which I want to log.

I am also interested in logging some information about the session. Namely, I want to know the signal strength of my device when I log.

All of this information feels like it’s right at my finger tips. _session.qo has “bars” and then data.qo has my custom note information.

I want to route both pieces of information to a custom endpoint as a single POST request. It seems like this should be possible to do, but I can’t figure out how?

Here’s what I can do:

  • I can route _session.qo and data.qo as two separate POST requests and try to collect the information server-side.

  • I can access card.wireless.count on my device and write it into my note. Unfortunately, this would be the last-known signal strength. I’m in “minimum” sync mode so the session doesn’t get created until I try to sync my note and I need to write my note before I try to sync it. So, there’s a chicken-and-egg scenario with trying to log the current session information inside the note.

  • I can route just data.qo to my endpoint and then modify my endpoint so that it calls back to Notehub and queries for the session information. This achieves my goal, but feels circuitous.

I guess I was hoping for a way to include session information inside the request occurring within that session. There’s lots of other metadata included (cell carrier, etc.) but nothing about the signal strength.


Hi @Meo,

You’re never going to be able to get the “current” (effectively meaning “future”) signal strength on the Notecard itself (only the last completed sync) for the exact reasons you mention. Therefore, your processing of this data has to happen on the server. Personally I would choose to route both _session.qo and your data.qo, and combine the required data elements on the server.