Added by Eric Fischer 3 days ago
I am trying to import time_entries from a third party system to OpenProject.
The request body:
{
"comment": "Logging time",
"startTime": "2025-10-13T14:45:00.000Z",
"endTime": "2025-10-13T16:00:00.000Z",
"_links": {
"project": { "href": "/api/v3/projects/3" },
"entity": { "href": "/api/v3/projects/3/work_packages/56" },
"user": { "href": "/api/v3/users/194" }
},
"spentOn": "2025-10-13",
"createdAt": "2025-12-12T19:20:28.059Z",
"updatedAt": "2025-12-12T19:20:28.059Z"
}
I think I followed the docs here: https://www.openproject.org/docs/api/endpoints/time-entries/
But I am only getting a non helping error:
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:InternalServerError",
"message": "An internal error has occurred.undefined method 'end_time=' for an instance of #<Class:0x00007f7c59e199c0>"
}
Does somebody have an explanation what is wrong?
Thanks in advance.
Replies (1)
Made some progress. Do not set the
endTimebut setstartTimeandhours.Also, do not set
createdAtandupdatedAtsince they are read only.However, now I am getting
{ "_type": "Error", "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation", "message": "Logged for can't be blank.", "_embedded": { "details": { "attribute": "entity" } } }and I am stuck again...