Blockquote
Preformatted text
Hello,
I reviewed your update as well as API documentation and i was able configure NBI service to correctly point to repositories. However, i am runnign into some issues while fetching records.
-
http://localhost:7557/devices ( Not using https )
This correctly displays all the records in JSON format in web.
-
I am querying using serial number shown below to get projection of SSID ( just for example purpose)
“_SerialNumber”:“48575443A3E562A3”
The result should return :
InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID → HOME
- I tried following:
curl -i 'http://localhost:7557/devices?query=%7B%22_SerialNumber%22%3A%20%2248575443A3E562A3%22%7D&projection=InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID'
HTTP/1.1 200 OK
GenieACS-Version: 1.2.8+20211027200938
Content-Type: application/json
total: 0
Date: Sun, 09 Apr 2023 12:09:49 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
(Trying just to list out all the values for given serial number)
curl -i 'http://localhost:7557/devices?query=%7B%22_SerialNumber%22%3A%20%2248575443A3E562A3%22%7D'
HTTP/1.1 200 OK
genieacs-version: 1.2.8+20211027200938
content-type: application/json
total: 0
date: Sun, 09 Apr 2023 12:10:17 GMT
keep-alive: timeout=5
transfer-encoding: chunked
access-control-allow-origin: *
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, Authorization, JSNLog-RequestId, activityId, applicationId, applicationUserId, channelId, senderId, sessionId
access-control-max-age: 3628800
access-control-allow-methods: GET, DELETE, OPTIONS, POST, PUT
( Using -X GET)
curl -i -X GET 'http://localhost:7557/devices?query=%7B%22_SerialNumber%22%3A%20%2248575443A3E562A3%22%7D&projection=InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID'
HTTP/1.1 200 OK
GenieACS-Version: 1.2.8+20211027200938
Content-Type: application/json
total: 0
Date: Sun, 09 Apr 2023 12:12:32 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
Based on the output provided, it appears that your API call was successful and the server returned a HTTP response with a 200 OK status code. The response also includes the GenieACS version number, content type, and other headers.
However, the “total: 0” in the response suggests that the query i specified did not return any matching devices. I hope i can get answer where i am doing wrong and check the query parameter. I want to see the output (Value) of the attributes.
I hope i am making sense.
Thanks,