Actuals - API endpoints
Rowan Savage avatar
Written by Rowan Savage
Updated over a week ago

POST /actuals/

Creates an 'actual' which is the total time spent on a project for a given date. This is always matched as project/person/role.


โ€‹Important notes:

  • the /actuals/ endpoint will overwrite any existing actual for the same project_id, person_id & role_id

  • The /actuals/ endpoint will auto fill 0 hours work for dates between two submitted actuals. For example, if you submit an actual for Monday and Friday. We will automatically insert 0 hours for Tuesday, Wednesday & Thursday. This can be overwritten at any time

  • The /actuals/ endpoint will auto fill 0 hours work for any days where assignments exists before the first submitted actual. For example, if someone had an assignment for Monday to Friday, and the first submitted actual was on Wednesday. We will automatically fill Monday and Tuesday with 0 hours. This can be overwritten at any time.

  • Please ensure there is a delay between each entry for the same person/project/role/date. Either wait for the response or add 100ms delay. You may receive a Too many requests error otherwise.

Tips:

  • If you have started adding actuals half-way through a project, and do not plan to fill in the history: Use the UI to create the first actual for each person/project/role. In that case we will not auto fill before this entry.

  • If there is not actual for a certain date, Runn will use the assigned hours in place of the actual. This is why we auto fill 0 for you when using the API. So that you do not need to add 0 for days that someone was not working.

POST /actuals/time_entry

Creates a time_entry that is added to an actual. This allow you to submit multiple entries for a single date/project/person/role and they will be added together in a single actual.

Important notes:

  • Please ensure there is a delay between each entry for the same person/project/role/date. Either wait for the response, or add 100ms delay.

  • We do not store these submissions, we simply add the time to the existing actual (or create a new actual where none exists)

  • You can not remove time through this endpoint. Instead you must update the existing actual with either the new total time, or with 0 and then re-submit the time entries.

  • Too many requests error occurs when you send multiple requests for the same person/project/role/date before we have finished writing the initial data to the database.

Did this answer your question?