Hello,
The endpoint ‚awork.com‘ currently doesn’t return a list of data when calling it, but rather HTML-Code looking like this.
Hi @mirco.koenig, what is the endpoint you’re using? This seems to be missing in your post. A cURL of your request or a trace id of the response header would help us here.
BTW, awork.com
is our website and app.awork.com
is the login page of the website. For the project data via the API, you need to use api.awork.com
.
Hi Sebastian,
the endpoint I am using is /retainerprojects (in full api,awork,com/api/v1/retainerprojects [I’m using , instead of . here to not turn it into a link]). Other Api-Calls I’m doing work without any issues.
(You can use ` to mark it as code so it shouldn’t turn it into a link)
That URL does not exist so it defaults to the web app. You can find the developer docs and available endpoints here: Projects | awork API | Documentation
We have not made the endpoints to work with retainer projects public yet as we’re planning a small iteration here. What are you planning on building with the endpoints? Maybe we can find some way to help.
Thank you for the info and offered help.
I’m trying to get the timebudgets for projects marked as retainers, not the sum of all timebudgets (like the field timeBudget in the projects-endpoint), but rather a list of all timebudgets or at least the timebudget from the current month.
Hi @mirco.koenig ,
currently the retainer endpoints are only internal and not available for external api clients as we were planning to do some improvements in the future but it shouldn’t really be a problem to make them available now.
You could already check out the endpoints in the network tab when using the awork app and opening a retainer project.
What info do you specifically need and are you planning on also creating/updating retainers via API or are you only interested in reading the retainer infos and current monthly budget?
Would be nice to know which info you need, then I can check if I can make those endpoints available.
Best wishes
Ian
Hi Ian,
right now I only need to read the list of the timebudgets from the retainers. Or the timebudget of the current month if that is easier.
Hi @mirco.koenig,
I added the GET endpoints for retainers in our developer docs and made them public. You can find them here: Endpoint to get all retainers for a project. | awork API | Documentation
A project usually has one retainer at a time with a start and end date and for each month one retainer budget is created automatically. The TimeBudget of the retainer itself is the default value per month. Each retainer budget also has a TimeBudget property which is the monthly budget in addition to any over-/underspent amount based on the carry-over options (please keep that in mind when summing up the retainer budgets).
The TrackedDuration of the retainer budgets keeps track of the already tracked duration. Please keep in mind that this is based on UTC dates and that non-billable times can be excluded if the project option DeductNonBillableHours is set to false.
If there are any questions, please let us know
Best wishes
Ian