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
Join us on Facebook
Visit our new website
jason
(Jason Pickering)
1 December 2015 14:42
2
What was the response and what was the payload? Which version?
···
On Tue, Dec 1, 2015, 15:34 Nicolas Germeau ngermeau@bluesquare.org 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
Join us on Facebook
Visit our new website
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
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@gmail.com wrote:
What was the response and what was the payload? Which version?
On Tue, Dec 1, 2015, 15:34 Nicolas Germeau ngermeau@bluesquare.org 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
Join us on Facebook
Visit our new website
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
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
Join us on Facebook
Visit our new website
morten
(Morten Hansen)
2 December 2015 07:15
4
Hi
Partial update of attribute values are currently not supported. You must get the full payload (?fields=:owner), make the modifications, then send the whole payload back (PUT /api/organisationUnits/ID)
···
On Tue, Dec 1, 2015 at 10:20 PM, Nicolas Germeau ngermeau@bluesquare.org wrote:
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
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
–
Morten
On Tue, Dec 1, 2015 at 3:42 PM, Jason Pickering jason.p.pickering@gmail.com wrote:
What was the response and what was the payload? Which version?
On Tue, Dec 1, 2015, 15:34 Nicolas Germeau ngermeau@bluesquare.org 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
Join us on Facebook
Visit our new website
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
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
Join us on Facebook
Visit our new website
Thanks for the answer Morten.
···
On Wed, Dec 2, 2015 at 8:15 AM, Morten Olav Hansen mortenoh@gmail.com wrote:
Hi
Partial update of attribute values are currently not supported. You must get the full payload (?fields=:owner), make the modifications, then send the whole payload back (PUT /api/organisationUnits/ID)
–
–
Morten
On Tue, Dec 1, 2015 at 10:20 PM, Nicolas Germeau ngermeau@bluesquare.org wrote:
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
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
On Tue, Dec 1, 2015 at 3:42 PM, Jason Pickering jason.p.pickering@gmail.com wrote:
What was the response and what was the payload? Which version?
On Tue, Dec 1, 2015, 15:34 Nicolas Germeau ngermeau@bluesquare.org 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
Join us on Facebook
Visit our new website
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
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
Join us on Facebook
Visit our new website
Nicolas Germeau
Software Developer
GSM: +32 487 129820
Tel: +32 2 737 65 16
Skype: nicolas.germeau
Follow us on Twitter
Join us on Facebook
Visit our new website