cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2444
Views
5
Helpful
3
Replies

Cloning switch ports with action batch api call

badreddine
Level 4
Level 4
Hello All,
When attempting to utilize the organizations/{{orgId}}/switch/devices/clone api call with Meraki Action Batche, an error message is thrown, indicating that this combination is not supported:
{
    "errors": [
        "organizations/XXXXXXXXX/switch/devices/clone does not support Action Batches."
    ]
}

Here is the action batch body :

{
    "confirmed": false,
    "synchronous": true,
    "actions": [        {
            "resource": "organizations/{{organizationId}}/switch/devices/clone",
            "operation": "update",
            "body": {
                "sourceSerial": "XXXX-XXXX-XXXX",
                "targetSerials": [
                    "{{SN1}}"
                ]
            }
        }
		]
}

I'm wondering if there is any workaround?

1 Accepted Solution

Accepted Solutions

JasonMo
Cisco Employee
Cisco Employee

From the supported resources list for action batches it looks like you will want to use /organizations/{organizationId}/switch/devices for the resource path with the operation of clone.

View solution in original post

3 Replies 3

Frazer McKechnie
Community Member

Without seeing the whole code you most likely just need to remove the attempt to use batch action and put your code within a for loop going across each switch you want to clone.

Thank you for your prompt response, it's a good solution, but I'm using only Postman to push the configurations. Additionally, the batch action api call can also be used to test if the configuration will be pushed correctly if the attribute confirmed is set to false

    "confirmed": false,

JasonMo
Cisco Employee
Cisco Employee

From the supported resources list for action batches it looks like you will want to use /organizations/{organizationId}/switch/devices for the resource path with the operation of clone.