首页 > 解决方案 > 推送到FusionPBX数据库

问题描述

如果您像我一样有穴居人的大脑,或者您发现 fusionpbx 文档难以阅读,我已经写过如何使用 nodeJS 推送到他们的数据库。确保将表名正确存储在 JSON 对象中。

这里我以目的地为例

  const axiosUser = await axios({
    method: 'post',
    url: '${domain name}/app/api/7/destinations?key=${API_KEY}',
    data:{
      destinations:destination.destinations // here i am importing my JSON OBJECT
    },
    httpsAgent: httpsAgent
  })
    console.log(axiosUser.data)
  } ```


also obviously add the correct packages
- axios
- https
- JSON object


and here is the JSON object example

{
  "destinations": [
    {
      "domain_uuid": "DOMAIN UUID",

      "destination_number": "NUMBER",
      "destination_description": "NAME OF PERSON"
    },

标签: node.js

解决方案


推荐阅读