Documentation contents

AarView · Integrate

Machine API

AarView's API for your tools: client ID and secret access, explicit scopes, pushing alerts, reading incidents, adding notes and reading statistics.

On this page

The machine API is for a SIEM, a SOAR or a script. It is never used with a user session: every call carries a machine access credential, and every call is scoped to that credential’s client.

Create machine access

In Settings > API & Webhooks, the super administrator creates machine access. It returns:

  • a client ID (avc_…);
  • a secret (avs_…), shown once and kept only as a hash;
  • the API address;
  • the scopes granted. Nothing is granted by default.

Optionally, the access can be restricted to origin networks and given an expiry date. The secret can be rotated at any time. Creating and rotating need a sign-in less than 10 minutes old.

Authenticate

Two headers:

curl -sS https://aarview.example.org/api/v1/ext/whoami \
  -H "X-AarView-Client-Id: avc_..." \
  -H "X-AarView-Client-Secret: avs_..."

HTTP Basic authentication (id:secret) is accepted too. The whoami answer gives the access’s client, its name and its scopes.

An unknown, expired or disabled credential, or one used from a network it is not allowed from, gets the same 401 answer, with no distinction.

Scopes

ScopeAllows
ingest:alertspushing alerts
incidents:readreading incidents
incidents:commentadding a note to an incident
stats:readreading statistics
archive:readarchiving its own events and alerts (on-site archive tool)

Endpoints

Base: https://<your domain>/api/v1/ext

Method and pathScopePurpose
GET /whoaminonewho the credential is, its scopes
POST /alertsingest:alertspush alerts
GET /incidentsincidents:readlist incidents
GET /incidents/{id}incidents:readread one incident
POST /incidents/{id}/notesincidents:commentadd a note
GET /statsstats:readthe client’s statistics
GET /archivearchive:reada window of events or alerts, for the on-site archive

List incidents

Parameters: page, per_page (200 at most), status (open, in_progress, resolved, closed), severity (critical, high, medium, low), kind (case or alert), since (ISO 8601 date), rule_id.

curl -sS "https://aarview.example.org/api/v1/ext/incidents?status=open&severity=critical" \
  -H "X-AarView-Client-Id: avc_..." \
  -H "X-AarView-Client-Secret: avs_..."

Add a note

visibility is internal (stays with your team, the default) or client (shown to the client). The text is 5,000 characters at most.

curl -sS https://aarview.example.org/api/v1/ext/incidents/<id>/notes \
  -H "X-AarView-Client-Id: avc_..." \
  -H "X-AarView-Client-Secret: avs_..." \
  -H "Content-Type: application/json" \
  -d '{"body": "Host reimaged by the systems team.", "visibility": "internal"}'

Statistics

GET /stats?days=30: the Statistics view’s figures for the credential’s client, over 1 to 365 days.

Push alerts

POST /api/v1/ext/alerts takes a list of alerts, 100 at most per call.

FieldRequiredContent
titleyes512 characters at most
sourceyesyour tool’s name, 64 characters at most
source_refnoyour id for the alert; it is how a duplicate is recognised
severitynofrom 1 (low) to 4 (critical)
source_levelnothe source tool’s level, from 0 to 15, converted by AarView instead of severity
descriptionno20,000 characters at most
alert_typenoyour category
tagsnolist of tags
observablesnolist of {"data_type": "ip", "data": "203.0.113.7"}
observed_atnoISO 8601 date of the observation
tlpnofrom 0 to 3, 2 by default
rawnothe original event
curl -sS https://aarview.example.org/api/v1/ext/alerts \
  -H "X-AarView-Client-Id: avc_..." \
  -H "X-AarView-Client-Secret: avs_..." \
  -H "Content-Type: application/json" \
  -d '[{"title": "SSH login from an unknown address", "source": "my-tool",
        "source_ref": "evt-2041", "severity": 3,
        "observables": [{"data_type": "ip", "data": "203.0.113.7"}]}]'

The answer gives how many alerts were received, created and recognised as duplicates, and the ids created. The client is never read from the body: it comes from the credential. Sending the same alert again (same source, same reference) does not create a second incident.

Generic format

For a tool that can only send its own JSON, create a connected source with the generic format instead. AarView reads:

DataFields read, in order
titletitle, name, rule, rule_name, alert
severityseverity, level, priority: a word (low, medium, high, critical…), a number from 1 to 4, or a score out of 10 or 100
referenceid, ref, alert_id, uuid
descriptiondescription, message, details
datetimestamp, time, @timestamp
observablesobservables (type and value, or data_type and data), and values found in fields or event
tagstags

An alert without a title is rejected; a missing or unknown severity becomes “medium”.