Skip to content

Runbook 03 β€” Security API Integration and Failure Handling

Runbook Type: Security API Operations / Security Automation
Difficulty: Intermediate β†’ Advanced
Primary Audience: Security Engineers / SOC Engineers / Detection Engineers / Cloud Security Engineers / Security Automation Engineers
Security Domains: SOC / SOAR / Cloud Security / Vulnerability Management / Threat Intelligence / Identity Security
Execution Model: Secure and resilient API integration workflow
Primary Goal: Build and operate reliable security integrations without allowing API failures to create unsafe security decisions

Modern security environments depend heavily on APIs.

Security automation may integrate with:

SIEM
SOAR
EDR / XDR
IDENTITY PROVIDERS
CLOUD PLATFORMS
VULNERABILITY MANAGEMENT
THREAT INTELLIGENCE
EMAIL SECURITY
ASSET INVENTORY
CASE MANAGEMENT

A typical workflow might look like:

SIEM ALERT
↓
IDENTITY API
↓
ASSET API
↓
VULNERABILITY API
↓
THREAT INTELLIGENCE API
↓
NORMALIZE
↓
CORRELATE
↓
ANALYST REVIEW

The workflow is only reliable if every API dependency is handled safely.

A successful API call does not automatically mean:

SUCCESSFUL
SECURITY OUTCOME

Likewise:

API FAILURE

does not mean:

NO SECURITY RISK

The integration must distinguish between:

NO RESULT

and:

COULD NOT CHECK
DISCOVER API
↓
DEFINE PURPOSE
↓
AUTHENTICATE
↓
AUTHORIZE
↓
BUILD REQUEST
↓
SEND REQUEST
↓
VALIDATE HTTP RESPONSE
↓
VALIDATE CONTENT
↓
HANDLE PAGINATION
↓
NORMALIZE DATA
↓
HANDLE PARTIAL FAILURE
↓
RETRY WHEN SAFE
↓
MONITOR
↓
AUDIT
↓
RECOVER

Before integrating an API, define:

WHY ARE WE CALLING IT?

Examples:

Retrieve security alerts
Retrieve asset information
Check vulnerability findings
Collect cloud configuration
Enrich indicators
Retrieve identity context
Create approved security cases

Document whether the integration needs:

READ
SEARCH
CREATE
UPDATE
DELETE

Prefer:

READ-ONLY

unless writes are genuinely required.

Recommended:

COLLECTION WORKFLOW
↓
READ-ONLY IDENTITY

and separately:

APPROVED RESPONSE
↓
CONTROLLED WRITE IDENTITY

Document:

API NAME
SERVICE OWNER
SECURITY OWNER
SUPPORT CONTACT
DOCUMENTATION LOCATION

Common types:

REST
GRAPHQL
SOAP
RPC
WEBHOOK
EVENT API

This runbook primarily focuses on REST-style APIs, but the operational principles apply more broadly.

Example training endpoint:

http://127.0.0.1:8080/api

Production integrations should use approved secure endpoints.

Examples:

/api/v1/
/api/v2/

Record the expected version.

An API upgrade may change:

FIELD NAMES
DATA TYPES
PAGINATION
AUTHENTICATION
STATUS CODES
ENDPOINTS

Before implementation understand:

AUTHENTICATION
ENDPOINTS
METHODS
PARAMETERS
RATE LIMITS
PAGINATION
ERROR RESPONSES
VERSIONING

Common authentication models include:

API TOKEN
OAUTH 2.0
SIGNED REQUEST
CLIENT CERTIFICATE
WORKLOAD IDENTITY
MANAGED IDENTITY

Where supported prefer:

SHORT-LIVED TOKEN
WORKLOAD IDENTITY
FEDERATED IDENTITY
MANAGED IDENTITY

over:

STATIC LONG-LIVED SECRET

Avoid:

API_TOKEN = "real-production-secret"

Depending on environment:

SECRET MANAGER
WORKLOAD IDENTITY
MANAGED IDENTITY
PROTECTED ENVIRONMENT VARIABLE

For a local training lab:

Terminal window
export SECURITY_API_TOKEN="training-token"

PowerShell:

Terminal window
$env:SECURITY_API_TOKEN = "training-token"

Before sending requests:

TOKEN AVAILABLE?
↓
YES β†’ CONTINUE
NO β†’ STOP

Do not silently send unauthenticated requests unless the endpoint is intentionally public.

Do not log:

API TOKEN
PASSWORD
PRIVATE KEY
SESSION TOKEN
AUTHORIZATION HEADER

Instead of:

Authorization:
Bearer eyJ...

log:

Authorization:
[REDACTED]

Ask:

WHAT IS THE MINIMUM
API PERMISSION REQUIRED?

Example:

READ FINDINGS

does not require:

ADMINISTRATOR

Where supported restrict credentials by:

RESOURCE
ACCOUNT
SUBSCRIPTION
PROJECT
API ENDPOINT
ACTION

Example:

SECURITY INVENTORY CLIENT
β†’ READ ONLY
CASE CREATION CLIENT
β†’ LIMITED WRITE
ADMINISTRATIVE CLIENT
β†’ SEPARATE / RESTRICTED

Document:

OWNER
EXPIRATION
ROTATION PROCESS
REVOCATION PROCESS

Common authentication response:

401 Unauthorized

Treat it as:

AUTHENTICATION FAILURE

not:

NO SECURITY FINDINGS

Common:

403 Forbidden

Usually means:

AUTHENTICATED
BUT NOT AUTHORIZED

Determine the exact missing permission.

Apply:

LEAST PRIVILEGE

Every request should define:

METHOD
URL
HEADERS
PARAMETERS
BODY
TIMEOUT
GET
β†’ retrieve
POST
β†’ create/process
PUT
β†’ replace
PATCH
β†’ modify
DELETE
β†’ delete

Methods such as:

POST
PUT
PATCH
DELETE

may modify state.

Require stronger validation.

Before calling an API verify:

EXPECTED HOST?
EXPECTED PROTOCOL?
EXPECTED PATH?

Preferred:

HTTPS

not:

HTTP

except controlled local training environments.

Do not casually disable:

CERTIFICATE VALIDATION

to make an integration work.

Investigate the trust problem.

Typical headers:

Authorization
Accept
Content-Type
User-Agent

Identify the automation.

Example:

GoHackersCloud-Security-Automation/1.0

This can help API owners identify traffic.

Generate:

request_id

or:

correlation_id

for each operation.

They connect:

AUTOMATION LOG
↓
API REQUEST
↓
API RESPONSE
↓
DOWNSTREAM ACTION

Do not blindly pass uncontrolled values into requests.

Validate:

DATES
SEVERITY
STATUS
PAGE NUMBER
PAGE SIZE

Use your language’s URL/query-building functions rather than manually concatenating untrusted input.

Before sending JSON verify:

REQUIRED FIELDS
DATA TYPES
ALLOWED VALUES
RESOURCE ID

For write operations:

BUILD REQUEST
↓
DISPLAY PROPOSED CHANGE
↓
APPROVAL
↓
SEND

If the target API supports:

VALIDATE
DRY RUN
WHAT-IF

use it before impactful changes.

Every external request should have a timeout.

Avoid:

REQUEST
↓
WAIT FOREVER

Depending on client/library:

CONNECTION TIMEOUT
READ TIMEOUT
TOTAL TIMEOUT

A local API might respond in:

<1 SECOND

while a large analytics query may legitimately require longer.

Do not use one arbitrary timeout for every API.

This:

THREAT INTELLIGENCE REQUEST
TIMED OUT

does not mean:

INDICATOR IS SAFE

It means:

RESULT UNKNOWN

Mental model:

1XX
INFORMATIONAL
2XX
SUCCESS
3XX
REDIRECTION
4XX
CLIENT-SIDE CONDITION
5XX
SERVER-SIDE FAILURE

Usually:

REQUEST SUCCEEDED

but you must still validate:

BODY
SCHEMA
CONTENT

Usually indicates:

RESOURCE CREATED

For write operations, verify the resulting resource.

Can represent successful operation without response content.

Do not attempt JSON parsing automatically.

Usually indicates:

INVALID REQUEST

Review:

PARAMETERS
BODY
SCHEMA

Review:

TOKEN PRESENT?
TOKEN EXPIRED?
TOKEN VALID?
AUTH FORMAT CORRECT?

Review:

ROLE
SCOPE
PERMISSIONS
RESOURCE ACCESS

Could mean:

BAD ENDPOINT
WRONG RESOURCE ID
RESOURCE REMOVED
API VERSION CHANGED

May indicate:

RESOURCE ALREADY EXISTS
STATE CONFLICT
DUPLICATE OPERATION

This is particularly relevant to idempotency.

Means:

RATE LIMIT

Do not continuously hammer the API.

Usually:

SERVER-SIDE FAILURE

May be retryable.

Often represent temporary service or gateway conditions.

These may be candidates for controlled retry.

Status Meaning Typical Action
200 Success Validate body
201 Created Verify resource
204 Success/no body Continue
400 Bad request Fix request
401 Authentication Stop/review credential
403 Authorization Review permissions
404 Not found Validate endpoint/resource
409 Conflict Check idempotency/state
429 Rate limited Backoff
500 Server error Controlled retry
503 Unavailable Retry/escalate

Bad design:

ANY ERROR
↓
RETRY

Better:

ERROR
↓
CLASSIFY
↓
RETRY?
STOP?
ESCALATE?

After receiving:

HTTP 200

ask:

IS BODY PRESENT?
IS IT EXPECTED FORMAT?
IS JSON VALID?
IS SCHEMA VALID?
ARE REQUIRED FIELDS PRESENT?

Example:

200 OK

with:

{
"error": "backend unavailable"
}

may still represent an unusable application response.

Expected:

application/json

but server returns:

text/html

This may indicate:

PROXY ERROR
LOGIN PAGE
SERVICE FAILURE

Handle malformed JSON safely.

Example:

HTTP 200
↓
INVALID JSON
↓
RECORD FAILURE
↓
DO NOT CRASH ENTIRE WORKFLOW

Expected:

{
"results": []
}

Do not assume every JSON object is valid.

Example finding requires:

id
asset
severity
status

Possible response:

QUARANTINE RECORD
MARK FIELD UNKNOWN
CONTINUE WITH WARNING

depending on field importance.

Example:

score

expected:

NUMBER

but received:

"critical"

Treat as schema/data problem.

If expected severity is:

critical
high
medium
low

and API returns:

urgent

do not silently map it unless documented.

For troubleshooting, preserve an approved raw response where appropriate.

Example:

raw-api-response.json

Be careful not to persist:

TOKENS
SENSITIVE HEADERS
UNNECESSARY SENSITIVE DATA

Normalized data should contain:

source_api
endpoint
collection_time
api_version

Many APIs return only part of a dataset.

Example:

PAGE 1
100 RECORDS
PAGE 2
100 RECORDS
PAGE 3
45 RECORDS
PAGE NUMBER
OFFSET/LIMIT
CURSOR
CONTINUATION TOKEN
NEXT LINK

Read the API documentation.

Do not assume:

page=1

works for every API.

Example:

?page=1&page_size=100

Example:

?offset=0&limit=100

Example response:

{
"results": [],
"next_cursor": "abc123"
}

Some APIs provide:

next

or:

nextLink

Follow only validated links expected for the trusted service.

Define:

MAXIMUM PAGES
MAXIMUM RECORDS
TIME LIMIT

A broken API might return:

same next cursor
forever

Track previously seen cursors.

Fingerprint page content or track stable record IDs where appropriate.

Track:

pages_processed
records_received
duplicate_records

If API reports:

total = 1,000

but you receive:

700

mark:

INCOMPLETE COLLECTION

APIs often restrict:

REQUESTS / SECOND
REQUESTS / MINUTE
REQUESTS / DAY

Do not attempt to bypass legitimate service rate controls.

Instead:

SLOW DOWN
CACHE
BATCH
BACKOFF

A 429 response may include:

Retry-After

Honor it where appropriate.

Some services expose:

X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-Reset

Names vary by provider.

If available, record:

REMAINING REQUESTS

to prevent unexpected service disruption.

Cache data when:

SOURCE CHANGES SLOWLY
MULTIPLE ALERTS NEED SAME DATA

Example:

ASSET CRITICALITY

may not need an API request for every alert.

Every cache needs:

EXPIRATION

Example:

IDENTITY CONTEXT
β†’ 15 minutes
ASSET INVENTORY
β†’ 1 hour

These are examples only.

Caching reduces:

API LOAD

but can increase:

DATA STALENESS

Balance both.

Retry only when failure is likely temporary.

Typical candidates:

TIMEOUT
429
500
502
503
504

Without a specific reason, avoid retrying:

400
401
403
404

Always define:

MAX RETRIES

Example:

ATTEMPT 1
↓
WAIT 1 SECOND
ATTEMPT 2
↓
WAIT 2 SECONDS
ATTEMPT 3
↓
WAIT 4 SECONDS
STOP

At scale, many workers retrying simultaneously can create:

THUNDERING HERD

Use randomized:

JITTER

where appropriate.

Define how much total time the workflow may spend retrying.

Example:

MAX RETRIES:
3
MAX TOTAL RETRY TIME:
30 seconds

A GET is generally easier to retry than a write operation.

Example:

POST /tickets

times out.

Did the server:

CREATE THE TICKET

before the timeout?

Unknown.

Blind retry could create:

DUPLICATE TICKET

Design writes so repeated requests do not create unintended duplicate effects.

Where supported:

Idempotency-Key:
ALERT-1001

Before creating a resource:

SEARCH EXISTING
↓
EXISTS?
↙ β†˜
YES NO
↓ ↓
USE CREATE
EXISTING

Useful identifiers:

ALERT ID
FINDING ID
INCIDENT ID
EVENT ID
ASSET ID

After:

POST
PATCH
PUT

verify the resulting state.

Request:

CREATE CASE

Response:

201 Created

Then retrieve:

CASE ID

and verify:

EXPECTED FIELDS

Security automation should use:

REQUEST
↓
RESPONSE
↓
VERIFICATION

Multi-API workflows frequently partially fail.

Example:

IDENTITY API
βœ“
CMDB API
βœ“
VULNERABILITY API
βœ—
THREAT INTEL API
βœ“

Result:

PARTIAL CONTEXT

rather than:

TOTAL FAILURE

when the use case permits.

Example:

{
"identity_context": "available",
"asset_context": "available",
"vulnerability_context": "unavailable",
"threat_intel_context": "available"
}

If a missing dependency is critical for the decision:

STOP AUTOMATED ACTION

and:

REQUIRE HUMAN REVIEW

If identity verification fails during proposed account containment:

DO NOT ASSUME
IDENTITY IS MALICIOUS

Escalate.

Design:

FULL CONTEXT
↓
NORMAL WORKFLOW
PARTIAL CONTEXT
↓
LIMITED ANALYSIS
↓
ANALYST REVIEW

Classify API dependencies:

OPTIONAL
IMPORTANT
CRITICAL

Example:

GEOGRAPHIC IP ENRICHMENT

may not prevent basic alert triage.

Example:

IDENTITY VERIFICATION

may be required before an identity response action.

API Purpose Criticality Failure Behavior
Identity User context Critical Stop write action
CMDB Asset context Important Mark unknown
Threat Intel IOC context Important Mark unavailable
Reporting Dashboard Optional Queue report

If an API repeatedly fails:

REQUEST
↓
FAIL
↓
FAIL
↓
FAIL
↓
STOP TEMPORARY CALLS

This prevents repeatedly overwhelming a failing service.

Conceptually:

CLOSED
β†’ requests allowed
OPEN
β†’ requests blocked temporarily
HALF-OPEN
β†’ limited test requests

It can reduce:

UNNECESSARY LOAD
LONG TIMEOUT CHAINS
CASCADE FAILURE

One failing API should not unnecessarily crash:

ALL SECURITY AUTOMATION

Separate dependencies where possible.

Architecture:

IDENTITY WORKERS
β”‚
β”œβ”€β”€ isolated
β”‚
VULNERABILITY WORKERS
β”‚
β”œβ”€β”€ isolated
β”‚
THREAT INTEL WORKERS

Failure in one pool should not consume all resources.

Parallel API requests can improve performance but increase:

RATE-LIMIT RISK
RESOURCE USAGE
COMPLEXITY

Define:

MAX WORKERS

rather than unlimited parallel requests.

If downstream systems cannot keep up:

SLOW INPUT

rather than building an unlimited queue.

For larger systems:

EVENT
↓
QUEUE
↓
WORKER
↓
API
↓
RESULT

can improve resilience.

Repeated failures can move to:

DLQ

for review.

Include:

request_id
operation
attempt_count
last_error
timestamp

Do not include unnecessary secrets.

Some APIs send data to you.

Flow:

SECURITY PLATFORM
↓
WEBHOOK
↓
YOUR RECEIVER
↓
VALIDATE
↓
QUEUE
↓
PROCESS

Validate:

SOURCE
AUTHENTICITY
SIGNATURE
SCHEMA
TIMESTAMP

according to provider documentation.

Where supported, validate:

TIMESTAMP
EVENT ID
NONCE

to reduce duplicate/replayed processing.

Do not perform long analysis before acknowledging if the provider expects a fast response.

Possible design:

WEBHOOK
↓
VALIDATE
↓
QUEUE
↓
ACKNOWLEDGE
↓
PROCESS ASYNC

APIs change.

Possible changes:

NEW FIELD
REMOVED FIELD
RENAMED FIELD
TYPE CHANGE
ENUM CHANGE

Track:

EXPECTED FIELDS
UNEXPECTED FIELDS
TYPE MISMATCHES

Example:

asset_id

suddenly missing from 80% of records.

This should trigger:

PIPELINE INVESTIGATION

Use:

PROVIDER API
↓
PROVIDER ADAPTER
↓
COMMON SECURITY MODEL

If the API changes:

UPDATE ADAPTER

instead of rewriting:

ALL DOWNSTREAM ANALYTICS

Before changing versions:

READ CHANGELOG
TEST NEW VERSION
COMPARE OUTPUT
UPDATE MAPPINGS
RUN REGRESSION TESTS

Where practical:

V1
↓
NORMALIZED OUTPUT A
V2
↓
NORMALIZED OUTPUT B
COMPARE

Track:

DEPRECATION DATE
MIGRATION DEADLINE
OWNER
REPLACEMENT VERSION

Monitor:

REQUEST COUNT
SUCCESS RATE
ERROR RATE
LATENCY
TIMEOUT RATE
RETRY RATE
429 RATE
5XX RATE

Example:

Identity API
Success: 99.9%
Latency: 180 ms
429: 0
Threat Intel API
Success: 82%
Latency: 3.2 s
Timeouts: Elevated

An API may be:

UP

but returning:

STALE
INCOMPLETE
INVALID

data.

Monitor:

DATA QUALITY

as well.

Track:

LAST SUCCESSFUL COLLECTION
LATEST SOURCE TIMESTAMP

At larger scale monitor:

P50
P95
P99

rather than only average latency.

Define acceptable reliability for the integration.

Example:

TARGET:
99.5% successful enrichment

Use organizational requirements rather than arbitrary numbers.

Example:

{
"request_id": "REQ-1001",
"service": "asset-api",
"method": "GET",
"status": 200,
"duration_ms": 184
}

URLs can contain:

TOKENS
USER DATA
QUERY SECRETS

Redact sensitive parameters.

Use:

authentication
authorization
timeout
rate_limit
server_error
schema_error
validation_error

Structured categories make it easier to:

SEARCH
TREND
ALERT

Track:

api_requests_total
api_requests_success
api_requests_failed
api_retries_total
api_timeouts_total

Track separately per:

SERVICE
ENDPOINT
OPERATION

Examples:

ERROR RATE SPIKE
NO SUCCESSFUL REQUEST
HIGH LATENCY
REPEATED 401
REPEATED 429
SCHEMA FAILURE

May indicate:

TOKEN EXPIRED
ROTATION FAILURE
AUTH CONFIGURATION CHANGE

May indicate:

PERMISSION CHANGE
ROLE REMOVAL
SCOPE CHANGE

May indicate:

API VERSION REMOVED
RESOURCE PATH CHANGED

May indicate:

REQUEST VOLUME INCREASE
BAD CACHE
CONCURRENCY TOO HIGH
PAGINATION LOOP

Possible:

SERVICE OUTAGE
PROVIDER INCIDENT
DEPENDENCY FAILURE

Escalate when:

CRITICAL API UNAVAILABLE
AUTHENTICATION BROKEN
SCHEMA CHANGE BREAKS PROCESSING
DATA QUALITY UNTRUSTWORTHY
HIGH-IMPACT ACTION CANNOT BE VERIFIED

When an important API is unavailable:

CONFIRM FAILURE
↓
CLASSIFY DEPENDENCY
↓
STOP UNSAFE ACTIONS
↓
ENABLE DEGRADED MODE
↓
RECORD COVERAGE GAP
↓
NOTIFY OWNER
↓
MONITOR RECOVERY

Check:

ONE REQUEST?
MULTIPLE REQUESTS?
MULTIPLE WORKERS?
HEALTH ENDPOINT?
SERVICE STATUS?

Avoid declaring an outage from one transient timeout.

Example:

THREAT INTEL API DOWN

Workflow may continue:

ALERT TRIAGE

but mark:

THREAT INTELLIGENCE
UNAVAILABLE

If a required verification API is unavailable:

PAUSE
AUTOMATED RESPONSE

while allowing:

READ-ONLY COLLECTION

where safe.

When service returns:

HEALTH CHECK
↓
TEST REQUEST
↓
VALIDATE SCHEMA
↓
VALIDATE DATA
↓
RESUME LIMITED TRAFFIC
↓
MONITOR
↓
FULL RECOVERY

Prefer:

CANARY REQUESTS

before restoring large request volume.

After an outage you may have:

10,000 QUEUED REQUESTS

Do not send them all simultaneously.

Use:

RATE CONTROL
BATCHING
PRIORITIZATION

Process:

CRITICAL CURRENT EVENTS

before:

LOW-PRIORITY STALE ENRICHMENT

when appropriate.

Some queued actions may no longer be relevant after a long outage.

Revalidate before processing.

Confirm:

REQUEST SUCCESS
DATA VALID
LATENCY NORMAL
ERROR RATE NORMAL
BACKLOG DECREASING

Document:

START TIME
SERVICE
IMPACT
FAILURE MODE
AFFECTED WORKFLOWS
SAFETY ACTIONS
RECOVERY TIME
ROOT CAUSE
FOLLOW-UP

Maintain:

Failure Retry? Workflow
Timeout Usually limited Degraded
400 No Fix request
401 No Auth review
403 No Permission review
404 Usually no Endpoint review
429 Yes, controlled Backoff
500 Limited Retry/degraded
Invalid JSON Usually no Schema/data review
Missing critical field No Quarantine

For any API that modifies security state:

DETECT
↓
VALIDATE
↓
ENRICH
↓
PROPOSE ACTION
↓
PREVIEW
↓
HUMAN APPROVAL
↓
WRITE
↓
VERIFY
↓
AUDIT

Low-impact example:

CRITICAL VULNERABILITY
↓
VALIDATE FINDING
↓
MAP OWNER
↓
CHECK EXISTING CASE
↓
CREATE CASE
↓
VERIFY CASE

Higher-impact:

SUSPICIOUS IDENTITY ALERT
↓
VERIFY IDENTITY
↓
COLLECT EVIDENCE
↓
ANALYST REVIEW
↓
APPROVED RESPONSE
↓
VERIFY STATE

Do not design generic automation that automatically:

DELETES CLOUD RESOURCES
DISABLES SECURITY LOGGING
REMOVES SECURITY CONTROLS
MASS-CHANGES IAM
MODIFIES FIREWALLS

without appropriate authorization, governance, testing, and safeguards.

Consider threats against:

API CREDENTIAL
API CLIENT
CONFIGURATION
REQUEST DATA
RESPONSE DATA
CACHE
QUEUE
LOGS

If a token is compromised:

REVOKE
ROTATE
INVESTIGATE USE
REVIEW PERMISSIONS

If integration has unnecessary privileges:

REDUCE SCOPE

Do not wait for an incident.

Treat API response data as:

UNTRUSTED INPUT

Validate before:

DATABASE INSERT
REPORTING
DOWNSTREAM ACTION

External services introduce:

DEPENDENCY RISK

Understand:

WHAT DATA IS SENT?
WHAT ACCESS EXISTS?
WHAT HAPPENS IF SERVICE FAILS?

Send only required data.

Do not send an entire incident record when the API only requires:

ONE HASH

Be cautious with:

USER INFORMATION
INTERNAL HOSTNAMES
PRIVATE IPS
INCIDENT DETAILS
CUSTOMER DATA

Do not retain full responses forever without a reason.

Define:

RETENTION
ACCESS CONTROL
ENCRYPTION

Test:

SUCCESS
AUTH FAILURE
PERMISSION FAILURE
NOT FOUND
RATE LIMIT
TIMEOUT
SERVER ERROR
INVALID JSON
MISSING FIELD
WRONG TYPE
EMPTY RESPONSE

Include:

ONE PAGE
MULTIPLE PAGES
EMPTY PAGE
REPEATED CURSOR
MISSING NEXT CURSOR

Verify:

RETRYABLE ERROR
β†’ RETRIES
NON-RETRYABLE ERROR
β†’ DOES NOT RETRY

Confirm retries are not:

IMMEDIATE

and do not overload the service.

Run the same synthetic write request twice.

Expected:

ONE LOGICAL RESULT

not:

TWO DUPLICATE RESULTS

Example:

3 APIS
2 SUCCESS
1 FAILURE

Verify output clearly states:

PARTIAL CONTEXT

Simulate:

API DOWN
↓
API RECOVERS

Verify:

CIRCUIT RECOVERS
BACKLOG PROCESSES
NO REQUEST STORM

Change synthetic response:

severity

to:

risk_level

The integration should:

DETECT FAILURE

rather than silently produce bad data.

Return:

severity = urgent

Verify:

UNKNOWN / QUARANTINE

according to policy.

Expected:

FAIL BEFORE REQUEST

Expected:

401
↓
NO RETRY LOOP
↓
AUTHENTICATION ERROR

Expected:

CONNECTION FAILURE
↓
BOUNDED RETRY
↓
DEGRADED MODE

Simulate response exceeding timeout.

Expected:

TIMEOUT
↓
CONTROLLED RETRY
↓
FAILURE STATUS

Expected:

404
↓
NO BLIND RETRY

Expected:

429
↓
READ RETRY-AFTER
↓
WAIT
↓
RETRY WITHIN BUDGET

Expected:

500
↓
CONTROLLED RETRY
↓
BACKOFF
↓
DEGRADED MODE

if still failing.

Before production:

  • Security use case documented
  • API owner identified
  • Documentation reviewed
  • API version documented
  • Required endpoints documented
  • Read/write operations identified
  • Least privilege implemented
  • Credentials securely stored
  • Credential rotation defined
  • HTTPS used where required
  • TLS validation enabled
  • Timeouts configured
  • Status handling implemented
  • JSON validation implemented
  • Schema validation implemented
  • Pagination implemented
  • Pagination limits configured
  • Rate limits understood
  • Retry-After handled where appropriate
  • Retries bounded
  • Backoff implemented
  • Write idempotency considered
  • Partial failures represented correctly
  • Critical dependencies identified
  • Degraded mode defined
  • Observability implemented
  • Secrets excluded from logs
  • Data freshness monitored
  • Recovery tested
  • API owner escalation documented

During each integration run:

  • Authentication available
  • API endpoint reachable
  • Expected version available
  • Request ID generated
  • Request validated
  • Timeout applied
  • HTTP status checked
  • Content type checked
  • Response schema validated
  • Pagination completed
  • Duplicate records handled
  • Rate limits respected
  • Partial failures recorded
  • Data normalized
  • Collection metrics generated
  • Security decision reflects missing context

Use:

INCIDENT ID:
API:
ENDPOINT:
FIRST FAILURE:
LAST SUCCESS:
HTTP STATUS:
ERROR CATEGORY:
REQUEST ID:
AFFECTED WORKFLOW:
AFFECTED DATA:
DEPENDENCY CRITICALITY:
RETRY ATTEMPTS:
DEGRADED MODE:
SECURITY IMPACT:
OWNER:
RECOVERY STATUS:

Before API migration:

CURRENT VERSION:
NEW VERSION:
DEPRECATION DATE:
AUTHENTICATION CHANGES:
ENDPOINT CHANGES:
SCHEMA CHANGES:
PAGINATION CHANGES:
RATE LIMIT CHANGES:
TEST RESULTS:
ROLLBACK PLAN:
APPROVER:
SERVICE:
STATUS:
LAST SUCCESS:
SUCCESS RATE:
ERROR RATE:
AVERAGE LATENCY:
P95 LATENCY:
TIMEOUT RATE:
429 RATE:
5XX RATE:
DATA FRESHNESS:
QUEUE DEPTH:
OWNER:
API REQUEST FAILED
↓
WHAT TYPE?
↓
β”Œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
↓ ↓ ↓ ↓
401 403 429 5XX
↓ ↓ ↓ ↓
AUTH PERMISSION BACKOFF RETRY
REVIEW REVIEW ↓ ↓
LIMIT BOUNDED
RETRY RETRY

Then:

STILL FAILED?
↓
IS DEPENDENCY CRITICAL?
↓
β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
↓ ↓
YES NO
↓ ↓
STOP DEGRADED
UNSAFE MODE
ACTION
↓
HUMAN
REVIEW

Never design:

API RETURNED NOTHING
↓
NO RISK

Use:

API RETURNED
VALID EMPTY RESULT
↓
NO MATCH FROM THIS SOURCE

versus:

API FAILED
↓
UNKNOWN
REQUEST
↓
DID IT CONNECT?
↓
DID AUTH WORK?
↓
WAS ACCESS ALLOWED?
↓
DID HTTP SUCCEED?
↓
IS CONTENT VALID?
↓
IS SCHEMA VALID?
↓
IS DATA COMPLETE?
↓
IS PAGINATION COMPLETE?
↓
IS DATA FRESH?
↓
CAN I TRUST IT
FOR THIS DECISION?
SECURE AUTHENTICATION
+
LEAST PRIVILEGE
+
VALIDATION
+
TIMEOUTS
+
CONTROLLED RETRIES
+
RATE-LIMIT HANDLING
+
IDEMPOTENCY
+
OBSERVABILITY
+
SAFE FAILURE
=
RELIABLE SECURITY API
INTEGRATION

Remember:

NO MATCH
IS NOT THE SAME AS
NO DATA

and:

NO DATA
IS NOT THE SAME AS
API FAILURE

Whenever your security automation calls an API, ask:

WHY AM I CALLING IT?
↓
WHAT ACCESS DO I NEED?
↓
HOW DO I AUTHENTICATE?
↓
IS THE CONNECTION TRUSTED?
↓
WHAT IS MY TIMEOUT?
↓
WHAT HTTP STATUS DID I GET?
↓
IS THE RESPONSE VALID?
↓
IS THE SCHEMA EXPECTED?
↓
IS THERE PAGINATION?
↓
AM I RATE LIMITED?
↓
SHOULD I RETRY?
↓
IS THE OPERATION IDEMPOTENT?
↓
IS ANY CONTEXT MISSING?
↓
CAN I SAFELY MAKE
THE SECURITY DECISION?

After completing this runbook, your security API integrations should be designed to:

AUTHENTICATE SECURELY
USE LEAST PRIVILEGE
VALIDATE REQUESTS
VALIDATE RESPONSES
HANDLE TIMEOUTS
CLASSIFY HTTP FAILURES
RESPECT RATE LIMITS
PROCESS PAGINATION
RETRY SAFELY
PREVENT DUPLICATE WRITES
HANDLE PARTIAL FAILURE
OPERATE IN DEGRADED MODE
MONITOR DEPENDENCIES
RECOVER SAFELY

The objective is not simply:

MAKE THE API CALL WORK

The objective is:

MAKE THE SECURITY WORKFLOW
RELIABLE WHEN THE API
DOES NOT WORK

➑️ Runbook 04 β€” SOC Alert Enrichment, Correlation and Triage

The next runbook moves from reliable data collection and API integration into operational SOC decision support.

You will build a repeatable process for:

SECURITY ALERT
↓
VALIDATE
↓
NORMALIZE
↓
DEDUPLICATE
↓
IDENTITY CONTEXT
↓
ASSET CONTEXT
↓
IOC CONTEXT
↓
VULNERABILITY CONTEXT
↓
CORRELATE
↓
PRIORITIZE
↓
TRIAGE RECOMMENDATION
↓
ANALYST REVIEW
↓
ESCALATE / CLOSE

The goal will be to transform raw security alerts into context-rich, explainable, analyst-ready investigations while keeping final security decisions and disruptive response actions under appropriate human control.