Page 1 of 1

module adding through API

Posted: 07 Mar 2022 22:00
by saqib6161
Hi when I request for. adding a module through API I get this response "data":{"key":null,"appendix":null},"code":409,"error":{"key":"app_from_url_already_exist","errorMsg":null}}.
note : I didn't added the current module before but showing this message.

Re: module adding through API

Posted: 09 Mar 2022 01:30
by PoltoS
Please show the request

Re: module adding through API

Posted: 09 Mar 2022 16:00
by saqib6161
PoltoS wrote:
09 Mar 2022 01:30
Please show the request
Request :
http://192.168.0.55:8083/ZAutomation/ap ... Device.zip

body :

{:
error: null,
data: {
moduleUrl: "http://developer.z-wave.me/modules/DummyDevice.tar.gz"
},:
code: 200,
message: null
}:

Re: module adding through API

Posted: 11 Mar 2022 19:25
by PoltoS
If you need to add an already installed app, please do

Code: Select all

curl -u 'admin:admin1' -X POST http://localhost:8083/ZAutomation/api/v1/instances -H 'Content-Type: application/json; charset=UTF-8' -d '{"moduleId":"DummyDevice","active":"true","title":"Dummy Device","params":{"deviceType":"switchBinary"}}'
.

If you want to install the app (so it become installed), please use the request you mentioned.