Thank you for your suggestions.
I will try that methods.
Original Message:
Sent: 11-06-2024 03:11
From: Richard Chandler
Subject: Duplicate / Modify external trunks via API
Hi Yasuto,
I'd suggest this is normally better answered in the Developer Forum. However some pointers.
Use GET /api/v2/telephony/providers/edges/trunks to get a list of trunks that you want to edit or copy. This will include the Trunk ID and BaseSettings ID
You can then use GET /api/v2/telephony/providers/edges/trunkbasesettings/{tunkBaseSettingsId} to get the Base settings information.
You can use POST /api/v2/telephont/providers/edges/trunkbasesettings to create a new base
The payload can be as simple as below but it won't work unless you have all the relevant info which you can get from a sample in the GET commands above.
{
"name": "Bob",
"description": "Bobs Trunk",
"trunkMetabase": {
"id": "external_sip_pcv_byoc_carrier.json",
"name": "Generic BYOC Carrier"
},
"trunkType": "EXTERNAL"
}
To Update you use the PUT variant of the POST command. However a PUT replaces all data unlike a PATCH so you basically copy almost everything. An important item to note is the PUT command has a version required so you always need to get the latest version via a GET and then update it.
------------------------------
Richard Chandler
Connect
Original Message:
Sent: 11-05-2024 20:56
From: Yasuto Shinmura
Subject: Duplicate / Modify external trunks via API
So, does anyone tells me how to modify existing trunk details via APIs?
------------------------------
Yasuto Shinmura
ディレクター
Original Message:
Sent: 11-05-2024 20:47
From: Yasuto Shinmura
Subject: Duplicate / Modify external trunks via API
Ok, I understood as I might combine several api calls to duplicate s trunk.
------------------------------
Yasuto Shinmura
ディレクター
Original Message:
Sent: 11-05-2024 13:22
From: Richard Chandler
Subject: Duplicate / Modify external trunks via API
When you use the copy option in the UI, what it's really doing is taking a copy of the data but then creating new objects as opposed to an AI copy command. What you can do is use Developer Tools in your browser and watch the process when you click copy. This is a useful way of seeing the API calls used when you want to replicate a UI process.
------------------------------
Richard Chandler
Connect
Original Message:
Sent: 11-05-2024 12:13
From: Yasuto Shinmura
Subject: Duplicate / Modify external trunks via API
Hi,
Is it possible to duplicate or update external trunk via API ?
I want to create multiple external trunks. I couldn't find APIs for duplicate a trunk. -- I can't understand how to specify the
trunkbasesetting id of my original trunks.
I can duplicate trunk via Genesys Cloud UI, so Is it possible to modify the name of trunk and phone number in it ?
Regards.
Yasuto,
#API/Integrations
#SIP/VoIP
#System Administration
#Telephony
------------------------------
Yasuto Shinmura
ディレクター
------------------------------