API Questions & Updates?

I wasn’t sure where to post this — I hope it’s OK!

I’ve been using the RescueTime API to work on syncing the time I log with my offline time tracker (Session, great app!) with my Focus Time. However, I don’t see any options in the API documentation to get a certain day’s Focus Time. Is there an endpoint to get a certain day’s Focus Time/how is it calculated?

In addition, adding Offline Work! Is there a way to add Offline Work without a certain start time, like the way you are able to in the app? Also, if I use the API to add Offline Work (let’s say from 12:00 to 13:00), and RescueTime logs productive Focus Time work from 12:00 to 12:30, will my Focus Time go up by an hour, or only by 30 minutes?

How are other people using API? Any interesting features you’ve discovered?

1 Like

@mark

I was going to take a stab at answering this, but I think I should let an expert handle it!

Hello,

The answer to this depends on which version of the app you are using. Based on what you are saying, it sounds like you are using the classic version of the app. However, if you mean the days “Focus work” time, then that would mean you are on the current version. Right now our data APIs have not been enhanced to document how this information can be retrieved, but the capability is in the system for getting Focus work time-- we will hopefully publish information on how to use it once our next round of features are released.

With regard to offline work: in classic, offline work was fixed to a precise time of day. In our new version it is only associated with the date, even those the resulting record reports a time, it will always be midnight. The API for this is also not published yet, sorry. Separately, to answer your question about total time counting, in the current version of the product, offline time is considered completely orthogonal to automatically logged time. So it would be possible to report more time than there was actually possible, if misused.

People have done a number of interesting things with the data if you google around, some incorporating other aggregators like Gyroscope, Zapier, and IFTTT. Amusingly one person developed an electro shock wrist band that shocked you if you got too distracted. We don’t recommend that!

Regards,
Mark

Thanks so much for your email! I found a bit of a workaround that seems to be working — I might have to add in that shock band, though!

Basically, I use an app called Session to do pomodoro sessions with multiple categories and such. Some of the time it’s offline work (reading, writing by hand) and other times it’s online and already tracked by RescueTime (note taking in Obsidian, typing, etc.) I figured out how to access and post to the API through Apple’s Shortcuts app, which Session has compatibility with — so at the end of each session I’m able to access the “old” offline time system, and add in the specific time segment. I’m also able to trigger Focus Work sessions so websites can be blocked!

It’s far from perfect, but it’s mostly due to my very imperfect implementation and the severely buggy Shortcuts app…

I’m looking forward to seeing all of the new features coming down the line! Data aggregation and tracking is a dangerous addiction… I love it!

Spencer

1 Like