Developer Reference

Public API v1

Integrate Amajoni AI agent security data into your SIEM, SOAR, CI/CD pipelines, and compliance dashboards. All endpoints are authenticated, rate-limited, and return JSON.

Get API key →Create account

Authentication

All requests require an X-API-Key header containing your API key. Keys are created in Settings → API Keys and are only shown once at creation time.

curl https://amajoni-production.up.railway.app/v1/posture \
  -H "X-API-Key: amj_your_key_here"

Rate limiting

60 requests per minute per API key. Exceeded requests receive HTTP 429 with aRetry-After: 60 header.

Response shape

List endpoints return a paginated envelope. Single-resource endpoints return the object directly. Errors always include an error object.

// List response
{
  "object": "list",
  "data": [ ... ],
  "meta": { "total": 42, "limit": 50, "offset": 0, "has_more": false }
}

// Error response
{
  "error": { "code": "not_found", "message": "Agent 'xyz' not found." }
}

Endpoints

GET/v1/agents

List agents

Returns all AI agents discovered in your cloud environment, sorted by blast radius descending. Supports filtering by risk level, cloud provider, environment, and internet exposure.

Query Parameters

NameTypeRequiredDescription
limitintegerNoNumber of results (1–100, default 50)
offsetintegerNoNumber of results to skip for pagination
risk_levelstringNoFilter: critical | high | medium | low
cloudstringNoFilter by cloud provider: AWS | GCP | Azure
environmentstringNoFilter by environment: production | staging | development
is_internet_exposedbooleanNoFilter to internet-exposed agents only
curl "https://amajoni-production.up.railway.app/v1/agents?risk_level=critical&limit=10" \
  -H "X-API-Key: amj_your_key_here"
GET/v1/agents/{id}

Get a single agent

Returns full detail for one AI agent by its UUID, including permissions, signals, governance fields, and blast radius.

curl https://amajoni-production.up.railway.app/v1/agents/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: amj_your_key_here"
PATCH/v1/agents/{id}

Update agent governance fields

Update ownership, team, approval status, tags, or review cadence for an agent. Only the fields you include are changed. When approval_status is set to 'approved', last_reviewed_at is automatically set to now.

Request Body Fields

FieldTypeDescription
owner_namestringFull name of the human owner
owner_emailstringEmail address of the owner
teamstringTeam or cost centre name
approval_statusstringapproved | pending_review | unreviewed | rejected
tagsstring[]Array of free-text labels
review_cadence_daysintegerDays between required reviews (default 90)
curl -X PATCH \
  https://amajoni-production.up.railway.app/v1/agents/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: amj_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "owner_name": "Jane Smith", "team": "ML Platform", "approval_status": "approved" }'
POST/v1/agents/bulk

Bulk update agent governance fields

Apply the same governance changes to up to 100 agents in a single request. Useful for SOAR runbooks and CI/CD pipelines that deploy batches of agents. Agents not owned by your org are silently skipped.

Request Body Fields

FieldTypeDescription
agent_idsstring[]List of agent UUIDs to update (max 100)
updatesobjectGovernance fields to apply (same as PATCH /v1/agents/{id})
curl -X POST \
  https://amajoni-production.up.railway.app/v1/agents/bulk \
  -H "X-API-Key: amj_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_ids": ["id-1", "id-2", "id-3"],
    "updates": { "team": "ML Platform", "approval_status": "pending_review" }
  }'

// Response
{ "object": "bulk_update_result", "updated": 3, "skipped": 0, "agent_ids": ["id-1","id-2","id-3"] }
GET/v1/agents/{id}/findings

Get findings for one agent

Returns all security findings for a specific agent, derived from its signals and mapped to OWASP LLM Top 10, MITRE ATT&CK, SOC 2, and NIST AI RMF.

curl https://amajoni-production.up.railway.app/v1/agents/550e8400-e29b-41d4-a716-446655440000/findings \
  -H "X-API-Key: amj_your_key_here"
GET/v1/findings

List all security findings

Returns all security findings across your entire agent fleet. Each finding maps a signal to a security framework. Filter by severity or framework to build targeted alert pipelines.

Query Parameters

NameTypeRequiredDescription
severitystringNoFilter: critical | high | medium | low
frameworkstringNoFilter: OWASP | MITRE | SOC2 | NIST | Signal
agent_idstringNoScope to a single agent
limitintegerNoResults per page (1–100, default 50)
offsetintegerNoPagination offset
curl "https://amajoni-production.up.railway.app/v1/findings?severity=critical&framework=OWASP" \
  -H "X-API-Key: amj_your_key_here"
GET/v1/posture

Get org posture summary

Returns an overall security posture score (0–100 with letter grade), agent counts by risk level, finding counts by severity, and exposure statistics. Use this as a dashboard feed or CI/CD gate.

curl https://amajoni-production.up.railway.app/v1/posture \
  -H "X-API-Key: amj_your_key_here"

// Response
{
  "object": "posture",
  "score": 72,
  "grade": "B",
  "total_agents": 14,
  "agents_by_risk": { "critical": 1, "high": 3, "medium": 6, "low": 4 },
  "agents_unowned": 5,
  "agents_internet_exposed": 2,
  "avg_blast_radius": 41.2,
  "total_findings": 23
}
GET/v1/activity

List activity events

Returns the security event log — scans, agent discoveries, governance changes, alerts, and signal detections. Most recent events first.

Query Parameters

NameTypeRequiredDescription
severitystringNoFilter: critical | high | medium | low | info
event_typestringNoe.g. scan_completed | agent_discovered | critical_found
limitintegerNoResults per page (1–100, default 50)
offsetintegerNoPagination offset
curl "https://amajoni-production.up.railway.app/v1/activity?severity=critical&limit=20" \
  -H "X-API-Key: amj_your_key_here"
GET/v1/scans

List recent scans

Returns scan records with status, timing, cloud provider, and agent counts discovered.

curl https://amajoni-production.up.railway.app/v1/scans \
  -H "X-API-Key: amj_your_key_here"
GET/v1/governance

Get governance summary

Returns ownership and review status across all agents. Response includes total_agents, approved, pending_review, unreviewed, rejected, unowned_agents, overdue_reviews, governance_rate (%), and a per-agent list with review_due flags. Useful for EU AI Act Art.14 (human oversight) compliance dashboards.

curl https://amajoni-production.up.railway.app/v1/governance \
  -H "X-API-Key: amj_your_key_here"
GET/v1/export/siem

SIEM-ready flat event export

Returns all security findings as a flat JSON array, one event per finding with full agent context embedded. Designed for direct ingestion into Splunk, QRadar, Elastic, or any SIEM that accepts JSON event streams.

curl https://amajoni-production.up.railway.app/v1/export/siem \
  -H "X-API-Key: amj_your_key_here"

# Pipe into jq to filter critical events
curl ... | jq '.events[] | select(.severity == "critical")'
GET/v1/export/csv

CSV governance export

Returns the full agent inventory and governance status as a CSV file with BOM encoding for Excel compatibility. Includes risk level, blast radius, signals, owner, team, approval status, and review dates.

curl https://amajoni-production.up.railway.app/v1/export/csv \
  -H "X-API-Key: amj_your_key_here" \
  -o amajoni-agents.csv
GET/v1/alerts

List active alerts

Returns persistent alerts for your organisation — each alert corresponds to a triggered rule (blast radius, governance gap, or security signal). Alerts are resolved automatically on the next scan if their condition clears. Results are sorted by severity (critical first) then last_seen_at descending.

Query Parameters

NameTypeRequiredDescription
severitystringNoFilter by severity: critical | high | medium | low
triage_statestringNoFilter by workflow state: new | acknowledged | dismissed | false_positive | resolved
resolvedbooleanNoInclude resolved alerts (default: false)
limitintegerNoResults per page, 1–200 (default: 50)
offsetintegerNoPagination offset (default: 0)
curl https://amajoni-production.up.railway.app/v1/alerts \
  -H "X-API-Key: amj_your_key_here"

# Filter to critical alerts only
curl "https://amajoni-production.up.railway.app/v1/alerts?severity=critical" \
  -H "X-API-Key: amj_your_key_here"

# Show only unacknowledged (new) alerts
curl "https://amajoni-production.up.railway.app/v1/alerts?triage_state=new" \
  -H "X-API-Key: amj_your_key_here"

Error codes

StatusMeaning
401Missing or invalid API key
404Resource not found or not owned by your org
400Malformed request (missing required fields or bad values)
429Rate limit exceeded — wait 60 s then retry
500Internal server error — contact support if persistent

Need help?

Email hi@amajoni.com with your question. Include your X-API-Key prefix (first 8 chars only — never the full key) to help us identify your account.