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).
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).
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
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).
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, 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}”
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).
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, 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}”
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).