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
Public URL :https://<ip>/dna/intent/api/v1/virtual-network
Parameter; virtualNetworkName ; DEFAULT_VNI 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
View more