Basic question about SGP http API

I am trying to verify that I can communicate with SGP API using a simple html JSON test script. I load this into the IE browser and the script attempts to make a sgGetStatus request to SGP, e.g.

http://127.0.0.1:59590/SgGetDeviceStatus

I get no response but instead it returns the error:

XMLHttpRequest: Network Error 0x2efd

Anyone have working code to do this type of thing?

ok, now I have no error but get 404 not found. SGP is running, and the port is correct afaik.

Here is the code:

Test SGP API using XMLHttpRequest to get SGP status.

The response is:

The response should be above, if blank then it did not work

Um, ok, it pasting in full html text in does not work, sorry. Can I paste the javascript section in?

You need to supply a device type for that endpoint, try this:

http://127.0.0.1:59590/devicestatus/camera?format=json

You can also see the valid values for device here:
http://127.0.0.1:59590/json/metadata?op=SgGetDeviceStatus

Thanks,
Jared

thanks, will test it out

BTW Jared, it worked, so thanks for the help.