dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41680
Re: Attribute value CRUD through web api
Hello Jason,
Thanks for swift answer.
*1) url and payload use to create: *
POST on
http://139.162.212.229:8081/rdcinstance/api/organisationUnits/LSVPfFapdqt/attributeValues
with payload
{
"value": "5",
"attribute": {
"id": "YnIzwq4yFAy"
}
}
RESPONSE: Request method 'POST' not supported
*2) url and payload to update*
PATCH on the same resource but I'm pretty sure this is not the right way to
do it.
*Version*
Version: 2.20
Version:19891
Regards,Nicolas
On Tue, Dec 1, 2015 at 3:42 PM, Jason Pickering <jason.p.pickering@xxxxxxxxx
> wrote:
> What was the response and what was the payload? Which version?
>
> On Tue, Dec 1, 2015, 15:34 Nicolas Germeau <ngermeau@xxxxxxxxxxxxxx>
> wrote:
>
>> Hello,
>>
>> I'm trying to create/update attribute values through the web api but it
>> seems that I can't find the correct syntax.
>>
>> To be specific I want to create or update attribute value on a specific
>> orgunit.
>>
>> For create: i tried to post with a payload (attributeValue and attribute)
>> on the attributeValues collection but with no success.
>>
>> For update: same but tried also with patch method but no success.
>>
>> Thanks in advance,
>> Nicolas
>>
>> --
>> *Nicolas Germeau*
>> *Software Developer*
>>
>> GSM: +32 487 129820
>>
>> Tel: +32 2 737 65 16
>> Skype: nicolas.germeau
>>
>> Follow us on Twitter <https://twitter.com/bluesquare_org>
>> Join us on Facebook <https://www.facebook.com/BlueSquare.org?fref=ts>
>> Visit our new website <http://www.bluesquare.org/>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help : https://help.launchpad.net/ListHelp
>>
>
--
*Nicolas Germeau*
*Software Developer*
GSM: +32 487 129820
Tel: +32 2 737 65 16
Skype: nicolas.germeau
Follow us on Twitter <https://twitter.com/bluesquare_org>
Join us on Facebook <https://www.facebook.com/BlueSquare.org?fref=ts>
Visit our new website <http://www.bluesquare.org/>
Follow ups
References