Jump to content

API access to spaces and notebooks in spaces


NathanielH

Recommended Posts

Posted

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?

 

Posted

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.

Posted

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)
  • Level 5*
Posted

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.)

Posted

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

Posted

@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.

Posted

@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!

Posted

 

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.

 

Posted

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!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...