Quickstart
Core concepts
Watchlists
Datasets in Defendis are access-controlled by your workspace scope. In practice:- You define watchlists that represent what you are authorised to monitor (
domains,emails,keywords,BINs, and other assets). - Many endpoints validate input against your watchlist scope.
- Requests outside your approved scope return 403 Forbidden.
- Watchlist write endpoints may return 409 Conflict when your workspace quota is reached.
Contract-first integration
- The OpenAPI spec is the source of truth for endpoints, parameters, and request/response schemas:
../openapi.yaml. - If you generate clients, treat the API as additive: new fields may appear without warning. Your parser should ignore unknown fields.
Request conventions
Content types
- Use query parameters for filtering and pagination on endpoints that support them.
- When an endpoint accepts a request body, send JSON:
Pagination
Paginated list endpoints return a consistent envelope:data: array of recordspaging: pagination metadata with:currentPagepageSizetotalRecordstotalPageshasMorenextPage
- Start with
page=1. - Keep fetching until
paging.hasMoreisfalse(orpaging.nextPageisnull). - Persist checkpoints (page and filter window) so your ingestion can resume safely after failures.
Example
Date filters
Some endpoints support date window filtering. When supported, use a closed-open window:fromDate: inclusive lower boundtoDate: exclusive upper bound
fromDate and toDate. Always follow the endpoint’s reference docs / OpenAPI contract for exact support.
Client recommendation:
- Use
YYYY-MM-DDfor date-only filters. - Prefer narrow windows for high-volume pulls and widen gradually.
Search & sorting
Search and sorting are endpoint-specific. Common patterns include:searchsortBysortOrder
Rate limits & reliability
Defendis enforces rate limiting. When exceeded you will receive 429 Too Many Requests. Client best practices:- Use exponential backoff for retries (with jitter).
- Distribute polling workloads over time.
- Automatically retry safe requests (GET) on transient failures (
429,5xx, timeouts). - Avoid retrying non-idempotent writes unless your application guarantees idempotency.
Typical integration patterns
Pull model
Near-real-time workflows
For operational workflows, use frequent polling with small time windows and robust retry/backoff behavior.Data handling & privacy
Some datasets, especiallyDataleaks, may contain sensitive information. As an API consumer, you are responsible for ensuring the data is handled appropriately within your environment.
Recommended practices:
Minimize retention
Keep only the fields and retention window required for your workflow.
Restrict access
Limit sensitive dataset access to the smallest set of users and services.
Redact logs
Avoid logging full payloads or sensitive fields in application and audit logs.
Enforce compliance
Apply your internal security, legal, and compliance controls to this API data.