Update To delete an app
parent
9ef706ec7d
commit
39335acb00
|
@ -1,42 +1,68 @@
|
||||||
# To delete an app:
|
# To delete an app:
|
||||||
|
|
||||||
## HTTP request type: `POST`
|
## HTTP request type: `DELETE`
|
||||||
|
|
||||||
## Authorization required: Yes (Header: Bearer auth, key is located in .env file)
|
## Authorization required: Yes (Header: Bearer auth, key is located in .env file)
|
||||||
|
|
||||||
## Endpoint: `/delete?id=[application id]`
|
## Endpoint: `/deleteapp`
|
||||||
|
|
||||||
## Parameters required: No
|
## Parameters required:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"appid": "011758035553"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Output:
|
### Output:
|
||||||
|
|
||||||
If it is successful:
|
If it is successful:
|
||||||
```
|
```
|
||||||
App deleted successfully
|
{
|
||||||
|
"message": "App deleted successfully"
|
||||||
|
}
|
||||||
|
|
||||||
Status code: 200
|
Status code: 200
|
||||||
```
|
```
|
||||||
If there is no token or a invalid token:
|
If there is no token specified in header:
|
||||||
```
|
```
|
||||||
Unauthorized
|
{
|
||||||
|
"error": "No authorization header"
|
||||||
|
}
|
||||||
|
|
||||||
Status code: 401
|
Status code: 401
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If there is a invalid token:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"error": "Invalid token"
|
||||||
|
}
|
||||||
|
|
||||||
|
Status code: 401
|
||||||
|
```
|
||||||
|
|
||||||
If there is no app ID specified:
|
If there is no app ID specified:
|
||||||
```
|
```
|
||||||
App ID is required
|
{
|
||||||
|
"error": "App not found"
|
||||||
|
}
|
||||||
|
|
||||||
Status code: 400
|
Status code: 400
|
||||||
```
|
```
|
||||||
If there is a invalid app ID specified:
|
If there is a invalid app ID specified:
|
||||||
```
|
```
|
||||||
App not found
|
{
|
||||||
|
"error": "App not found"
|
||||||
|
}
|
||||||
|
|
||||||
Status code: 404
|
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)
|
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
|
{
|
||||||
|
"error": "Failed to save file"
|
||||||
|
}
|
||||||
|
|
||||||
Status code: 500
|
Status code: 500
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user