刪除貴機構的營利資料

您正在查看 Apigee Edge 說明文件。
查看 Apigee X 說明文件

簡介

在下列情況中,建議刪除貴機構的營利資料:

  • 從要重複使用的測試機構中清除營利資料。在這種情況下,您必須在刪除營利資料後同步處理 Apigee Edge 資料。
  • 刪除機構。您必須刪除營利資料,才能刪除機構。

刪除機構的營利資料會永久移除下列資料:

  • API 套件
  • 房價方案
  • 開發人員接受的房價方案
  • 營利交易
  • 通知範本
  • 第三方付款服務供應商 (如已設定)

以下各節說明從貴機構刪除營利資料的必要步驟,以支援上述情境:

允許刪除貴機構的營利資料

您必須先為貴機構啟用 features.isMintOrgDataDeletionAllowed 資源,才能刪除貴機構的營利資料。

透過向 https://api.enterprise.apigee.com/v1/organizations/org_name API 發出 POST 呼叫啟用,其中 org_name 是貴機構的名稱。

curl -u email:password -X POST -H "Content-type:application/json" https://api.enterprise.apigee.com/v1/organizations/{org_name} -d \
'{
  "name" : "{org_name}",
  "properties" : {
    "property" : [ {
      "name" : "features.isMintOrgDataDeletionAllowed",
      "value" : "true"
    }, {
      "name" : "features.topLevelDevelopersAreCompanies",
      "value" : "false"
    } ]
  }
}'

刪除營利資料

如要刪除貴機構的營利資料,請向 /organizations/org_name/asyncjobs/deleteorgdata 發出 POST 要求,其中 org_name 是貴機構的名稱。

舉例來說,以下要求會刪除 myOrg 機構的營利資料:

curl -H "Content-Type:application/json" -X POST \
"https://api.enterprise.apigee.com/v1/mint/organizations/myOrg/asyncjobs/deleteorgdata" \
-u email:password

以下為回應範例:

{
  "id": "c6eaa22d-27bd-46cc-be6f-4f77270818cf",
  "log": "",
  "orgId": "myOrg",
  "status": "RUNNING",
  "type": "DELETE_ORG"
}

查看非同步刪除作業的狀態

如要查看非同步刪除作業的狀態,請向 /asyncjobs/{id} 發出 GET 要求,其中 {id} 是回應中傳回的刪除作業 ID。

舉例來說,下列要求會顯示 ID 為 c6eaa22d-27bd-46cc-be6f-4f77270818cf 的非同步刪除作業狀態:

curl -X GET \
"https://api.enterprise.apigee.com/v1/mint/asyncjobs/c6eaa22d-27bd-46cc-be6f-4f77270818cf" \
-u email:password

以下為回應範例:

{
  "id": "c6eaa22d-27bd-46cc-be6f-4f77270818cf",
  "log": "",
  "orgId": "myOrg",
  "status": "COMPLETED",
  "type": "DELETE_ORG"
}

同步處理 Apigee Edge 資料與營利

如果您想重複使用這個機構,必須同步處理 Apigee Edge 資料與營利資料,詳情請參閱「同步處理 Apigee Edge 與營利資料」一節。

正在刪除機構

如果不再需要機構,您可以在刪除營利資料後刪除公司資料,詳情請參閱「刪除機構」。