Probably because that field can be populated by the Get operation and someone left the data definition alone for all operations.
Original Message:
Sent: Feb 12, 2025 01:55 PM
From: Roc
Subject: Using Python/requests/REST API how to associate a new device to a nad_group
Oh, I was hoping to be able to add the Device to the Device group at the time the device was being created. If i cant be done this way, then why is the "nad_groups" feild listed as an "optional" parameter?
Original Message:
Sent: Feb 07, 2025 11:06 AM
From: chulcher
Subject: Using Python/requests/REST API how to associate a new device to a nad_group
Patch the device group with the new device.
------------------------------
Carson Hulcher, ACEX#110
Original Message:
Sent: Feb 06, 2025 05:41 PM
From: Roc
Subject: Using Python/requests/REST API how to associate a new device to a nad_group
Hello,
Im trying to figure out how to add a device to a nad_group when creating a new device. Going through the api explorer I see a field for it, as "Optional". I include the nad_group name in the field, and will get back a "200" response, but the nad_group device is not added to the nad_group:
This is the input data:
{
"nad_groups": [
"Junos"
],
"name": "test-dev",
"ip_address": "99.99.99.99",
"tacacs_secret": "secret",
"vendor_name": "Juniper",
"attributes": {
"platform": "Junos"
}
}
This is the output:
Response Body
{ "id": 3417, "name": "test-dev", "ip_address": "99.99.99.99", "radius_secret": "", "tacacs_secret": "", "vendor_name": "Juniper", "coa_capable": false, "coa_port": 3799, "attributes": { "platform": "Junos" }, "_links": { "self": { "href": "https://np-clearpass.intcx.net/api/network-device/3417" } }}
Response Code
201
Not sure what I'm missing,