Skip to main content
Question

/account/~/directory/entries not returning IVR Menus

  • January 25, 2021
  • 3 replies
  • 936 views

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

3 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • January 25, 2021

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)
  }
}



  • Author
  • New Participant
  • January 26, 2021

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.


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • January 26, 2021

What is your account main company number?