Follow
Accessing Allocation Information for a Project via the API

You can use a URL call to access the allocation information for a project that is available when scheduling resources in Workfront. (For more information about user allocations, see "Managing User Allocations.")

Accessing allocation information in this way enables you to get information about the number of hours planned over a time period based on a specific user, role, or team. This information is helpful when budgeting for a project or validating forecasted revenue.

NOTE Allocation information is not currently available in the API layer; rather, this information is accessible as an API call via the browser URL. In a future release, allocation information will be accessible via the API layer.

Requesting Information 

The information returned in your request depends upon the criteria you specify in the request. Some criteria is required.

Before requesting information as described in the following sections, you must first log in to the Workfront site via your browser. 

Required Criteria

You must include the following criteria in your request:

Protocol and Workfront IP Address: Specify the protocol (http://) followed by the IP address of your Workfront instance. 

For example:

https://domain.my.workfront.com/contourData

Project (Required): Specify a specific project for which you want to receive information.

In the following example URL, the project information is bolded and the URL is segmented for easier readability:

https://domain.my.workfront.com/contourData?
projectID=594befbd00003bb93e21c2556cc538d1&
rangeStartDate=2017-06-21T00:00:00-06:00&
rangeEndDate=2017-07-06T23:59:59-06:00&
userID=5935957b00003ad144e2a60c7fa89e65

Date range (Required): Specify a date range that represents the time period for which you want information to include.

In the following example URL, the date range is bolded and the URL is segmented for easier readability::

https://domain.my.workfront.com/contourData?
projectID=594befbd00003bb93e21c2556cc538d1&
rangeStartDate=2017-06-21T00:00:00-06:00&
rangeEndDate=2017-07-06T23:59:59-06:00
&
userID=5935957b00003ad144e2a60c7fa89e65

Optional Criteria

You can choose to refine your request by specifying either a user, role, or team. You can choose only one of the following options. If you choose not to refine your search by any of the following options, the request returns a summary for the entire project within the specified date range.

User (Optional): Specify the User ID for the user whose allocation information you want returned. Allocation information is returned only for tasks that the user that you specify is assigned to.

In the following example URL, the user information is bolded and the URL is segmented for easier readability:

https://domain.my.workfront.com/contourData?
projectID=594befbd00003bb93e21c2556cc538d1&
rangeStartDate=2017-06-21T00:00:00-06:00&
rangeEndDate=2017-07-06T23:59:59-06:00&
userID=5935957b00003ad144e2a60c7fa89e65

To access a user's User ID:

  1. Navigate to the profile page of the user whose ID you want to access.
    The User ID is located as the last portion of the URL.

Role (Optional): Specify the specific role for which you want allocation information to be returned. Allocation information is returned only for tasks assigned to the role that you specify.
Only those tasks that are assigned only to a role are returned in the request. Tasks that are assigned to a role and to a user are not returned.

In the following example URL, the role information is bolded and the URL is segmented for easier readability:

https://domain.my.workfront.com/contourData?
projectID=594befbd00003bb93e21c2556cc538d1&
rangeStartDate=2017-06-21T00:00:00-06:00&
rangeEndDate=2017-07-06T23:59:59-06:00&
roleID=555d05780007b29a77c08f2fad28f0c4

To access the Role ID:

  1. Navigate to the Job Roles page in the Setup area.
  2. Create a custom view that includes the Role ID field.
  3. On the Job Roles page, select the new custom view from the Views drop-down menu.
    The Role ID of each job role is displayed in the Role ID column.
    jobrole_id.png

Team (Optional): Specify the specific team for which you want allocation information to be returned. Allocation information is returned only for the team you specify.  

In the following example URL, the team information is bolded and the URL is segmented for easier readability:

https://domain.my.workfront.com/contourData?
projectID=594befbd00003bb93e21c2556cc538d1&
rangeStartDate=2017-06-21T00:00:00-06:00&
rangeEndDate=2017-07-06T23:59:59-06:00&
teamID=55a7caa4000659cf9d56ed9464b9ca91

To access the Team ID:

  1. In the People area, click the Team tab, then select the team whose ID you want to access from the drop-down menu. 
    The Team ID is located as the last portion of the URL. 

Example Request

https://domain.my.workfront.com/contourData?projectID=594befbd00003bb93e21c2556cc538d1&rangeStartDate=2017-06-21T00:00:00-06:00&rangeEndDate=2017-07-06T23:59:59-06:00&userID=5935957b00003ad144e2a60c7fa89e65

Understanding What Information Is Returned

When you request allocation information for a project, the following information is returned:

Total Cost: The total cost returned based on the criteria of the request

Total Hours: The total hours returned based on the criteria of the request.

For example:

{"data":{"totalHours":43.0,"totalCost":641.00}}

 

Need to have a full license type (what does this mean? System admin?) 

If a task is built by User Hourly, and it only has a Role assignment, it will not pull in those hours.