API DOCS

Incident API

🚨
Base path: https://api.aamos.ai/v1/incident/ — Manage operational incidents with full lifecycle tracking, SLA enforcement, and team workflows.
POST /v1/incident/incidents

Create a new incident. The system automatically assigns an SLA deadline based on priority level.

Request — application/json

FieldTypeRequiredDescription
titlestringRequiredShort, descriptive title for the incident.
prioritystringRequiredOne of: critical, high, medium, low.
sourcestringRequiredOrigin system or sensor that triggered the incident (e.g. vims, reality-alerts, manual).
assignee_groupstringOptionalTeam or group responsible for resolution.
descriptionstringOptionalDetailed description of the incident.

Example Request

bash
curl -X POST https://api.aamos.ai/v1/incident/incidents \
  -H "Authorization: Bearer ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Unauthorized access detected at Site A",
    "priority": "high",
    "source": "vims",
    "assignee_group": "security-ops",
    "description": "VIMS analysis detected structural change at front gate. Change score: 0.74."
  }'

Response — 201 Created

json
{
  "incident_id": "inc_4b7e2f9a1c",
  "status": "open",
  "priority": "high",
  "sla_deadline": "2025-01-15T14:30:00Z",
  "created_at": "2025-01-15T10:30:00Z"
}
GET /v1/incident/incidents

List incidents with optional filtering by status, priority, and pagination.

Query Parameters

ParameterTypeDescription
statusstringFilter: open, investigating, resolved, closed.
prioritystringFilter: critical, high, medium, low.
pageintegerPage number (default: 1). 50 results per page.
bash
curl "https://api.aamos.ai/v1/incident/incidents?status=open&priority=high" \
  -H "Authorization: Bearer ak_live_YOUR_KEY"

Response — 200 OK

json
{
  "incidents": [
    {
      "incident_id": "inc_4b7e2f9a1c",
      "title": "Unauthorized access detected at Site A",
      "status": "open",
      "priority": "high",
      "sla_deadline": "2025-01-15T14:30:00Z",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "total": 1,
  "page": 1
}
PUT /v1/incident/incidents/:id/status

Update the status of an incident through its lifecycle.

Request — application/json

FieldTypeDescription
statusstringNew status: openinvestigatingresolvedclosed.
bash
curl -X PUT https://api.aamos.ai/v1/incident/incidents/inc_4b7e2f9a1c/status \
  -H "Authorization: Bearer ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "investigating" }'

Response — 200 OK

json
{
  "incident_id": "inc_4b7e2f9a1c",
  "status": "investigating",
  "updated_at": "2025-01-15T11:15:00Z"
}
POST /v1/incident/incidents/:id/comments

Add a comment to an incident for audit trail and team communication.

Request — application/json

FieldTypeDescription
textstringThe comment text. Markdown supported.
bash
curl -X POST https://api.aamos.ai/v1/incident/incidents/inc_4b7e2f9a1c/comments \
  -H "Authorization: Bearer ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "On-site team dispatched. ETA 20 minutes." }'

Response — 201 Created

json
{
  "comment_id": "cmt_2e8a5f1b3d",
  "incident_id": "inc_4b7e2f9a1c",
  "text": "On-site team dispatched. ETA 20 minutes.",
  "created_at": "2025-01-15T11:20:00Z"
}

Deviation API

📐
Base path: https://api.aamos.ai/v1/deviation/ — Detect visual deviations in assets against registered baselines, with configurable thresholds and region-level analysis.
POST /v1/deviation/compare

Compare an image against the registered baseline for an asset. Returns a deviation score, change classification, and actionable recommendation.

Request — multipart/form-data

ParameterTypeRequiredDescription
imagefileRequiredCurrent image of the asset. JPEG, PNG, or WebP. Max 10 MB.
asset_idstringRequiredYour unique identifier for the asset being compared.
thresholdfloatOptionalDeviation threshold (0.0–1.0) above which changes are flagged. Default: 0.3.

Example Request

bash
curl -X POST https://api.aamos.ai/v1/deviation/compare \
  -H "Authorization: Bearer ak_live_YOUR_KEY" \
  -F "image=@/path/to/asset_current.jpg" \
  -F "asset_id=rack-server-b2" \
  -F "threshold=0.25"

Response — 200 OK

json
{
  "asset_id": "rack-server-b2",
  "deviation_score": 0.42,
  "change_type": "component_removal",
  "regions": [
    {
      "bbox": [200, 150, 450, 320],
      "deviation": 0.61,
      "label": "Missing hardware component (slot 4)"
    }
  ],
  "recommend_action": "immediate_review",
  "analyzed_at": "2025-01-15T10:30:00Z"
}

Recommended Actions

ValueDescription
noneNo action needed. Deviation within expected range.
monitorMinor deviation detected. Continue monitoring.
reviewDeviation above threshold. Schedule a review.
immediate_reviewSignificant deviation. Requires immediate attention.
POST /v1/deviation/baseline

Register or update the baseline image for an asset. The baseline is the reference state used for all future comparisons.

Request — multipart/form-data

ParameterTypeRequiredDescription
asset_idstringRequiredYour unique identifier for the asset. Created if new.
imagefileRequiredThe reference (baseline) image. JPEG, PNG, or WebP.
bash
curl -X POST https://api.aamos.ai/v1/deviation/baseline \
  -H "Authorization: Bearer ak_live_YOUR_KEY" \
  -F "asset_id=rack-server-b2" \
  -F "image=@/path/to/rack_baseline.jpg"

Response — 201 Created

json
{
  "baseline_id": "dbl_6f3c8e2a9d",
  "asset_id": "rack-server-b2",
  "created_at": "2025-01-15T09:00:00Z"
}