Read custom columns of Task from Microsoft project file with Aspose.Tasks REST API

When I get the list of tasks, I want to get all column data, but currently get only name, start, finish and duration.
Is it possible to get custom columns?

@paul1122

Thanks for your inquiry. You can use the GetTask API to get complete details of a specific task of a project. Hopefully it will help you to accomplish your requirement.

I am reopening this discussion because I am trying to extract from the mpp file also the predecessor information to store it together with name, start, finish and duration.
With the GetTask API I can get the predecesso of a single task. Is there an endpoint where I can get this information for all the tasks? I am looking only at the predecessor

@leliofa ,
please check GetTaskLinks endpoint:

Hi Vasiliy,
I tried what you suggested but I think I cannot understand the results. getTasks will return me for example:
{
“link”: {
“href”: “/0”,
“rel”: “self”,
“type”: null,
“title”: null
},
“uid”: 0,
“id”: 0,
“name”: “Project Plan v3.0”,
“start”: “2024-03-19T13:00:00.000Z”,
“finish”: “2024-10-07T22:00:00.000Z”,
“duration”: “48.08:00:00”
},
{
“link”: {
“href”: “/1”,
“rel”: “self”,
“type”: null,
“title”: null
},
“uid”: 1,
“id”: 1,
“name”: “Prepare”,
“start”: “2024-03-19T13:00:00.000Z”,
“finish”: “2024-05-06T22:00:00.000Z”,
“duration”: “11.16:00:00”
},
{
“link”: {
“href”: “/36”,
“rel”: “self”,
“type”: null,
“title”: null
},
“uid”: 36,
“id”: 2,
“name”: “Preliminary activities”,
“start”: “2024-03-19T13:00:00.000Z”,
“finish”: “2024-04-05T22:00:00.000Z”,
“duration”: “4.16:00:00”
},
UID 1 is successor of UID 0 and UID 36 is successor of UID 1.
But getTaskLinks shows:
{
“link”: {
“href”: “/taskLinks/1”,
“rel”: “self”,
“type”: null,
“title”: null
},
“index”: 1,
“predecessorUid”: 23,
“successorUid”: 24,
“linkType”: “FinishToStart”,
“lag”: 0,
“lagFormat”: “Day”
},
that I read as: UID 1 has UID 23 as a predecessor and UID 24 as a successor. What am I missing?

@leliofa

Yes, there is a task link with UID = 1 betweenTask with UID=23 as a predecessor and Task with UID 24 as a successor.

This seems wrong.

I found out what the issue is. The Links endpoint will return the link between tasks in the Gantt. So predecessor and successor are the two ends of the link.
The get task endpoint returns the predecessor and successor in terms of Parent Task and Children Tasks that is what I am looking for. But I have to call get task endpoint for each row in my Gantt. Any chance I can find this info somewhere in a single call? My goal is to recreate the hierarchy as in the MPP.

@leliofa ,
looks like I was confused by ‘predecessor’ term.
In MS Project ‘successor’ and ‘predecessor’ denote two ends (tasks) of a task link.

When talking about tasks hierarchy, usually refer to “parent-child” or “task-subtasks” relationship.

If you want to retrieve parent and child task relationships, you can use GetTask API and examine “subtasksUids” property.

There is no API to get all parent-child relationships in one call.