node.js - 推送到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"
},
解决方案
推荐阅读
- javascript - 如何查看网站是客户端呈现还是服务器端呈现?
- java - 在 Kotlin 中,有没有办法通过函数调用向枚举中添加一个值?
- r - 在r中找到水道周围两点之间的最短距离
- atom-editor - Atom 编辑器:失去了在 Atom 编辑器中进行多行编辑的能力
- next.js - Apollo GraphQL 加载查询
- javascript - 可观察到的角度订阅返回未定义
- html - 如何在angular9中动态添加类名
- amazon-web-services - 如何使用 POST 函数将 DynamoDB、Lambda 函数或网关 API 链接到外部 API?
- reactjs - 具有多路径的 React Router 的 Laravel 路由设置
- c# - 使用“Enter”导航将按钮集中在其他页面上