Hi everyone,
I’m working on V3 API now, which goes remarkably well.
Still have one issue though.
My goal is to add devices to my account with the HTTP api.
I use the API key which I generate for each application, a method which is OK for me>
I can add a device using the EndDeviceRegistry.Create methods, this is going well and I see the device created in my account.
Unfortunately I cannot run sucessfulle the NsEndDeviceRegistry.set
The API keeps telling I have an error in my field mask area.
I think I am supposed to enter in the field mask which items I want to update ( I want to update network session keys obviously NwkSkey, we use ABP)
Can someone tell me how to enter the “field_mask” : { } when I do a POST call to the api/v3/ns/applications/my_app/devices
I cannot figure it out. I get the idea of the field masks when I do a GET to the API, but not when I do a POST tot the API.
This is my javascript body which I send ( Using postmaster )
I know I must implement ‘end_device’ AND 'field_mask" but I don’t know how to implement the latter.
Can someone help me a bit further ?? Thank you in advance !!
Arian.
POST to
https://eu1.cloud.thethings.network/api/v3/ns/applications/myapp/devices
Body:
{
“end_device”: {
"ids": {
"device_id": "7070707070707070",
"application_ids": {
"application_id": "myapp"
},
"dev_eui": "7070707070707070"
},
"name": "device666" ,
"description" : "device no 666",
"network_server_address" : "eu1.cloud.thethings.network",
"application_server_address" : "eu1.cloud.thethings.network",
"lorawan_version": "1.0.3",
"lorawan_phy_version": "1.0.3-a",
"frequency_plan_id": "EU_863_870",
"supports_join" : false,
"session": {
"dev_addr": "26ABBBAA",
"keys": {
"f_nwk_s_int_key": {
"key": "56B53196B3571871C348A7A1BC9E0362"
},
"s_nwk_s_int_key": {
"key": "56B53196B3571871C348A7A1BC9E0362"
},
"nwk_s_enc_key": {
"key": "56B53196B3571871C348A7A1BC9E0362"
},
"app_s_key": {
"key": "075EAC7B7AFC7558339A3EBD294DCDE9"
}
}
}
},
“field_mask” : { “field”: “frequency_plan_id”} → Help ???
}