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

API call for AP-provision

trondaker
Level 1
Level 1

Hi,

 

Has anyone made this api-call work? Could you share the json-object being sent? I get the following no matter what i do:

 

Json sent:

 

ap_to_provision = [{
   
"rfProfile": "Some-radio-profile",
   
"siteId": "932d38c-6805-49b0-81b7-c2ec96d3b115",
   
"deviceName": "AP-Name-here",
   
"type": "Unified AP",
   
"siteNameHierarchy": "Site/name/to/floor"
}]

 

I have tried the SiteID for the building and for the actual floor, same result. This call is sent via the DnaCenterAPISDK, and the URL is /dna/intent/api/v1/wireless/ap-provision.

 

Error message:

 

{
"bapiKey": "d897-19b8-47aa-a9c4",
"bapiName": "AP Provision",
"bapiExecutionId": "4bc3e6ce-cfb9-4f67-911f-5e64c8f8073f",
"timeDuration": 720,
"status": "FAILURE",
"bapiError": {
bapiErrorResponse : {
GET APwirelessConfiguration ","
bapiErrorCode " : "
","
bapiErrorMessage " : "
"},"
componentErrorResponse " : [ {"
compId " : "
uuid1b4f41c6 ","
compName " : "
Get site ID ","
compErrorCode " : "
400 ","
compErrorMessage " : "
Bad request in get Site ID BAPI ","
componentType " : "
BAPI_INVOKER "} ]}",
"runtimeInstanceId": "DNACP_Runtime_ff120c45-8d15-4ec3-a6e1-c74046c8d4c2"
}

 

I dont understand what other siteid i can try here? Should i claim the device first via the PnP-calls, and then provision? Version is 2.2.3.5.

1 Accepted Solution

Accepted Solutions

trondaker
Level 1
Level 1

My bad, turns out the siteId here refers to the sitenamehierarchy for some odd reason. 

 

ap_to_provision = [{
    
"rfProfile": "Some-radio-profile",
    
"siteId": "Global/Building/Floor"
    
"deviceName": "AP-Name-here",
    
"type": "Unified AP",
    
"siteNameHierarchy": "Global/Building/Floor"
}]

 

Replace the actual ID of the site with the hierarchy of the floor the AP is on and its accepted.

View solution in original post

1 Reply 1

trondaker
Level 1
Level 1

My bad, turns out the siteId here refers to the sitenamehierarchy for some odd reason. 

 

ap_to_provision = [{
    
"rfProfile": "Some-radio-profile",
    
"siteId": "Global/Building/Floor"
    
"deviceName": "AP-Name-here",
    
"type": "Unified AP",
    
"siteNameHierarchy": "Global/Building/Floor"
}]

 

Replace the actual ID of the site with the hierarchy of the floor the AP is on and its accepted.

Review Cisco Networking for a $25 gift card