Official API for Gantt charts? /api/gantts

Hi,

I'm building a YoutTrack app that exports per-task Gantt data (start date, estimation, spent time…). I can't find an official API for it, so I'd like to confirm what's supported.

What I found :

  • The only working source is an undocumented REST endpoint:
     `GET /api/gantts/{id}?fields=members(startDate,estimation,spentTime,
     dependsOn(...),parent(...),issue(...))` → per-task data via `GanttMember`.

Questions:

  1. Is there an official/supported API (REST or workflow) for Gantt per-task scheduling?
  2. Are `/api/gantts` and `GanttMember` stable and safe to use in a published app, or internal and subject to change? 
  3. Why is the Gantt REST entity absent from the REST API reference?

Thanks!

0
2 comments

Hello! 
Stan from YouTrack Support here! 

Is there an official/supported API (REST or workflow) for Gantt per-task scheduling?

There's no official REST API for the Gantt chart itself, but you don't need one for the data you're after. Per-task values live on the issues and are fully available through the public Issues REST API:

  • Estimation and spent time come from the issue's time tracking.
  • The start date is read from the date custom field the chart is configured to use, like any other custom field value. If a chart isn't linked to a date field, its start dates are stored only on the chart and aren't exposed through the public API.
  • Parent and dependency relationships are issue links, returned in the issue's links field.

     

On the workflow side, there's a documented, supported Gantt entity in the JS workflow API: Gantt. Keep in mind that it works at the chart level (the set of issues on a chart, plus adding, removing, and checking issues) and runs server-side inside YouTrack, so it's suited to automation rather than exporting per-task data to an external system.

Are /api/gantts and GanttMember stable and safe to use in a published app, or internal and subject to change?

They're internal endpoints. /api/gantts and GanttMember aren't part of the public API, so we don't provide support for them, and they can change at any time without prior notice, including entity and field names. 

Why is the Gantt REST entity absent from the REST API reference?

The reference documents only the public, supported part of the API. The Gantt endpoints are internal at the time, so they are currently not included in the public documentation. 

Please don't hesitate to reach out anytime if you have any questions or need any help!

0

Thank you for your answer, it's much clearer now. 

0

Please sign in to leave a comment.