Delete URL endpoint

When a service instance is deleted, AMS calls the app's Delete URL to delete the service instance.

AMS will send a request resembling the following:

POST <service-base-url><service-delete-url>
Authorization: Bearer <JWT>
{
    "uuid": "2128d91f-7248-4361-94b8-38a414d5cbb1",
    "assetType": "campaign",
    "assetId": null,
    "recordDefinition": {
        "inputParameters": [
        {
            "dataType": "Double",
            "unique": true,
            "name": "input",
            "width": 10
        }
        ],
        "outputParameters": [
        {
            "dataType": "Double",
            "unique": true,
            "name": "output",
            "width": 10
        }
        ]
    },
    "applicationService": {
        "uuid": "c2d3a932-2e00-45e5-9899-17d8edda00c7",
        "name": "service",
        "description": null,
        "baseUrl": "https://somefakeappbaseurl.com",
        "configureUrl": "/configure",
        "saveConfigurationUrl": null,
        "deleteUrl": "/delete",
        "createUrl": "/create",
        "invokeUrl": "/invoke",
        "statusUrl": null,
        "operationalUrl": null,
        "smallLogo": "https://smalllogourl",
        "mediumLogo": null,
        "largeLogo": null,
        "maxBatchSize": 0,
        "application": {
            "uuid": "d6862ebc-8c5e-4905-8da1-28e3166c978c",
            "name": "appname",
            "description": "description",
            "baseUrl": "https://www.oracle.com",
            "statusUrl": "status",
            "installUrl": "/installurl",
            "configureUrl": "/configure",
            "uninstallUrl": "/uninstall",
            "saveConfigurationUrl": "/save",
            "smallLogo": "smalllogo",
            "mediumLogo": "mediumlogo",
            "largeLogo": "largelogo",
            "status": "UP",
            "providerUuid": "53aba933-a031-46ce-ab69-4ad0f4cc3335"
        },
        "serviceType": {
            "name": "activity",
            "externalName": "activityext",
            "description": "activitytypeofservice"
            },
        "status": "UP"
        },
    "secret": null,
    "status": "CREATED"
}

Tip: The JWT Token in the Authorization Header is generated by following the AMS to App token generation. For more information about this call, including authentication details, see the endpoint API reference.

Sample Delete URL endpoint implementation

@RequestMapping(value = "/delete", method=RequestMethod.POST)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void deleteServiceInstance(@RequestBody String body) throws JSONException {
    JSONObject request  = new JSONObject(body);
    String instanceUuid = request.getString("uuid");
 
    ServiceInstance serviceInstance = serviceInstanceService.getEntity(instanceUuid);
    if(serviceInstance == null) {
        // deleting something that doesn't exist.
        return;
    }
 
    serviceInstanceService.deleteEntity(instanceUuid);
}

App's response to the Delete URL request

The app does not need to respond to this call. If the app chooses responds to this call, it will be ignored by AMS. The sample code simply returns a 204, this is ignored by AMS.

Learn more

Developing CX Apps Template Services