cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API - Network combine enrollment string error

Highlighted
Here to help

API - Network combine enrollment string error

Hi,

 

I have some problems with the combine networks API.

 

The API works as well on my test dashboard, with the same network name as the test network on the customer dashboard. On the customer dashboard, the network are bind to a template with an enrollment string "magasins".

 

When i try to combine the two networks without an enrollment string, no problems, but when the network are bind to the template, the api return an 400 error with this : 

 

{"errors":["PG::UniqueViolation: ERROR: duplicate key value violates unique constraint \"node_groups_enrollment_string_lowercase_index\"\nDETAIL: Key (lower(enrollment_string))=(magasins-appliance) already exists.\n: UPDATE \"node_groups\" SET \"enrollment_string\" = 'magasins-appliance', \"alert_settings_json\" = '{\"amp_malware_detected\":true,\"amp_malware_blocked\":false,\"appliance_down\":true,\"failover_event\":false,\"dhcp_no_leases\":false,\"rogue_ap\":false,\"rogue_dhcp\":false,\"ip_conflict\":false,\"cellular_up_down\":true,\"cellular_up\":true,\"cellular_down\":true,\"client_connectivity\":true,\"vrrp\":true,\"vpn_connectivity_change\":true,\"settings_changed\":false,\"usage_alert\":false,\"appliance_timeout\":60,\"usage_alert_period\":1200,\"usage_alert_threshold\":104857600,\"amp_malware_detected_preferences\":\"other\",\"amp_malware_detected_preferences_text\":\"[\\\"MAIL\\\"]\",\"appliance_down_preferences\":\"other\",\"appliance_down_preferences_text\":\"[\\\"MAIL\\\",\\\"MAIL\\\",\\\"MAIL\\\"]\",\"failover_event_preferences\":\"other\",\"failover_event_preferences_text\":\"[\\\"MAIL\\\"]\",\"cellular_up_down_preferences\":\"other\",\"cellular_up_down_preferences_text\":\"[\\\"MAIL\\\"]\",\"cellular_up_preferences\":\"other\",\"cellular_up_preferences_text\":\"[\\\"MAIL\\\"]\",\"cellular_down_preferences\":\"other\",\"cellular_down_preferences_text\":\"[\\\"MAIL\\\"]\",\"client_connectivity_preferences\":\"other\",\"client_connectivity_preferences_text\":\"[\\\"MAIL\\\"]\",\"vrrp_preferences\":\"other\",\"vrrp_preferences_text\":\"[\\\"MAIL\\\"]\",\"vpn_connectivity_change_preferences\":\"other\",\"vpn_connectivity_change_preferences_text\":\"[\\\"MAIL\\\"]\"}', \"updated_at\" = '2019-12-02 19:04:58.830607' WHERE \"node_groups\".\"type\" IN ('WiredGroup') AND \"node_groups\".\"id\" = 659214395456365508"]}

 

I replace the mail address in the error message by "MAIL". There are many différent mail address, no just one.

 

I try différent values for the enrollmentString parameters but i have always the same error.

 

Today when i try with the API or with the GUI, i get this error message : 

{
    "errors": [
        "ActiveRecord::RecordNotSaved"
    ]
}
 
The problem seems to come from the enrollment string of the template but i can't delete the enrollmentString...
 
If someone have an idea to resolve this problem...
 
Thanks
 
2 REPLIES 2
Highlighted
Kind of a big deal

Re: API - Network combine enrollment string error

The template makes thie considerably trickier.

 

First it has to be a combined template.  A non-combined template can not contain a combined network.  So check that our first, and if the template is not combined start by converting it to a combined template.

 

If it is not combined - and its been a while since I have done this so my memory is hazy - you have to create another new template and then combine the templates together under Organization/Configuration Templates.

 

Now back to the network.  My memory is a little hazy on this one.  I think you have to create a new network first and attached it to the combined template.  Then you need to move everything out of the old network to the new network, and finally remove the original network.

I'm about 75% confident you can not convert a non-combined network to a combined network that is bound to a template "in place".

Highlighted
Here to help

Re: API - Network combine enrollment string error

Hi,

 

Thanks for your response,

 

I test this operation with a template on my test dashboard, that work.

 

Indeed, to combined to network, you have to bind a temporary network to the combined template and combined the two network. You can't combined two networks there are not bind to the same template.. It's work great on my test dashboard.

 

The only difference is on the "enrollmentstring". My Customer set one and i don't have this type of value on my dashboard. I look for the value to put in the combined network API.

 

Regards,

 

 

 

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.