Post

2 followers Follow
0
Avatar

Capacity hours via the API

Capacity hours are widely used in views and reports, see for example "resource load" and a report example here: https://success.clarizen.com/hc/en-us/articles/360034552233-Time-phased-Resource-Utilization-and-Financial-Reports?search=api+time+phase+data

Where is the capacity hours per user/employee made available in the API?

I'm looking for a way to get the capacity for each user on a daily or weekly basis to be able to compare it with time tracked in TimeSheets.

Karsten Answered

Official comment

Avatar

Hi Karsten,

It's only possible via the UI.

Best regards,

Roland

Roland Pumputis
Comment actions Permalink

Please sign in to leave a comment.

11 comments

0
Avatar

Hello Karsten,

I think you're looking for UCTimePhaseDaily.

I hope this helps.

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Hello Roland,

Thanks a lot. Yes, that's what I'm looking for.

I'm just getting started with the Clarizen data model and CZQL.

I have looked at metadata specification, and it all makes sense. But when I make a call to UCTimePhaseDaily it returns an empty object with no data. Please see screenshot. Am I missing some parameters that UCTimePhaseDaily requires before returning data? It doesn't seem to say so in the spec.

Thanks,

Karsten

Karsten 0 votes
Comment actions Permalink
1
Avatar

Hello Karsten,

This works in my demo environment: 

Are 8.7, 8.8 and 8.9 system settings enabled?

Thank you,

Roland

Roland Pumputis 1 vote
Comment actions Permalink
0
Avatar

Hi Roland, 

This has been very helpful, thank you!

I don't think I would have thought about changing those settings anytime soon.

Also, I understand that UCTimePhase is updated once every 24 hours, so when testing updates to the calendar the changes won't appear instantly in the API.

Thanks,

Karsten

Karsten 0 votes
Comment actions Permalink
0
Avatar

Hello Karsten,

Yes, UCTimePhase is updated once every 24 hours. It can be manually updated in the reports module as well.

I hope this answers your question.

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Hi Roland,

Your answers earlier was very instructive, thanks. I have been successful in using UCTimePhaseDaily on the sandbox environment and move the calls to also work with the prod environment at api2.clarizen.com.

A new issue has emerged, since I'm not able to move from sandbox to prod env. for the Timesheet-object.

Here is a simple query for externalID and Duration on the sandbox env and the result is as expected:

If I replicate this call and only change the url and api key, I get a response only listing IDs on the prod enviroment:

 

Looking at the dialogue here https://success.clarizen.com/hc/en-us/community/posts/360010199000-Permissions-for-API-user - it could seem to be a matter of permissions. But I have checked several times and the integration user generating the primary api key is Admin, liteadmin and have Financial permissions. And as mentioned, I have no issue in accessing other data across users like UCTimePhaseDaily.

Can you help with this?
Regards,

Karsten

Karsten 0 votes
Comment actions Permalink
0
Avatar

Hi Roland,

I managed to work out the problem: The api user had to be "superuser" as well in order to get the timesheet data.

So please ignore the question below as it has been resolved.

Thanks,

Karsten

Karsten 0 votes
Comment actions Permalink
0
Avatar

Hello Karsten,

Glad you found the solution. Thank you for the update!

Roland Pumputis 0 votes
Comment actions Permalink