03-16-2016 11:00 AM - edited 03-01-2019 04:27 AM
Hello, I am trying to add a new WiFi Access-Point into a previously provisioned APIC-EM project via the REST API using post method to the URL below (the x-auth token-id and project-id is good because I can read the list of devices within the project).
api/v1/pnp-project/a03c6485-b77e-4444-9f09-3a02a118549e/device
with the request JSON body format shown in the screen-grab below
I get status-code = 500 "InternalError" returned with the following rather cryptic message, has anyone got any pointer where I am going wrong with this request please ??
Cheers, Jim.W.
Solved! Go to Solution.
03-16-2016 11:48 AM
add "[" and "]" in begin and end of your JSON body
03-16-2016 11:33 AM
What version is your APIC-EM ?
03-16-2016 11:39 AM
Version = 1.1.0.767
03-16-2016 11:48 AM
add "[" and "]" in begin and end of your JSON body
03-16-2016 12:28 PM
Thanks, that's starting to look better, changing the body to the following gives me rc=202 now so looks like the request was accepted now.
[{"platformId": "AIR-CAP3702I-E-K9","hostName": "APf44e5f80464","serialNumber": "f4:4e:05:f8:04:64","configId": "19c14528-783-4f57-8193-55982b52a0cf"}]
I don't see the device added in the site corresponding to project-id "a03c6485-b77e-4444-9f09-3a02a118549e" so I will take a peek at that next.
Cheers.
OK, as post-script I think I worked out why the device added via REST API was not appearing on the devices-list under the project. Originally I let the access-point boot and and attempt to connect to the APIC-EM PnP-server before I had defined it anywhere and it appeared in the "Unplanned Devices" list as expected. I deleted it from that project-list and powered the unit off but that AP serial-number now seems to be getting refused when adding to the APIC, if I changed the serial-number of the device I am adding to anything else it appears in the provisoined project-list OK.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide