i want to get tasks list created after particular time how to get

const asana = require(‘asana’);

const PERSONAL_ACCESS_TOKEN = ‘1/1199938211428584:32899a81b852588720d9642fac1dXXXX’

WORKSPACE_ID=“118562944727XXXX”

const client = asana.Client.create().useAccessToken(PERSONAL_ACCESS_TOKEN);
const data={completed_since : “2021-02-16T07:22:36.979Z”,modified_since :“2021-02-16T07:22:36.979Z”, opt_pretty: true}

    client.tasks.getTasks(WORKSPACE_ID,data)

.then((result) => {

    console.log(result,'result');

});

showing error invalid request how to do this …

I am not sure about your question? Your subject talks about tasks “list”, and you query “tasks”.

I suppose, that you need to query tasks created after a specific time.

The search API can help.

example

GET /workspaces/118562944727XXXX/tasks/search??created_at.after=2021-01-15T08:23:15Z

1 Like