API questions
Home › Forums › Conduit: AEP Model › API questions
- This topic has 4 replies, 2 voices, and was last updated 4 years, 11 months ago by
Arnaud CESBRON.
-
AuthorPosts
-
May 15, 2020 at 8:18 am #30619
Arnaud CESBRON
ParticipantHello,
i need help.
Wtih API on Conduit product, is there a way to know firmware and device version with out logging ?
Is thera a way to setup de first user / password with API when is’t the first start ?
Thanks for your reply.
May 15, 2020 at 8:28 am #30620Jeff Hatch
KeymasterAmaud,
In api/system there is a firmware field that contains the firmware version and a productId field that contains the type of device.
Jeff
May 15, 2020 at 9:35 am #30621Arnaud CESBRON
ParticipantJeff, yes i see it after. But i need to be logging.
Have you an answer for my second part on my question. We made application to configure gateway with API. She works fine on 1.x firmware, but don’t work with 5.x. The problem is on the first connection on new device, before the default admin password is admin. But now, on 5.x, it’s changed. At this time i don’t know how to initiate it by API. I you know a way to do this, I’m interested.
thanks
May 15, 2020 at 2:48 pm #30624Jeff Hatch
KeymasterAmaud,
The following info should help in doing commissioning through the API.
// Execute this command to check that the device is in the commissioning mode andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k "https://192.168.2.1/api/commissioning" { "code" : 200, "status" : "success" } // Execute this command to set the username. In the example the username is "admin" andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k -X POST -H "Content-Type: json/application" -d '{"username":"admin", "aasID": "", "aasAnswer":""}' https://192.168.2.1:443/api/commissioning { "code" : 200, "result" : { "aasDone" : false, "aasID" : "5EC7E7C8FE2A6E3584D2A124A10E9", "aasMsg" : "New password: ", "aasType" : "question; input hide" }, "status" : "success" } // Execute this command to set the password. Use the aasID value that is received in the previous response. andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k -X POST -H "Content-Type: json/application" -d '{"username":"admin", "aasID": "5EC7E7C8FE2A6E3584D2A124A10E9", "aasAnswer":"Admin123"}' https://192.168.2.1:443/api/commissioning { "code" : 200, "result" : { "aasDone" : false, "aasID" : "5EC7E7C8FE2A6E3584D2A124A10E9", "aasMsg" : "Retype new password: ", "aasType" : "question; input hide" }, "status" : "success" } // Execute this command to confirm the password. If you get a response to the command "Change password success!", it means that the commissioning mode has been completed successfully. andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k -X POST -H "Content-Type: json/application" -d '{"username":"admin", "aasID": "5EC7E7C8FE2A6E3584D2A124A10E9", "aasAnswer":"Admin123"}' https://192.168.2.1:443/api/commissioning { "code" : 200, "result" : { "aasDone" : true, "aasID" : "5EC7E7C8FE2A6E3584D2A124A10E9", "aasMsg" : "Change password success!", "aasType" : "info" }, "status" : "success" } *****************************************************************************************************************************************************************
Jeff
May 15, 2020 at 11:27 pm #30625Arnaud CESBRON
ParticipantJeff thanks for your help.
I will work in this way.
Arnaud
-
AuthorPosts
- You must be logged in to reply to this topic.