Content
You are here:
Work Package PATCH API request returns 200, but no change made
Added by Ethan Rapp over 1 year ago
Hello,
I am setting up a Jenkins job/webhook that updates OP work packages once they're identified in our Repo commits.
I am having an issue where a PATCH API call to /api/v3/work_packages/ returns a 200 response, but the task does not change. If I copy the exact payload from my Jenkins script output, and place it in my /api/docs page to test it, it does do the change.
Here's an exact copy of the payload:
{
"id": 1896,
"lockVersion": 9,
"customField4": 807,
"_links": {
"status": {
"href": "/api/v3/statuses/9"
}
}
}
Before initiating the PATCH I have a request that gets the Lock Version value (I was getting 409 responses before that).
Can anyone tell me where I'm going wrong?
Running version: OpenProject 12.4.0
Replies (1)
Hi Ethan,
do you call /api/v3/work_packages/ or /api/v3/work_packages/{id}? If your payload works in /api/docs, I can only imagine that the ID is missing in the endpoint.