eloqua - Eloqua's update event API endpoint overwrites instead of updating
问题描述
I'm writing a script that will hit the Eloqua API to add a new sessions to an event as per the docs here. I'm using the endpoint /api/REST/2.0/assets/eventRegistration/{id}
from the docs and doing a put request that looks like this:
{
"type": "EventRegistration",
"id": "131",
"sessions": [
{
"type": "EventSession",
"id": "46",
"name": "TEST+PUT+SESSION"
}
]
}
But that request overwrites the event and deletes any other sessions that already exist. Is there a way to tell the api to just add a new session and not overwrite or do I need to do a get request first and then a put?
解决方案
All existing sessions are required when adding new sessions, so you will need to retrieve all sessions to include existing sessions in the PUT.
推荐阅读
- javascript - 在最近的浏览器中播放 HTML 5 视频是否需要 Javascript?
- reactjs - flex 方向行项目溢出如何解决这个问题?
- sql-server - 找出销量排名前5位的厂商中各型号的平均价格,并按平均价格订购
- javascript - 如何将我的过滤器脚本设置为仅在首次加载时显示网站上默认按钮位置的项目?
- javascript - 容器绑定脚本上的错误“预期的 OAuth 2 访问令牌”
- javascript - 如何正确控制执行流程 Javascript 异常处理
- javascript - 重复字符的 JavaScript 正则表达式规则
- python-3.x - 语法 X = Add() ([tensor1, tensor2]) 在使用 keras.layers.add 构建 ResNET 时如何准确工作?
- php - echo 在要作为 echo | 输出的值内 PHP
- linux - 如何告诉用户空间程序停止发送?或者发送了多少个字符?