Expand my Community achievements bar.

Got questions about Workfront Governance? Join our upcoming Ask Me Anything session on February 12th!

API Report filter

Avatar

Level 10

Hello. I've quickly skimmed the community to see if there's already a similar question to mine and didn't find any. I have a few reports with a filtered date. I want to be able to change those dates via API. The reports have a filterID, so I get to the filter but there's nothing there that refers to the content of the filter. Any idea how I can change filter dates for reports via API?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi Polly,

I believe you'd need to use the filterID to locate the appropriate UIFilter entry, then modify its definition (e.g. by replacing the hard-coded date range contained within).

Regards,

Doug

Avatar

Level 10

Hi @Doug Den Hoed‚ ,

I did use the filterID to get what filter data I can get through the API. Here's an example of all fields of what I've picked from the specific filterID. I'm not seeing definition when I try &fields=* on the browser to check.

ID"id_redacted"

name"_filter"

objCode"UIFT"

appGlobalIDnull

customerID"custid_redacted"

displayName"_filter"

enteredByID"id_redacted"

filterType"REPORT"

globalUIKey"uikey_redacted"

isAppGlobalEditablefalseisPublicfalseisReporttrueisSavedSearchfalseisTextfalse

msgKeynullobjID"redacted"

objObjCode"CUST"

preferenceID"redacted"

securityRootID"redacted"

securityRootObjCode"PTLSEC"

uiObjCode"HOUR"

Avatar

Community Advisor

Buckle up Polly,

Log in to Workfront, then (after replacing [yourdomain]) enter this into the URL:

https://[yourdomain].my.workfront.com/attask/api-unsupported/uiview/metadata

By doing so, notice that:

  • you're using api-unsupported, which
  • allows you to see the uiview object, which
  • includes a "definition" property, which
  • is noted as LAZY_READ, which
  • means you must explicitly "ask" for it (i.e. fields=* is Not Enough)

Welcome to api-unsupported (aka The Dark Side).

Regards,

Doug

Avatar

Level 10

LOL. I should've been more persistent and just try to get it out by typing fields=definition... I had been too trusting with the *.

Thanks @Doug Den Hoed‚ for the advice and the laugh.