Content
Can't patch a workPackage via API - OpenProject 5.0.4 (Mysql2)
Hi, I’m trying to patch a WorkPackage, adding a relation to it.
Even if I run /api/v3/relations/schema/follows, as written on documentation, I get a 404.
As "documented in the API:http://docs.openproject.org/apiv3-doc/#work-packages-relations-post, you POST to POST/api/v3/work_packages/<WP ID>/relations using the following body:
{
"_links":
{
"from": { "href": "/api/v3/work_packages/<WP ID>" },
"to": { "href": "/api/v3/work_packages/<To ID>" }
}
"type": "precedes",
"description": "Relation description, optional."
}
This would create a precedes relation for your current WP, which is identical to creating a follows relation for the <To ID>.
Hi, thank you for the quick response, but I get a 500 response code,
while if I run, as an example:
https://openproject.sunto.reply.it/api/v3/projects/24/work_packages?offset=1&pageSize=500&filters=[{customField14,
I get the expected response.
Hi Danilo,
what does the log output?
Also judging from your title, you are using OpenProject 5.0.4? Please note that the examples shown are for the stable version 7.2.x.
Best,
Oliver
Hi,
I’m not able to retrieve the log right now.
Yes, I do use 5.0.4 version. Can you point me the correct documentation, so that I can find some kind of workaround achieve the same behaviour?
Thank you