Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-3265

Improve the usability of the delete service API - quick fix

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • 2.5.1
    • System
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • 3scale 2019-09-09, 3scale 2019-09-30

      When deleting a service via the API, the action is currently asynchronous. This means that it is very difficult to automate this action as there is no ergonomic way to determine when the service has been fully deleted. Often this action is followed by a recreate of the service which results in a 422 error due to the service name already being in use.

      This API could be improved by either being synchronous (which would probably require performance improvements to the delete process since it can take a while). Or via a new job status API that returns a job id that can be queried to determine when the job is done.

      Note that service deletion has been addressed in THREESCALE-2987, THREESCALE-2988

      Dev notes

      To get something to the customer quickly, we can just add another endpoint to provide some information if the object still exists in the Database (unscoped query)
      The endpoint could look like

      Path: /admin/api/objects/status
      Parameters:
      - object_type: Service|Account|Proxy
      - object_id: Integer
      
      Response:
      200 or 404
      
      Determine the body in case of 200
      

      (Somewhat related - at the tenant level we have a "show" request that responds with the status when it has not been deleted yet.)
      For jobId it is an idea but I do not want to introduce more dependencies on our background job.

              Unassigned Unassigned
              rhn-support-spoole Shannon Poole
              Michal Macejko Michal Macejko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: