選擇欄位

information

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

目錄

選擇欄位

從表單中刪除欄位。
刪除組或表時,也會刪除該組或表中的所有欄位。

其值自動填充的下一個字段僅從表單中刪除,而不會從數據中刪除。

  • 記錄號碼
  • 建立人
  • 更新人
  • 建立時間
  • 更新時間

此 API 在測試環境中修改應用。
如果要將更改傳播到生產環境,請運行此 API,然後 運行將應用設置傳播到生產環境的 API

URL

常規應用
https://sample.cybozu.com/k/v1/preview/app/form/fields.json
建立訪客空間
https://sample.cybozu.com/k/guest/GUEST_SPACE_ID/v1/preview/app/form/fields.json

HTTP 方法

DELETE

所需許可權

  • 應用程式管理

請求

參數
參數名稱 必須 說明
app 數位或字串 必須 應用ID
fields 陣列 必須 要刪除的欄位的欄位代碼清單
您最多可以指定 100 個字段。
revision 數位或字串 自選 預期修訂號
如果它與實際修訂號不匹配,則會發生錯誤,並且不會刪除該字段。
如果指定值"-1"或未指定值,則不會驗證修訂號。
範例請求(如果在網址中包含參數 )
URL

https://sample.cybozu.com/k/v1/preview/app/form/fields.json?app=1&fields[0]=%E6%96%87%E5%AD%97%E5%88%971%E8%A1%8C_0&fields[1]=%E6%95%B0%E5%80%A4&revision=2

頁眉
1
2
3
{
  "X-Cybozu-API-Token": "API_TOKEN"
}

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

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

https://sample.cybozu.com/k/v1/preview/app/form/fields.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,
  "revision": 2,
  "fields": ["字串" "數位"]
}

回應

財產
屬性名稱 說明
revision 字串 更改應用設置后的修訂號
示例回應
1
2
3
{
  "revision": "3"
}

示例代碼

使用 curl 的請求
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
curl -X DELETE 'https://sample.cybozu.com/k/v1/preview/app/form/fields.json' \
  -H 'X-Cybozu-API-Token: API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "app": 1,
    "revision": 2,
    "fields": [
      "字串",
      "数値"
    ]
  }'
發送kintone REST API請求 使用API 發送請求
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
const body = {
  app: kintone.app.getId(),
  revision: 2,
  fields: [
    '文字串',
    '数値'
  ]
};

await kintone.api(kintone.api.url('/k/v1/preview/app/form/fields.json'), 'DELETE', body);

await kintone.api(kintone.api.url('/k/v1/preview/app/form/fields.json'), 'DELETE', body);

限制

  • 以下欄位無法刪除:
    • 狀態
    • 執行者
    • 類別