You're right. As you can see in my first example, I did a PATCH to /demo but GET /dev. Sorry about that! Thanks!
On Tue, Aug 30, 2016 at 5:40 PM, Halvdan Hoem Grelland <[email protected]> wrote: > Jim, > > Your example works completely fine. The name is getting changed. > > On Tue, Aug 30, 2016 at 2:47 PM, Jim Grace <[email protected]> > wrote: > >> Thanks, Morten. >> >> I've tried it without the /name, and it still doesn't change the name, >> e.g.: >> >> curl -X PATCH -d '{"name": "New Name"}' -H "Content-Type: >> application/json" -u admin:district >> https://play.dhis2.org/dev/api/24/dataElements/fbfJHSPpUQD >> >> I've also tried putting the "id" field into the payload, but also the >> name doesn't change: >> >> curl -X PATCH -d '{"id": "fbfJHSPpUQD", "name": "New Name"}' -H >> "Content-Type: application/json" -u admin:district >> https://play.dhis2.org/dev/api/24/dataElements/fbfJHSPpUQD >> >> -- >> You received this bug notification because you are a member of DHIS 2 >> developers, which is subscribed to DHIS. >> https://bugs.launchpad.net/bugs/1618147 >> >> Title: >> Web API PATCH not working >> >> Status in DHIS: >> New >> >> 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 >> https://play.dhis2.org/dev/api/24/dataElements/fbfJHSPpUQD/name >> >> curl -X PATCH -d '{"name": "New Name"}' -H "Content-Type: >> application/json" -u admin:district >> https://play.dhis2.org/dev/api/24/dataSets/lyLU2wR22tC/name >> >> As can be seen by these GETs: >> >> curl -u admin:district >> https://play.dhis2.org/demo/api/24/dataElements/fbfJHSPpUQD? >> fields=id,name >> >> curl -u admin:district >> https://play.dhis2.org/demo/api/24/dataSets/lyLU2wR22tC?fields=id,name >> >> The same kind of syntax on a local 2.21 system works fine (without the >> /24). >> >> 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: >> https://bugs.launchpad.net/dhis2/+bug/1618147/+subscriptions >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~dhis2-devs >> Post to : [email protected] >> Unsubscribe : https://launchpad.net/~dhis2-devs >> More help : https://help.launchpad.net/ListHelp >> > > > > -- > Halvdan Hoem Grelland > Software developer, DHIS 2 > University of Oslo > http://www.dhis2.org <https://www.dhis2.org/> > > > _______________________________________________ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > > -- Jim Grace Core developer, DHIS 2 HISP US Inc. http://www.dhis2.org <https://www.dhis2.org/>
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

