Applications - Delete
Applications can be deleted by sending DELETE to applications endpoint with application_id
Returns HTTP 204 Code if successful or appropriate error messages if failed
Name | Example | Description |
---|---|---|
application_id string | "BIMXKv8O" | (required) The unique identifier of the Application object |
DELETE /1/applications/{application_id}
Host: https://api.cogniac.io
Example: Delete an Application
curl -X DELETE https://api.cogniac.io/1/applications/di71rG94 \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz"
import cogniac
# connect to the tenant
cc = cogniac.CogniacConnection(username="[email protected]",
password="myPassword",
tenant_id="63QhzFLc9tg4")
# get the app object
my_app = cc.get_application('di71rG94')
# apps must be inactive to delete
my_app.active = False
# to delete an app, call the delete method
my_app.delete()
HTTP 204 Code (no content)
Applications Must Be inactive Before Deletion
To help prevent accidental deletion, you must transition an application to the 'inactive' state before you can delete an application. Otherwise you'll see an error message like below:
HTTP 404 Code (bad request) with body
{
"message": "Invalid Input: Cannot delete active applications; set application to inactive before deleting. ## 0404032 ##"
}
Delete Warning
DELETE completely remove an application from the Cogniac system and cannot be undone. But note that deleting an application does NOT delete the application's output subjects. Because applications are trained by their output subjects you can always recreate an application by adding a new application of the same type with identical output subjects.
Updated over 6 years ago