manodrum
manodrum

Reputation: 3

AtTask / Workfront entryDate filtering

I am following the API documentation. I am getting a collection of my team's updates successfully. Now I am trying to filter that request to only show updates posted in the past day, but I keep getting the following error:

{
"error":
    {"class":"com.attask.common.InvalidParameterException",
        "message":"Invalid Parameter: Search Parameter value \"updates:entryDate\"",
        "title":null,
        "msgKey":"exception.attask",
        "attributes":[""],
        "code":0
    }
}

I have tried against both version 2.0 and 4.0 of the API. Here is my GET request:

/attask/api/v4.0/team/search?id=xxxx&fields=updates%2C updates:enteredByName%2C updates:iconName%2C updates:iconPath%2C updates:entryDate&updates:entryDate=%24%24TODAY-1d&updates:entryDate_Range=%24%24TODAY&updates:entryDate_Mod=between

Also, I did look at this question and have tried flipping the entryDate and entryDate_Range values both ways with no luck: AtTask Modifiers

Upvotes: 0

Views: 968

Answers (1)

michael johnson
michael johnson

Reputation: 757

This is not possible directly from the API the reason being you are trying to performa search on the UPDATE Object while at the TEAM object. You could do this through multiple calls.

You would first perform the call you are using to get all updates for the team. Then using the Update IDS you could search at the Note level to filter out based on entry date as seen below.

/attask/api/note/search?ID={ID1,ID2,ID3,...}&ID_Mod=in&entryDate={firstDate}&entryDate_Range={secondDate}&entryDate_Mod=between&fields=noteText

full example

/attask/api/note/search?ID=54e3549a0023edd5ca0a6e00205df219,54e3533b0023b9813b02e6cca6e5a24a&ID_Mod=in&entryDate=2015-02-17T07:42:03:433-0700&entryDate_Range=2015-02-17T07:47:54:092-0700&entryDate_Mod=between&fields=noteText

Upvotes: 1

Related Questions