Layer7 API Management

 View Only
  • 1.  Delete Organization from API Developer Portal 4.2.9.3

    Posted Nov 28, 2019 01:21 AM
    Hi,

    We have an api developer portal environment, v 4.2.9.3. We are unable to delete an organization from the organization list? We do not find the delete option at all.

    Does any one face this..not being able to delete unwanted organization?
    Is there any way to delete from the db?

    Geethu


    ------------------------------
    Geethu
    ------------------------------


  • 2.  RE: Delete Organization from API Developer Portal 4.2.9.3

    Posted Nov 28, 2019 01:58 PM
    Hi Geethu,

      There is no option to delete organization in the Organizations page.

      I managed to accomplish this using PAPI (Portal API).

      First you need to get an OAuth token to make PAPI calls using the Client_ID and Shared_Secret for the PAPI App of your tenant.
        - Log in to your Tenant using Admin credentials
        - Click "Portal API" in your Dashboard (a new window appears, with API explorer for your administrative ("APIM") Tenant.
        - Select the API "Portal API (Your_Tenant)" and the "App/Api Key" "Portal API App for Tour_Tenant".
        - Take note of the "API Key", "Shared Secret" and Token Endpoint and use them to request the token using the "Client_Credentials" OAuth flow

       Once you get the OAuth Token, use it to Authorize PAPI Calls.

       To  Delete an Organization, first you have to issue a GET request to get the list of all organizations and organization details.
       You have two options:

       Method GET Request -> https://apim-ssg.YOUR_DOMAIN:9443/YOUR_TENANT/Organizations

       or 

      Method GET Request ->  GET https://apim-ssg.YOUR_DOMAIN:9443/YOUR_TENANT/tenant-admin/1.0/organizations

       The response JSON will provide you with the Organizations UUIDs and NAMEs.

       Once you find the UUID belonging to the  Organization you want to delete, you can delete It using:

      Method DELETE Request ->   https://apim-ssg.YOUR_DOMAIN:9443/YOUR_TENANT/Organizations('a3b68c02-4655-4ca9-be1d-87c1b1411994')

       In the example above "a3b68c02-4655-4ca9-be1d-87c1b1411994" is the UUID of the Organization

       The documentation states that "If the organization is associated with any applications, users, private APIs, or account plans, then it cannot be deleted."

    PAPI is documented at:
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/layer7-api-management/api-developer-portal/4-2/publishers/portal-api-papi/papi-swagger-file-4-2-9.html

    Regards,

    Marlos Chida


  • 3.  RE: Delete Organization from API Developer Portal 4.2.9.3

    Broadcom Employee
    Posted Nov 28, 2019 04:26 PM
    Dear Geethu,
    In addition to what Marlos Chida said, just to remind you,  if the org is still associated to any entity (application, user, account plan, etc.) , even the PAPI cannot delete it.

    Regards,
    Mark


  • 4.  RE: Delete Organization from API Developer Portal 4.2.9.3

    Posted Nov 29, 2019 12:46 AM
    Thank you so much Marlos and Mark.

    I wonder why portal UI doesn't have that feature?

    Geethu


  • 5.  RE: Delete Organization from API Developer Portal 4.2.9.3
    Best Answer

    Posted Nov 29, 2019 03:19 AM
    Hello Geethu,
    Actually there is a way to delete an organisation via the PAPI:
    1) delete all apps pertaining to that organisation
    2) delete all users for that organisation (you will not be able to delete the last orgadmin of that organisation but that is expected)
    3) use the PAPI to change that last orgadmin user to a 'simple' developer user
    4) delete that last user using PAPI
    5) delete the ORG via PAPI

    I hope this helps

    ------------------------------
    Maurizio Garzelli
    APIIDA
    APIIDA Principal Consultant
    https://apiida.com
    ------------------------------



  • 6.  RE: Delete Organization from API Developer Portal 4.2.9.3

    Posted Dec 02, 2019 01:49 AM
    Thanks a lot Maurizio Garzelli !! :)