← Back to team overview

dhis2-devs team mailing list archive

Fwd: Re: Tracker Relationship API

 

Hi Devs
Could this be a bug? The attached error is getting generated when I send
the attached TEI Payload via  curl.
rgds
David
---------- Forwarded message ----------
From: "David Muturi" <dnmuturi@xxxxxxxxx>
Date: 29 Jul 2016 21:46
Subject: Re: [Dhis2-devs] Tracker Relationship API
To: "Morten Olav Hansen" <morten@xxxxxxxxx>
Cc:

Hi Morten,
> Sorry to come back to you again on this, I am getting the error in the
> attached output.txt file when  I try too update relationship between two
> TEIs. I have attached my JSON payload as well, when I look at it, I cant
> seem to  see any errors in the syntax.
> rgds
> David
>
> 2016-07-27 10:12 GMT+03:00 Morten Olav Hansen <morten@xxxxxxxxx>:
>
>> Hi
>>
>> Yes, you can add this to your create or update TEI payload:
>> "relationships": [
>>   { "trackedEntityInstanceA": "UID of TEI A", "trackedEntityInstanceB":
>> "UID of TEI B" }
>> ]
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Tue, Jul 26, 2016 at 9:13 PM, David Muturi <dnmuturi@xxxxxxxxx> wrote:
>>
>>> Hello Dhis2 team,
>>> Is there a way of creating relationships between enrolled TEI's via the
>>> API similar to enrollment as described in the dhis2 docs here
>>> http://dhis2.github.io/dhis2-docs/master/en/developer/html/dhis2_developer_manual_full.html#d7532e12063
>>>
>>> rgds
>>> David
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>
{"httpStatus":"Internal Server Error","httpStatusCode":500,"status":"ERROR","message":"ERROR: null value in column \"relationshiptypeid\" violates not-null constraint\n  Detail: Failing row contains (6160501, 6024359, null, 6012024)."}

Attachment: export3.json
Description: application/json


Follow ups

References