Jump to content

Accessing tasks via API


Go to solution Solved by agsteele,

Recommended Posts

Hi,

I would like to access tasks via API as I have some use cases that could help my day-to-day work, for example, seeing all tasks within a notebook stock, presenting it on a calendar view etc.

It doesnt appear based on the documentationt that tasks have been exposed via API.

Can someone confirm?

Link to comment
  • Evernote Expert
  • Solution

You are correct the API hasn't been updated to include tasks, or any of the new features.

I think the best guess is that this won't happen until v10 developments are more complete.

  • Like 1
Link to comment
  • 7 months later...

There's always the internal APIs, you can just copy as fetch over to chrome snippets add your .then()'s (or async await) and your logic... I do this all the time on tons of different sites. 

These requests seem pretty self explanatory, the IDs look just like UUIDs that are probably generated client side on create (I didn't see any requests before this one)


Create Task: 

fetch("https://api.evernote.com/command/v1/batch", {
  "headers": {
    "authorization": "Bearer <Check one of your requests for this>",
    "content-type": "application/json",
    "en-client": "ion",
    "ion-version": "10.56.9(350)",
    "x-conduit-version": "1.68.4",
    "x-feature-version": "4",
    "x-mono-authn-token": ""
  },
  "referrer": "https://www.evernote.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"id\":\"b5788131-a7ef-47e3-875c-eedf63171b59\",\"mutations\":[{\"id\":\"b8e1d79e-e015-0e8a-865a-507b8afe0cd9\",\"name\":\"taskCreate\",\"guids\":{\"Task\":[[\"50q7a1ot61kxgnyoult6sopa1ebsnicuq\",\"b6935bb4-6c08-a0ea-6159-84b74de154a3\",166349549]]},\"params\":{\"container\":\"32192cbe-7cae-3924-348f-d20a036eb7d5\",\"label\":\"Test API PK123\",\"taskGroupNoteLevelID\":\"48123de2-62c0-486c-8095-11093f8c74c5\",\"dueDate\":null,\"timeZone\":\"America/Los_Angeles\",\"dueDateUIOption\":\"date_only\",\"flag\":false,\"sortWeight\":\"ZYYYYYYYYYYYYYM\",\"status\":\"open\",\"sourceOfChange\":\"TASK_KINGDOM\",\"repeatAfterCompletion\":null,\"noteLevelID\":\"7c12ce6e-c722-4a72-8bfa-945396956016\",\"taskFlag\":1,\"featureVersion\":[0,1,0]},\"isRetry\":false,\"timestamp\":1683601015276,\"metadata\":{\"Note\":[{\"entityID\":\"32192cbe-7cae-3924-348f-d20a036eb7d5\",\"ownerID\":<redacted>,\"shardID\":668,\"generatedID\":null,\"parentRef\":null}],\"Task\":[{\"entityID\":\"b6935bb4-6c08-a0ea-6159-84b74de154a3\",\"ownerID\":<redacted>,\"shardID\":668,\"generatedID\":{\"seed\":\"50q7a1ot61kxgnyoult6sopa1ebsnicuq\",\"id\":\"b6935bb4-6c08-a0ea-6159-84b74de154a3\"},\"parentRef\":null}]}}],\"timestamp\":1683601016236,\"clientID\":\"null\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

 

Update Task:

fetch("https://api.evernote.com/command/v1/batch", {
  "headers": {
    "authorization": "Bearer <Check one of your requests for this>",
    "content-type": "application/json",
    "en-client": "ion",
    "ion-version": "10.56.9(350)",
    "x-conduit-version": "1.68.4",
    "x-feature-version": "4",
    "x-mono-authn-token": ""
  },
  "referrer": "https://www.evernote.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"id\":\"66495335-852b-41a8-86a7-26abee372a1d\",\"mutations\":[{\"id\":\"af2db678-b60a-e4f2-fa4a-e8abbc0a3a2c\",\"name\":\"taskUpdate\",\"guids\":{},\"params\":{\"task\":\"b6935bb4-6c08-a0ea-6159-84b74de154a3\",\"label\":\"Test API PK123 abcd\",\"dueDate\":null,\"timeZone\":\"America/Los_Angeles\",\"dueDateUIOption\":\"date_only\",\"flag\":false,\"sortWeight\":\"ZYYYYYYYYYYYYYM\",\"status\":\"open\",\"sourceOfChange\":\"TASK_KINGDOM\",\"recurrence\":null,\"repeatAfterCompletion\":null,\"forceDeleteAllOutliers\":false,\"taskFlag\":1},\"isRetry\":false,\"timestamp\":1683601487978,\"metadata\":{}}],\"timestamp\":1683601491668,\"clientID\":\"null\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

 

 So I need to create 30 tasks... should I take the time to automate this 😅 ...maybe it could become a youtube video 🤷‍♂️

  • Like 1
  • Thanks 1
Link to comment
4 hours ago, Trones said:

There's always the internal APIs, you can just copy as fetch over to chrome snippets add your .then()'s (or async await) and your logic... I do this all the time on tons of different sites. 

These requests seem pretty self explanatory, the IDs look just like UUIDs that are probably generated client side on create (I didn't see any requests before this one)


Create Task: 

fetch("https://api.evernote.com/command/v1/batch", {
  "headers": {
    "authorization": "Bearer <Check one of your requests for this>",
    "content-type": "application/json",
    "en-client": "ion",
    "ion-version": "10.56.9(350)",
    "x-conduit-version": "1.68.4",
    "x-feature-version": "4",
    "x-mono-authn-token": ""
  },
  "referrer": "https://www.evernote.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"id\":\"b5788131-a7ef-47e3-875c-eedf63171b59\",\"mutations\":[{\"id\":\"b8e1d79e-e015-0e8a-865a-507b8afe0cd9\",\"name\":\"taskCreate\",\"guids\":{\"Task\":[[\"50q7a1ot61kxgnyoult6sopa1ebsnicuq\",\"b6935bb4-6c08-a0ea-6159-84b74de154a3\",166349549]]},\"params\":{\"container\":\"32192cbe-7cae-3924-348f-d20a036eb7d5\",\"label\":\"Test API PK123\",\"taskGroupNoteLevelID\":\"48123de2-62c0-486c-8095-11093f8c74c5\",\"dueDate\":null,\"timeZone\":\"America/Los_Angeles\",\"dueDateUIOption\":\"date_only\",\"flag\":false,\"sortWeight\":\"ZYYYYYYYYYYYYYM\",\"status\":\"open\",\"sourceOfChange\":\"TASK_KINGDOM\",\"repeatAfterCompletion\":null,\"noteLevelID\":\"7c12ce6e-c722-4a72-8bfa-945396956016\",\"taskFlag\":1,\"featureVersion\":[0,1,0]},\"isRetry\":false,\"timestamp\":1683601015276,\"metadata\":{\"Note\":[{\"entityID\":\"32192cbe-7cae-3924-348f-d20a036eb7d5\",\"ownerID\":<redacted>,\"shardID\":668,\"generatedID\":null,\"parentRef\":null}],\"Task\":[{\"entityID\":\"b6935bb4-6c08-a0ea-6159-84b74de154a3\",\"ownerID\":<redacted>,\"shardID\":668,\"generatedID\":{\"seed\":\"50q7a1ot61kxgnyoult6sopa1ebsnicuq\",\"id\":\"b6935bb4-6c08-a0ea-6159-84b74de154a3\"},\"parentRef\":null}]}}],\"timestamp\":1683601016236,\"clientID\":\"null\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

 

Update Task:

fetch("https://api.evernote.com/command/v1/batch", {
  "headers": {
    "authorization": "Bearer <Check one of your requests for this>",
    "content-type": "application/json",
    "en-client": "ion",
    "ion-version": "10.56.9(350)",
    "x-conduit-version": "1.68.4",
    "x-feature-version": "4",
    "x-mono-authn-token": ""
  },
  "referrer": "https://www.evernote.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"id\":\"66495335-852b-41a8-86a7-26abee372a1d\",\"mutations\":[{\"id\":\"af2db678-b60a-e4f2-fa4a-e8abbc0a3a2c\",\"name\":\"taskUpdate\",\"guids\":{},\"params\":{\"task\":\"b6935bb4-6c08-a0ea-6159-84b74de154a3\",\"label\":\"Test API PK123 abcd\",\"dueDate\":null,\"timeZone\":\"America/Los_Angeles\",\"dueDateUIOption\":\"date_only\",\"flag\":false,\"sortWeight\":\"ZYYYYYYYYYYYYYM\",\"status\":\"open\",\"sourceOfChange\":\"TASK_KINGDOM\",\"recurrence\":null,\"repeatAfterCompletion\":null,\"forceDeleteAllOutliers\":false,\"taskFlag\":1},\"isRetry\":false,\"timestamp\":1683601487978,\"metadata\":{}}],\"timestamp\":1683601491668,\"clientID\":\"null\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

 

 So I need to create 30 tasks... should I take the time to automate this 😅 ...maybe it could become a youtube video 🤷‍♂️

Interesting thrift alternative for simple scripting. Is the REST api published somewhere?

Link to comment

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