Attempting to use the RestAPI's to get all the company directory. We have ~50 IVR Menus set up but their details are not extracted when calling /account/~/directory/entries
Thanks for your reply @Phong Vu. I have tried this and it didn't work. The resulting dataset is still empty.
I am running against production as well.
What is your account main company number?
(02) 9053 8501
I can find a list of IVR menus in that company. I am not sure why using API you cannot read it though. What programming language do you call the API? Can you post some lines of code.
I'm using the python client library but the "Try it out!" function on the API Reference | RingCentral Developers doesn't work either.
There's nothing about the code that would raise issues.
@group_limit("medium") def company_directory(page=1): queryParams = { "page": page, "perPage": 1000, } if platform is None: init_platform() with click_spinner.spinner(): resp = platform.get(f"/restapi/v1.0/account/~/directory/entries", queryParams) result = resp.json_dict() yield result["records"] paging = result["paging"] if paging["page"] < paging["totalPages"]: yield from company_directory(page + 1)
No, that is not the endpoint. I showed you my sample code above. It is the extension endpoint with the "type=IvrMenu" filter
'/restapi/v1.0/account/~/extension'
I see, it's very confusing that /account/accountId/directory/entries allows you to filter IVRMenu's then
Can't find your account. Is this the account's name "Elgas Limited"?
That's the one.
To list your company IVR menus, call the extension API with the "type" filter set to "IvrMenu". Here is the sample code in Node Js
async function list_ivr_menu(){ try{ var params = { type: ["IvrMenu"] } var resp = await platform.get('/restapi/v1.0/account/~/extension', params) var jsonObj = await resp.json() for (var record of jsonObj.records) console.log(JSON.stringify(record)) }catch(e){ console.log(e.message) } }
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder