Applications - Delete
  • 22 Dec 2023
  • 1 Minute to read
  • Dark
    Light

Applications - Delete

  • Dark
    Light

Article summary

Applications can be deleted by sending DELETE to the endpoint of the application 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 Application

DELETE /1/applications/{application_id}
Host: https://api.cogniac.io

Example: Delete an Application

# apps must be inactive to delete it 
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="test@cogniac.co", 
                               password="password", 
                               tenant_id="abcdefg")

# get the app object
my_app = cc.get_application('m6fqjxjn')

# apps must be inactive to delete
my_app.active = False

# to delete an app, call the delete method
my_app.delete()
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 removes 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.




Was this article helpful?