我尝试按照本文档https://apidocs.teamup.com/docs/api/8b5d0d1556103-update-an-event中所述更新和删除 Teamup 日历中的事件。我尝试了不同的数据组合,但无法删除和更新事件。
下面您可以看到更新事件的代码片段
curl --location --request PUT 'https://teamup.com/<calender-key>/events/<event-id>?tz=Asia%2FKatmandu' \
--header 'Accept: application/json' \
--header 'Teamup-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"id":<event-id>,
"subcalendar_ids": [
<subcalender-id>
],
"subcalendar_remote_ids": [
"123"
],
"creation_dt":"2024-06-21T12:00:00+05:45",
"start_dt": "2024-06-21T12:00:00+05:45",
"end_dt": "2024-06-21T15:15:00+05:45",
"all_day": false,
"rrule": "",
"notes": "string",
"version": "string",
"remote_id": "string",
"redit": "single",
"ristart_dt": null,
"title": "string",
"location": "string",
"who": "string",
"signup_enabled": true,
"signup_deadline": "2024-06-21T15:15:00+05:45",
"signup_visibility": "all_users",
"signup_limit": 1,
"comments_enabled": true,
"comments_visibility": "all_users"
}'
我没有更新事件,但仍然出现以下错误
{"error":{"id":"event_validation_conflict","title":"Conflict with another user","message":"The event was changed by another user while you were editing. Please close the event editor, refresh the calendar and edit again."}}%
任何人都可以洞察上述请求有什么问题吗
我认为您请求了错误的 API 主机。 尝试用
https://api.teamup.com
代替 https://teamup.com