How can I delete organization? Or how can i change alias of organization?

hsnbilgen
Participant III

i have OPDK (Private Cloud Apigee Edge). i have a problem with the alias of an organization. can anyone help me to delete the org? or re configure the alias of an organization? @Anil Sagar

Solved Solved
1 7 3,201
2 ACCEPTED SOLUTIONS

In the private cloud Apigee Edge product, there is a command-line tool called "create-org.sh" which allows you to create a new organization. There is also setup-org.sh which will set it up.

There is no tool to remove an organization, though it is possible to do so using the appropriate Admin APIs and curl commands. You have two options really: just ignore the existing organization, or actually remove it.

If you wish to actually remove it, then....

  1. undeploy and then delete any APIproxies in the organization.
  2. delete the virtual hosts curl -u $creds $url/o/$org/e/$env/virtualhosts/default -X DELETE
  3. Disassociate the environment from all MPs. Use UUIDs for the MPs, and run this command once per MP: curl -u $creds -H "Content-Type: application/x-www-form-urlencoded" -X POST "$url/o/$org/e/$env/servers" -d "action=remove&uuid=$UUID1"
  4. fixup the analytics group for each environment curl -u $creds -X DELETE "$url/analytics/groups/ax/axgroup001/scopes?org=$org&env=$env"
  5. delete each environment in the org: curl -u $creds "$ url/o/$org/e/$env" -X DELETE
  6. list the pods associated to the org, and remove the association between org and pods: curl -u $creds "$url/o/$org/pods" curl -u $creds -H "Content-Type: application/x-www-form-urlencoded" -X POST "$url/o/$org/pods" -d "action=remove&region=dc-1&pod=$PODNAME"
  7. delete the organization curl -u $creds "$url/o/$org" -X DELETE

There may be an additional step required after that to cleanup zookeeper, depending on the version of the Edge product that you have installed.

View solution in original post

Adding to Dino's point 1 - ignoring the org

if you chose to ignore the organization, you could remove all the users

http://apigee.com/docs/api-services/content/managing-organization-users#-a-name-delete-a-removing-us...

or using the API

http://apigee.com/docs/management/apis/delete/organizations/%7Borg_name%7D/userroles/%7Brole_name%7D...

That way, your users wont see it again

Thanks,

View solution in original post

7 REPLIES 7

In the private cloud Apigee Edge product, there is a command-line tool called "create-org.sh" which allows you to create a new organization. There is also setup-org.sh which will set it up.

There is no tool to remove an organization, though it is possible to do so using the appropriate Admin APIs and curl commands. You have two options really: just ignore the existing organization, or actually remove it.

If you wish to actually remove it, then....

  1. undeploy and then delete any APIproxies in the organization.
  2. delete the virtual hosts curl -u $creds $url/o/$org/e/$env/virtualhosts/default -X DELETE
  3. Disassociate the environment from all MPs. Use UUIDs for the MPs, and run this command once per MP: curl -u $creds -H "Content-Type: application/x-www-form-urlencoded" -X POST "$url/o/$org/e/$env/servers" -d "action=remove&uuid=$UUID1"
  4. fixup the analytics group for each environment curl -u $creds -X DELETE "$url/analytics/groups/ax/axgroup001/scopes?org=$org&env=$env"
  5. delete each environment in the org: curl -u $creds "$ url/o/$org/e/$env" -X DELETE
  6. list the pods associated to the org, and remove the association between org and pods: curl -u $creds "$url/o/$org/pods" curl -u $creds -H "Content-Type: application/x-www-form-urlencoded" -X POST "$url/o/$org/pods" -d "action=remove&region=dc-1&pod=$PODNAME"
  7. delete the organization curl -u $creds "$url/o/$org" -X DELETE

There may be an additional step required after that to cleanup zookeeper, depending on the version of the Edge product that you have installed.

I created an organization "XYZ" and then decided to delete the organization and delete environments named "dev" and "sit". As part of organization deletion, I deleted virtual host, environment and disassociated an organization from a pod. Finally when I tried to delete an organization through the management API call the response is

{ "code": "organizations.OrganizationDoesNotExist", "message": "Organization : XYZ does not exist", "contexts": [] }

When I logged into edge-ui, I could still see the organization as well the environment named "dev" are present and environment "sit" deleted successfully.

http://xx.xxx.xxx.xxx:8080/v1/organizations/XYZ (GET call)

Response:

{ "createdAt": 1543590692901, "createdBy": "apigee.admin@example..com", "displayName": "XYZ", "environments": ["dev"], "lastModifiedAt": 1543590692901, "lastModifiedBy": "apigee.admin@example.com", "mdc": { "first": "org", "second": "XYZ" }, "name": "XYZ", "properties": {"property": []}, "type": "paid" }

Please provide the inputs on resolving this issue.

Thanks,

Vijay.

Adding to Dino's point 1 - ignoring the org

if you chose to ignore the organization, you could remove all the users

http://apigee.com/docs/api-services/content/managing-organization-users#-a-name-delete-a-removing-us...

or using the API

http://apigee.com/docs/management/apis/delete/organizations/%7Borg_name%7D/userroles/%7Brole_name%7D...

That way, your users wont see it again

Thanks,

I created an organization "XYZ" and then decided to delete the organization and delete environments named "dev" and "sit". As part of organization deletion, I deleted virtual host, environment and disassociated an organization from a pod. Finally when I tried to delete an organization through the management API call the response is

{ "code": "organizations.OrganizationDoesNotExist", "message": "Organization : XYZ does not exist", "contexts": [] }

When I logged into edge-ui, I could still see the organization as well the environment named "dev" are present and environment "sit" deleted successfully.

http://xx.xxx.xxx.xxx:8080/v1/organizations/XYZ (GET call)

Response:

{ "createdAt": 1543590692901, "createdBy": "apigee.admin@example..com", "displayName": "XYZ", "environments": ["dev"], "lastModifiedAt": 1543590692901, "lastModifiedBy": "apigee.admin@example.com", "mdc": { "first": "org", "second": "XYZ" }, "name": "XYZ", "properties": {"property": []}, "type": "paid" }

Please provide the inputs on resolving this issue.

Thanks,

Vijay.

sgilson
Participant V

Hi @Dino,

I think the API call to fixup analytics is:

curl -u $creds -X DELETE "$url/analytics/groups/axgroup001/scopes?org=$org&env=$env"

Notice how I removed the "/ax" from the URL.

Stephen

I created an organization "XYZ" and then decided to delete the organization and delete environments named "dev" and "sit". As part of organization deletion, I deleted virtual host, environment and disassociated an organization from a pod. Finally when I tried to delete an organization through the management API call the response is

{ "code": "organizations.OrganizationDoesNotExist", "message": "Organization : XYZ does not exist", "contexts": [] }

When I logged into edge-ui, I could still see the organization as well the environment named "dev" are present and environment "sit" deleted successfully.

http://xx.xxx.xxx.xxx:8080/v1/organizations/XYZ (GET call)

Response:

{ "createdAt": 1543590692901, "createdBy": "apigee.admin@example..com", "displayName": "XYZ", "environments": ["dev"], "lastModifiedAt": 1543590692901, "lastModifiedBy": "apigee.admin@example.com", "mdc": { "first": "org", "second": "XYZ" }, "name": "XYZ", "properties": {"property": []}, "type": "paid" }

Please provide the inputs on resolving this issue.

Thanks,

Vijay.

@Vijayendra Kondaveeti,

Did you get resolution for this issue?