Expand my Community achievements bar.

Join us for our Coffee Break Sweepstakes on July 16th! Come ask your questions or share your use cases on Creative Briefs for a chance to win a piece of Workfront swag!

Budgeted Hours

Avatar

Level 2
Hi all! I'm trying to add Budgeted Hours to a project throught an API call but haven't found a way to handle the " BudgetedHour " object. Is it even possible to add Budgeted Hours to each role in a project via API? Has anyone had success with this? Thanks in advance! Marcelo Teixeira AgenciaClick Isobar
8 Replies

Avatar

Level 10
Hi Marcelo, Since that functionality is relatively new, it's possible that object has not yet been exposed through the API. @Vazgen Babayan is the Product Manager for that area and as such might be able to provide more details. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 10
Sorry, just saw the comment here. Budgeted Hours are exposed through API and metadata can be obtained through the following call: https://DOMAIN.my.workfront.com/attask/api/v10.0/bghr/metadata Vazgen Babayan Product Manager Workfront

Avatar

Level 2
Thanks for the help! But I think I'm missing something here... I've been through all the documentation and also explored the metadata but couldn't find the answers. I've tried using an API call (like this one https://DOMAIN.my.workfront.com/attask/api/v10.0/bghr/search?projectID=5bfeaaaf0097abd14f7a3663fda15... aiming to see the budgeted hours I had manually added to the project, and then I'd use a POST call to add additional budgeted hours. But instead I received list of options to make allocations. Maybe I'm calling the wrong object? Marcelo Teixeira Pauleti AgenciaClick Isobar

Avatar

Level 10
Excellent - thanks for confirming, Vazgen. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 10
The object has the following fields: GUID - all the budgeted hours for a user are stored in one string, which is then broken down by periods. GUID is the unique ID for that string. As such, there can be multiple results with the same GUID - those are representing budgeted hours for different time periods for the same user, project and role. allocationDate - the records are broken down by weeks. The allocation Date shows the first day of the week. If the week contains days from two months, it is split in two "weeks" with one containing the days from the previous month and the other - from the next. Since it is a calculated field and not stored like that in DB, it can't be used for search queries. budgetedHours - budgeted hours entered for a user. plannedBudgetedHours - budgeted hours entered on a role for that user projectID - the ID of the project where the budget is entered roleID - the ID of the role userID - the ID of the user In order to add budgeted hours project ID, role ID, user ID, allocation Date composition should be used in place of unique ID. For each project ID, role ID, user ID, allocation Date composition there are two values - Budgeted Hours (BDG) and Planned Budgeted Hours (PBDG). BDG corresponds to the budgeted hours set on a user. PBDG corresponds to the budgeted hours set on a role for that user POST: https://vazgenbabayan.preview.workfront.com/attask/api/v9.0/BGHR?apiKey=YOUR_API_KEY The following JSON should be put in the body of the request: [ { "allocationDate":"1519547650000", "projectID": "5a9668f5001380a6aa8628f2d41301e3", "roleID": "56327101000e3d6da52d43f514fd2fb3", "userID": "5672ac8f003318c106ac3e090c39f6f7", "budgetedHours":0, "plannedBudgetedHours": 100 } ] Vazgen Babayan Product Manager Workfront

Avatar

Level 4
Vazgen, is there any plans for referencing the Role object from budgeted hours object? For one of our integrations we need to access the role rate. The legacy approach allowed referencing the Role object. The new budgeted hours doesn't not appear to at the moment which makes it so I'll have to do a secondary lookup. Eric Decker

Avatar

Level 10
We will add references to the corresponding objects from BGHR object with the next public version of Workfront API. The changes are already available for api-unsupported You can modify the following call for your instance to get the updated metadata: https://vazgenbabayan.my.workfront.com/attask/api-unsupported/bghr/metadata Vazgen Babayan Product Manager Workfront

Avatar

Level 4
Thank you. This is great to hear. Eric Decker