更新使用者可用的服務。
一次最多只能選擇100個使用者。
有關用於導入 CSV 檔的 API 的詳細資訊,請參閱
導入User Usage Services 。
https://sample.cybozu.com/v1/users/services.json
PUT
參數
參數值 |
型 |
必須 |
說明 |
users |
陣列 |
必須 |
訪客資訊的編輯 |
users[].code |
字串 |
必須 |
用戶代碼 指定不超過 128 個字元。 不能指定空格或僅指定空格。
|
users[].services |
陣列 |
必須 |
服務代碼 您可以指定以下值:kintone :kintonegaroon :Garoonoffice :Cybozu Officemailwise :Mailwisesecure_access :SecureAccess 若要取消使用者的所有服務,請指定一個空陣列。 |
示例請求
頁眉
1
2
3
4
|
{
"X-Cybozu-Authorization": "QWRtaW5pc3RyYXRvcjpjeWJvenU=",
"Content-Type": "application/json"
}
|
有關請求頭的詳細資訊,請參閱
通用使用者 API 規範 。
身體
1
2
3
4
5
6
7
8
9
10
11
12
|
{
"users": [
{
"code": "sato-noboru",
"services": ["garoon", "kintone"]
},
{
"code": "kato-misaki",
"services": ["kintone"]
}
]
}
|
使用 curl 的請求
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
curl -X PUT 'https://sample.cybozu.com/v1/users/services.json' \
-H 'X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU=' \
-H 'Content-Type: application/json' \
-d '{
"users": [
{
"code": "sato-noboru",
"services": ["garoon", "kintone"]
},
{
"code": "kato-misaki",
"services": ["kintone"]
}
]
}'
|
- cybozu.com 不建議您在「管理通用」 中執行以下操作並並行執行API。