How to get project hours?

Using the API, I want to obtain the project hours (the amount of time spent
in total), this is so I can create some graphs based on budget and going

So, querying a project seems to contain no information on the time spent on
the project…
I tried querying tasks related to that project but that also doesn’t bring
any time spent on the project…, which is weird as on FA website there is
“Billed Hours”, “Unbilled Hours”, “Unbillable Hours” but this is not in the
json return?

I can see that “timeslips” brings the information that I might need, but it
doesnt seem you can fetch timeslips related to a specific project?

The end result, I want to just get the total time spent on a project,
doesnt matter who by just the figure that In see in the “Summary” tab.

Is this possible?

I just
which seems its not possible, is there any work around? I can cache results.