Delete API

DELETE https://{controlplane_path}/api/1/rest/public/apim/{path_to_api}      

Overview

Soft delete an APIM API. This is a soft delete, and is recoverable from the Recycle Bin.
Note: As an Org admin, you can use the Recycle Bin to recover or permanently remove deleted endpoint accounts, files, pipelines, tasks, project spaces, and projects. Deleted items can be recovered in 30 days unless you delete them permanently. Learn more about Recycle Bin.
Important: This page describes a Classic APIM API.

Prerequisites

  • Environment (Org) admin permissions

Request

 DELETE https://{controlplane_path}/api/1/rest/public/apim/{path_to_api}?{query_parameters}

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

curl -X 'DELETE' \
  'https://elastic.snaplogic.com/api/1/rest/public/apim/acme/apim/BookStore?soft_delete=true' \
  -H 'Authorization: Basic {base64_encoded email:password}'

Path parameters

Key Description
controlplane_path Required. The path to the SnapLogic control plane: elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For example:
  • uat.elastic.snaplogic.com
  • emea.snaplogic.com
path_to_api Required. The path to the SnapLogic API.

Format: /org_name/apim/api

Important: The path is case sensitive

Query parameters

Key Type Description
soft_delete boolean
  • If the flag is set as true and API is unpublished/retired, that API is deleted and sent to recycle bin
  • If the flag is set as true and the API is published, the API is not deleted and not sent to recycle bin.
  • If the flag is set as true and API is deprecated, the API is not deleted and not sent to recycle bin.

Request header

Use the application/json content type with basic authentication (email and password) or a JWT. For examples, refer to Authentication.

Request body

None.

Response

Response

{
    "response_map": {
        "success": {
            "success": {
                "disabled_jobs": [
                    {
                        "/Automation2/apim/api/1.0": []
                    },
                    {
                        "/Automation2/apim/api/1.1": []
                    }
                ],
                "deleted_plexes": [],
                "path": "/Automation2/apim/api"
            }
        }
    },
    "http_status_code": 200
}
Key Type Description
disabled_jobs array Paths to the disabled tasks in the API version.
deleted_plexes array Paths to the disabled plexes.
path array All the assets in the API version.

Error handling

HTTP status codes Message Resolution
400 {"message":"Published/Deprecated API cannot be deleted, Unpublish/Retire the api first to remove."} Unpublish or deprecate the API to delete it.
404 {"message": "The requested resource at the supplied path does not exist: /org_name/apim/api_version"}
  • Check if the API exists.
  • Check if you have entered the correct Org name.