Skip to main content
The First Step
Jan 25, 2021 1:10 AM UTC
Question

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

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
Community Manager
Jan 25, 2021 3:58 PM UTC

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


The First Step
Jan 26, 2021 10:12 PM UTC

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
Community Manager
Jan 26, 2021 11:08 PM UTC

What is your account main company number?