diff --git a/To-delete-an-app.md b/To-delete-an-app.md new file mode 100644 index 0000000..6440fa4 --- /dev/null +++ b/To-delete-an-app.md @@ -0,0 +1,36 @@ +# To delete an app: + +## HTTP request type: `POST` + +## Authorization required: Yes (Header: Bearer auth, key is located in .env file) + +## Endpoint: `/delete?id=[application id]` + +## Parameters required: No + +### Output: + +If it is successful: +``` +App deleted successfully +``` +If there is no token or a invalid token: +``` +Unauthorized +``` +If there is no app ID specified: +``` +App ID is required +``` +If there is a invalid app ID specified: +``` +App not found +``` +If there is a problem while deleting the uploaded file: (likely cause is directory where the binary is located is set to read only) +``` +Failed to delete file: /file/path +``` +If there is a problem while saving apps.json onto the host: (likely cause is directory where the binary is located is set to read only) +``` +Failed to save apps +``` \ No newline at end of file