I have some automation scripts that deprovisions a switch from Aruba Central via API calls. One of those API's deletes the switch. However we run into issues if the switch is part of a switch stack. As you may or may not know you can't use delete /monitoring/v1/switches/{serial} since it's in a switch stack. We can delete via stack id with delete /monitoring/v1/switch_stacks/{stack_id}. However as far as I know that will delete the entire stack from Central. I don't want to do that all the time because in some cases we only want to remove one switch from the stack if the others are up.
Is anyone aware of how to delete an individual switch from a switch stack via API? I looked through the Aruba API reference guides and didn't see anything obvious. Ideally we should be able to unassociate it from the stack and then delete all via API calls.