獲取應用的條件通知的設置。
獲取生產環境的設置時,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
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"
}
|
身體
財產
屬性名稱 |
型 |
說明 |
notifications |
陣列(物件) |
表示條件通知設置的物件陣列 |
notifications[].entity |
物件 |
一個物件,表示條件通知設置的目標 |
notifications[].entity.type |
字串 |
條件通知設置的類型USER :使用者GROUP :群組ORGANIZATION :組織FIELD_ENTITY :在添加表單欄位中指定的欄位
|
notifications[].entity.code |
字串 |
設置條件通知的代碼
entity.type 這取決於的值。- 對於"使用者":用戶的登錄名
- 對於"GROUP":組代碼
- 對於"ORGANIZATION":組織代碼
- 對於FIELD_ENTITY:在添加表單欄位中指定的欄位的欄位代碼
如果您是訪客使用者,則您的登錄名前面有"guest/"。 |
notifications[].includeSubs |
布爾值 |
設置是否由子單位繼承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
}'
|
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);
|