Skip to content

Admin API

All endpoints require HTTP Basic Auth and are prefixed with /api/v1/admin.

Requires FACE_API_STORAGE_ENABLED=true (returns 501 otherwise).

Authorization: Basic base64(username:password)

GET /api/v1/admin/stats

Aggregate statistics across all images and jobs.

curl -u admin:password https://face-api.xylolabs.com/api/v1/admin/stats
{
  "total_images": 1250,
  "total_jobs": 3420,
  "total_faces_detected": 8910,
  "avg_inference_ms": 14.52,
  "storage_used_bytes": 524288000,
  "jobs_by_type": { "detect": 2100, "mask": 1320 },
  "jobs_by_method": { "gaussian": 800, "pixelate": 400, "solid": 120 }
}

Images

GET /api/v1/admin/images

Paginated list of stored images.

Parameter Type Default Description
page int 1 Page number
per_page int 20 Items per page (1-100)
curl -u admin:password "https://face-api.xylolabs.com/api/v1/admin/images?page=1&per_page=10"
{
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "filename": "photo.jpg",
      "content_type": "image/jpeg",
      "size_bytes": 245760,
      "width": 1920,
      "height": 1080,
      "original_url": "https://static.face-api.xylolabs.com/...",
      "job_count": 3,
      "created_at": "2026-04-06T10:30:00+00:00"
    }
  ],
  "total": 1250, "page": 1, "per_page": 10, "pages": 125
}

GET /api/v1/admin/images/{image_id}

Image detail with all associated jobs.

curl -u admin:password https://face-api.xylolabs.com/api/v1/admin/images/550e8400-...

DELETE /api/v1/admin/images/{image_id}

Delete image, associated jobs, and S3 objects. Returns 204.

curl -u admin:password -X DELETE https://face-api.xylolabs.com/api/v1/admin/images/550e8400-...

GET /api/v1/admin/images/{image_id}/download

Redirects (302) to presigned S3 URL for the original image.


Jobs

GET /api/v1/admin/jobs

Paginated job list with optional filters.

Parameter Type Default Description
page int 1 Page number
per_page int 20 Items per page (1-100)
job_type string detect or mask
method string Filter by blur method
curl -u admin:password "https://face-api.xylolabs.com/api/v1/admin/jobs?job_type=mask&method=gaussian"

GET /api/v1/admin/jobs/{job_id}

Job detail with full detection data.

GET /api/v1/admin/jobs/{job_id}/download

Redirects (302) to presigned S3 URL for the processed image.