Skip to content

Deleting Applications

Soft delete an application (retained for historical activity records).


Endpoint

DELETE /api/apps/:id

Soft deletes an application. The application is marked as deleted but retained in the database for historical activity records.


Authentication

Requires API Key with Policy Definition permission.


Path Parameters

Parameter Type Description
id UUID Application ID to delete

Response

Returns 204 No Content on successful deletion.


Behavior

Applications are soft deleted:

  • They remain in the database for historical activity records
  • They won't appear in normal GET /api/apps queries
  • Use GET /api/appsdeleted to view deleted applications
  • Historical activities will still reference the deleted application

Examples

Delete an Application

Soft delete an application by its ID.

APP_ID="550e8400-e29b-41d4-a716-446655440000"

curl -X DELETE "https://your-shield-host:8080/api/apps/$APP_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

BASE_URL = "https://your-shield-host:8080"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

app_id = "550e8400-e29b-41d4-a716-446655440000"

response = requests.delete(f"{BASE_URL}/api/apps/{app_id}", headers=HEADERS)

if response.status_code == 204:
    print("Application deleted successfully")
const axios = require('axios');

const BASE_URL = 'https://your-shield-host:8080';
const HEADERS = { 'Authorization': 'Bearer YOUR_API_KEY' };

const appId = '550e8400-e29b-41d4-a716-446655440000';

const response = await axios.delete(`${BASE_URL}/api/apps/${appId}`, { headers: HEADERS });

if (response.status === 204) {
  console.log('Application deleted successfully');
}

Error Responses

Status Code Description
401 Invalid or expired API key
403 Insufficient permissions (requires Policy Definition)
404 Application not found or already deleted

Important Notes

  • Rules using this application will fail - Delete or update rules that reference this application first
  • Historical data preserved - Activity logs will still show the application name
  • Cannot be restored via API - Contact support or recreate the application manually