AS3 Force-Delete

Overview

For information about how to delete an AS3 application you have created previously on a BIG-IP, see the Deleting the configuration on the target BIG-IP device section in the Application Services 3 Extension (AS3) documentation.

Warning

The following AS3 Force-Delete API can force the delete of an AS3 or service catalog application from the BIG-IQ only. This API cannot remove the related objects from the BIG-IP. Using this API is not recommended except for certain recovery cases that require the forced removal of an application from the BIG-IQ only. Prior to attempting to use this API you may wish to contact F5 support.

REST Endpoint: mgmt/cm/global/tasks/force-delete

Requests

POST mgmt/cm/global/tasks/force-delete

To delete an AS3 or service catalog application you can send the POST request to the force-delete endpoint.

Request Parameters

The request parameters in a POST request can include the following parameters.

Name Type Required Description
configSetName string True The name of the AS3 or service catalog application, for example “tenant_appName”.

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
configSetName string The name of the AS3 or service catalog application, for example “tenant_appName”.
id string The task’s id.
identityReferences object List of links to identities
     link string Url of the identity
selfLink string Url of the task.
status string Status of the task. Initially this can be “STARTED”. You can send GET requests to selfLink to check for the change in the task’s status.
userReference object User reference
     link string Url of the user.

Permissions

Role Allow
admin Yes

GET mgmt/cm/global/tasks/force-delete/<id>

To check the status of a force-delete task you can send a GET request to the test’s selfLink.

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
configSetName string The name of the AS3 or service catalog application, for example “tenant_appName”.
id string The task’s id.
identityReferences object List of links to identities
     link string Url of the identity
selfLink string Url of the task.
status string Status of the task. Initially this can be “STARTED”. Subsequent checks can return “DONE” or “FINISHED”. The value of “FINISHED” means the application configuration is removed from the BIG-IQ only.
username string The name of the admin user.
userReference object User reference
     link string Url of the user.

Permissions

Role Allow
admin Yes

Examples

POST to create a force-delete task

You can send a POST to the force-delete endpoint to create a force-delete task to remove the

POST https://<BIG-IQ>/mgmt/cm/global/tasks/force-delete

The JSON in the body of the POST can be similar to the following.

{
    "configSetName": "jbClassic1"
}

Response

The JSON in the response to the POST can look similar to the following. The value of status can be “STARTED” initially, which means the task has been started. The value of selfLink is the url for the task.

{
    "configSetName": "jbClassic1",
    "id": "1d50d5ce-544d-4ef7-a0dc-357d7104d599",
    "status": "STARTED",
    "userReference": {
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    },
    "identityReferences": [{
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    }],
    "ownerMachineId": "af35ec22-e3c1-4007-b2ff-6d61c95e60b7",
    "taskWorkerGeneration": 1,
    "generation": 1,
    "lastUpdateMicros": 1567793103982691,
    "kind": "cm:global:tasks:force-delete:forcedeletetaskstate",
    "selfLink": "https://localhost/mgmt/cm/global/tasks/force-delete/1d50d5ce-544d-4ef7-a0dc-357d7104d599"
}

GET to check the status of the force-delete task

You can send repeated GET requests to check the status of the force-delete task, which can eventually update to “DONE” and “FINISHED”. You can send the GET request to the task’s url, returned as the value of selfLink in the response to the initial POST.

GET https://<BIG-IQ>/mgmt/cm/global/tasks/force-delete/<id>

Response

In the following example the value of the task’s id is 1d50d5ce-544d-4ef7-a0dc-357d7104d599 and the JSON in the response to the GET when the task is done can look similar to the following.

{
    "configSetName": "jbClassic1",
    "currentStep": "DONE",
    "endDateTime": "2019-09-06T11:05:04.474-0700",
    "generation": 10,
    "id": "1d50d5ce-544d-4ef7-a0dc-357d7104d599",
    "identityReferences": [{
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    }],
    "kind": "cm:global:tasks:force-delete:forcedeletetaskstate",
    "lastUpdateMicros": 1567793104524696,
    "ownerMachineId": "af35ec22-e3c1-4007-b2ff-6d61c95e60b7",
    "selfLink": "https://localhost/mgmt/cm/global/tasks/force-delete/1d50d5ce-544d-4ef7-a0dc-357d7104d599",
    "startDateTime": "2019-09-06T11:05:03.999-0700",
    "status": "FINISHED",
    "userReference": {
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    },
    "username": "admin"
}