存取控制的 API
SetPermission
根據您的範例輸入使用下列結構,為指定的非管理員使用者群組 (角色) 設定針對 API 清單的執行權限:
範例
{
"inputs": {
"roleName": "MyCustomGroup",
"apis": [
{
"thingName": "PTC-PLM.Windchill.BillOfProcess.Part",
"serviceName": "GetProcessPlans"
},
{
"thingName": "PTC-PLM.Windchill.BillOfProcess.Part",
"serviceName": "GetVariantSpecs"
},
{
"thingName": "PTC-PLM.Windchill.BillOfProcess",
"serviceName": "GetEnterpriseOperationDetails"
}
]
},
"version": "1"
}
「描述」
• roleName:此項可指定為其設定權限之使用者群組 (在本例中為 "MyCustomGroup") 的名稱。
• apis:這是 API 物件的陣列,每個物件都包含:
◦ thingName:與 API 相關聯的物件 (或資源) 名稱。
◦ serviceName:為其設定執行權限的特定服務。
此結構可讓您清楚定義受影響的使用者群組,以及權限設定流程中涉及的 API。
RevokePermission
根據您的範例輸入使用下列結構,撤銷指定非管理員使用者群組 (角色) 針對 API 清單的執行權限:
範例
{
"inputs": {
"roleName": "MyCustomGroup",
"apis": [
{
"thingName": "PTC-PLM.Windchill.BillOfProcess.Part",
"serviceName": "GetProcessPlans"
},
{
"thingName": "PTC-PLM.Windchill.BillOfProcess.Part",
"serviceName": "GetVariantSpecs"
},
{
"thingName": "PTC-PLM.Windchill.BillOfProcess",
"serviceName": "GetEnterpriseOperationDetails"
}
]
},
"version": "1"
}
「描述」
• roleName:此項可指定為其撤銷權限之使用者群組 (在本例中為 "MyCustomGroup") 的名稱。
• apis:這是 API 物件的陣列,每個物件都包含:
◦ thingName:與 API 相關聯的物件 (或資源) 名稱。
◦ serviceName:要撤銷其執行權限的特定服務。
此結構可讓您清楚定義受影響的使用者群組,以及權限撤銷流程中涉及的 API。