刪除記錄回覆

information

本頁面使用機器翻譯而成。
機器翻譯免責聲明 (External link)

目錄

刪除記錄回覆

刪除記錄回覆。

  • 您只能刪除運行 API 的使用者貼文的回覆。
    • 如果您使用 API 令牌身份驗證運行 API,則只能刪除”Administrator”用戶發佈的回覆。
  • 如果您在禁用記錄回覆的應用程式中運行它,則會出現錯誤。

URL

常規應用程式
https://sample.cybozu.com/k/v1/record/comment.json
訪客空間的應用程式
https://sample.cybozu.com/k/guest/GUEST_SPACE_ID/v1/record/comment.json

HTTP 方法

DELETE

所需存取權限

  • 查看應用以刪除回覆的許可權
  • 查看刪除註釋的回覆的許可權

請求

參數
參數名稱 類型 必須 說明
app 數位或字串 必須 應用ID
record 數位或字串 必須 記錄ID
comment 數位或字串 必須 評論ID
範例請求(如果在網址中包含參數 )
URL

https://sample.cybozu.com/k/v1/record/comment.json?app=1&record=1&comment=1

標頭
1
2
3
{
  "X-Cybozu-API-Token": "API_TOKEN"
}

關於請求標頭,請參見 kintone REST API的通用規範

範例要求(如果要在要求內文中包含參數)
URL

https://sample.cybozu.com/k/v1/record/comment.json

標頭
1
2
3
4
{
  "X-Cybozu-API-Token": "API_TOKEN",
  "Content-Type": "application/json"
}

關於請求標頭,請參見 kintone REST API的通用規範

內文
1
2
3
4
5
{
  "app": 1,
  "record": 1,
  "comment": 1
}

回應

屬性

示例回應
1
{}

示例代碼

使用 curl 的請求
1
2
3
4
5
6
7
8
curl -X DELETE 'https://sample.cybozu.com/k/v1/record/comment.json' \
  -H 'X-Cybozu-API-Token: API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "app": 1,
    "record": 1001,
    "comment": 1
  }'
發送kintone REST API請求 使用API 發送請求
1
2
3
4
5
6
7
const body = {
  app: kintone.app.getId(),
  record: 1001,
  comment: 1
};

await kintone.api(kintone.api.url('/k/v1/record/comment.json', true), 'DELETE', body);