Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • 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
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

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

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. 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 about 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 almost 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...