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. HTTP status 409 (Conflict) when attempting to update a work package via the API

HTTP status 409 (Conflict) when attempting to update a work package via the API

Added by Keith Brautigam about 6 years ago

When attempting to update a work package via the API sometimes I get HTTP status 409 (Conflict). It seems like OpenProject is keeping around locks on work packages longer than it needs to. Anyway any ideas as to what causes this and what can be done about it would be appreciated.

Thank you!


Replies (2)

RE: HTTP status 409 (Conflict) when attempting to update a work package via the API - Added by Oliver Günther about 6 years ago

Hi Keith,

you will only get 409 errors if the lockVersion in your update call is too old. It needs to match the current version of the work package in database (optimistic locking).

If you POST to the form before trying to patch, you will get the error message for lockVersion as well as the current up-to-date lockVersion from the _embedded.payload data.

Further references:

http://docs.openproject.org/apiv3-doc/#work-packages-work-package-patch

http://docs.openproject.org/apiv3-doc/#work-packages-work-package-edit-form-post

Best,

Oliver

RE: HTTP status 409 (Conflict) when attempting to update a work package via the API - Added by Keith Brautigam about 6 years ago

Hi Oliver,

That gave me enough info to fix it. Thank you!

Keith

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