Post

3 followers Follow
0
Avatar

Get assigned work per day from API

Hi all,

I'm trying to get the assigned work per user per day from the API. The image shows a table from Clarizen's Project->Project Planning page Resources table. This is basically what I need, but for all project instead of one.

I've been looking at WorkItem, Timesheet and WorkByDay but while I get results  I can't get the results shown in the table above even after specifying specific User and Project, so I must be getting something else.

 

This is the query that I thought would be right but it returns only one result which is not one of the dates in the table:

SELECT ExternalId,EntityType,ResourceLink.Resource.Name,Date,DurationInDaysInt,WorkAtDay
FROM WorkByDay
WHERE ResourceLink IN (
SELECT id FROM ResourceLink
WHERE Resource IN (
SELECT id FROM User
WHERE Name = 'NAME'
)
)

 

What would I need to query to get the green box's data? 

Thanks!

Marijn Craenen Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hello Marijn,

If I remember correctly, I don't think you'll get the data in the exact format you see in the Resource Planning screen, but DurationInDaysInt and WorkAtDay should give you enough information to extrapolate that.

I hope this helps.

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Roland,

I'm after similar information to Marijn. The WorkByDay object does not appear in the tree under Settings->Configuration but Marijn's query works on our instance. Where do I find the field list and description for this object? Also, the results from DurationInDaysInt and WorkAtDay depend on the details of the Resource's calendar. What's the recommended way of extracting the workings hours/days from a resource's calendar via the API in order to compute the integrated Work assigned over the duration?

thanks,

Ian

Ian Price 0 votes
Comment actions Permalink