Top Menu

Jump to content
    Global modules

    Global modules

    • Home
    • Projects
    • Activity
    • Work packages
    • Gantt charts
    • Calendars
    • Team planners
    • Boards
    • News
    Home
    Home
Help
    Getting started
    • Introduction video
  • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support
  • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation

User menu

Sign in
Forgot your password?

or sign in with your existing account

OpenProject ID Google

Side Menu

Collapse project menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Expand project menu
General discussion
  1. OpenProject Community
  2. OpenProject
  3. Forums
  4. General discussion
  5. Work Package PATCH API request returns 200, but no change made

Work Package PATCH API request returns 200, but no change made

Added by Ethan Rapp over 2 years 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)

RE: Work Package PATCH API request returns 200, but no change made - Added by Jan H about 2 years ago

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.

  • (1 - 1/1)
Loading...