But running this, the new DID will be added, but all already assigned DIDs are removed, include config of this Call Flow. So can I use this API with some options to keep current config, or os there another API I can use?
Many thanks!
regards,
Co
Please, is there someone who cal help me how to just add a DID to a Call Flow without any other changes?
I'm guessing what's happening is that the other DNIs and config is getting overwritten because this a PUT and not a PATCH endpoint. You should be able to first call GET /api/v2/architect/ivrs/{ivrId}, then use the response body to fill out the rest of the request to PUT/api/v2/architect/ivrs/{ivrId}
@jacobshaw thanks for your solution (workaround) and this worked properly. However, since this is a list of 200+ DNIS numbers for one call flow ( an important one) the impact would be very large if something goes wrong and the DNIS aren't assigned anymore.
Do you know if there is another way to assign a DID to a call flow?
That is standard practice for PUT endpoints, which are meant to replace the entire object, versus a PATCH endpoint which is meant for partial updates. An alternative would be to use GET /api/v2/architect/ivrs to get all the IVR configs up front, then stash them somewhere and then lookup and use them as needed.
Thanks again, and I know how a PUT works and I wish there was a PATCH. So I was hoping there was another API where you assigning a calls flow to a DNIS, in stead of DNIS to a CallFlow like this API.
Just like you do at the GUI. But it seems there is not.
However, thanks for your time!