Open seanlane opened 6 years ago
Sean, I found your blog post. I'm using jrnl.com as well. I'm trying to move it to Day One. I feel like I'm ALMOST there. I have Insomnia downloaded. I think I've retrieved my API key. I think I'm doing something wrong. What option should I select in the auth section, and how can I be sure I have the right API Key? This is going to be huge for me. I have a large jrnl.com library.
@tyler611 You're right, you are very close! You don't need to have any AUTH selected here, because the authentication is being handled by the API key. In your browser, following the original instructions, you should see the Authorization
header visible within the Headers of the Request to the https://jrnl.com/api/v1/entry
endpoint. In Firefox, it looks something like this:
You can copy the contents of that Header, and insert them into a request within Insomnia under the Header section there, like so:
Then just hit the send button above that, and you should see your contents in the right-most pane. If you have more than 250 items, then you'll need to play around with their API to see how to get those. If you've made it this far, I think you'll be able to do that. Good luck!
Be sure to get the full contents of the value of that Authorization header too! It'll be much longer than that example you see above, so just be sure when copying and pasting. You can be sure it's the right key because it will be associated with your username, and you'll have been logged into the user for which you are scraping entries.
Thank you! I was also mistakenly trying to put part of this under "Query." Not Header. I also kept trying to put "ApiKey" where "Authorization" needed to be. I'm not too experienced with this side of things. Your reply helped a ton. It's working!
Now I will read up more on (possibly) extracting images, JSON files, and the formatting I need to pull this into Day One. You've just saved me so much time. I have nearly 1000 entries in jrnl.com. I can't thank you enough.
Glad to have helped; hope you can get everything out!
Comments for my blog post about extracting journal entries from jrnl.com: https://sean.lane.sh/posts/2018/08/Extracting-Entries-from-jrnl.com/