← Back to team overview

dhis2-devs team mailing list archive

Re: Web API Usage

 

On Mon, Mar 12, 2012 at 4:32 PM, Saptarshi Purkayastha <sunbiz@xxxxxxxxx> wrote:
> Dear devs,
>
> Is there documentation about the web-api. Like what resources support
> GET/POST? I see a list of all the resources and 4 representations, but is
> there more detailed documentation??

It is only /dataValueSets and /messages which support post. The rest
supports get only for now.


>
> I also recently saw commits from Lars that implementing caching for WebAPI.
> Is there any reason not to use ETags for the purpose?? That will enable to
> check if new content is exposed by the web service or not and seems like the
> standard way for update checks.

Server-side validation / etag based caching is not useful in this
scenario since the main purpose (besides saving network usage) is to
reduce the load on the server - if you are to produce reliable
hashes/etags then you will have to generate those reports/charts first
anyway. The idea now is to use the knowledge of when the data in the
reports are refreshed. And then we might as well use expiration
caching (cache-control/expiry headers) and let the client cache the
representations completely and thus avoid the validation round-trip.
Will write some more about this later.




>
> Is there a way to create organization units through the Web API?? If not the
> web api, are there any considerations to adding org units on-the-fly,
> attaching datasets and collecting data. I vaguely remember having to do
> something with resource tables. Is that still necessary??

No not at the moment but we will include it later.

Resource tables are not required.

>
> Too many questions probably in one email... but all somehow related to one
> another.
>
>
> ---
> Regards,
> Saptarshi PURKAYASTHA
>
> My Tech Blog:  http://sunnytalkstech.blogspot.com
> You Live by CHOICE, Not by CHANCE
>
> _______________________________________________
> 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
>


Follow ups

References