Skip to main content
Migration Notice
We're migrating documentation from the old portal into this one. Some things may look a little different or out of place in the meantime — we know, and we're working to get it right. If something's unclear or doesn't look right, let us know.
Version: 4.5.0

API guide

Eyeglass provides a REST API, called the Zero Trust API, that runs on the Eyeglass appliance. External tools use it to read active security events and, with a license, to start critical-path snapshots and lock out or unlock users. Security information and event management (SIEM) tools, security orchestration (SOAR) tools, and scripts use it.

Licensing​

Read-only event endpoints don't need a license. The critical-path snapshot and the lockout and unlock endpoints need a Zero Trust API license.

Create an API token​

  1. In Eyeglass, go to Integrations > API Tokens.
  2. Click Create New Token.
  3. Name the token after the tool that uses it, for example SIEM Integration. The name appears in the Eyeglass logs.
  4. Copy the token. If you revoke it, the tool loses access immediately.

Send the token in an HTTP header named api_key on every request:

curl --header "api_key: <your-token>" \
--header "accept: application/json" \
https://<eyeglass-ip>/sera/v1/securityevents

To browse the routes and generate commands, open the API Explorer at https://<eyeglass-ip>/sera/docs/.

Endpoints​

Events (read only)​

MethodPathParametersPurpose
GET/v1/ransomware/rsweventsNoneLists active Ransomware Defender events.
GET/v1/securityeventstype: all, rsw, or eaLists active security events. rsw returns Ransomware Defender events and ea returns Active Auditor events.

Critical-path snapshots (license required)​

MethodPathParametersPurpose
GET/v2/ransomware/criticalpathsstate: all, running, or finishedLists recent snapshot jobs.
POST/v2/ransomware/criticalpathsNoneTakes a snapshot of all configured critical paths. Returns a job id.
GET/v2/ransomware/criticalpaths/{id}id: the job IDReturns the status of one job.

Lockout and unlock (license required)​

MethodPathParametersPurpose
POST/v2/ransomware/lockout/{user}user: the SID or user nameCreates a ransomware event and locks out the user. Returns a job id.
POST/v2/ransomware/unlock/{user}user: the user nameUnlocks a user who was locked out. Returns a job id.

Note: An API-started lockout affects only the platform where the event originated.

Every error returns a payload with a code and a message.

Critical-path snapshot hold-off timer​

By default, a request to POST /v2/ransomware/criticalpaths takes one snapshot per critical path per hour. Extra requests during that hour are ignored. This timer is separate from snapshot expiry and quota.

To change the window:

  1. Log in to the Eyeglass appliance as admin, and run sudo -s.

  2. Open /opt/superna/sca/data/system.xml.

  3. In the <rsware> tag, add or change this setting. Replace 2 with the number of hours:

    <api_request_dead_time_hours>2</api_request_dead_time_hours>
  4. Save the file.

Use cases​

  • Event polling. A SIEM or SOAR tool polls /v1/securityevents on a schedule to feed dashboards or alerts.
  • Automated response. A playbook locks out a user, or takes critical-path snapshots, when another tool detects a threat.

See also​