← Back to team overview

dhis-mobile-devs team mailing list archive

Re: DHIS2 REST API Specifications

 

Sorry to bother everyone again. I just want to add Christian and
mtrack-dev@xxxxxxxxxx to this mailing thread, since I'll be doing fieldwork
over the next 2 weeks and probably won't have great access to internet.
Christian will be leading this integration effort going forward.

Hope to hear from you soon,

Rowena


On Tue, Jul 19, 2011 at 8:28 PM, Rowena Luk <rluk@xxxxxxxxxx> wrote:

> Dear DHIS mobile team in general, and Jo in specific,
>
> Lars recommended that we talk to you about some questions we have getting
> data into DHIS2 for Ministry of Health in Uganda. As many of you probably
> know already, there's been a big push to get DHIS2 implemented, configured,
> and (hopefully soon) deployed nationwise in Uganda, which is really
> exciting. David and I are working on getting indicator data into the system
> (specifically, data about disease occurrence and ACT stock levels), which is
> a key part of being able to present one integrated platform (DHIS2) that
> holds all the data relevant to MOH. Our timelines are very short, so we're
> planning on working through whatever API is currently available and working
> in DHIS2, in recognition of the fact that these APIs may evolve in the
> future (and so will we).
>
> Now, down to the specifics: can anyone help clarify some of the specifics
> of the web API, i.e. http://apps.dhis2.org/demo/api/.
>
> Specifically:
> * What response should we be expecting from the DHIS2 system when
> everything is processed correctly? HTTP 200 OK, and then what in the body?
> * What responses do we get in case of error? HTTP 4XX or 5XX? Will we get
> an error message in the body, and if so, is that in plaintext, json, xml, or
> other?
>
> This isn't really a question, but more of a request: when I try to hit the
> DHIS2 api with an unauthenticated POST, the system responds with the html of
> the login screen and an HTTP 200 status code. Since this is an automated
> API, it would be great if the system could somehow indicate in a
> machine-friendly manner that the authentication failed, e.g. typically one
> might expect a 401 message. Just raising the suggestion; this isn't a
> dealbreaker for us.
>
>
> Really hope you can help us out here. I've gotten as far as submitting a
> POST with the right HTTP basic auth credentials to apps.dhis2.org, but am
> getting an empty response message with HTTP 200 OK, and nothing is showing
> up in the DB. Knowing what the expected behaviour should be will help me
> debug.
>
> Thanks everyone!
>
> Rowena
> (Senior Engineer, Dimagi Inc.)
>

Follow ups

References