Select to view content in your preferred language

batch enable subnetwork controller using "enable subnetwork controller" REST API

715
3
06-28-2022 08:42 PM
YiuTungNicholasTse
Emerging Contributor

Hello, I've written a python script that calls the "Enable subnetwork controller" rest api and supposedly it will update a bunch of subnetwork controllers for me.

For the parameters, I have called another api specifying the link to my server's utility network feature server query. From that I have acquired the needed fields which is used for the parameters for the "Enable subnetwork controller" rest api.

The fields I have included in "Enable subnetwork controller" are networkSourceId, featureGlobalId, terminalID, subnetworkControllerName & tierName.

I have only included the required fields, after running the python script, the results returned this result: 

{

 "success": false,
 "error": {
  "extendedCode": -2147219885,
  "message": "An expected Field was not found or could not be retrieved properly.",
  "details": [
   
  ]
 }

}

Here is the link to the Arcgis Developer rest api:

https://developers.arcgis.com/rest/services-reference/enterprise/enablesubnetworkcontroller-utility-...

0 Kudos
3 Replies
RobertKrisher
Esri Regular Contributor

If you also include a subnetwork name value does the call work?

0 Kudos
YiuTungNicholasTse
Emerging Contributor

My bad, I have already included it on the case above, sorry I forgot to include it above in my text.  

I have also tried to leave it out, and it somehow says my name is invalid. It returned the following error.

success: false

error:extendedCode: -2147208571
message: The name is invalid.
details: None

 

0 Kudos
RobertKrisher
Esri Regular Contributor

If you are still experiencing the issue I would recommend logging a case with support. This issue will likely walking through on a call with your code + data. Based off that error message my guess is there is an invalid character in your subnetwork controller name or subnetwork name. If you try to enable the controller manually you should be able to see a more specific error.

0 Kudos