← Back to team overview

dhis2-devs team mailing list archive

[Bug 1618147] Re: Web API PATCH not working


Hi Jim

Would it be possible for you to move over to the new endpoints for
PATCH? that means using /api/type/ID directly, and not /api/type/ID
/prop-name? the old endpoint was just needed as we had very very basic
PATCH support to start with.. now that we support it a bit better (it
still have some issues) the recommended approach is using PATCH
/api/type/ID instead

You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.

  Web API PATCH not working

Status in DHIS:

Bug description:
  I can't get Web API PATCH to work in 2.24 they way I can in 2.21. The
  following commands do not change the names of the referenced
  dataElement or dataSet:

  curl -X PATCH -d '{"name": "New Name"}' -H "Content-Type:
  application/json" -u admin:district

  curl -X PATCH -d '{"name": "New Name"}' -H "Content-Type:
  application/json" -u admin:district

  As can be seen by these GETs:

  curl -u admin:district

  curl -u admin:district

  The same kind of syntax on a local 2.21 system works fine (without the

  This is following up a problem reported to me in 2.23, so please
  backport if appropriate. Also please check to see if this should be
  backported to 2.22.

To manage notifications about this bug go to: