Jump to content
NathanielH

API access to spaces and notebooks in spaces

Recommended Posts

Having recently joined Evernote as a member of a business, we have started collaborating primarily through Notebooks within Spaces. I'm trying to use the API to programmatically access these notebooks, but haven't found a way to enumerate them; I've tried the business example from https://dev.evernote.com/doc/articles/business.php, but the Notebooks from spaces are not showing up. Is there a guide or documentation on how to use spaces with the API?

 

Share this post


Link to post

I can see from inspecting HTTP requests with a web session evernote web that the API call I need might be named "listWorkspacesWithResultSpec", but I can't find any documentation or implementations of this API call.

Share this post


Link to post

I don't work on/with the API, but it looks to me like there might not be official support for this in the public API yet, although some workarounds look possible.

What exactly are you trying to do? Some options:

  1. Get all notebooks in the business
  2. Get all notebooks shared with a particular user (i.e. in their list of notebooks and/or spaces)
  3. All notebooks that they have permission to access (including notebooks they haven't added to their list)

Share this post


Link to post

As @rezecib says, the API calls for Spaces haven't been added to the public Evernote API.  Not sure if/when they will be.  But notebooks exist as primary elements in the Evernote store, independent of whether they are attached to a Space or not.  So you should be able to access notebooks via the API, but subject of course to access restrictions.

As @rezecib asks, what specifically are you wanting to do?  (Technically we're supposed to be having developer discussions in StackOverflow but I'll go with this thread until someone says otherwise.)

Share this post


Link to post

Hello,

Thanks for the responses. To start with, I'm trying to enumerate the notebooks available to me as a business user, so I guess option #3 that @rezecib outlined.

I'm unsure how to do this, and have tried listing shared and linked notebooks, but neither of these correspond to the full list of notebooks available in the business to me using the client or web API, and indeed list only a small fraction of them. I've attached the relevant portions of my current code, which as you can see is based on some of the example code available on the official site/GitHub code.

Very grateful for any assistance!

 

 

forumcut.py

Share this post


Link to post

@NathanielH I wasn't able to set aside enough time to get up and running with a token etc of my own, but I see there's a Thrift definition for listAccessibleBusinessNotebooks, which I believe is what you want.

Unfortunately the Python API isn't up-to-date with that, but it looks like it would just need to be automatically generated from the Thrift definitions. I'll poke around and see if I can make that happen. Meanwhile I see you've already done a little patching of the client yourself, so you could try to making the Python UserStore function for it.

Share this post


Link to post

@rezecib Thanks for this - I went ahead and copied the definition for listNotebooks and changed this around to call listAccessibleBusinessNotebooks; this seems to work and definitely lists more notebooks than I was able to see before. As I wrote this I was wondering why the lists were different, and I think I was getting confused due to being an admin of the business, which meant I could see a lot of notebooks that weren't showing up in that list as they hadn't been explicitly shared with me.

For the cases you described above, would #1 ("Get all notebooks in the business") be a different API call?

And to expand the topic slightly, is there a call like findNotesMetadata that works across all accessible/visible business content? Examples or a guide on how to handle API searches with business accounts would be appreciated also.

Thanks again for your help so far, much appreciated!

Share this post


Link to post

 

3 minutes ago, NathanielH said:

is there a call like findNotesMetadata that works across all accessible/visible business content?

findNotesMetadata should be able to do this if you set includeAllReadableNotebooks in the NoteFilter you pass to it.

4 minutes ago, NathanielH said:

For the cases you described above, would #1 ("Get all notebooks in the business") be a different API call?

The business vault user owns all published notebooks, so with their auth token (if you can get it?), listNotebooks should return those. If you want everything everything, I'm not sure if that's possible.

 

Share this post


Link to post

Thank you! Searching seems to work now, my failures with this before seemed to be also due to not having notebooks explicitly shared with me.

Bringing the official SDK up to date with calls like listAccessibleBusinessNotebooks and listWorkspacesWithResultSpec would certainly be appreciated; I would happily put in a formal feature request for this :)

I'll see if we can get a token for the vault user, but that's probably outside the scope of this thread... Again, thanks so much for your help!!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...