CSV-JSON

Good day friends,

I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.

I'm trying to programmatically retrieve some data using CSV

Am I right to assume this?

for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...

I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in But I tried it and I get a returned "status Ime Abuja
···

https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html

Code: 404 Not Found" for CSV, and JSONP

    whereas when I switch json to xml, it just works... Like

api/analytics/dataValueSet.xml?dimension=…

    Or does this have to do with some configuration or the nature of the data?

    Thanks so much, in anticipation.


photo

                        Ime Asangansi MD, PhD (Informatics)

                                                  Chief Excellence Officer, ehealth4everyone

                        Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

Hi Ime,

This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut

···

On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi imeasangansi@gmail.com wrote:


photo

                        Ime Asangansi MD, PhD (Informatics)

                                                  Chief Excellence Officer, ehealth4everyone

                        Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

Good day friends,

I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



I'm trying to programmatically retrieve some data using CSV



Am I right to assume this?

for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



But I tried it and I get a returned "status Code:         404 Not Found" for CSV, and JSONP

    whereas when I switch json to xml, it just works... Like

api/analytics/dataValueSet.xml?dimension=...



    Or does this have to do with some configuration or the nature of the data?



    Thanks so much, in anticipation.



Ime

Abuja

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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

If you want to use DataValueSet, you should use that endpoint:
https://play.dhis2.org/demo/api/dataValueSets.csv?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602

···

On Fri, Jan 6, 2017 at 11:50 AM, Knut Staring knutst@gmail.com wrote:

Hi Ime,

This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut

On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi imeasangansi@gmail.com wrote:


photo

                        Ime Asangansi MD, PhD (Informatics)

                                                  Chief Excellence Officer, ehealth4everyone

                        Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

Good day friends,

I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



I'm trying to programmatically retrieve some data using CSV



Am I right to assume this?

for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



But I tried it and I get a returned "status Code:         404 Not Found" for CSV, and JSONP

    whereas when I switch json to xml, it just works... Like

api/analytics/dataValueSet.xml?dimension=...



    Or does this have to do with some configuration or the nature of the data?



    Thanks so much, in anticipation.



Ime

Abuja

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

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Thanks so much, Knut! Really appreciate your very quick reply!

Your examples work, but for some reason, I still face the problem I was having.

I can replicate the problem on the demo server. Please see the following:

This json below works:

But when you switch to CSV, it gives the 404, as I had discussed in my initial mail. As discussed earlier, XML response type works, but JSONP and CSV do not. Really appreciate any help or clarification. Takk! Ime Abuja
···

https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME

https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME

  On 1/6/2017 12:03 PM, Knut Staring wrote:
    If you want to use DataValueSet, you should use that endpoint:

https://play.dhis2.org/demo/api/dataValueSets.csv?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602

      On Fri, Jan 6, 2017 at 11:50 AM, Knut Staring <knutst@gmail.com>
      wrote:

Hi Ime,

This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut

                On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi <imeasangansi@gmail.com>
                wrote:
                      --

photo

                                            Ime Asangansi MD, PhD (Informatics)

                                                                                          Chief Excellence Officer, ehealth4everyone

                                            Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

                    Good day friends,



                    I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



                    I'm trying to programmatically retrieve some data using CSV



                    Am I right to assume this?

                    for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

                    I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



                    I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



                    But I tried it and I get a returned "status Code                          :                             404 Not Found" for CSV, and JSONP

                        whereas when I switch json to xml, it just works... Like

                    api/analytics/dataValueSet.xml?dimension=...



                        Or does this have to do with some configuration or the nature of the data?



                        Thanks so much, in anticipation.



                    Ime

                    Abuja

              Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

              Post to     : dhis2-devs@lists.launchpad.net

              Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

              More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Knut Staring

                            Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Not sure…I think you could report it as a Jira issue.

···

On Jan 6, 2017 2:43 PM, “Ime Asangansi” imeasangansi@gmail.com wrote:

Thanks so much, Knut! Really appreciate your very quick reply!

Your examples work, but for some reason, I still face the problem I was having.



I can replicate the problem on the demo server. Please see the following:



This json below works:

https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME

But when you switch to CSV, it gives the 404, as I had discussed in my initial mail.

https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME

As discussed earlier, XML response type works, but JSONP and CSV do not.



Really appreciate any help or clarification.

Takk!



Ime

Abuja




  On 1/6/2017 12:03 PM, Knut Staring wrote:
    If you want to use DataValueSet, you should use that endpoint:

https://play.dhis2.org/demo/api/dataValueSets.csv?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602

      On Fri, Jan 6, 2017 at 11:50 AM, Knut Staring <knutst@gmail.com>
      wrote:

Hi Ime,

This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

                On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi <imeasangansi@gmail.com>
                wrote:
                      --

photo

                                            Ime Asangansi MD, PhD (Informatics)

                                                                                          Chief Excellence Officer, ehealth4everyone

                                            Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

                    Good day friends,



                    I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



                    I'm trying to programmatically retrieve some data using CSV



                    Am I right to assume this?

                    for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

                    I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



                    I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



                    But I tried it and I get a returned "status Code                          :                             404 Not Found" for CSV, and JSONP

                        whereas when I switch json to xml, it just works... Like

                    api/analytics/dataValueSet.xml?dimension=...



                        Or does this have to do with some configuration or the nature of the data?



                        Thanks so much, in anticipation.



                    Ime

                    Abuja

              Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

              Post to     : dhis2-devs@lists.launchpad.net

              Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

              More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Knut Staring

                            Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Hi Ime,

CSV is simply not supported. Please see the docs:

https://ci.dhis2.org/docs/master/en/developer/html/webapi_analytics.html#webapi_analytics_data_value_set_format

You can retrieve data in the raw data value set format from the dataValueSet resource:

/api/26/analytics/dataValueSet

The following resource representations are supported:

  • json (application/json)

  • xml (application/xml)

best regards,

Lars

···

On Fri, Jan 6, 2017 at 5:26 PM, Knut Staring knutst@gmail.com wrote:

Not sure…I think you could report it as a Jira issue.


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

On Jan 6, 2017 2:43 PM, “Ime Asangansi” imeasangansi@gmail.com wrote:

Thanks so much, Knut! Really appreciate your very quick reply!

Your examples work, but for some reason, I still face the problem I was having.



I can replicate the problem on the demo server. Please see the following:



This json below works:

https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME

But when you switch to CSV, it gives the 404, as I had discussed in my initial mail.

https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME

As discussed earlier, XML response type works, but JSONP and CSV do not.



Really appreciate any help or clarification.

Takk!



Ime

Abuja




  On 1/6/2017 12:03 PM, Knut Staring wrote:
    If you want to use DataValueSet, you should use that endpoint:

https://play.dhis2.org/demo/api/dataValueSets.csv?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602

      On Fri, Jan 6, 2017 at 11:50 AM, Knut Staring <knutst@gmail.com>
      wrote:

Hi Ime,

This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

                On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi <imeasangansi@gmail.com>
                wrote:
                      --

photo

                                            Ime Asangansi MD, PhD (Informatics)

                                                                                          Chief Excellence Officer, ehealth4everyone

                                            Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

                    Good day friends,



                    I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



                    I'm trying to programmatically retrieve some data using CSV



                    Am I right to assume this?

                    for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

                    I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



                    I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



                    But I tried it and I get a returned "status Code                          :                             404 Not Found" for CSV, and JSONP

                        whereas when I switch json to xml, it just works... Like

                    api/analytics/dataValueSet.xml?dimension=...



                        Or does this have to do with some configuration or the nature of the data?



                        Thanks so much, in anticipation.



                    Ime

                    Abuja

              Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

              Post to     : dhis2-devs@lists.launchpad.net

              Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

              More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Knut Staring

                            Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Thanks so much, Lars and Knut.

Really appreciate.

Ime
···

On 1/6/2017 5:37 PM, Lars Helge Øverland wrote:

Hi Ime,

CSV is simply not supported. Please see the docs:

https://ci.dhis2.org/docs/master/en/developer/html/webapi_analytics.html#webapi_analytics_data_value_set_format

        You can retrieve data in the raw data value set format from the dataValueSet resource:
/api/26/analytics/dataValueSet
        The following resource representations are supported:
  • json (application/json)
  • xml (application/xml)

best regards,

Lars

      On Fri, Jan 6, 2017 at 5:26 PM, Knut Staring <knutst@gmail.com>
      wrote:
          Not sure...I think you could  report it as a Jira issue.
                On Jan 6, 2017 2:43 PM, "Ime Asangansi" <imeasangansi@gmail.com                    > wrote:
                    Thanks so much, Knut! Really appreciate your very quick reply!

                    Your examples work, but for some reason, I still face the problem I was having.



                    I can replicate the problem on the demo server. Please see the following:



                    This json below works:

                    [https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME](https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME)



                    But when you switch to CSV, it gives the 404, as I had discussed in my initial mail.



                    [https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME](https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME)



                    As discussed earlier, XML response type works, but JSONP and CSV do not.



                    Really appreciate any help or clarification.

                    Takk!



                    Ime

                    Abuja




                      On 1/6/2017 12:03 PM, Knut Staring wrote:
                        If you want to use DataValueSet, you should use that endpoint:

https://play.dhis2.org/demo/api/dataValueSets.csv?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602

                          On Fri, Jan 6, 2017 at 11:50 AM, Knut Staring <knutst@gmail.com>
                          wrote:

Hi Ime,

This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut

                                    On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi <imeasangansi@gmail.com>
                                    wrote:
                                          --

photo

                                                      Ime Asangansi MD, PhD (Informatics)


                                                                                                                Chief Excellence Officer, ehealth4everyone

                                                      Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

                                        Good day friends,



                                        I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



                                        I'm trying to programmatically retrieve some data using CSV



                                        Am I right to assume this?

                                        for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

                                        I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



                                        I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



                                        But I tried it and I get a returned "status
                                            Code                                              :                                                 404 Not Found" for CSV, and JSONP

                                            whereas when I switch json to xml, it just works... Like

                                        api/analytics/dataValueSet.xml?dimension=...



                                            Or does this have to do with some configuration or the nature of the data?



                                            Thanks so much, in anticipation.



                                        Ime

                                        Abuja

                                  Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                                  Post to     : dhis2-devs@lists.launchpad.net

                                  Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                                  More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Knut Staring

                                                Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org


Knut Staring

                                      Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

        _______________________________________________

        Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

        Post to     : dhis2-devs@lists.launchpad.net

        Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

        More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)


Lars Helge Øverland

                    Lead developer, DHIS 2
                    University of Oslo
                      Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

CSV would be useful though, feel free to open a Jira improvement issue.

···

On Sat, Jan 7, 2017 at 2:36 PM, Ime Asangansi imeasangansi@gmail.com wrote:

Thanks so much, Lars and Knut.

Really appreciate.



Ime
  On 1/6/2017 5:37 PM, Lars Helge Øverland wrote:

Hi Ime,

CSV is simply not supported. Please see the docs:

https://ci.dhis2.org/docs/master/en/developer/html/webapi_analytics.html#webapi_analytics_data_value_set_format

        You can retrieve data in the raw data value set format from the dataValueSet resource:
/api/26/analytics/dataValueSet
        The following resource representations are supported:
  • json (application/json)
  • xml (application/xml)

best regards,

Lars

      On Fri, Jan 6, 2017 at 5:26 PM, Knut Staring <knutst@gmail.com>
      wrote:
          Not sure...I think you could  report it as a Jira issue.
        _______________________________________________

        Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

        Post to     : dhis2-devs@lists.launchpad.net

        Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

        More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)


Lars Helge Øverland

                    Lead developer, DHIS 2

                    University of Oslo

                      Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

                On Jan 6, 2017 2:43 PM, "Ime Asangansi" <imeasangansi@gmail.com                    > wrote:
                    Thanks so much, Knut! Really appreciate your very quick reply!

                    Your examples work, but for some reason, I still face the problem I was having.



                    I can replicate the problem on the demo server. Please see the following:



                    This json below works:

                    [https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME](https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME)



                    But when you switch to CSV, it gives the 404, as I had discussed in my initial mail.



                    [https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME](https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME)



                    As discussed earlier, XML response type works, but JSONP and CSV do not.



                    Really appreciate any help or clarification.

                    Takk!



                    Ime

                    Abuja




                      On 1/6/2017 12:03 PM, Knut Staring wrote:
                        If you want to use DataValueSet, you should use that endpoint:

https://play.dhis2.org/demo/api/dataValueSets.csv?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602

                          On Fri, Jan 6, 2017 at 11:50 AM, Knut Staring <knutst@gmail.com>
                          wrote:

Hi Ime,

This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut


Knut Staring

                                      Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

                                    On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi <imeasangansi@gmail.com>
                                    wrote:
                                          --

photo

                                                      Ime Asangansi MD, PhD (Informatics)


                                                                                                                Chief Excellence Officer, ehealth4everyone

                                                      Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

                                        Good day friends,



                                        I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



                                        I'm trying to programmatically retrieve some data using CSV



                                        Am I right to assume this?

                                        for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

                                        I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



                                        I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



                                        But I tried it and I get a returned "status
                                            Code                                              :                                                 404 Not Found" for CSV, and JSONP

                                            whereas when I switch json to xml, it just works... Like

                                        api/analytics/dataValueSet.xml?dimension=...



                                            Or does this have to do with some configuration or the nature of the data?



                                            Thanks so much, in anticipation.



                                        Ime

                                        Abuja

                                  Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                                  Post to     : dhis2-devs@lists.launchpad.net

                                  Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                                  More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Knut Staring

                                                Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Sure, will be super useful. I’ll do and post here.

Thanks

Ime

Abuja
···

On 1/7/2017 3:07 PM, Lars Helge Øverland wrote:

    CSV would be useful though, feel free to open a Jira improvement [issue](https://jira.dhis2.org).
      On Sat, Jan 7, 2017 at 2:36 PM, Ime Asangansi <imeasangansi@gmail.com>
      wrote:
          Thanks so much, Lars and Knut.

          Really appreciate.



              Ime
                On 1/6/2017 5:37 PM, Lars Helge Øverland wrote:

Hi Ime,

                    CSV is simply not supported. Please see the docs:

https://ci.dhis2.org/docs/master/en/developer/html/webapi_analytics.html#webapi_analytics_data_value_set_format

                      You can retrieve data in the raw data value set format from the dataValueSet resource:
/api/26/analytics/dataValueSet
                      The following resource representations are supported:
  • json (application/json)
  • xml (application/xml)

best regards,

Lars

                    On Fri, Jan 6, 2017 at 5:26 PM, Knut Staring <knutst@gmail.com>
                    wrote:
                        Not sure...I think you could  report it as a Jira issue.
                              On Jan 6, 2017 2:43 PM, "Ime Asangansi" <imeasangansi@gmail.com                                  > wrote:
                                  Thanks so much, Knut! Really appreciate your very quick reply!

                                  Your examples work, but for some reason, I still face the problem I was having.



                                  I can replicate the problem on the demo server. Please see the following:



                                  This json below works:

                                  [https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME](https://play.dhis2.org/demo/api/25/analytics/dataValueSet.json?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME)



                                  But when you switch to CSV, it gives the 404, as I had discussed in my initial mail.



                                  [https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME](https://play.dhis2.org/demo/api/25/analytics/dataValueSet.csv?dimension=dx:gQNFkFkObU8&dimension=pe:LAST_4_QUARTERS&dimension=ou:jNb63DIHuwU;WAjjFMDJKcx;ZpE2POxvl9P;TSyzvBiovKh;azRICFoILuh;Umh4HKqqFp6;RzgSFJ9E46G;egv5Es0QlQP;pMEnu7BjqMz;EuoA3Crpqts;KfUCAQoOIae;bG0PlyD0iP3;AnXoUM1tfNT;nX05QLraDhO;LEVEL-4&displayProperty=NAME)



                                  As discussed earlier, XML response type works, but JSONP and CSV do not.



                                  Really appreciate any help or clarification.

                                  Takk!



                                  Ime

                                  Abuja




                                    On 1/6/2017 12:03 PM, Knut Staring wrote:
                                      If you want to use DataValueSet, you should use that endpoint:

https://play.dhis2.org/demo/api/dataValueSets.csv?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602

                                        On Fri, Jan 6, 2017 at 11:50 AM, Knut Staring <knutst@gmail.com>
                                        wrote:

Hi Ime,

                                              This seems to work fine:

https://play.dhis2.org/demo/api/analytics.csv?dimension=dx:fbfJHSPpUQD&dimension=pe:2016&dimension=ou:O6uvpzGd5pu;lc3eMKXaEfw

Knut

                                                  On Fri, Jan 6, 2017 at 7:11 AM, Ime Asangansi <imeasangansi@gmail.com>
                                                  wrote:
                                                      --

photo

                                                      Ime Asangansi MD, PhD (Informatics)


                                                                                                                Chief Excellence Officer, ehealth4everyone

                                                      Abuja, Nigeria


+2348180790150


ime@ehealth4everyone.com


Skype: asangansiime


www.ehealth4everyone.com

                                                      Good day friends,



                                                      I'm a web-api newbie here, in need a kind and quick clarification concerning response formats.



                                                      I'm trying to programmatically retrieve some data using CSV



                                                      Am I right to assume this?

                                                      for any data I can get in JSON format through api/analytics/dataValueSet.json?dimension=...

                                                      I can get the equivalent through api/analytics/dataValueSet.csv?dimension=...



                                                      I'm trying to switch our programmatic access to analytics to CSV, and want to know if this is the expected result as the manual says in [https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html](https://ci.dhis2.org/docs/2.23/en/developer/html/ch01s32.html)



                                                      But I tried it and I get a returned "status Code                                                          :                                                           404 Not Found" for CSV, and JSONP

                                                      whereas when I switch json to xml, it just works... Like

                                                      api/analytics/dataValueSet.xml?dimension=...



                                                      Or does this have to do with some configuration or the nature of the data?



                                                      Thanks so much, in anticipation.



                                                      Ime

                                                      Abuja

                                                Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                                                Post to     : dhis2-devs@lists.launchpad.net

                                                Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                                                More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
                                                      Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

                                                      Skype: knutstar

http://dhis2.org


Knut Staring

                                                    Dept. of Informatics, University of Oslo

Norway: +4791880522

                                                    Skype: knutstar

http://dhis2.org

                      _______________________________________________

                      Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                      Post to     : dhis2-devs@lists.launchpad.net

                      Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

                      More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)


Lars Helge Øverland

                                  Lead developer, DHIS 2

University of Oslo

                                    Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org


Lars Helge Øverland

                    Lead developer, DHIS 2
                    University of Oslo
                      Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org