1
Database / API query.php syntax
« on: February 07, 2020, 08:08:28 pm »
Hello, I am hoping to get some ideas/assistance with the API access. I am using postman and curl to get data on all devices for example, but am unable to query a specific device:
Good Query:
https://1.1.1.1:8443/query.php?t=devices
Bad Query
https://1.1.1.1:8443/query.php?t=devices&q=device="devicea_test"
I receive a ERR :400 Invalid Query.
I can use the sql queries also that gets me the specific device data. I am not sure how to troubleshoot the API and php. I am using Mariadb as my database engine.
Thanks for any guidance you can give me on this.
Good Query:
https://1.1.1.1:8443/query.php?t=devices
Bad Query
https://1.1.1.1:8443/query.php?t=devices&q=device="devicea_test"
I receive a ERR :400 Invalid Query.
I can use the sql queries also that gets me the specific device data. I am not sure how to troubleshoot the API and php. I am using Mariadb as my database engine.
Thanks for any guidance you can give me on this.