cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
100
Views
0
Helpful
0
Replies

Not able to add SGT's to DNAC 2.3.5.5 with API

Double U S
Level 1
Level 1

Hi,

Goal; I want to bulk import SGT's in DNA center. But i'm having problems with the API.

Steps taken:

Try "Get virtual network with scalable groups":

Method: GET
Parameter; virtualNetworkName ; DEFAULT_VN

I get a response i can work with:
 
{
"virtualNetworkName": "DEFAULT_VN",
"isGuestVirtualNetwork": false,
"scalableGroupNames": [
"sgttest1",
"sgttest2",
"BYOD",
"Auditors",
"Unknown",
"Employees",
"Development_Servers",
"Developers",
"Contractors",
"Point_of_Sale_Systems",
"PCI_Servers",
"Network_Services",
"Guests",
"Test_Servers",
"Quarantined_Systems",
"Production_Users",
"IoT",
"Production_Servers",
"Extranet",
"Intranet",
"TrustSec_Devices"
],
"vManageVpnId": "",
"status": "success",
"description": "Virtual network info retrieved successfully.",
"executionId": "ac79f26f-47dc-4615-895c-46caaf526a40"
}
 
Then i performed a TRY of POST.
 

POST body;


{
"virtualNetworkName": "DEFAULT_VN",
"scalableGroupNames": [
"sgttest3",
"sgttest4"
]
}

 

Result:
{
"status": "failed",
"description": "virtualNetworkName in request already exist. Provide a valid virtualNetworkName and try again.",
"taskId": null,
"taskStatusUrl": "/dna/intent/api/v1/task/null",
"executionStatusUrl": "/dna/intent/api/v1/dnacaap/management/execution-status/358a0d1a-1372-4eec-93b6-4421c7f43665",
"executionId": "358a0d1a-1372-4eec-93b6-4421c7f43665"
}
Response on that executionId:
 
{
"bapiKey": "e3a8-5b19-406a-9f4e",
"bapiName": "Add virtual network with scalable groups",
"bapiExecutionId": "358a0d1a-1372-4eec-93b6-4421c7f43665",
"startTime": "Fri May 17 09:30:21 UTC 2024",
"startTimeEpoch": 1715938221016,
"endTime": "Fri May 17 09:30:21 UTC 2024",
"endTimeEpoch": 1715938221722,
"timeDuration": 706,
"status": "SUCCESS",
"runtimeInstanceId": "DNACP_Runtime_cb8046f0-feba-420c-b709-119881656b7f"
}
 
 
So instead of a POST i try a PUT because of the response message "virtualNetworkName in request already exist". PUT has the same body requirements, so i use the same input as the POST above. Response:

{
"status": "failed",
"description": "Invalid scalable group in request object with name = sgttest3. Please check your request data and try again.",
"taskId": null,
"taskStatusUrl": "/dna/intent/api/v1/task/null",
"executionStatusUrl": "/dna/intent/api/v1/dnacaap/management/execution-status/0985ca32-ea02-43d4-9671-f468039fb7d0",
"executionId": "0985ca32-ea02-43d4-9671-f468039fb7d0"
}
 
I've also tested a body with only one SGTI "sgttest3". And also with the optional fields "isGuestVirtualNetwork": false, and "vManageVpnId": "",
 
When i add the sgt "sgttest3" by hand in the GUI all is good and i can see it in the GET.
 
Anybody any suggestions?
 
BR
 
 
 
 
 

 

0 Replies 0