獲取應用的條件通知設置

information

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

目錄

獲取應用的條件通知設置

獲取應用的條件通知的設置。

URL

獲取生產環境的設置時,URL 與獲取測試環境的設置時不同。

如果要獲取生產環境的設置
常規應用
https://sample.cybozu.com/k/v1/app/notifications/general.json
建立訪客空間
https://sample.cybozu.com/k/guest/GUEST_SPACE_ID/v1/app/notifications/general.json
獲取操作測試環境的設置
常規應用
https://sample.cybozu.com/k/v1/preview/app/notifications/general.json
建立訪客空間
https://sample.cybozu.com/k/guest/GUEST_SPACE_ID/v1/preview/app/notifications/general.json

HTTP 方法

GET

所需許可權

  • 應用程式管理

請求

參數
參數名稱 必須 說明
app 數位或字串 必須 應用ID
範例請求(如果在網址中包含參數 )
URL

https://sample.cybozu.com/k/v1/app/notifications/general.json?app=1

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

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

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

https://sample.cybozu.com/k/v1/app/notifications/general.json

頁眉
1
2
3
4
{
  "X-Cybozu-API-Token": "API_TOKEN",
  "Content-Type": "application/json"
}
身體
1
2
3
{
  "app": "1"
}

回應

財產
屬性名稱 說明
notifications 陣列(物件) 表示條件通知設置的物件陣列
notifications[].entity 物件 一個物件,表示條件通知設置的目標
notifications[].entity.type 字串 條件通知設置的類型
  • USER:使用者
  • GROUP:群組
  • ORGANIZATION:組織
  • FIELD_ENTITY:在添加表單欄位中指定的欄位
    • 建立人
    • 更新人
    • 選擇使用者
    • 選擇組織
    • 選擇群組
notifications[].entity.code 字串 設置條件通知的代碼
entity.type 這取決於的值。
  • 對於"使用者":用戶的登錄名
  • 對於"GROUP":組代碼
  • 對於"ORGANIZATION":組織代碼
  • 對於FIELD_ENTITY:在添加表單欄位中指定的欄位的欄位代碼
如果您是訪客使用者,則您的登錄名前面有"guest/"。
notifications[].includeSubs 布爾值 設置是否由子單位繼承
  • true:繼承
  • false:不繼承
entity.type 僅當的值為 「ORGANIZATION」 或 「FIELD_ENTITY」 指定組織選擇欄位時,才返回"true"。
notifications[].recordAdded 布爾值 添加記錄時是否通知
  • true:添加記錄時通知
  • false:添加記錄時不通知
notifications[].recordEdited 布爾值 編輯記錄時是否通知
  • true:通過記錄編輯通知
  • false:編輯記錄時不通知
notifications[].commentAdded 布爾值 是否在撰寫評論時通知
  • true:通過寫評論通知
  • false:寫評論時不通知
notifications[].statusChanged 布爾值 是否希望收到狀態更新的通知
  • true:通知我狀態更新
  • false:不通知我狀態更新
notifications[].fileImported 布爾值 載入檔時是否通知
  • true:通過載入檔通知
  • false:載入檔時不通知
notifyToCommenter 布爾值 曾填寫回覆的使用者,將於該記錄新增回覆時收到通知。
  • true:在撰寫評論時接收通知
  • false:在撰寫評論時不接收通知
revision 字串 應用設置的修訂號
示例回應
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "notifications": [
    {
      "entity": {
        "type": "USER",
        "code": "user1"
      },
      "includeSubs": false,
      "recordAdded": true,
      "recordEdited": true,
      "commentAdded": false,
      "statusChanged": false,
      "fileImported": true
    }
  ],
  "notifyToCommenter": true,
  "revision": "2"
}

示例代碼

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

await kintone.api(kintone.api.url('/k/v1/app/notifications/general.json', true), 'GET', body);