I am currently trying to use ClearPass API to view and create new devices under GuestManager. However I am having issues with simply trying to "post" to /api/device endpoint. I am using advanced rest client in order to test
Headers
Authorization: Bearer <access token>
Content-Type: application/json
Body
{
"sponsor_name": "name", //same as logged in user
"mac": "00-00-00-00-00-01",
"username": "00-00-00-00-00-01", // explorer says to use mac
"source":"mac_create",
"visitor_name": "visitor name " //field used as a label in device table
}
Biggest problem is that in the API explorer all the fields say "optional" so I am not sure which ones I need to specify.
The access token is valid, I can make a "get" request to /device and see all the devices listed. When I try to post, the repsonse is 200 with no error or any responses. But when I go to Guest > Manage Devices the device is not listed in the table. I can use the "add device" button found on that page which works as expected but cant seem to get the API to work
I might be missing something simple but I am not sure what. Any help would be appreciated.
Thanks,
Monil