← Back to team overview

dhis2-devs-core team mailing list archive

Changed response payload in web-api

 

Hi everyone

As part of the continued change to WebMessage based responses in the
web-api, I have now more or less removed all old "text based" responses..
there might be a few more, but I will go through it today and remove all of
it. If you have any code that assumes a text based payload, you will need
to change your code (it will use accept headers / extension to decide on
xml or json)

A more intrusive change is that I have now wrapped ImportSummary /
ImportTypeSummary and ImportSummaries in a WebMessageResponse. The update
to your code is easy enough, use o.response / o.response.responseType to
get your summary, it will now also switch to WARNING if there are any
conflicts / ignores detected, it will also give a (possible) user facing
message.

If you see any places where this have not been changed, please report back
to me and I will update.

I'm keeping the response format in /api/metadata as is it for legacy
reasons (it will be replaced in 2.21/2.22 anyways).

--
Morten

Follow ups