analyticsTablesClear

Hello Devs!!

Version:
2.24
Build revision:
57640e2
Build date:
2016-11-19 04:24

Quick question, I’m trying to clear the analytics tables from dhis2 and using the command in the manual works but it comes back with an error:

++ [2016-11-21 18:28:08] API URL “http://localhost:8080/api/24/maintenance/analyticsTablesClear” to be requested with “POST”

++ [2016-11-21 18:29:13] API request output:

ERROR: API request returned code 000, exiting…

This happens if I use PUT or POST.

I’ve tried the following command as well:

curl -X PUT -H -u “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear”

Any ideas? Ideally it would return a 200 whether the tables are there and it cleared them, or if they don’t exist yet (first time using that db after a refresh from backup).

···

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

Hi

Code 000… what does that mean? what is the status that cURL is returning? that endpoint should return a 201 No Content

···

On Tue, Nov 22, 2016 at 1:47 AM, Timothy Harding tharding@baosystems.com wrote:

Hello Devs!!

Version:
2.24
Build revision:
57640e2
Build date:
2016-11-19 04:24

Quick question, I’m trying to clear the analytics tables from dhis2 and using the command in the manual works but it comes back with an error:

++ [2016-11-21 18:28:08] API URL “http://localhost:8080/api/24/maintenance/analyticsTablesClear” to be requested with “POST”

++ [2016-11-21 18:29:13] API request output:

ERROR: API request returned code 000, exiting…

This happens if I use PUT or POST.

I’ve tried the following command as well:

curl -X PUT -H -u “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear”

Any ideas? Ideally it would return a 200 whether the tables are there and it cleared them, or if they don’t exist yet (first time using that db after a refresh from backup).

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007


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

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Morten, not sure about the 000 code still. Depending on how I call it (using commands I use for just about everything API related) I will either get a 200, or an 000. I’m looking more into it, but I have a workaround now:

curl -X POST --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

or

curl -X PUT --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

It does come back with a “null” though:

curl -X PUT --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

null200

···

On Mon, Nov 21, 2016 at 10:04 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

Code 000… what does that mean? what is the status that cURL is returning? that endpoint should return a 201 No Content

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, Nov 22, 2016 at 1:47 AM, Timothy Harding tharding@baosystems.com wrote:

Hello Devs!!

Version:
2.24
Build revision:
57640e2
Build date:
2016-11-19 04:24

Quick question, I’m trying to clear the analytics tables from dhis2 and using the command in the manual works but it comes back with an error:

++ [2016-11-21 18:28:08] API URL “http://localhost:8080/api/24/maintenance/analyticsTablesClear” to be requested with “POST”

++ [2016-11-21 18:29:13] API request output:

ERROR: API request returned code 000, exiting…

This happens if I use PUT or POST.

I’ve tried the following command as well:

curl -X PUT -H -u “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear”

Any ideas? Ideally it would return a 200 whether the tables are there and it cleared them, or if they don’t exist yet (first time using that db after a refresh from backup).

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007


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

Hm ok, I will have a look at 224 tomorrow, maybe the code there is different… if it comes back with null, it seems there have been changes from 224 => master

···

On Tue, Nov 22, 2016 at 8:29 PM, Timothy Harding tharding@baosystems.com wrote:

Morten, not sure about the 000 code still. Depending on how I call it (using commands I use for just about everything API related) I will either get a 200, or an 000. I’m looking more into it, but I have a workaround now:

curl -X POST --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

or

curl -X PUT --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

It does come back with a “null” though:

curl -X PUT --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

null200

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

On Mon, Nov 21, 2016 at 10:04 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

Code 000… what does that mean? what is the status that cURL is returning? that endpoint should return a 201 No Content

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, Nov 22, 2016 at 1:47 AM, Timothy Harding tharding@baosystems.com wrote:

Hello Devs!!

Version:
2.24
Build revision:
57640e2
Build date:
2016-11-19 04:24

Quick question, I’m trying to clear the analytics tables from dhis2 and using the command in the manual works but it comes back with an error:

++ [2016-11-21 18:28:08] API URL “http://localhost:8080/api/24/maintenance/analyticsTablesClear” to be requested with “POST”

++ [2016-11-21 18:29:13] API request output:

ERROR: API request returned code 000, exiting…

This happens if I use PUT or POST.

I’ve tried the following command as well:

curl -X PUT -H -u “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear”

Any ideas? Ideally it would return a 200 whether the tables are there and it cleared them, or if they don’t exist yet (first time using that db after a refresh from backup).

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007


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

Hi Timothy

This should be fixed now (allow our server some time to build)

···

On Tue, Nov 22, 2016 at 11:34 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hm ok, I will have a look at 224 tomorrow, maybe the code there is different… if it comes back with null, it seems there have been changes from 224 => master

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, Nov 22, 2016 at 8:29 PM, Timothy Harding tharding@baosystems.com wrote:

Morten, not sure about the 000 code still. Depending on how I call it (using commands I use for just about everything API related) I will either get a 200, or an 000. I’m looking more into it, but I have a workaround now:

curl -X POST --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

or

curl -X PUT --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

It does come back with a “null” though:

curl -X PUT --user “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear” -w “%{http_code}”

null200

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007

On Mon, Nov 21, 2016 at 10:04 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

Code 000… what does that mean? what is the status that cURL is returning? that endpoint should return a 201 No Content

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Tue, Nov 22, 2016 at 1:47 AM, Timothy Harding tharding@baosystems.com wrote:

Hello Devs!!

Version:
2.24
Build revision:
57640e2
Build date:
2016-11-19 04:24

Quick question, I’m trying to clear the analytics tables from dhis2 and using the command in the manual works but it comes back with an error:

++ [2016-11-21 18:28:08] API URL “http://localhost:8080/api/24/maintenance/analyticsTablesClear” to be requested with “POST”

++ [2016-11-21 18:29:13] API request output:

ERROR: API request returned code 000, exiting…

This happens if I use PUT or POST.

I’ve tried the following command as well:

curl -X PUT -H -u “${DHIS_USERNAME:?}:${DHIS_PASSWORD:?}” “${DHIS_BASEURL:?}/api/24/maintenance/analyticsTablesClear”

Any ideas? Ideally it would return a 200 whether the tables are there and it cleared them, or if they don’t exist yet (first time using that db after a refresh from backup).

Timothy Harding
Sr. Systems Analyst, BAO Systems

+1 202-536-1541 | tharding@baosystems.com | http://www.baosystems.com | Skype: hardingt@gmail.com | 2900 K Street, Suite 404, Washington D.C. 20007


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