← Back to team overview

dhis2-devs team mailing list archive

Re: web api for Tracker Web API error.

 

In 2.29 , The "Tracked entity" object is renamed to "Tracked Entity Type"
in the web API.
So, try using "trackedEntityType"

On Fri, May 25, 2018 at 2:13 PM, 林晓东 <lin_xd@xxxxxxx> wrote:

> Hi,all,
>    I have done a test on Tracker Web API. as documents:
>   body:
> {
>
>   "trackedEntity": "nEenWmSyUEp",
>   "orgUnit": "DiszpKrYNg8",
>   "attributes": [
>     {
>       "attribute": "w75KJ2mc4zz",
>       "value": "Joe"
>     },
>     {
>       "attribute": "zDhUuAYrxNC",
>       "value": "Smith"
>     }
>   ]
> }
>
> url: https://play.dhis2.org/dev/api/29/trackedEntityInstances.json?
> ou=DiszpKrYNg8
> method : post
>
> got:
>
> {
>   "httpStatus" : "Internal Server Error",
>   "httpStatusCode" : 500,
>   "status" : "ERROR",
>   "message" : "Unrecognized field \"trackedEntity\" (class
> org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance), not
> marked as ignorable (14 known properties: \"trackedEntityInstance\",
> \"lastUpdatedAtClient\", \"lastUpdated\", \"createdAtClient\",
> \"trackedEntityType\", \"orgUnit\", \"inactive\", \"enrollments\",
> \"featureType\", \"attributes\", \"deleted\", \"relationships\",
> \"created\", \"coordinates\"])\n at [Source: (String)\"{\n
> \"trackedEntity\": \"nEenWmSyUEp\",\n  \"orgUnit\": \"DiszpKrYNg8\",\n
> \"attributes\": [\n    {\n      \"attribute\": \"w75KJ2mc4zz\",\n
> \"value\": \"Joe\"\n    },\n    {\n      \"attribute\": \"zDhUuAYrxNC\",\n
>     \"value\": \"Smith\"\n    }\n  ]\n}\"; line: 2, column: 21] (through
> reference chain: org.hisp.dhis.dxf2.events.trackedentity.
> TrackedEntityInstance[\"trackedEntity\"])"
> }{
>   "httpStatus" : "Internal Server Error",
>   "httpStatusCode" : 500,
>   "status" : "ERROR",
>   "message" : "Unrecognized field \"trackedEntity\" (class
> org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance), not
> marked as ignorable (14 known properties: \"trackedEntityInstance\",
> \"lastUpdatedAtClient\", \"lastUpdated\", \"createdAtClient\",
> \"trackedEntityType\", \"orgUnit\", \"inactive\", \"enrollments\",
> \"featureType\", \"attributes\", \"deleted\", \"relationships\",
> \"created\", \"coordinates\"])\n at [Source: (String)\"{\n
> \"trackedEntity\": \"nEenWmSyUEp\",\n  \"orgUnit\": \"DiszpKrYNg8\",\n
> \"attributes\": [\n    {\n      \"attribute\": \"w75KJ2mc4zz\",\n
> \"value\": \"Joe\"\n    },\n    {\n      \"attribute\": \"zDhUuAYrxNC\",\n
>     \"value\": \"Smith\"\n    }\n  ]\n}\"; line: 2, column: 21] (through
> reference chain: org.hisp.dhis.dxf2.events.trackedentity.
> TrackedEntityInstance[\"trackedEntity\"])"
> }
>
> what's wrong with this?
>
> Thanks.
> --
> 此致
>
>    林晓东
>
> 莫愁前路无知己,天下谁人不识君。
>
>
>
>
> _______________________________________________
> 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
>
>


-- 
Kumar Gaurav Nath Shahdeo
Developer
Email gauravns@xxxxxxxxxxxxxxxx
Telephone +91 9160688935 <+91+9160688935>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=kumar-gaurav%20nath%20shahdeo-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>

Follow ups

References