Jump to content
  • 2

App limited to no more than 128 note metadata using Evernote API with developer token


mybanez

Idea

Posted

Hello folks,

I´m experiencing a weird problem with a personal application that creates some reports using content from my Evernote account. Until a month ago, everything was fine, but all of a sudden, the calls to findNotesMetadata just don't return more than 128 items, even tough the notebooks i´m processing have more than a thousand notes. I developed Java and Python versions of the app, and both are facing the same issue. I really don´t have a clue about what is going on. The apps uses a developer token for the production server, so i generated a new token, but the problem persist. Does anyone has ever faced something like this?

Here is my code. The "DEBUG LINE" print these lines. The API correctly informs that there are 1132 notes, but returns only the first 128. 

100/100/1132
28/128/1132
0/128/1132

    public static void main(String[] args) {
        try {
            EvernoteAuth evernoteAuth = new EvernoteAuth(EvernoteService.PRODUCTION, AUTH_TOKEN_PROD);
            ClientFactory factory = new ClientFactory(evernoteAuth);
            UserStoreClient userStore = factory.createUserStoreClient();
            if (!userStore.checkVersion("CEVN", Constants.EDAM_VERSION_MAJOR, Constants.EDAM_VERSION_MINOR)) {
                throw new Exception("Invalid protocol version");
            }
            NoteStoreClient noteStoreClient = factory.createNoteStoreClient();
            List<NoteMetadata> lsMtds = new ArrayList<NoteMetadata>();
            int offset = 0;
            NotesMetadataList lsMtdsPag;
            NoteFilter filter = new NoteFilter();
            filter.setOrder(NoteSortOrder.TITLE.getValue());
            filter.setAscending(true);
            filter.setWords("stack:\"4. Referências\""); // STACK WITH MORE THAN 1000 NOTES
            NotesMetadataResultSpec resultSpec = new NotesMetadataResultSpec();
            resultSpec.setIncludeTitle(true);
            do {
                lsMtdsPag = noteStoreClient.findNotesMetadata(filter, offset, 100, resultSpec);
                lsMtds.addAll(lsMtdsPag.getNotes());
                for (NoteMetadata mtd : lsMtdsPag.getNotes()) {
                    System.out.println(mtd.getTitle());
                }
                offset += lsMtdsPag.getNotesSize();
                System.out.println(lsMtdsPag.getNotesSize()+"/"+offset+"/"+lsMtdsPag.getTotalNotes()); // DEBUG LINE
            } while (lsMtdsPag.getTotalNotes() > offset && lsMtdsPag.getNotesSize() > 0);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }    
 

9 replies to this idea

Recommended Posts

  • 1
  • Level 5
Posted

We had something looking similar on the client themselves: Some Searches only delivered 128 hits, and then stopped. This was later corrected. Probably they had some limit imposed to avoid a runaway loop.

To get this resolved I think you need to contact tech support directly - I doubt users in the forum can help you out.

  • Like 1
  • 1
Posted
Em 04/11/2021 at 18:45, PinkElephant disse:

We had something looking similar on the client themselves: Some Searches only delivered 128 hits, and then stopped. This was later corrected. Probably they had some limit imposed to avoid a runaway loop.

To get this resolved I think you need to contact tech support directly - I doubt users in the forum can help you out.

Hi... i created another account, obtained the developer token... and the problem still there! If i don´t set the "words" property of the filter, it works, returning more than 128 notes. If i define the "notebookGuid" field, it works also. But if i define the notebook or stack name as search criteria, it fails. I started thinking that Evernote API is just broken.

  • 1
Posted
Em 30/11/2021 at 16:33, eric99 disse:

 

Hi, I'm considering to write some scripts for personal use, but before delving into the API I wonder whether it is stable (and performant) again. What's your experience today with the java and python API? Thanks

Hi Eric. What i can say about my experience is that i've had to implement a workaround in my application because the search queries just stopped working via API, at least for me. I don't use it anymore, but instead i use the notebook guid to load any note. I tried the Evernote support, but all questions they did to me were related to if i was having any problem with the Evernote clients, which i wasn't. So i thought it was simpler to just change my application. Other than that, everything is ok with Java and Python APIs.

  • Like 2
  • 0
Posted
1 hora atrás, PinkElephant disse:

As I said, talk to support.

I already did this. Thanks for your comments.

  • 0
  • Level 5
Posted

I have no problem to help, but this is beyond my reach, and probably beyond those of most forum participants. I don’t remember another thread that would go as deep into the API workings as this one.

So sorting it out with support is probably your best chance to sort out the limiting issue bugging your access.

  • Thanks 1
  • 0
Posted
On 11/3/2021 at 11:04 PM, mybanez said:

 

 

On 11/6/2021 at 9:02 PM, mybanez said:

Hi... i created another account, obtained the developer token... and the problem still there! If i don´t set the "words" property of the filter, it works, returning more than 128 notes. If i define the "notebookGuid" field, it works also. But if i define the notebook or stack name as search criteria, it fails. I started thinking that Evernote API is just broken.

Hi, I'm considering to write some scripts for personal use, but before delving into the API I wonder whether it is stable (and performant) again. What's your experience today with the java and python API? Thanks

  • 0
Posted

Same issue here. Word grammer search limiting 128 note on free account. What would be the alternative ? 

 

    offset = 0
    max_notes = 150
    updated_filter = NoteFilter(order=NoteSortOrder.UPDATED,
                                ascending=False, 
                                words='sourceURL:*')

It only returns 128 notes out of 173 notes.

 

What is workaround here ?

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