Question

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

  • 25 January 2021
  • 3 replies
  • 901 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

Userlevel 1

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


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.

Userlevel 1

What is your account main company number?

Reply