Skip to content

Listing Applications

Query and retrieve applications with pagination and sorting.


Endpoint

GET /api/apps

Retrieves all applications with optional filtering, sorting, and pagination.


Authentication

Requires any valid API Key. All keys have read access.


Query Parameters

Parameter Type Default Description
sortBy string "id asc" Sort specification (e.g., "name asc", "id desc")
skip integer 0 Number of records to skip (for pagination)
take integer All Number of records to return

Response

Returns a paginated list of applications:

Response Format
{
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "External APIs",
      "description": "Third-party API integrations",
      "urlFilters": [
        {
          "filterType": 1,
          "isWhitelist": false,
          "contentType": ["application/json"],
          "methods": ["POST", "PUT"],
          "filter": "api.external.com",
          "comment": "External API hostname",
          "runContentTypeDetection": true
        }
      ],
      "rules": [
        {
          "id": "rule-uuid",
          "name": "Detect PII"
        }
      ],
      "createdAt": 1704067200,
      "updatedAt": 1704067200,
      "readOnly": false
    }
  ],
  "count": 10
}

Examples

List All Applications

Retrieve all applications sorted by name.

curl -X GET "https://your-shield-host:8080/api/apps?sortBy=name%20asc" \
  -H "Authorization: Bearer YOUR_API_KEY" | jq '.items[] | {id, name}'
import requests

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

response = requests.get(
    f"{BASE_URL}/api/apps",
    headers=HEADERS,
    params={"sortBy": "name asc"}
)

apps = response.json()
for app in apps["items"]:
    print(f"{app['id']}: {app['name']}")
const axios = require('axios');

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

const response = await axios.get(`${BASE_URL}/api/apps`, {
  headers: HEADERS,
  params: { sortBy: 'name asc' }
});

response.data.items.forEach(app => {
  console.log(`${app.id}: ${app.name}`);
});
Paginated Results

Retrieve applications with pagination (25 per page).

curl -X GET "https://your-shield-host:8080/api/apps?skip=0&take=25" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

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

page = 0
page_size = 25

response = requests.get(
    f"{BASE_URL}/api/apps",
    headers=HEADERS,
    params={"skip": page * page_size, "take": page_size}
)

apps = response.json()
print(f"Page {page + 1}: {len(apps['items'])} of {apps['count']} total")
const axios = require('axios');

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

const page = 0;
const pageSize = 25;

const response = await axios.get(`${BASE_URL}/api/apps`, {
  headers: HEADERS,
  params: { skip: page * pageSize, take: pageSize }
});

console.log(`Page ${page + 1}: ${response.data.items.length} of ${response.data.count} total`);

GET /api/appsdeleted

Retrieve all applications including soft-deleted ones.

Endpoint

GET /api/appsdeleted

Example

curl -X GET "https://your-shield-host:8080/api/appsdeleted" \
  -H "Authorization: Bearer YOUR_API_KEY"