Search tasks that include active project within Project Insight.
curl -X GET --header 'Accept: application/json' 'http://yourdomain.com/api/task/search?includeActiveProjects=true'
Alternatively, you can use the task 'search' method in order to narrow and filter your results for retrieving specific tasks.
curl -X GET --header 'Accept: application/json' 'http://yourdomain.com/api/task/search?includeActiveProjects=true&projectList=b01ecae1-c012-450a-a8ed-dd23d29c6da5&keywords=process'
If you're working with JavaScript within Project Insight, you can use jQuery and make Ajax requests.
var settings = { "async": true, "crossDomain": true, "url": "{YOUR_DOMAIN_URL}/api/task/project/fb8989ebb84d4b9f825bfe412bfa6021", "method": "GET", "headers": { "api-token": "{YOUR_API_TOKEN}", "cache-control": "no-cache", } } $.ajax(settings).done(function (response) { console.log(response); });
Comments
1 comment
A specific question on tasks was to extract each person's Work Status when separately tracking individual resource Work Status. To get the raw data for a single project, start with this example and expand from there.
https://[URL]/api/project/[project-id]?modelproperties=tasks;task:taskresources;taskresource:WorkPercentCompleteType
You could replace WorkPercentCompleteType with simply WorkPercentComplete for retrieving the percentage as opposed to the Work Status label.
Please sign in to leave a comment.