Web API Usage

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??

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.

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??

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

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.

···

On Mon, Mar 12, 2012 at 4:32 PM, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:

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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

Thank you so much for the info Lars.

Sounds like we should be getting POST/PUT on many resources… I’d like to vote on the org unit creation to priority :slight_smile:

Didn’t realize what you were solving with the caching… but for the client-side trying to check if new data is available, ETags are generally useful.

Like you explain, you are solving a different problem, so it might not be relevant.

···

Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com

You Live by CHOICE, Not by CHANCE

2012/3/12 Lars Helge Øverland larshelge@gmail.com

On Mon, Mar 12, 2012 at 4:32 PM, Saptarshi Purkayastha sunbiz@gmail.com 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@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp