Send Docs Feedback

Delete monetization data from your organization

Introduction

You may wish to delete monetization data from your organization in the following scenarios:

  • Clear monetization data from a test organization that you would like to reuse. In this case, you must synchronize the Apigee Edge data after you delete the monetization data.
  • Delete your organization. In this case, you must delete the monetization data before you can delete the organization.

The following sections describe the steps required to delete monetization data from your organization to support the scenarios above:

Enabling the deletion of monetization data from your organization

Before you can delete monetization data from your organization, you must enable the features.isMintOrgDataDeletionAllowed property for your organization.

Enable the property by issuing a POST call to the https://api.enterprise.apigee.com/v1/organizations/{org_name} API, where {org_name} is the name of your organization.

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"
    } ]
  }
}'

When you update the organization with the API call, be sure to include all the existing organization properties in the payload, even if they are not being changed. Otherwise, the existing organization properties are overwritten by only the properties you set with this call. To view the properties currently set for your organization, see Get Organization.


The following properties are reserved and unchangeable. Specifying them in the request payload will have no impact, and you can omit them.

  • features.isCpsEnabled - Specifies whether your organization is running on the Core Persistence Services framework.
  • features.isMonetizationEnabled - Indicates that Monetization is enabled.

Deleting monetization data

Deleting monetization data from an organization permanently removes the following data:

  • API packages
  • Rate plans
  • Developer accepted rate plans
  • Monetization transactions
  • Third-party payment providers, if configured

To delete monetization data from your organization, issue a POST request to /organizations/{org_name}/delete-org-data, where {org_name} is the name of your organization.

Apigee recommends that you delete monetization data before moving to production. This API will permanently delete all monetization data from your organization. Do not proceed if there is any monetization data that you need to maintain. 

For example, the following request deletes monetization data from the myOrg organization:

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

The following provides an example of the response:

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

Viewing the status of the asynchronous delete operation

This section is valid Apigee Edge Private Cloud customers with sys admin privileges. Apigee Cloud customers should contact their Apigee customer support representative to confirm the asynchronous job has fully completed.

To view the status of the asynchronous delete operation, issue a GET request to /asyncjobs/{id}, where {id} is the ID of the delete operation returned in the response.

For example, the following request displays the status of the asynchronous delete operation with the 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

The following provides an example of the response:

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

Synchronizing Apigee Edge data with monetization

If you want to re-use the organization, you must synchronize Apigee Edge data with monetization, as described in Synchronize Apigee Edge data with monetization.

Deleting the organization

If the organization is no longer needed, you can delete it after you have deleted the monetization data, as described in Delete an Organization.

 

Help or comments?