5 To delete an app
matu6968 edited this page 2024-11-21 01:45:26 +01:00

To delete an app:

HTTP request type: DELETE

Authorization required: Yes (Header: Bearer auth, key is located in .env file)

Endpoint: /deleteapp

Parameters required:

  {
    "appid": "011758035553"
  }

Output:

If it is successful:

{
	"message": "App deleted successfully"
}

Status code: 200

If there is no token specified in header:

{
	"error": "No authorization header"
}

Status code: 401

If there is a invalid token:

{
	"error": "Invalid token"
}

Status code: 401

If there is a invalid request body:

{
	"error": "Invalid request body"
}

Status code: 400

If there is no or invalid app ID specified:

{
	"error": "App not found"
}

Status code: 404

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)

{
	"error": "Failed to save file"
}

Status code: 500

If using a HTTP request other then DELETE:

{
	"error": "Method not allowed. Only DELETE is supported for this endpoint."
}

Status code: 405