我正在检查设备访问API。
SoftLayer_User_Customer中有一个设备访问API。
但我无法找到&#34的API;在添加新设备时自动授予访问权限#34;
我在哪里可以找到它?或SoftLayer不支持?
答案 0 :(得分:0)
您必须添加权限才能在添加新设备时实施自动授予访问权限。
这是添加权限的其余API:
POST
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_User_Customer/[userId]/addPortalPermission
身体:Json
{
"parameters": [
{
"keyName": "ACCESS_ALL_HARDWARE" // To add the “ACCESS_ALL_GUEST” and “ACCESS_ALL_DEDICATEDHOSTS” permissions you have to run the same request, changing
} // only the “keyName”.
]
}
要获取所有权限的“keyName”,请使用以下rest api:
GET
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_User_Customer_CustomerPermission_Permission/getAllObjects
要验证是否已添加权限,请使用此rest api:
GET
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_User_Customer/[userId]/getPermissions