獲取應用訪問許可權設置

information

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

目錄

獲取應用訪問許可權設置

獲取應用的訪問許可權設置。

URL

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

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

HTTP 方法

GET

所需許可權

  • 應用程式管理

請求

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

https://sample.cybozu.com/k/v1/app/acl.json?app=8

頁眉
1
2
3
{
  "X-Cybozu-Authorization": "QWRtaW5pc3RyYXRvcjpjeWJvenU="
}

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

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

https://sample.cybozu.com/k/v1/app/acl.json

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

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

身體
1
2
3
{
  "app": "8"
}

回應

財產
屬性名稱 說明
rights 陣列 存取權限清單
設置按從高優先順序到最低的順序排列。
rights[].entity 物件 設置許可權的內容
rights[].entity.type 字串 訪問許可權的類型
  • USER:使用者
  • GROUP:群組
  • ORGANIZATION:組織
  • CREATOR:建立應用程式
rights[].entity.code 字串 要為其設置許可權的代碼
entity.type 這取決於的值。
  • 對於"使用者":用戶的登錄名
  • 對於"GROUP":組代碼
  • 對於"ORGANIZATION":組織代碼
  • 對於"CREATOR": "null"
如果您是訪客使用者,則您的登錄名前面有"guest/"。
rights[].includeSubs 布爾值 設置是否由子單位繼承
  • true:繼承
  • false:不繼承
entity.type 僅當的值為 「ORGANIZATION」 或 「FIELD_ENTITY」 指定組織選擇欄位時,才返回"true"。
rights[].appEditable 布爾值 是否可以管理應用
  • true:您可以管理您的應用程式
  • false:我無法管理應用程式
rights[].recordViewable 布爾值 是否可以查看記錄
  • true: 可以查看
  • false:不可見
rights[].recordAddable 布爾值 是否可以添加記錄
  • true:可添加
  • false:無法添加
rights[].recordEditable 布爾值 是否可以編輯記錄
  • true:可編輯
  • false:無法編輯
rights[].recordDeletable 布爾值 是否可以刪除記錄
  • true:可以刪除
  • false:無法刪除
rights[].recordImportable 布爾值 檔是否可以讀取
  • true:可以匯入檔。
  • false:無法讀取檔
rights[].recordExportable 布爾值 檔是否可以匯出
  • true:可以匯出檔。
  • false:我無法匯出檔。
revision 字串 應用設置的修訂號
示例回應
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  "rights": [
    {
      "entity": {
        "type": "USER",
        "code": "user1"
      },
      "includeSubs": false,
      "appEditable": true,
      "recordViewable": true,
      "recordAddable": true,
      "recordEditable": true,
      "recordDeletable": true,
      "recordImportable": true,
      "recordExportable": true
    },
    {
      "entity": {
        "type": "GROUP",
        "code": "group1"
      },
      "includeSubs": false,
      "appEditable": false,
      "recordViewable": false,
      "recordAddable": false,
      "recordEditable": false,
      "recordDeletable": false,
      "recordImportable": false,
      "recordExportable": false
    },
    {
      "entity": {
        "type": "ORGANIZATION",
        "code": "org1"
      },
      "includeSubs": true,
      "appEditable": false,
      "recordViewable": true,
      "recordAddable": true,
      "recordEditable": true,
      "recordDeletable": true,
      "recordImportable": true,
      "recordExportable": true
    },
    {
      "entity": {
        "type": "CREATOR",
        "code": null
      },
      "includeSubs": false,
      "appEditable": true,
      "recordViewable": true,
      "recordAddable": true,
      "recordEditable": true,
      "recordDeletable": true,
      "recordImportable": true,
      "recordExportable": true
    }
  ],
  "revision": "2"
}

示例代碼

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

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