# Public OneFirewall API description (served by html/web_site/apis.html). Keep openapi.json in sync with this file.
openapi: 3.0.3
info:
  title: OneFirewall Server API
  version: 4.1.0 (2026-11-30)
  description: |
    Public edition: the threat-intelligence, connector, traffic and dashboard endpoints used by the OneFirewall web app. Every operation carries a request example (cURL), parameter and body examples and, where the call returns data, an example response. Account, administration and reporting endpoints are not listed.

    REST API of the OneFirewall server: a multi-tenant, crowd-sourced threat-intelligence platform. Member organizations report malicious IPv4/IPv6 addresses, domains, URLs and file hashes; the server computes trust-weighted consensus scores and each organization pulls blocklists for its firewalls. The same data is exposed as STIX 2.1 through a TAXII 2.1 server.

    This document is generated from the server code (`app.js` and `app/Api_*.js`).

    ## Authentication

    Send an API token as `Authorization: Bearer ofa_...`. Create it in Profile > API tokens (shown once, optional expiration date, removable at any time). It acts as the user who created it and needs no 2FA code. It cannot manage credentials: API tokens, JWTs, 2FA, password and impersonation answer 403 and need a signed-in session.

    Legacy access, still supported: send the JWT from `POST /api/v1/login` (completed with `POST /api/v1/login/otp` when 2FA is active), from `GET /api/v1/profile/jwt`, or from `POST /api/v1/saml/exchange` as `Authorization: Bearer <token>`.

    The same middleware also accepts, for compatibility:

    - `Authorization: Basic base64(<guid>:<token>)`, used by older connectors;
    - the `?authorization=<token>` query parameter (API token or JWT), for clients that cannot send headers. Do not send an `Authorization` header with it: the header wins. URLs can end up in logs, so prefer the header when the client supports it.

    JWTs are signed with a per-user secret held by the server, so they cannot be validated offline. `DELETE /api/v1/profile/jwt` revokes every JWT of the user, but not the API tokens; resetting a forgotten password revokes both.

    ## Roles

    | Role | Name |
    |---|---|
    | 0 | Super Admin |
    | 1 | Member |
    | 2 | Guest |
    | 3 | Read Only |
    | 10 | Member Admin (manages its own organization) |
    | 20 | Member Mobile |
    | 999 | Disabled (new sign-ups, SSO users waiting for approval) |

    Each operation lists the roles it accepts; other roles get 403 (a few legacy handlers answer 401 instead, noted per operation).

    ## Organizations and Credit Coins

    Every user belongs to an organization. Threat-intelligence, AI, automation and report calls debit Credit Coins from it (public operations note their cost; the Organization page has the full price list and the usage report) and answer 402 when the balance is too low. `X-OFA-COST` is the number of coins charged. An organization with 0 Credit Coins gets 402 on every threat-intelligence endpoint (`/ips`, `/ipv4`, `/ipv6`, `/urls`, `/domains`, `/files`, `/feeds`, `/flat`, `/intel`, `/info`, `/stix2`, `/taxii2`). An organization with a feed delay (`delay` > 0) cannot use STIX2, TAXII2 or the consensus feed.

    A Super Admin without an organization receives 409 `ORGANIZATION_REQUIRED` on every call except the organization-selection ones (organization status, join, list, create).

    ## CLOUD and ONPREM

    The same server runs as the OneFirewall cloud (`OFA_INSTANCE=CLOUD`) or as an on-premise installation (`ONPREM`). On ONPREM, IPv6, domain, URL, file, info and overview requests are forwarded to the cloud unless `proxy=LOCAL` is given or the connector (`agid`) is configured LOCAL.

    ## Known issues

    - `GET /api/v1/otp` always answers 405 and is not listed; 2FA setup is `POST /api/v1/otp` (re-authentication required).

    ## Errors and limits

    Most errors are plain text; some are JSON `{"message": ...}`. Unknown `/api/*` routes answer 404 `{"message":"Endpoint not found"}`. Request bodies are limited to 5 MB.

    The application rate-limits its unauthenticated endpoints (per IP and per account, shared by all replicas). The edge gateway in front of the API applies rate limiting to every route and may add `RateLimit` / `Retry-After` headers.
  contact:
    name: OneFirewall support
    email: support@onefirewall.com
    url: https://www.onefirewall.com
  license:
    name: Proprietary
    url: https://www.onefirewall.com
servers:
  - url: https://app.onefirewall.com
    description: OneFirewall cloud (production)
    x-internal: false
  - url: https://{host}
    description: On-premise installation (production); local development runs on port 8081
    variables:
      host:
        default: onefirewall.example.internal
        description: Host name (and port) of the installation.
    x-internal: true
security:
  - bearerAuth: []
tags:
  - name: System
    description: Health and version.
  - name: Graphs
    description: Traffic dashboards and threat updates.
  - name: IPv4
    description: IPv4 threat rules, submissions and blocklists.
  - name: IPv6
    description: IPv6 threat records.
  - name: Domains
    description: Domain threat records.
  - name: URLs
    description: URL threat records.
  - name: Files
    description: File-hash threat records.
  - name: Intel
    description: Indicator lookups (ASN/geo, DNS, cross-type intelligence).
  - name: STIX2
    description: STIX 2 objects.
  - name: Connectors
    description: Firewall connectors (agents) status and configuration.
  - name: Traffic
    description: Firewall traffic ingestion.
paths:
  /api/v1/agents:
    post:
      tags:
        - Connectors
      summary: Register a connector
      operationId: registerAgent
      description: |-
        Stores the registration and an initial connector record.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRegistration'
            example:
              gaid: OFA-AGENT-7f3k9QxL2mN4pR8s
              score_threshold: 150
              installation_name: fw-edge-01
              plugin: FORTIGATE
      security:
        - bearerAuth: []
      responses:
        '201':
          description: Registered.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/agents' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"gaid":"OFA-AGENT-7f3k9QxL2mN4pR8s","score_threshold":150,"installation_name":"fw-edge-01","plugin":"FORTIGATE"}'
  /api/v1/defense:
    get:
      tags:
        - Graphs
      summary: Connector defense summary
      operationId: getDefense
      description: |-
        Attacks and actors blocked by the organization's connectors in the recent window, with a timeline. Requires the organization `config.live` integration (400 `Please configure the Org config section` otherwise).

        **Roles:** Super Admin (0), Member Admin (10).
      parameters:
        - name: agid
          in: query
          description: Only this connector.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Summary.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefenseSummary'
              example:
                attacks: 1842
                actors: 311
                devices:
                  - agid: OFA-AGENT-7f3k9QxL2mN4pR8s
                    hostname: fw-edge-01
                    plugin: FORTIGATE
                    blocked_count: 1620
                    blocked_autonomy_count: 222
                top_actors:
                  - ip: 203.0.113.45
                    count: 214
                    ofa:
                      ip: 203.0.113.45
                      score: 742
                      tags:
                        - ssh-bruteforce
                      ip_info:
                        country: NL
                        asn: AS64500
                timeline:
                  start: 1795334400
                  bucket_sec: 3600
                  blocked:
                    - 64
                    - 71
                    - 58
                  blocked_autonomy:
                    - 8
                    - 11
                    - 6
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/defense' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/domains:
    get:
      tags:
        - Domains
      summary: Latest Domain records
      operationId: listLatestDomains
      description: |-
        Records updated after `ts` (page size 100-2000). Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).

        **Cost:** 12 Credit Coins.
      parameters:
        - name: ts
          in: query
          description: Polling cursor (`header.next_ts`).
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: page_size
          in: query
          description: Records per page.
          schema:
            type: integer
            format: int32
            minimum: 100
            maximum: 2000
            default: 100
          required: false
          example: 1000
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Records.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocList'
              example:
                header:
                  type: Domains Feed
                  version: 2
                  ts: null
                  next_ts: 1795420680
                  page_size: 1000
                  delay: 0
                  eval: null
                  exec_python: null
                  user:
                    guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                body:
                  - domain: malicious-example.com
                    ts: '2026-11-30T21:40:11Z'
                    entry_ts: '2026-11-19T10:02:45Z'
                    score: 655
                    tags:
                      - phishing
                    total_members: 4
                    total_reports: 11
                    blocked_by:
                      - OFA-GID-a1B2c3D4e5F6g7H8
                    unblocked_by: []
                    members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/domains?page_size=1000' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - Domains
      summary: Report a domain
      operationId: submitDomain
      description: |-
        Recomputes the consensus score. The organization policy may also contribute it to the Alliance.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainSubmit'
            example:
              domain: malicious-example.com
              confidence: 0.9
              decision: 1
              tags:
                - phishing
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Recorded.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/domains' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"domain":"malicious-example.com","confidence":0.9,"decision":1,"tags":["phishing"]}'
  /api/v1/domains/score/{min_score}:
    get:
      tags:
        - Domains
      summary: Domain blocklist (plain text)
      operationId: getDomainFeed
      description: |-
        Records with score >= min_score. Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL. On a LOCAL connector with `score_threshold_cloud`, cloud records above that score are merged in.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).

        **Cost:** 45 Credit Coins.
      parameters:
        - name: min_score
          in: path
          description: Minimum score (1-1000).
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
          required: true
          example: 150
        - name: page
          in: query
          description: Cursor from the `next_page` response header of the previous page.
          schema:
            type: string
            maxLength: 4096
            pattern: ^[A-Za-z0-9+/=_-]*$
          required: false
          example: eyJzZWFyY2hfYWZ0ZXIiOls2NTVdfQ
        - name: format
          in: query
          description: '`LIST` returns one comma-separated line instead of one value per line.'
          schema:
            type: string
            enum:
              - LIST
              - list
          required: false
          example: LIST
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: plugin
          in: query
          description: Client plugin name, recorded in the connector feedback. `CHECKPOINT`, `CHECKPOINT_IP` or `CHECKPOINT-IP` switch the IPv4 feed to Check Point observable CSV.
          schema:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_\-]+$
          required: false
          example: FORTIGATE
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: protocol
          in: query
          description: Return one `http(s)://<domain>/` URL per line instead of the CSV.
          schema:
            type: string
            enum:
              - HTTP
              - HTTPS
              - http
              - https
          required: false
          example: https
        - name: resolve
          in: query
          description: Return `<domain>|<ipv4>,<ipv4>...` lines (reserved addresses removed). Ignored when `protocol` is set.
          schema:
            type: string
            enum:
              - 'YES'
              - 'yes'
          required: false
          example: 'yes'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Blocklist.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
            next_page:
              description: Opaque cursor (base64) for the next page of a plain-text feed. Pass it back as `?page=`. Absent on the last page.
              required: false
              schema:
                type: string
                maxLength: 4096
                pattern: ^[A-Za-z0-9+/=_-]*$
          content:
            text/plain:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
              example: "malicious-example.com\r\nphish-login.example.net\r\n"
            text/csv:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/domains/score/150' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/domains/{domain}:
    get:
      tags:
        - Domains
      summary: Get a domain record
      operationId: getDomain
      description: |-
        Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).

        **Cost:** 32 Credit Coins.
      parameters:
        - name: domain
          in: path
          description: Domain (URL-encoded).
          schema:
            type: string
            maxLength: 253
            pattern: ^[^\s/]+$
          required: true
          example: malicious-example.com
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Record.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocStaticRecord'
              example:
                domain: malicious-example.com
                ts: '2026-11-30T21:40:11Z'
                entry_ts: '2026-11-19T10:02:45Z'
                score: 655
                tags:
                  - phishing
                total_members: 4
                total_reports: 11
                blocked_by:
                  - OFA-GID-a1B2c3D4e5F6g7H8
                unblocked_by: []
                members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/domains/malicious-example.com' \
              -H "Authorization: Bearer $OFA_TOKEN"
    put:
      tags:
        - Domains
      summary: Block/unblock a domain for the organization
      operationId: putDomainDecision
      description: |-
        Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      parameters:
        - name: domain
          in: path
          description: Domain (URL-encoded).
          schema:
            type: string
            maxLength: 253
            pattern: ^[^\s/]+$
          required: true
          example: malicious-example.com
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionUpdate'
            example:
              decision: 1
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X PUT 'https://app.onefirewall.com/api/v1/domains/malicious-example.com' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"decision":1}'
  /api/v1/domains/{domain}/submissions:
    get:
      tags:
        - Domains
      summary: Submissions of the organization
      operationId: listDomainSubmissions
      description: |-


        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: domain
          in: path
          description: Domain (URL-encoded).
          schema:
            type: string
            maxLength: 253
            pattern: ^[^\s/]+$
          required: true
          example: malicious-example.com
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Submissions.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmissionList'
              example:
                me: OFA-GUID-1234-5678-9012
                submissions:
                  - guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                    confidence: 0.9
                    tags:
                      - phishing
                    ts: 1795413600
                    can_delete: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/domains/malicious-example.com/submissions' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/domains/{domain}/{guid}:
    delete:
      tags:
        - Domains
      summary: Delete a submission
      operationId: deleteDomainSubmission
      description: |-
        Own submissions; Super Admin, Member and Member Admin can delete any of the organization.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: domain
          in: path
          description: Domain (URL-encoded).
          schema:
            type: string
            maxLength: 253
            pattern: ^[^\s/]+$
          required: true
          example: malicious-example.com
        - name: guid
          in: path
          description: Submission id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          required: true
          example: OFA-GUID-1234-5678-9012
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X DELETE 'https://app.onefirewall.com/api/v1/domains/malicious-example.com/OFA-GUID-1234-5678-9012' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/feedback:
    get:
      tags:
        - Connectors
      summary: Connectors of the organization
      operationId: listConnectors
      description: |-
        Active connectors. Connector secrets are masked unless the caller may read them; `short=true` omits heavy fields.

        **Roles:** Super Admin (0), Member (1), Guest (2), Read Only (3), Member Admin (10), Member Mobile (20).
      parameters:
        - name: agid
          in: query
          description: Only this connector.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: short
          in: query
          description: Short form.
          schema:
            type: string
            enum:
              - 'true'
          required: false
          example: 'true'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Connectors.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Connector'
                maxItems: 10000
              example:
                - agid: OFA-AGENT-7f3k9QxL2mN4pR8s
                  mgid: OFA-GID-a1B2c3D4e5F6g7H8
                  code: 200
                  score_threshold: 150
                  sync_time: 5
                  maximum_rules: 50000
                  hostname: fw-edge-01
                  plugin: FORTIGATE
                  active: true
                  blacklist_size: 12840
                  ts: 1795420740
                  version: 4.1.0
                  config:
                    running: 'yes'
                    score_threshold: 150
                    sync_time: 5
                    password: '************'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/feedback?short=true' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - Connectors
      summary: Report connector status
      operationId: reportConnectorStatus
      description: |-
        Sent by connectors. A connector id registered by another organization answers 409. `code: -1` updates the stored record (200); otherwise a new record is stored (201). Lack of permission answers 401.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorReport'
            example:
              agid: OFA-AGENT-7f3k9QxL2mN4pR8s
              mgid: OFA-GID-a1B2c3D4e5F6g7H8
              code: 200
              score_threshold: 150
              sync_time: 5
              maximum_rules: 50000
              hostname: fw-edge-01
              plugin: FORTIGATE
              blacklist:
                - 203.0.113.45
                - 198.51.100.23
              config:
                running: 'yes'
              active: true
              ts: 1795420800
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Updated.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '201':
          description: Stored.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/feedback' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"agid":"OFA-AGENT-7f3k9QxL2mN4pR8s","mgid":"OFA-GID-a1B2c3D4e5F6g7H8","code":200,"score_threshold":150,"sync_time":5,"maximum_rules":50000,"hostname":"fw-edge-01","plugin":"FORTIGATE","blacklist":["203.0.113.45","198.51.100.23"],"config":{"running":"yes"},"active":true,"ts":1795420800}'
    delete:
      tags:
        - Connectors
      summary: Remove a connector
      operationId: deactivateConnector
      description: |-
        Marks it inactive. Lack of permission answers 401.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      parameters:
        - name: agid
          in: query
          description: Connector id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: true
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X DELETE 'https://app.onefirewall.com/api/v1/feedback?agid=OFA-AGENT-7f3k9QxL2mN4pR8s' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/feedback/config:
    post:
      tags:
        - Connectors
      summary: Replace a connector configuration
      operationId: putConnectorConfig
      description: |-
        Lack of permission answers 401.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      parameters:
        - name: agid
          in: query
          description: Connector id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: true
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Connector configuration.
            example:
              running: 'yes'
              score_threshold: 150
              sync_time: 300
              password: '************'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/feedback/config?agid=OFA-AGENT-7f3k9QxL2mN4pR8s' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"running":"yes","score_threshold":150,"sync_time":300,"password":"************"}'
  /api/v1/feedback/config/status:
    post:
      tags:
        - Connectors
      summary: Pause or resume a connector
      operationId: putConnectorRunning
      description: |-
        Lack of permission answers 401.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorStatus'
            example:
              agid: OFA-AGENT-7f3k9QxL2mN4pR8s
              running: 'no'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/feedback/config/status' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"agid":"OFA-AGENT-7f3k9QxL2mN4pR8s","running":"no"}'
  /api/v1/feedback/logs:
    get:
      tags:
        - Connectors
      summary: Read connector logs
      operationId: listConnectorLogs
      description: |-
        Troubleshooting logs of a connector of the organization, newest first (by the time they were received).

        **Roles:** Super Admin (0), Member (1), Read Only (3), Member Admin (10).
      parameters:
        - name: agid
          in: query
          description: License ID of the connector.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: true
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: limit
          in: query
          description: Maximum number of entries.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 200
          required: false
          example: 100
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Log entries.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConnectorLog'
                maxItems: 200
              example:
                - received_at: '2026-11-23T08:00:01.250Z'
                  ts: '2026-11-23T08:00:00.000Z'
                  level: error
                  event: sync_failed
                  message: 'Firewall not reachable: connection timed out'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/feedback/logs?agid=OFA-AGENT-7f3k9QxL2mN4pR8s&limit=100' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - Connectors
      summary: Send connector logs
      operationId: sendConnectorLogs
      description: |-
        Adds troubleshooting logs or events to a connector of the organization. They are shown in Connector Status. The body is one entry, or an array of up to 200. An entry that is not valid refuses the whole request (400), and nothing is stored.

        The newest 200 entries of each connector are kept, for up to 30 days. Up to 120 requests every 10 minutes for each connector. Do not send passwords or tokens.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: agid
          in: query
          description: License ID of the connector.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: true
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/ConnectorLogEntry'
                - type: array
                  items:
                    oneOf:
                      - $ref: '#/components/schemas/ConnectorLogEntry'
                      - type: string
                        description: 'Only the message: the level is info. Cut after 600 characters.'
                  minItems: 1
                  maxItems: 200
            example:
              - level: error
                event: sync_failed
                message: 'Firewall not reachable: connection timed out'
                ts: 1795420800
      security:
        - bearerAuth: []
      responses:
        '201':
          description: Stored.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: object
                properties:
                  stored:
                    type: integer
                    minimum: 1
                    maximum: 200
                    description: Number of entries stored.
                required:
                  - stored
              example:
                stored: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/feedback/logs?agid=OFA-AGENT-7f3k9QxL2mN4pR8s' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '[{"level":"error","event":"sync_failed","message":"Firewall not reachable: connection timed out","ts":1795420800}]'
  /api/v1/feeds/{score}/{members}/{events}:
    get:
      tags:
        - IPv4
      summary: Consensus feed
      operationId: getFeed
      description: |-
        Rules with score > score, at least `members` organizations and `events` events, plus rules blocked by the caller's organization. 1000 rules per page, pages 0-9. Organizations with a feed delay get 403.

        **Roles:** Super Admin (0), Member (1), Guest (2), Read Only (3), Member Admin (10), Member Mobile (20).

        **Cost:** 480 Credit Coins per page.
      parameters:
        - name: score
          in: path
          description: Score threshold (100-1000).
          schema:
            type: integer
            format: int32
            minimum: 100
            maximum: 1000
          required: true
          example: 300
        - name: members
          in: path
          description: Minimum organizations.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100000
          required: true
          example: 2
        - name: events
          in: path
          description: Minimum events.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000000
          required: true
          example: 5
        - name: page
          in: query
          description: Page 0-9.
          schema:
            type: integer
            format: int32
            minimum: 0
            maximum: 9
          required: false
          example: 0
        - name: scroll_feeds
          in: query
          description: Only rules indexed after this time.
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Rules.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IpRule'
                maxItems: 1000
              example:
                - gid: OFA-RULE-GID-a1B2c3D4e5F6g7H8
                  ip: 203.0.113.45
                  ts: 1795420680
                  entry_ts: 1795161600
                  score: 742.5
                  tags:
                    - ssh-bruteforce
                    - botnet
                  reverse_dns: host45.example-hosting.net
                  is_network: false
                  blocked_by:
                    - OFA-GID-a1B2c3D4e5F6g7H8
                  unblocked_by: []
                  ttl_by: []
                  reports: 37
                  delay: 0
                  elk_entry_ts: '2026-11-20T08:14:03Z'
                  dec: 1
                  info:
                    members: 6
                    events: 37
                    sources:
                      - honeypot
                      - firewall
                    stix_bundles: []
                    attack_infos: []
                    notes:
                      - Repeated SSH logins on port 22
                  members: []
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/feeds/300/2/5?page=0' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/files:
    get:
      tags:
        - Files
      summary: Latest File hash records
      operationId: listLatestFiles
      description: |-
        Records updated after `ts` (page size 100-2000). Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 12 Credit Coins.
      parameters:
        - name: ts
          in: query
          description: Polling cursor (`header.next_ts`).
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: page_size
          in: query
          description: Records per page.
          schema:
            type: integer
            format: int32
            minimum: 100
            maximum: 2000
            default: 100
          required: false
          example: 1000
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: file_name
          in: query
          description: Filter by file name.
          schema:
            type: string
            maxLength: 1024
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: invoice.pdf.exe
        - name: file_type
          in: query
          description: Filter by file type.
          schema:
            type: string
            maxLength: 128
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: exe
        - name: tags
          in: query
          description: Filter by tag.
          schema:
            type: string
            maxLength: 512
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: trojan
        - name: min_score
          in: query
          description: Minimum score.
          schema:
            type: integer
            format: int32
            minimum: 0
            maximum: 1000
          required: false
          example: 150
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Records.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocList'
              example:
                header:
                  type: Files Feed
                  version: 2
                  ts: null
                  next_ts: 1795420680
                  page_size: 1000
                  delay: 0
                  eval: null
                  exec_python: null
                  user:
                    guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                body:
                  - sha256: 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
                    ts: '2026-11-30T21:40:11Z'
                    entry_ts: '2026-11-19T10:02:45Z'
                    score: 655
                    tags:
                      - trojan
                    total_members: 4
                    total_reports: 11
                    blocked_by:
                      - OFA-GID-a1B2c3D4e5F6g7H8
                    unblocked_by: []
                    members: []
                    md5: 44d88612fea8a8f36de82e1278abb02f
                    sha1: 3395856ce81f2b7382dee72602f798b642f14140
                    file_name: invoice.pdf.exe
                    file_type: exe
                    file_bytes: 73802
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/files?page_size=1000' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - Files
      summary: Report a file hash
      operationId: submitFile
      description: |-
        Recomputes the consensus score. The organization policy may also contribute it to the Alliance.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileSubmit'
            example:
              sha256: 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
              md5: 44d88612fea8a8f36de82e1278abb02f
              file_name: invoice.pdf.exe
              file_type: exe
              file_bytes: 73802
              source: sandbox
              confidence: 0.95
              decision: 1
              tags:
                - trojan
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Recorded.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/files' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"sha256":"275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f","md5":"44d88612fea8a8f36de82e1278abb02f","file_name":"invoice.pdf.exe","file_type":"exe","file_bytes":73802,"source":"sandbox","confidence":0.95,"decision":1,"tags":["trojan"]}'
  /api/v1/files/score/{min_score}:
    get:
      tags:
        - Files
      summary: File hash blocklist (plain text)
      operationId: getFileFeed
      description: |-
        Records with score >= min_score. Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL. On a LOCAL connector with `score_threshold_cloud`, cloud records above that score are merged in.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 45 Credit Coins.
      parameters:
        - name: min_score
          in: path
          description: Minimum score (1-1000).
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
          required: true
          example: 150
        - name: page
          in: query
          description: Cursor from the `next_page` response header of the previous page.
          schema:
            type: string
            maxLength: 4096
            pattern: ^[A-Za-z0-9+/=_-]*$
          required: false
          example: eyJzZWFyY2hfYWZ0ZXIiOls2NTVdfQ
        - name: format
          in: query
          description: '`LIST` returns one comma-separated line instead of one value per line.'
          schema:
            type: string
            enum:
              - LIST
              - list
          required: false
          example: LIST
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: plugin
          in: query
          description: Client plugin name, recorded in the connector feedback. `CHECKPOINT`, `CHECKPOINT_IP` or `CHECKPOINT-IP` switch the IPv4 feed to Check Point observable CSV.
          schema:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_\-]+$
          required: false
          example: FORTIGATE
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: digest
          in: query
          description: Hash column to list.
          schema:
            type: string
            enum:
              - md5
              - sha1
              - sha256
          required: false
          example: sha256
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Blocklist.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
            next_page:
              description: Opaque cursor (base64) for the next page of a plain-text feed. Pass it back as `?page=`. Absent on the last page.
              required: false
              schema:
                type: string
                maxLength: 4096
                pattern: ^[A-Za-z0-9+/=_-]*$
          content:
            text/plain:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
              example: "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f\r\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\r\n"
            text/csv:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/files/score/150?digest=sha256' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/files/{digest}:
    get:
      tags:
        - Files
      summary: Get a file hash record
      operationId: getFile
      description: |-
        Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 8 Credit Coins.
      parameters:
        - name: digest
          in: path
          description: File hash (URL-encoded).
          schema:
            type: string
            maxLength: 64
            pattern: ^(?:[A-Fa-f0-9]{32}|[A-Fa-f0-9]{40}|[A-Fa-f0-9]{64})$
          required: true
          example: 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Record.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocStaticRecord'
              example:
                sha256: 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
                ts: '2026-11-30T21:40:11Z'
                entry_ts: '2026-11-19T10:02:45Z'
                score: 655
                tags:
                  - trojan
                total_members: 4
                total_reports: 11
                blocked_by:
                  - OFA-GID-a1B2c3D4e5F6g7H8
                unblocked_by: []
                members: []
                md5: 44d88612fea8a8f36de82e1278abb02f
                sha1: 3395856ce81f2b7382dee72602f798b642f14140
                file_name: invoice.pdf.exe
                file_type: exe
                file_bytes: 73802
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/files/275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f' \
              -H "Authorization: Bearer $OFA_TOKEN"
    put:
      tags:
        - Files
      summary: Block/unblock a file hash for the organization
      operationId: putFileDecision
      description: |-
        Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: digest
          in: path
          description: File hash (URL-encoded).
          schema:
            type: string
            maxLength: 64
            pattern: ^(?:[A-Fa-f0-9]{32}|[A-Fa-f0-9]{40}|[A-Fa-f0-9]{64})$
          required: true
          example: 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionUpdate'
            example:
              decision: 1
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X PUT 'https://app.onefirewall.com/api/v1/files/275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"decision":1}'
  /api/v1/files/{digest}/submissions:
    get:
      tags:
        - Files
      summary: Submissions of the organization
      operationId: listFileSubmissions
      description: |-


        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: digest
          in: path
          description: File hash (URL-encoded).
          schema:
            type: string
            maxLength: 64
            pattern: ^(?:[A-Fa-f0-9]{32}|[A-Fa-f0-9]{40}|[A-Fa-f0-9]{64})$
          required: true
          example: 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Submissions.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmissionList'
              example:
                me: OFA-GUID-1234-5678-9012
                submissions:
                  - guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                    confidence: 0.9
                    tags:
                      - phishing
                    ts: 1795413600
                    can_delete: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/files/275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f/submissions' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/files/{digest}/{guid}:
    delete:
      tags:
        - Files
      summary: Delete a submission
      operationId: deleteFileSubmission
      description: |-
        Own submissions; Super Admin, Member and Member Admin can delete any of the organization.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: digest
          in: path
          description: File hash (URL-encoded).
          schema:
            type: string
            maxLength: 64
            pattern: ^(?:[A-Fa-f0-9]{32}|[A-Fa-f0-9]{40}|[A-Fa-f0-9]{64})$
          required: true
          example: 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
        - name: guid
          in: path
          description: Submission id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          required: true
          example: OFA-GUID-1234-5678-9012
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X DELETE 'https://app.onefirewall.com/api/v1/files/275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f/OFA-GUID-1234-5678-9012' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/graphs/overview:
    get:
      tags:
        - Graphs
      summary: Threat overview
      operationId: getGraphsOverview
      description: |-
        IoC and connector counters for the organization. ONPREM forwards to the cloud unless `proxy=LOCAL`. Super Admins may pass `org_id`.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      parameters:
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: org_id
          in: query
          description: 'Super Admin: organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Overview.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphResult'
              example:
                graph1:
                  name: Live IPv4
                  value: 184233
                  change: 1204 today
                  data:
                    - date: '2026-11-21T00:00:00.000Z'
                      value: 1310
                    - date: '2026-11-30T00:00:00.000Z'
                      value: 1204
                graph2:
                  name: File Signatures
                  value: 25411
                  change: 86 today
                  data:
                    - date: '2026-11-30T00:00:00.000Z'
                      value: 86
                graph3:
                  name: Domains
                  value: 40218
                  change: 212 today
                  data:
                    - date: '2026-11-30T00:00:00.000Z'
                      value: 212
                graph4:
                  name: URLs
                  value: 30876
                  change: 154 today
                  data:
                    - date: '2026-11-30T00:00:00.000Z'
                      value: 154
                graph5:
                  name: IPv6
                  value: 2210
                  change: 9 today
                  data:
                    - date: '2026-11-30T00:00:00.000Z'
                      value: 9
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/graphs/overview' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/graphs/traffic/malicious/detailed:
    get:
      tags:
        - Graphs
      summary: Malicious traffic, detailed
      operationId: getMaliciousDetailed
      description: |-
        Requires the organization `config.live` integration (400 `Please configure the Org config section` otherwise).

        **Roles:** Super Admin (0), Member Admin (10).
      parameters:
        - name: from_ts
          in: query
          description: 'Start of the window (seconds). Default: one hour ago.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: to_ts
          in: query
          description: 'End of the window (seconds). Default: from_ts + 1 hour.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795420800
        - name: time
          in: query
          description: Relative window ending now (`<n>m`, `<n>h` or `<n>d`); overrides from_ts/to_ts.
          schema:
            type: string
            maxLength: 6
            pattern: ^\d{1,4}[hdm]$
          required: false
          example: 24h
        - name: firewall
          in: query
          description: Only events of this device.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: fw-edge-01
        - name: action
          in: query
          description: Comma-separated raw action values of the organization's firewall (e.g. `Allow,Deny`).
          schema:
            type: string
            maxLength: 1024
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: Allow,Deny
        - name: org_id
          in: query
          description: 'Super Admin: organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Data.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphResult'
              example:
                deny: 5120
                allow: 48210
                allow_not_detected: 47702
                allow_low: 380
                allow_medium: 96
                allow_high: 27
                allow_critical: 5
                deny_not_detected: 3998
                deny_low: 610
                deny_medium: 322
                deny_high: 141
                deny_critical: 49
                deny_from_ofa: 512
                not_parsed: 0
                info:
                  org_name: Example Corp
                  org_logo_url: ''
                  user_name: Jane Doe
                  from_ts: '2026-11-30 00:00:00'
                  to_ts: '2026-11-23 00:00:00'
                  now_ts: '2026-11-23 00:00:05'
                scores:
                  low: 1 - 149
                  medium: 150 - 399
                  high: 400 - 699
                  critical: 700 - 1000
                unique_actors:
                  critical: 3
                  high: 11
                  medium: 42
                  low: 97
                score_first_agent: 150
                plugin: FORTIGATE
                connectors: 2
                active_connectors: 2
                unknown_actors: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/graphs/traffic/malicious/detailed?time=24h' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/graphs/traffic/malicious/top:
    get:
      tags:
        - Graphs
      summary: Top malicious actors
      operationId: getMaliciousTop
      description: |-
        Requires the organization `config.live` integration (400 `Please configure the Org config section` otherwise).

        **Roles:** Super Admin (0), Member Admin (10).
      parameters:
        - name: from_ts
          in: query
          description: 'Start of the window (seconds). Default: one hour ago.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: to_ts
          in: query
          description: 'End of the window (seconds). Default: from_ts + 1 hour.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795420800
        - name: time
          in: query
          description: Relative window ending now (`<n>m`, `<n>h` or `<n>d`); overrides from_ts/to_ts.
          schema:
            type: string
            maxLength: 6
            pattern: ^\d{1,4}[hdm]$
          required: false
          example: 24h
        - name: firewall
          in: query
          description: Only events of this device.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: fw-edge-01
        - name: action
          in: query
          description: Comma-separated raw action values of the organization's firewall (e.g. `Allow,Deny`).
          schema:
            type: string
            maxLength: 1024
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: Deny
        - name: org_id
          in: query
          description: 'Super Admin: organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
        - name: size
          in: query
          description: Maximum actors.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 500000
          required: false
          example: 10
        - name: never_denied
          in: query
          description: '`1`: only actors whose traffic was never denied (up to 20 000).'
          schema:
            type: string
            enum:
              - '1'
          required: false
          example: '1'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Data.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphResult'
              example:
                - actor: 203.0.113.45
                  src_ip: 203.0.113.45
                  dst_ip: 198.51.100.10
                  live_score: 742
                  date_time: '2026-11-30T23:41:09Z'
                  device: fw-edge-01
                  service: ssh
                  direction: inbound
                  action: deny
                  first_seen: 1795161600
                  ip_info:
                    country: NL
                    asn: AS64500
                    as_name: Example Hosting B.V.
                  count: 128
                  never_denied: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/graphs/traffic/malicious/top?time=24h&size=10' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/graphs/traffic/query:
    get:
      tags:
        - Graphs
      summary: Top values of a traffic field
      operationId: getTrafficTerms
      description: |-
        Requires the organization `config.live` integration (400 `Please configure the Org config section` otherwise).

        **Roles:** Super Admin (0), Member Admin (10).
      parameters:
        - name: term
          in: query
          description: '`DEVICE_NAME`, `SERVICE_NAME`, `DIRECTION_NAME`, `ACTION_NAME` (mapped through the org config) or a raw field name.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9_.@-]+$
          required: true
          example: SERVICE_NAME
        - name: from_ts
          in: query
          description: 'Start of the window (seconds). Default: one hour ago.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: to_ts
          in: query
          description: 'End of the window (seconds). Default: from_ts + 1 hour.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795420800
        - name: time
          in: query
          description: Relative window ending now (`<n>m`, `<n>h` or `<n>d`); overrides from_ts/to_ts.
          schema:
            type: string
            maxLength: 6
            pattern: ^\d{1,4}[hdm]$
          required: false
          example: 24h
        - name: firewall
          in: query
          description: Only events of this device.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: fw-edge-01
        - name: action
          in: query
          description: Comma-separated raw action values of the organization's firewall (e.g. `Allow,Deny`).
          schema:
            type: string
            maxLength: 1024
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: Deny
        - name: org_id
          in: query
          description: 'Super Admin: organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Buckets.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphResult'
              example:
                - date: https
                  value: 30211
                - date: ssh
                  value: 4180
                - date: dns
                  value: 2312
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/graphs/traffic/query?term=SERVICE_NAME&time=24h' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/graphs/traffic/raw:
    get:
      tags:
        - Graphs
      summary: Latest raw traffic events
      operationId: getTrafficRaw
      description: |-
        Requires the organization `config.live` integration (400 `Please configure the Org config section` otherwise).

        **Roles:** Super Admin (0), Member Admin (10).
      parameters:
        - name: to_ts
          in: query
          description: 'End of the window (seconds). Default: from_ts + 1 hour.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795420800
        - name: org_id
          in: query
          description: 'Super Admin: organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Events.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  description: Traffic document.
                maxItems: 10000
              example:
                - '@timestamp': '2026-11-30T23:59:41Z'
                  ip_src: 203.0.113.45
                  ip_dst: 198.51.100.10
                  dstport: 22
                  service: ssh
                  action: deny
                  devname: fw-edge-01
                  member_id: OFA-GID-a1B2c3D4e5F6g7H8
                  ofa:
                    ip: 203.0.113.45
                    score: 742
                    live_score: 742
                    entry_ts: 1795161600
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/graphs/traffic/raw' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/graphs/traffic/timeseries:
    get:
      tags:
        - Graphs
      summary: Traffic time series
      operationId: getTrafficTimeseries
      description: |-
        Requires the organization `config.live` integration (400 `Please configure the Org config section` otherwise).

        **Roles:** Super Admin (0), Member Admin (10).
      parameters:
        - name: from_ts
          in: query
          description: 'Start of the window (seconds). Default: one hour ago.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: to_ts
          in: query
          description: 'End of the window (seconds). Default: from_ts + 1 hour.'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795420800
        - name: time
          in: query
          description: Relative window ending now (`<n>m`, `<n>h` or `<n>d`); overrides from_ts/to_ts.
          schema:
            type: string
            maxLength: 6
            pattern: ^\d{1,4}[hdm]$
          required: false
          example: 1h
        - name: firewall
          in: query
          description: Only events of this device.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: fw-edge-01
        - name: action
          in: query
          description: Comma-separated raw action values of the organization's firewall (e.g. `Allow,Deny`).
          schema:
            type: string
            maxLength: 1024
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: Deny
        - name: org_id
          in: query
          description: 'Super Admin: organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Data.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphResult'
              example:
                info:
                  from_ts: '2026-11-30T23:00:00.000Z'
                  to_ts: '2026-11-23T00:00:00.000Z'
                  interval_ms: 60000
                  buckets: 60
                windows:
                  - ts: 1795417200000
                    count: 812
                  - ts: 1795417260000
                    count: 797
                  - ts: 1795417320000
                    count: 845
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/graphs/traffic/timeseries?time=1h' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/info/domain/{domain}:
    get:
      tags:
        - Intel
      summary: Resolve a domain to IPv4 addresses
      operationId: resolveDomain
      description: |-
        Empty list when it does not resolve. ONPREM forwards to the cloud unless `proxy=LOCAL`.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 32 Credit Coins.
      parameters:
        - name: domain
          in: path
          description: Domain.
          schema:
            type: string
            maxLength: 253
            pattern: ^(?=.{1,253}$)(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z]{2,63}$
          required: true
          example: malicious-example.com
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Addresses.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  maxLength: 15
                  pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$
                maxItems: 1000
              example:
                - 203.0.113.45
                - 203.0.113.46
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/info/domain/malicious-example.com' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/info/{ipv4}:
    get:
      tags:
        - Intel
      summary: ASN and geo information of an IPv4
      operationId: getIpv4Info
      description: |-
        Local IPinfo Lite database. ONPREM forwards to the cloud unless `proxy=LOCAL`.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 32 Credit Coins.
      parameters:
        - name: ipv4
          in: path
          description: IPv4 address.
          schema:
            type: string
            maxLength: 15
            pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$
          required: true
          example: 203.0.113.45
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Information.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpGeo'
              example:
                status: success
                query: 203.0.113.45
                continent: Europe
                continentCode: EU
                country: Netherlands
                countryCode: NL
                region: NH
                regionName: North Holland
                city: Amsterdam
                district: ''
                zip: '1012'
                lat: 52.3676
                lon: 4.9041
                timezone: Europe/Amsterdam
                offset: 3600
                currency: EUR
                isp: Example Hosting B.V.
                org: Example Hosting B.V.
                as: AS64500 Example Hosting B.V.
                asname: EXAMPLE-HOSTING
                as_domain: example-hosting.net
                reverse: host45.example-hosting.net
                mobile: false
                proxy: false
                hosting: true
                source: local
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/info/203.0.113.45' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/info/provider/{ip}:
    get:
      tags:
        - Intel
      summary: Cloud / CDN / crawler / VPN provider of an IP
      operationId: getIpProvider
      description: |-
        Tells whether an IPv4 or IPv6 address is in the published ranges of a public provider (Google Cloud, Googlebot, Bingbot, Amazon AWS, Microsoft Azure, Oracle Cloud, DigitalOcean, GitHub, Meta, X, Linode, Telegram, OpenAI, Cloudflare, Vultr, iCloud Private Relay, Proton VPN, Perplexity, DuckDuckBot, StatusCake, Pingdom), of an internet scanner (70+ organisations: Censys, CyberCube, Shadowserver, Shodan, Palo Alto Xpanse, Driftnet, BinaryEdge, ONYPHE, Rapid7, Stretchoid, ZoomEye, ...) or of Palo Alto Networks (Prisma Access) and returns it with its logo. Ranges come from a local database built from https://github.com/lord-alfred/ipranges (cloud / crawlers) and https://github.com/OpenFilters/internet-scanners (scanners); where lists overlap the more specific one wins (e.g. Googlebot over Google Cloud, a scanner over the cloud it rents from), then the AS of the IP is matched for scanners. Always served by this installation.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** free.
      parameters:
        - name: ip
          in: path
          description: IPv4 or IPv6 address.
          schema:
            type: string
            maxLength: 45
            pattern: ^[0-9A-Fa-f:.]+$
          required: true
          example: 66.249.66.1
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Provider of the IP; `provider` is null when it is not in any provider's ranges.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpProvider'
              example:
                ip: 66.249.66.1
                found: true
                provider:
                  id: googlebot
                  name: Googlebot
                  category: crawler
                  category_label: Search crawler
                  website: https://developers.google.com/search/docs/crawling-indexing/googlebot
                  logo: /assets/images/providers/googlebot.png
                  network: 66.249.66.0/24
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/info/provider/66.249.66.1' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/info/networks:
    post:
      tags:
        - Intel
      summary: Network owners of many IPs
      operationId: postIpNetworks
      description: |-
        Who owns the network of each IPv4 / IPv6 address, in one call (used by the dashboard's Attacker Networks chart): the provider or internet scanner when the IP is in its ranges (as in `GET /api/v1/info/provider/{ip}`), otherwise the owner of the AS announcing it. Private, reserved or unknown addresses map to null; invalid entries and duplicates are skipped. Local lookups only.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** free.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ips:
                  type: array
                  maxItems: 20000
                  items:
                    type: string
                    maxLength: 45
              required:
                - ips
            example:
              ips:
                - 167.94.138.35
                - 198.235.24.20
                - 80.82.77.40
                - 10.0.0.1
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Network owner per IP (null for private / reserved / unknown).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpNetworks'
              example:
                networks:
                  167.94.138.35:
                    id: censys
                    name: Censys
                    category_label: Internet scanner
                    logo: /assets/images/providers/censys.png
                    asn: AS398324
                    as_name: Censys, Inc.
                  198.235.24.20:
                    id: paloalto-xpanse
                    name: Palo Alto Xpanse
                    category_label: Internet scanner
                    logo: /assets/images/providers/paloalto.png
                    asn: AS396982
                    as_name: Google LLC
                  80.82.77.40:
                    id: AS202425
                    name: IP Volume inc
                    category_label: ''
                    logo: ''
                    asn: AS202425
                    as_name: IP Volume inc
                  10.0.0.1: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/info/networks' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{"ips": ["167.94.138.35", "198.235.24.20"]}'
  /api/v1/intel/{intel_id}:
    get:
      tags:
        - Intel
      summary: Intelligence for any indicator
      operationId: getIntel
      description: |-
        Accepts an IPv4/IPv6 address, domain, URL or file hash and returns the record, the organization's connector and traffic events, and STIX objects. Super Admins may pass `org_id` (their own organization pays). Organizations with a feed delay get no STIX objects.

        **Roles:** Super Admin (0), Member (1), Guest (2), Read Only (3), Member Admin (10), Member Mobile (20).

        **Cost:** IPv4 207 Credit Coins (170 without STIX objects), IPv6 96, domain or URL 48, file 12. IPv6, domains, URLs and files are charged only if found.
      parameters:
        - name: intel_id
          in: path
          description: Indicator.
          schema:
            type: string
            maxLength: 4096
            pattern: ^\S+$
          required: true
          example: 203.0.113.45
        - name: org_id
          in: query
          description: 'Super Admin: organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Intelligence.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Intel'
              example:
                organizations:
                  gid: OFA-GID-a1B2c3D4e5F6g7H8
                  name: Example Corp
                type: ipv4
                request: 203.0.113.45
                timestamp: 1795420800
                timestamp_readable: '2026-11-23T00:00:00.000Z'
                request_id: aB3dE5fG7hJ9
                body:
                  gid: OFA-RULE-GID-a1B2c3D4e5F6g7H8
                  ip: 203.0.113.45
                  ts: 1795420680
                  entry_ts: 1795161600
                  score: 742.5
                  tags:
                    - ssh-bruteforce
                    - botnet
                  reverse_dns: host45.example-hosting.net
                  is_network: false
                  blocked_by:
                    - OFA-GID-a1B2c3D4e5F6g7H8
                  unblocked_by: []
                  ttl_by: []
                  reports: 37
                  delay: 0
                  elk_entry_ts: '2026-11-20T08:14:03Z'
                  dec: 1
                  info:
                    members: 6
                    events: 37
                    sources:
                      - honeypot
                      - firewall
                    stix_bundles: []
                    attack_infos: []
                    notes:
                      - Repeated SSH logins on port 22
                  members: []
                ip_info:
                  status: success
                  query: 203.0.113.45
                  continent: Europe
                  continentCode: EU
                  country: Netherlands
                  countryCode: NL
                  region: NH
                  regionName: North Holland
                  city: Amsterdam
                  district: ''
                  zip: '1012'
                  lat: 52.3676
                  lon: 4.9041
                  timezone: Europe/Amsterdam
                  offset: 3600
                  currency: EUR
                  isp: Example Hosting B.V.
                  org: Example Hosting B.V.
                  as: AS64500 Example Hosting B.V.
                  asname: EXAMPLE-HOSTING
                  as_domain: example-hosting.net
                  reverse: host45.example-hosting.net
                  mobile: false
                  proxy: false
                  hosting: true
                  source: local
                events:
                  - ts: 1795420500
                    src_ip: 203.0.113.45
                    dst_ip: 198.51.100.10
                    dst_port: 22
                    action: deny
                    firewall: fw-edge-01
                traffic: []
                stix:
                  - type: indicator
                    id: indicator--f4ca1ddb-965a-54ff-85d9-a94da8e306fb
                    spec_version: '2.1'
                    pattern: '[ipv4-addr:value = ''203.0.113.45'']'
                mitre_ids:
                  - T1110
                intel:
                  - id: T1110
                    name: Brute Force
                    phases:
                      - credential-access
                reports: []
                agents:
                  - agid: OFA-AGENT-7f3k9QxL2mN4pR8s
                    hostname: fw-edge-01
                    plugin: FORTIGATE
                    blacklist:
                      - 203.0.113.45
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/intel/203.0.113.45' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/ips:
    get:
      tags:
        - IPv4
      summary: Poll or search IPv4 rules
      operationId: listIpRules
      description: |-
        Without `startwith`: rules updated after `ts`, oldest first (12 Credit Coins). With `startwith`: rules containing that IP (2 Credit Coins). A paused connector (`agid` with config.running=no) gets an empty answer and no charge. Elasticsearch overload answers 500 `Too many Request`.

        **Roles:** Super Admin (0), Member (1), Guest (2), Read Only (3), Member Admin (10), Member Mobile (20).

        **Cost:** 12 Credit Coins (2 in search mode).
      parameters:
        - name: ts
          in: query
          description: 'Only rules updated after this time (polling cursor: pass back `header.next_ts`).'
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: startwith
          in: query
          description: 'IPv4/CIDR: return the rules containing this address (search mode, 2 Credit Coins).'
          schema:
            type: string
            maxLength: 18
            pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:/(?:3[0-2]|[12]?\d))?$
          required: false
          example: 203.0.113.0/24
        - name: page_size
          in: query
          description: Maximum rules.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
            default: 64
          required: false
          example: 1000
        - name: full
          in: query
          description: '`yes` includes the per-organization submissions.'
          schema:
            type: string
            enum:
              - 'yes'
          required: false
          example: 'yes'
        - name: show_id
          in: query
          description: 1 only rules from the web app, 2 rules blocked by the caller's organization, 3 rules unblocked by it.
          schema:
            type: string
            enum:
              - '0'
              - '1'
              - '2'
              - '3'
          required: false
          example: '2'
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: plugin
          in: query
          description: Client plugin name, recorded in the connector feedback. `CHECKPOINT`, `CHECKPOINT_IP` or `CHECKPOINT-IP` switch the IPv4 feed to Check Point observable CSV.
          schema:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_\-]+$
          required: false
          example: FORTIGATE
        - name: gaid
          in: query
          description: Legacy connector id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Rules.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpRuleList'
              example:
                header:
                  type: IPv4 Feed
                  version: 2
                  ts: null
                  next_ts: 1795420680
                  page_size: 1000
                  delay: 0
                  eval: null
                  exec_python: null
                  user:
                    guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                body:
                  - gid: OFA-RULE-GID-a1B2c3D4e5F6g7H8
                    ip: 203.0.113.45
                    ts: 1795420680
                    entry_ts: 1795161600
                    score: 742.5
                    tags:
                      - ssh-bruteforce
                      - botnet
                    reverse_dns: host45.example-hosting.net
                    is_network: false
                    blocked_by:
                      - OFA-GID-a1B2c3D4e5F6g7H8
                    unblocked_by: []
                    ttl_by: []
                    reports: 37
                    delay: 0
                    elk_entry_ts: '2026-11-20T08:14:03Z'
                    dec: 1
                    info:
                      members: 6
                      events: 37
                      sources:
                        - honeypot
                        - firewall
                      stix_bundles: []
                      attack_infos: []
                      notes:
                        - Repeated SSH logins on port 22
                    members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ips?page_size=1000' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - IPv4
      summary: Report an IPv4 address or network
      operationId: submitIp
      description: |-
        Adds (or with `lid`, updates) the organization's event on the rule and recomputes the consensus score. The caller must belong to an organization.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: gaid
          in: query
          description: Connector id (heartbeat).
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IpSubmit'
            example:
              ip: 203.0.113.45
              notes:
                - SSH brute force from this address
              source: firewall
              ttl: 604800
              decision: 1
              contribute: true
              confidence: 0.9
              tags:
                - ssh-bruteforce
      security:
        - bearerAuth: []
      responses:
        '201':
          description: Recorded.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/ips' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"ip":"203.0.113.45","notes":["SSH brute force from this address"],"source":"firewall","ttl":604800,"decision":1,"contribute":true,"confidence":0.9,"tags":["ssh-bruteforce"]}'
  /api/v1/ips/{ref}:
    get:
      tags:
        - IPv4
      summary: Get an IPv4 rule by GID
      operationId: getIpRule
      description: |-
        Same response as the list. 1 Credit Coin.

        **Roles:** Super Admin (0), Member (1), Guest (2), Read Only (3), Member Admin (10), Member Mobile (20).

        **Cost:** 1 Credit Coin.
      parameters:
        - name: ref
          in: path
          description: 'GET: rule GID (`OFA-RULE-GID-...`). PUT: IPv4 address.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9._:/-]+$
          required: true
          example: 203.0.113.45
        - name: page_size
          in: query
          description: Maximum rules.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
            default: 64
          required: false
          example: 10
        - name: full
          in: query
          description: '`yes` includes the per-organization submissions.'
          schema:
            type: string
            enum:
              - 'yes'
          required: false
          example: 'yes'
        - name: show_id
          in: query
          description: 1 only rules from the web app, 2 rules blocked by the caller's organization, 3 rules unblocked by it.
          schema:
            type: string
            enum:
              - '0'
              - '1'
              - '2'
              - '3'
          required: false
          example: '1'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Rule.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpRuleList'
              example:
                header:
                  type: IPv4 Feed
                  version: 2
                  ts: null
                  next_ts: 1795420680
                  page_size: 1000
                  delay: 0
                  eval: null
                  exec_python: null
                  user:
                    guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                body:
                  - gid: OFA-RULE-GID-a1B2c3D4e5F6g7H8
                    ip: 203.0.113.45
                    ts: 1795420680
                    entry_ts: 1795161600
                    score: 742.5
                    tags:
                      - ssh-bruteforce
                      - botnet
                    reverse_dns: host45.example-hosting.net
                    is_network: false
                    blocked_by:
                      - OFA-GID-a1B2c3D4e5F6g7H8
                    unblocked_by: []
                    ttl_by: []
                    reports: 37
                    delay: 0
                    elk_entry_ts: '2026-11-20T08:14:03Z'
                    dec: 1
                    info:
                      members: 6
                      events: 37
                      sources:
                        - honeypot
                        - firewall
                      stix_bundles: []
                      attack_infos: []
                      notes:
                        - Repeated SSH logins on port 22
                    members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ips/203.0.113.45' \
              -H "Authorization: Bearer $OFA_TOKEN"
    put:
      tags:
        - IPv4
      summary: Block/unblock an IPv4 for the organization
      operationId: putIpDecision
      description: |-
        Sets the organization decision and/or TTL on an indexed rule.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: ref
          in: path
          description: 'GET: rule GID (`OFA-RULE-GID-...`). PUT: IPv4 address.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9._:/-]+$
          required: true
          example: 203.0.113.45
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IpDecision'
            example:
              decision: 1
              ttl: 604800
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X PUT 'https://app.onefirewall.com/api/v1/ips/203.0.113.45' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"decision":1,"ttl":604800}'
  /api/v1/ips/{ref}/history:
    get:
      tags:
        - IPv4
      summary: History of an IPv4
      operationId: getIpHistory
      description: |-


        **Roles:** Super Admin (0), Member (1), Guest (2), Read Only (3), Member Admin (10), Member Mobile (20).

        **Cost:** 40 Credit Coins.
      parameters:
        - name: ref
          in: path
          description: IPv4 address.
          schema:
            type: string
            maxLength: 18
            pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:/(?:3[0-2]|[12]?\d))?$
          required: true
          example: 203.0.113.45
        - name: ts
          in: query
          description: Optional time reference.
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1792828800
      security:
        - bearerAuth: []
      responses:
        '200':
          description: History.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpHistory'
              example:
                header:
                  type: IPv4 History
                  version: 4
                  ts: 1795420800
                  user:
                    guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                body:
                  - ts: 1795161600
                    score: 310
                    reports: 4
                  - ts: 1795334400
                    score: 612
                    reports: 21
                  - ts: 1795420680
                    score: 742.5
                    reports: 37
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ips/203.0.113.45/history' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/ips/{ref}/{lid}:
    delete:
      tags:
        - IPv4
      summary: Delete an event of the organization
      operationId: deleteIpEvent
      description: |-
        The event owner, or a Super Admin / Member / Member Admin of the organization, can delete it. Not owned → 401.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: ref
          in: path
          description: IPv4 address or network.
          schema:
            type: string
            maxLength: 18
            pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:/(?:3[0-2]|[12]?\d))?$
          required: true
          example: 203.0.113.45
        - name: lid
          in: path
          description: Event id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Event (submission) id inside a rule, `OFA-RULE-LID-...` or the id chosen by the submitter.
          required: true
          example: OFA-LID-Zq8w2Ke5Tn1Yb7Hc
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X DELETE 'https://app.onefirewall.com/api/v1/ips/203.0.113.45/OFA-LID-Zq8w2Ke5Tn1Yb7Hc' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/ipv4:
    get:
      tags:
        - IPv4
      summary: IPv4 blocklist with the connector threshold
      operationId: getIpv4FeedByConnector
      description: |-
        Same as `/api/v1/ipv4/{min_score}`, using the `score_threshold` configured for `agid` (400 without it).

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 320 Credit Coins per page.
      parameters:
        - name: page
          in: query
          description: Cursor from the `next_page` response header of the previous page.
          schema:
            type: string
            maxLength: 4096
            pattern: ^[A-Za-z0-9+/=_-]*$
          required: false
          example: eyJzZWFyY2hfYWZ0ZXIiOls3NDIuNV19
        - name: format
          in: query
          description: '`LIST` returns one comma-separated line instead of one value per line.'
          schema:
            type: string
            enum:
              - LIST
              - list
          required: false
          example: LIST
        - name: limit
          in: query
          description: Maximum lines.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100000
            default: 100000
          required: false
          example: 1000
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: plugin
          in: query
          description: Client plugin name, recorded in the connector feedback. `CHECKPOINT`, `CHECKPOINT_IP` or `CHECKPOINT-IP` switch the IPv4 feed to Check Point observable CSV.
          schema:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_\-]+$
          required: false
          example: FORTIGATE
        - name: show_score
          in: query
          description: '`yes` appends the score to each line.'
          schema:
            type: string
            enum:
              - 'yes'
          required: false
          example: 'yes'
        - name: show_source
          in: query
          description: "`yes` appends why each IP is listed as a last column: `manual` (blocked by your organization), `score` (current score at or above the threshold) or `rule` (only your organization's blocking rule). Plain CSV output only; ignored with `format=list` and the Check Point and MikroTik plugins."
          schema:
            type: string
            enum:
              - 'yes'
          required: false
          example: 'yes'
        - name: tag
          in: query
          description: Only IPs with one of these tags (comma-separated).
          schema:
            type: string
            maxLength: 512
            pattern: ^[A-Za-z0-9_\-.]+(,[A-Za-z0-9_\-.]+)*$
          required: false
          example: botnet,ssh-bruteforce
        - name: status_code
          in: query
          description: Status code to record in the connector feedback.
          schema:
            type: integer
            format: int32
            minimum: 0
            maximum: 999
          required: false
          example: 200
        - name: org_id
          in: query
          description: 'Super Admin: build the list for another organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Blocklist.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
            next_page:
              description: Opaque cursor (base64) for the next page of a plain-text feed. Pass it back as `?page=`. Absent on the last page.
              required: false
              schema:
                type: string
                maxLength: 4096
                pattern: ^[A-Za-z0-9+/=_-]*$
          content:
            text/plain:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
              example: "203.0.113.45\r\n198.51.100.23\r\n192.0.2.77\r\n"
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ipv4?show_score=yes' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/ipv4/{min_score}:
    get:
      tags:
        - IPv4
      summary: IPv4 blocklist (plain text)
      operationId: getIpv4Feed
      description: |-
        Plain-text IPv4 blocklist of rules with score >= min_score, after the organization's decisions and reserved ranges. Pages: follow the `next_page` header.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 320 Credit Coins per page.
      parameters:
        - name: min_score
          in: path
          description: Minimum score (1-1000).
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
          required: true
          example: 150
        - name: page
          in: query
          description: Cursor from the `next_page` response header of the previous page.
          schema:
            type: string
            maxLength: 4096
            pattern: ^[A-Za-z0-9+/=_-]*$
          required: false
          example: eyJzZWFyY2hfYWZ0ZXIiOls3NDIuNV19
        - name: format
          in: query
          description: '`LIST` returns one comma-separated line instead of one value per line.'
          schema:
            type: string
            enum:
              - LIST
              - list
          required: false
          example: LIST
        - name: limit
          in: query
          description: Maximum lines.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100000
            default: 100000
          required: false
          example: 1000
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: plugin
          in: query
          description: Client plugin name, recorded in the connector feedback. `CHECKPOINT`, `CHECKPOINT_IP` or `CHECKPOINT-IP` switch the IPv4 feed to Check Point observable CSV.
          schema:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_\-]+$
          required: false
          example: FORTIGATE
        - name: show_score
          in: query
          description: '`yes` appends the score to each line.'
          schema:
            type: string
            enum:
              - 'yes'
          required: false
          example: 'yes'
        - name: show_source
          in: query
          description: "`yes` appends why each IP is listed as a last column: `manual` (blocked by your organization), `score` (current score at or above the threshold) or `rule` (only your organization's blocking rule). Plain CSV output only; ignored with `format=list` and the Check Point and MikroTik plugins."
          schema:
            type: string
            enum:
              - 'yes'
          required: false
          example: 'yes'
        - name: tag
          in: query
          description: Only IPs with one of these tags (comma-separated).
          schema:
            type: string
            maxLength: 512
            pattern: ^[A-Za-z0-9_\-.]+(,[A-Za-z0-9_\-.]+)*$
          required: false
          example: botnet
        - name: status_code
          in: query
          description: Status code to record in the connector feedback.
          schema:
            type: integer
            format: int32
            minimum: 0
            maximum: 999
          required: false
          example: 200
        - name: org_id
          in: query
          description: 'Super Admin: build the list for another organization.'
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          required: false
          example: OFA-GID-a1B2c3D4e5F6g7H8
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Blocklist.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
            next_page:
              description: Opaque cursor (base64) for the next page of a plain-text feed. Pass it back as `?page=`. Absent on the last page.
              required: false
              schema:
                type: string
                maxLength: 4096
                pattern: ^[A-Za-z0-9+/=_-]*$
          content:
            text/plain:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
              example: "203.0.113.45,742\r\n198.51.100.23,515\r\n192.0.2.77,160\r\n"
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ipv4/150?show_score=yes' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/ipv6:
    get:
      tags:
        - IPv6
      summary: Latest IPv6 records
      operationId: listIpv6
      description: |-
        Records updated after `ts` (page 100-2000). ONPREM forwards to the cloud unless `proxy=LOCAL`.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).

        **Cost:** 12 Credit Coins.
      parameters:
        - name: ts
          in: query
          description: Polling cursor.
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: page_size
          in: query
          description: Records per page.
          schema:
            type: integer
            format: int32
            minimum: 100
            maximum: 2000
            default: 100
          required: false
          example: 1000
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Records.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocList'
              example:
                header:
                  type: IPv6 Feed
                  version: 2
                  ts: null
                  next_ts: 1795420680
                  page_size: 1000
                  delay: 0
                  eval: null
                  exec_python: null
                  user:
                    guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                body:
                  - ipv6: 2001:db8:85a3::8a2e:370:7334
                    ts: '2026-11-30T21:40:11Z'
                    entry_ts: '2026-11-19T10:02:45Z'
                    score: 655
                    tags:
                      - scanner
                    total_members: 4
                    total_reports: 11
                    blocked_by:
                      - OFA-GID-a1B2c3D4e5F6g7H8
                    unblocked_by: []
                    members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ipv6?page_size=1000' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - IPv6
      summary: Report an IPv6 address
      operationId: submitIpv6
      description: |-


        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Ipv6Submit'
            example:
              ipv6: 2001:db8:85a3::8a2e:370:7334
              confidence: 0.8
              decision: 1
              tags:
                - scanner
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Recorded.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/ipv6' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"ipv6":"2001:db8:85a3::8a2e:370:7334","confidence":0.8,"decision":1,"tags":["scanner"]}'
  /api/v1/ipv6/{ipv6}:
    get:
      tags:
        - IPv6
      summary: Get an IPv6 record
      operationId: getIpv6
      description: |-
        ONPREM forwards to the cloud unless `proxy=LOCAL`.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).

        **Cost:** 32 Credit Coins.
      parameters:
        - name: ipv6
          in: path
          description: IPv6 address.
          schema:
            type: string
            format: ipv6
            maxLength: 45
          required: true
          example: 2001:db8:85a3::8a2e:370:7334
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Record.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocStaticRecord'
              example:
                ipv6: 2001:db8:85a3::8a2e:370:7334
                ts: '2026-11-30T21:40:11Z'
                entry_ts: '2026-11-19T10:02:45Z'
                score: 655
                tags:
                  - scanner
                total_members: 4
                total_reports: 11
                blocked_by:
                  - OFA-GID-a1B2c3D4e5F6g7H8
                unblocked_by: []
                members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ipv6/2001%3Adb8%3A85a3%3A%3A8a2e%3A370%3A7334' \
              -H "Authorization: Bearer $OFA_TOKEN"
    put:
      tags:
        - IPv6
      summary: Block/unblock an IPv6 for the organization
      operationId: putIpv6Decision
      description: |-
        ONPREM forwards to the cloud unless `proxy=LOCAL`.

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      parameters:
        - name: ipv6
          in: path
          description: IPv6 address.
          schema:
            type: string
            format: ipv6
            maxLength: 45
          required: true
          example: 2001:db8:85a3::8a2e:370:7334
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionUpdate'
            example:
              decision: 1
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X PUT 'https://app.onefirewall.com/api/v1/ipv6/2001%3Adb8%3A85a3%3A%3A8a2e%3A370%3A7334' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"decision":1}'
  /api/v1/ipv6/{ipv6}/submissions:
    get:
      tags:
        - IPv6
      summary: Submissions of the organization for an IPv6
      operationId: listIpv6Submissions
      description: |-


        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: ipv6
          in: path
          description: IPv6 address.
          schema:
            type: string
            format: ipv6
            maxLength: 45
          required: true
          example: 2001:db8:85a3::8a2e:370:7334
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Submissions.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmissionList'
              example:
                me: OFA-GUID-1234-5678-9012
                submissions:
                  - guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                    confidence: 0.9
                    tags:
                      - phishing
                    ts: 1795413600
                    can_delete: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/ipv6/2001%3Adb8%3A85a3%3A%3A8a2e%3A370%3A7334/submissions' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/ipv6/{ipv6}/{guid}:
    delete:
      tags:
        - IPv6
      summary: Delete a submission
      operationId: deleteIpv6Submission
      description: |-
        Own submissions; Super Admin, Member and Member Admin can delete any of the organization.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: ipv6
          in: path
          description: IPv6 address.
          schema:
            type: string
            format: ipv6
            maxLength: 45
          required: true
          example: 2001:db8:85a3::8a2e:370:7334
        - name: guid
          in: path
          description: Submission id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          required: true
          example: OFA-GUID-1234-5678-9012
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X DELETE 'https://app.onefirewall.com/api/v1/ipv6/2001%3Adb8%3A85a3%3A%3A8a2e%3A370%3A7334/OFA-GUID-1234-5678-9012' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/notes/{ip}/{lid}:
    put:
      tags:
        - IPv4
      summary: Edit the note of an own event
      operationId: putIpEventNote
      description: |-
        Only the user who created the event (401 otherwise).

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: ip
          in: path
          description: IPv4 address or network.
          schema:
            type: string
            maxLength: 18
            pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:/(?:3[0-2]|[12]?\d))?$
          required: true
          example: 203.0.113.45
        - name: lid
          in: path
          description: Event id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Event (submission) id inside a rule, `OFA-RULE-LID-...` or the id chosen by the submitter.
          required: true
          example: OFA-LID-Zq8w2Ke5Tn1Yb7Hc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Note'
            example:
              note: 'Confirmed by SOC: SSH brute force against bastion host'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X PUT 'https://app.onefirewall.com/api/v1/notes/203.0.113.45/OFA-LID-Zq8w2Ke5Tn1Yb7Hc' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"note":"Confirmed by SOC: SSH brute force against bastion host"}'
  /api/v1/poc_traffic:
    get:
      tags:
        - Traffic
      summary: Summary of traffic ingested with a tag
      operationId: getTrafficSummary
      description: |-
        Based on the first 256 events of the tag.

        **Roles:** Super Admin (0).
      parameters:
        - name: tag
          in: query
          description: Tag used at ingestion.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: true
          example: poc-2026-11
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Summary.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_events:
                    type: integer
                    format: int32
                    minimum: 0
                    maximum: 2147483647
                  malicious_traffic:
                    type: integer
                    format: int32
                    minimum: 0
                    maximum: 2147483647
                  not_malicious_traffic:
                    type: integer
                    format: int32
                    minimum: 0
                    maximum: 2147483647
                  highest_crime_score:
                    type: number
                    format: double
                    minimum: 0
                    maximum: 1000
                  highest_crime_actor:
                    type: string
                    maxLength: 18
                    pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
              example:
                total_events: 256
                malicious_traffic: 41
                not_malicious_traffic: 215
                highest_crime_score: 998
                highest_crime_actor: 203.0.113.45
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/poc_traffic?tag=poc-2026-11' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - Traffic
      summary: Ingest a CSV traffic export
      operationId: ingestTrafficCsv
      description: |-
        Text body; data starts at line 5 (`src_ip,dst_ip,src_port,dst_port,service,firewall,action`), stops at a `-------` line, `#` lines skipped. Lines are queued and processed asynchronously.

        **Roles:** Super Admin (0).
      parameters:
        - name: tag
          in: query
          description: Stored as request_id; read the results with GET.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: poc-2026-11
      requestBody:
        required: true
        content:
          text/plain:
            schema:
              type: string
              maxLength: 5242880
              pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
            example: |-
              src_ip,dst_ip,src_port,dst_port,service,firewall,action
              203.0.113.45,198.51.100.10,51820,22,ssh,fw-edge-01,deny
              192.0.2.77,198.51.100.10,40112,443,https,fw-edge-01,allow
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Queued.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueAck'
              example:
                message: ok
                queued: 2
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/poc_traffic?tag=poc-2026-11' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: text/plain' \
              --data-binary 'src_ip,dst_ip,src_port,dst_port,service,firewall,action
            203.0.113.45,198.51.100.10,51820,22,ssh,fw-edge-01,deny
            192.0.2.77,198.51.100.10,40112,443,https,fw-edge-01,allow'
  /api/v1/poc_traffic/direct:
    post:
      tags:
        - Traffic
      summary: Ingest traffic events (JSON)
      operationId: ingestTrafficEvents
      description: |-
        One event: processed synchronously, the enriched event is returned (404 when both IPs are reserved). An array: queued (durable queue), at most 10 tags and 10 notes per event. Matching IPs above the organization's score bands are reported to the Alliance when live-traffic contribution is enabled.

        **Roles:** Super Admin (0), Member Admin (10).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/TrafficEvent'
                - type: array
                  items:
                    $ref: '#/components/schemas/TrafficEvent'
                  maxItems: 100000
                  minItems: 1
            example:
              - src_ip: 203.0.113.45
                dst_ip: 198.51.100.10
                src_port: 51820
                dst_port: 22
                service: ssh
                firewall: fw-edge-01
                action: deny
                request_id: req-8f2a1c
                tags:
                  - edge
                event_id: evt-000123
      security:
        - bearerAuth: []
      responses:
        '200':
          description: 'Event result, or `{message: "queued", queued}` for arrays.'
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TrafficEventResult'
                  - $ref: '#/components/schemas/QueueAck'
              example:
                src_ip: 203.0.113.45
                dst_ip: 198.51.100.10
                src_port: 51820
                dst_port: 22
                service: ssh
                firewall: fw-edge-01
                action: deny
                request_id: req-8f2a1c
                tags:
                  - edge
                event_id: evt-000123
                ofa_exist: true
                ofa_action: block
                ofa_risk: critical
                ofa:
                  ip: 203.0.113.45
                  score: 742
                  live_score: 742
                  ip_info:
                    country: NL
                    asn: AS64500
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/poc_traffic/direct' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '[{"src_ip":"203.0.113.45","dst_ip":"198.51.100.10","src_port":51820,"dst_port":22,"service":"ssh","firewall":"fw-edge-01","action":"deny","request_id":"req-8f2a1c","tags":["edge"],"event_id":"evt-000123"}]'
  /api/v1/poc_traffic/direct/raw:
    post:
      tags:
        - Traffic
      summary: Ingest raw firewall log lines
      operationId: ingestTrafficLogs
      description: |-
        Any Content-Type, read as text. One event per line: JSON, CEF/LEEF, pfSense filterlog, Palo Alto CSV, key=value, Apache/ModSecurity. Unparsable lines are counted in `skipped`.

        **Roles:** Super Admin (0), Member Admin (10).
      parameters:
        - name: tag
          in: query
          description: Stored as request_id.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: poc-2026-11
        - name: firewall
          in: query
          description: Device name when the log has none.
          schema:
            type: string
            maxLength: 256
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          required: false
          example: fortigate
        - name: dst_ip
          in: query
          description: Destination IP when the log has none (e.g. WAF).
          schema:
            type: string
            maxLength: 15
            pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$
          required: false
          example: 198.51.100.10
      requestBody:
        required: true
        content:
          text/plain:
            schema:
              type: string
              maxLength: 5242880
              pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
            example: date=2026-11-30 time=23:41:09 devname="fw-edge-01" type="traffic" srcip=203.0.113.45 srcport=51820 dstip=198.51.100.10 dstport=22 service="SSH" action="deny"
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Queued.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueAck'
              example:
                message: queued
                queued: 1
                skipped: 0
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/poc_traffic/direct/raw?tag=poc-2026-11&firewall=fortigate' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: text/plain' \
              --data-binary 'date=2026-11-30 time=23:41:09 devname="fw-edge-01" type="traffic" srcip=203.0.113.45 srcport=51820 dstip=198.51.100.10 dstport=22 service="SSH" action="deny"'
  /api/v1/stix2/{stix2id}:
    get:
      tags:
        - STIX2
      summary: STIX 2 objects for an indicator
      operationId: getStix2
      description: |-
        Stored bundles plus objects generated from the record. Organizations with a feed delay get 403.

        **Roles:** Super Admin (0), Member (1), Guest (2).

        **Cost:** 25 Credit Coins.
      parameters:
        - name: stix2id
          in: path
          description: Indicator (IP, domain...) or STIX id.
          schema:
            type: string
            maxLength: 4096
            pattern: ^\S+$
          required: true
          example: 203.0.113.45
      security:
        - bearerAuth: []
      responses:
        '200':
          description: STIX objects.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StixObject'
                maxItems: 10000
              example:
                - type: indicator
                  id: indicator--f4ca1ddb-965a-54ff-85d9-a94da8e306fb
                  spec_version: '2.1'
                  created: '2026-11-20T08:14:03.000Z'
                  modified: '2026-11-30T23:58:00.000Z'
                  pattern_type: stix
                  pattern: '[ipv4-addr:value = ''203.0.113.45'']'
                  confidence: 74
                  labels:
                    - ssh-bruteforce
                    - botnet
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/stix2/203.0.113.45' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/updates:
    get:
      tags:
        - Graphs
      summary: Threat landscape updates
      operationId: getUpdates
      description: |-
        Platform-wide summary for the window (maximum 30 days).

        **Roles:** Super Admin (0), Member (1), Member Admin (10).
      parameters:
        - name: time_window
          in: query
          description: Window (`<n>m`, `<n>h`, `<n>d`).
          schema:
            type: string
            maxLength: 6
            pattern: ^\d{1,4}[hdm]$
            default: 24h
          required: false
          example: 24h
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Updates.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Updates'
              example:
                header:
                  type: Updates
                  version: 2
                  time_window: 24h
                  window_secs: 86400
                  from_ts: 1795334400
                  to_ts: 1795420800
                  generated_at: 1795420800
                updates:
                  new_ips:
                    count: 1204
                    delta:
                      value: 1204
                      prev: 1102
                      pct: 9.3
                    headline: 1204 new IP addresses reported for the first time in the last 24h
                    examples:
                      - ip: 203.0.113.45
                        score: 742
                        tags:
                          - ssh-bruteforce
                        first_seen: 1795417200
                        reverse_dns: null
                  submissions:
                    ips: 9120
                    domains: 640
                    urls: 410
                    files: 88
                    total: 10258
                    headline: 10258 submissions in the last 24h
                  top_malicious_ips:
                    headline: Top 3 highest-scored malicious IPs on the platform
                    items:
                      - ip: 203.0.113.45
                        score: 998
                        tags:
                          - botnet
                        reports: 412
                        reverse_dns: null
                        last_seen: 1795420740
                  top_malicious_domains:
                    headline: Top 5 highest-scored malicious domains on the platform
                    items:
                      - domain: malicious-example.com
                        score: 910
                        tags:
                          - phishing
                        total_reports: 57
                        total_members: 9
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/updates?time_window=24h' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/urls:
    get:
      tags:
        - URLs
      summary: Latest URL records
      operationId: listLatestURLs
      description: |-
        Records updated after `ts` (page size 100-2000). Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 12 Credit Coins.
      parameters:
        - name: ts
          in: query
          description: Polling cursor (`header.next_ts`).
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 9999999999
            description: Unix time in seconds.
          required: false
          example: 1795417200
        - name: page_size
          in: query
          description: Records per page.
          schema:
            type: integer
            format: int32
            minimum: 100
            maximum: 2000
            default: 100
          required: false
          example: 1000
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Records.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocList'
              example:
                header:
                  type: URLs Feed
                  version: 2
                  ts: null
                  next_ts: 1795420680
                  page_size: 1000
                  delay: 0
                  eval: null
                  exec_python: null
                  user:
                    guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                body:
                  - url: http://malicious-example.com/login.php
                    ts: '2026-11-30T21:40:11Z'
                    entry_ts: '2026-11-19T10:02:45Z'
                    score: 655
                    tags:
                      - phishing
                    total_members: 4
                    total_reports: 11
                    blocked_by:
                      - OFA-GID-a1B2c3D4e5F6g7H8
                    unblocked_by: []
                    members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/urls?page_size=1000' \
              -H "Authorization: Bearer $OFA_TOKEN"
    post:
      tags:
        - URLs
      summary: Report a url
      operationId: submitURL
      description: |-
        Recomputes the consensus score. The organization policy may also contribute it to the Alliance.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UrlSubmit'
            example:
              url: http://malicious-example.com/login.php
              confidence: 0.9
              decision: 1
              tags:
                - phishing
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Recorded.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v1/urls' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"url":"http://malicious-example.com/login.php","confidence":0.9,"decision":1,"tags":["phishing"]}'
  /api/v1/urls/score/{min_score}:
    get:
      tags:
        - URLs
      summary: URL blocklist (plain text)
      operationId: getURLFeed
      description: |-
        Records with score >= min_score. Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL. On a LOCAL connector with `score_threshold_cloud`, cloud records above that score are merged in.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 45 Credit Coins.
      parameters:
        - name: min_score
          in: path
          description: Minimum score (1-1000).
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
          required: true
          example: 150
        - name: page
          in: query
          description: Cursor from the `next_page` response header of the previous page.
          schema:
            type: string
            maxLength: 4096
            pattern: ^[A-Za-z0-9+/=_-]*$
          required: false
          example: eyJzZWFyY2hfYWZ0ZXIiOls2NTVdfQ
        - name: format
          in: query
          description: '`LIST` returns one comma-separated line instead of one value per line.'
          schema:
            type: string
            enum:
              - LIST
              - list
          required: false
          example: LIST
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
        - name: plugin
          in: query
          description: Client plugin name, recorded in the connector feedback. `CHECKPOINT`, `CHECKPOINT_IP` or `CHECKPOINT-IP` switch the IPv4 feed to Check Point observable CSV.
          schema:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_\-]+$
          required: false
          example: FORTIGATE
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Blocklist.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
            next_page:
              description: Opaque cursor (base64) for the next page of a plain-text feed. Pass it back as `?page=`. Absent on the last page.
              required: false
              schema:
                type: string
                maxLength: 4096
                pattern: ^[A-Za-z0-9+/=_-]*$
          content:
            text/plain:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
              example: "http://malicious-example.com/login.php\r\nhttps://phish-login.example.net/verify\r\n"
            text/csv:
              schema:
                type: string
                maxLength: 268435456
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                description: Plain-text list, one value per line (CRLF), or one comma-separated line with `format=LIST`.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/urls/score/150' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/urls/{url}:
    get:
      tags:
        - URLs
      summary: Get a url record
      operationId: getURL
      description: |-
        Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).

        **Cost:** 32 Credit Coins.
      parameters:
        - name: url
          in: path
          description: URL (URL-encoded).
          schema:
            type: string
            maxLength: 4096
            pattern: ^\S+$
          required: true
          example: http://malicious-example.com/login.php
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Record.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IocStaticRecord'
              example:
                url: http://malicious-example.com/login.php
                ts: '2026-11-30T21:40:11Z'
                entry_ts: '2026-11-19T10:02:45Z'
                score: 655
                tags:
                  - phishing
                total_members: 4
                total_reports: 11
                blocked_by:
                  - OFA-GID-a1B2c3D4e5F6g7H8
                unblocked_by: []
                members: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/urls/http%3A%2F%2Fmalicious-example.com%2Flogin.php' \
              -H "Authorization: Bearer $OFA_TOKEN"
    put:
      tags:
        - URLs
      summary: Block/unblock a url for the organization
      operationId: putURLDecision
      description: |-
        Served locally on CLOUD; on ONPREM forwarded to the cloud unless `proxy=LOCAL` or the `agid` connector is configured LOCAL.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: url
          in: path
          description: URL (URL-encoded).
          schema:
            type: string
            maxLength: 4096
            pattern: ^\S+$
          required: true
          example: http://malicious-example.com/login.php
        - name: proxy
          in: query
          description: 'ONPREM only: `LOCAL` serves the request from this installation; any other value forwards it to the OneFirewall cloud (installation Alliance key). Ignored on CLOUD.'
          schema:
            type: string
            maxLength: 16
            pattern: ^[A-Za-z]+$
          required: false
          example: LOCAL
        - name: agid
          in: query
          description: Connector id. Records a connector feedback event; on ONPREM, without `proxy`, the connector's configured mode (LOCAL/CLOUD) decides where the request is served.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionUpdate'
            example:
              decision: 1
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X PUT 'https://app.onefirewall.com/api/v1/urls/http%3A%2F%2Fmalicious-example.com%2Flogin.php' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '{"decision":1}'
  /api/v1/urls/{url}/submissions:
    get:
      tags:
        - URLs
      summary: Submissions of the organization
      operationId: listURLSubmissions
      description: |-


        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: url
          in: path
          description: URL (URL-encoded).
          schema:
            type: string
            maxLength: 4096
            pattern: ^\S+$
          required: true
          example: http://malicious-example.com/login.php
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Submissions.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmissionList'
              example:
                me: OFA-GUID-1234-5678-9012
                submissions:
                  - guid: OFA-GUID-1234-5678-9012
                    name: Jane
                    surname: Doe
                    username: jane.doe@example.com
                    confidence: 0.9
                    tags:
                      - phishing
                    ts: 1795413600
                    can_delete: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/urls/http%3A%2F%2Fmalicious-example.com%2Flogin.php/submissions' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/urls/{url}/{guid}:
    delete:
      tags:
        - URLs
      summary: Delete a submission
      operationId: deleteURLSubmission
      description: |-
        Own submissions; Super Admin, Member and Member Admin can delete any of the organization.

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: url
          in: path
          description: URL (URL-encoded).
          schema:
            type: string
            maxLength: 4096
            pattern: ^\S+$
          required: true
          example: http://malicious-example.com/login.php
        - name: guid
          in: path
          description: Submission id.
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          required: true
          example: OFA-GUID-1234-5678-9012
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Success (empty body).
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X DELETE 'https://app.onefirewall.com/api/v1/urls/http%3A%2F%2Fmalicious-example.com%2Flogin.php/OFA-GUID-1234-5678-9012' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v1/version:
    get:
      tags:
        - System
      summary: Version and health
      operationId: getVersion
      description: |-
        Returns the server version and checks MongoDB and Elasticsearch. Answers 500 (with the same body) when MongoDB is unreachable or the Elasticsearch cluster status is not green/yellow.

        **Authentication:** none (public endpoint).
      security:
        - {}
      responses:
        '200':
          description: Healthy.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    type: string
                    maxLength: 32
                    pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                  is_master:
                    type: string
                    maxLength: 16
                    pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                    description: '`OFA_IS_MASTER` environment value, or `NO`.'
                  application:
                    type: string
                    maxLength: 128
                    pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                  ofa_instance:
                    type: string
                    enum:
                      - CLOUD
                      - ONPREM
                  hostname:
                    type: string
                    maxLength: 253
                    pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                  m:
                    type: integer
                    format: int32
                    minimum: 0
                    maximum: 2147483647
                    description: Number of organizations.
                  e:
                    type: string
                    maxLength: 16
                    pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
                    description: Elasticsearch cluster status.
              example:
                version: 4.1.0
                is_master: 'NO'
                application: OneFirewall Server
                ofa_instance: CLOUD
                hostname: api-node-1
                m: 128
                e: green
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        4XX:
          $ref: '#/components/responses/ClientError'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET 'https://app.onefirewall.com/api/v1/version' \
              -H "Authorization: Bearer $OFA_TOKEN"
  /api/v2/ips:
    post:
      tags:
        - IPv4
      summary: Queue a batch of IPv4 reports
      operationId: submitIpBatch
      description: |-
        Up to 3000 submissions per call, processed asynchronously (durable queue).

        **Roles:** Super Admin (0), Member (1), Member Admin (10), Member Mobile (20).
      parameters:
        - name: gaid
          in: query
          description: Connector id (heartbeat).
          schema:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Connector (agent) id.
          required: false
          example: OFA-AGENT-7f3k9QxL2mN4pR8s
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/IpSubmit'
              maxItems: 3000
              minItems: 1
            example:
              - ip: 203.0.113.45
                source: firewall
                decision: 1
                confidence: 0.9
                tags:
                  - ssh-bruteforce
                ttl: 604800
              - ip: 198.51.100.23
                source: ids
                decision: -1
                confidence: 0.6
                tags:
                  - port-scan
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Queued.
          headers:
            RateLimit:
              description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
              required: false
              schema:
                type: string
                maxLength: 256
                pattern: ^[\x20-\x7E]*$
            Access-Control-Allow-Origin:
              description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
              required: false
              schema:
                type: string
                maxLength: 2048
                pattern: ^[\x20-\x7E]*$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
              example:
                message: Submission are added to the queue
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl -X POST 'https://app.onefirewall.com/api/v2/ips?gaid=OFA-AGENT-7f3k9QxL2mN4pR8s' \
              -H "Authorization: Bearer $OFA_TOKEN" \
              -H 'Content-Type: application/json' \
              --data-binary '[{"ip":"203.0.113.45","source":"firewall","decision":1,"confidence":0.9,"tags":["ssh-bruteforce"],"ttl":604800},{"ip":"198.51.100.23","source":"ids","decision":-1,"confidence":0.6,"tags":["port-scan"]}]'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API token or JWT
      description: 'API token (`ofa_...`, opaque, stored only as a keyed hash, revocable one by one) or legacy JWT signed (HS256) with a per-user server-side secret, revocable per user. JWT handling follows RFC8725 (JWT best current practices): algorithm pinned by the server, no `none`, claims checked against the live user record. See the API description for the compatibility forms (Basic, query parameter).'
  responses:
    BadRequest:
      description: Invalid input. Malformed JSON bodies are rejected with an empty 400 for every route.
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    ClientError:
      description: Other client error.
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    Unauthorized:
      description: Missing, invalid or revoked token, unknown or disabled user, or the token still needs the OTP step (`OTP Authentication Failed - OTP Required`).
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    PaymentRequired:
      description: Not enough Credit Coins for this call, or the organization has 0 Credit Coins (every threat-intelligence endpoint answers 402 in that case).
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    Forbidden:
      description: The caller's role or license does not allow this operation.
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    NotFound:
      description: The resource does not exist (or is not visible to the caller).
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    Conflict:
      description: Conflict with the current state. Super Admins without an organization get `{"code":"ORGANIZATION_REQUIRED"}` on every call except the organization-selection ones.
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    TooManyRequests:
      description: Rate limit exceeded (application limiter or edge gateway).
      headers:
        RateLimit:
          description: Rate-limit state (IETF `RateLimit` header). Added by the edge gateway in front of the API when rate limiting is configured there; the Node.js application itself does not emit it.
          required: false
          schema:
            type: string
            maxLength: 256
            pattern: ^[\x20-\x7E]*$
        Access-Control-Allow-Origin:
          description: CORS origin. The API is served same-origin and the Node.js application does not emit CORS headers; present only when the edge gateway adds it.
          required: false
          schema:
            type: string
            maxLength: 2048
            pattern: ^[\x20-\x7E]*$
        Retry-After:
          description: Seconds to wait before retrying. Sent by the application's own limiter (login, OTP, sign-up, captcha, password reset, e-mail verification, SSO code exchange) and by the edge gateway.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
            maximum: 86400
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    ServerError:
      description: Unexpected server error.
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    BadGateway:
      description: The OneFirewall cloud (or an external integration) could not be reached.
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    ServiceUnavailable:
      description: A dependency (queue, captcha store, Elasticsearch) is temporarily unavailable; retry later.
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    GatewayTimeout:
      description: The handler failed after authentication (`Server Error 09`). Also returned for routes whose handler is missing (see the operation description).
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/TextMessage'
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
  schemas:
    TextMessage:
      type: string
      maxLength: 4000
      pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
      description: Plain-text message.
    Message:
      type: object
      description: JSON error / status body. Most handlers answer errors as plain text; a few use this JSON shape.
      properties:
        message:
          type: string
          maxLength: 4000
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        code:
          type: string
          maxLength: 64
          pattern: ^[A-Z_]+$
        required:
          type: string
          enum:
            - current_otp
            - password
          description: 'OTP setup: which re-authentication field is required.'
    UserPublic:
      type: object
      description: User as returned inside other documents. Secrets (token, OTP seed, password hash, session) are never returned.
      properties:
        guid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: User GUID (`OFA-GUID-nnnn-nnnn-nnnn` for accounts created by the server).
          example: OFA-GUID-1234-5678-9012
        name:
          type: string
          maxLength: 100
          pattern: ^[^<>"`\\\u0000-\u001F\u007F]+$
        surname:
          type: string
          maxLength: 100
          pattern: ^[^<>"`\\\u0000-\u001F\u007F]+$
        username:
          type: string
          format: email
          maxLength: 254
        role:
          type: integer
          format: int32
          minimum: 0
          maximum: 999
          enum:
            - 0
            - 1
            - 2
            - 3
            - 10
            - 20
            - 999
          description: 'Role: 0 Super Admin, 1 Member, 2 Guest, 3 Read Only, 10 Member Admin, 20 Member Mobile, 999 Disabled.'
        short_username:
          type: string
          maxLength: 64
          pattern: ^[a-z0-9]{7,64}$
          description: Optional login alias.
        service_account:
          type: boolean
        otp_valid:
          type: boolean
          nullable: true
    IpRule:
      type: object
      description: IPv4 threat rule (Elasticsearch `live_roules`). User secrets are scrubbed from every nested `user`/`decision_by`.
      properties:
        gid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: IPv4 rule GID (`OFA-RULE-GID-` + 16 characters).
          example: OFA-RULE-GID-a1B2c3D4e5F6g7H8
        ip:
          type: string
          maxLength: 18
          pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:/(?:3[0-2]|[12]?\d))?$
          description: IPv4 address or network (CIDR).
        ts:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          description: Unix time in seconds.
        entry_ts:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          description: Unix time in seconds.
        score:
          type: number
          format: double
          minimum: 0
          maximum: 1000
          description: Consensus score 0-1000.
        tags:
          type: array
          items:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_.:\- ]+$
          maxItems: 200
        reverse_dns:
          type: string
          maxLength: 253
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          nullable: true
        is_network:
          type: boolean
        blocked_by:
          type: array
          items:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          maxItems: 10000
          description: Organizations that block this IP.
        unblocked_by:
          type: array
          items:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          maxItems: 10000
        ttl_by:
          type: array
          items:
            type: object
            description: Per-organization TTL entry.
          maxItems: 10000
        reports:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        delay:
          type: number
          format: double
          minimum: 0
        elk_entry_ts:
          type: string
          format: date-time
          maxLength: 64
        dec:
          type: number
          format: double
          description: Score decay coefficient.
        info:
          type: object
          properties:
            members:
              type: integer
              format: int32
              minimum: 0
              maximum: 2147483647
            events:
              type: integer
              format: int32
              minimum: 0
              maximum: 2147483647
            sources:
              type: array
              items:
                type: string
                maxLength: 128
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
              maxItems: 200
            stix_bundles:
              type: array
              items:
                type: object
                description: STIX 2 bundle attached to the rule.
              maxItems: 200
            attack_infos:
              type: array
              items:
                type: object
                description: Attack details reported with an event.
              maxItems: 200
            notes:
              type: array
              items:
                type: string
                maxLength: 2000
                pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
              maxItems: 200
        members:
          type: array
          items:
            type: object
            description: 'Per-organization submissions: `{gid, name, trust, decision, events[]}` (only with `full=yes`).'
          maxItems: 10000
    FeedHeader:
      type: object
      properties:
        type:
          type: string
          maxLength: 32
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        version:
          type: integer
          format: int32
          minimum: 1
          maximum: 10
        ts:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          nullable: true
        next_ts:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          nullable: true
          description: Pass back as `ts` to poll the next page.
        page_size:
          type: integer
          format: int32
          minimum: 0
          maximum: 1000
        delay:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
          description: Organization feed delay, in seconds.
        eval:
          type: string
          maxLength: 4000
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          nullable: true
          description: Client-side helper configured on the server (`config.eval_function`).
        exec_python:
          type: string
          maxLength: 4000
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          nullable: true
          description: Client-side helper configured on the server (`config.exec_python`).
        user:
          $ref: '#/components/schemas/UserPublic'
    IpRuleList:
      type: object
      properties:
        header:
          $ref: '#/components/schemas/FeedHeader'
        body:
          type: array
          items:
            $ref: '#/components/schemas/IpRule'
          maxItems: 1000
      required:
        - header
        - body
    IocStaticRecord:
      type: object
      description: Domain, URL, IPv6 or file-hash record (one of the identifying fields is set). User secrets are scrubbed.
      properties:
        domain:
          type: string
          maxLength: 253
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          description: Domain records.
        url:
          type: string
          maxLength: 4096
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          description: URL records.
        ipv6:
          type: string
          format: ipv6
          maxLength: 45
          description: IPv6 records.
        md5:
          type: string
          maxLength: 32
          pattern: ^[A-Fa-f0-9]{32}$
        sha1:
          type: string
          maxLength: 40
          pattern: ^[A-Fa-f0-9]{40}$
        sha256:
          type: string
          maxLength: 64
          pattern: ^[A-Fa-f0-9]{64}$
        file_name:
          type: string
          maxLength: 1024
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        file_type:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        file_bytes:
          type: integer
          format: int64
          minimum: 0
          maximum: 9007199254740991
        ts:
          type: string
          format: date-time
          maxLength: 64
        entry_ts:
          type: string
          format: date-time
          maxLength: 64
        score:
          type: number
          format: double
          minimum: 0
          maximum: 1000
        tags:
          type: array
          items:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_.:\- ]+$
          maxItems: 200
        total_members:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        total_reports:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        blocked_by:
          type: array
          items:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          maxItems: 10000
        unblocked_by:
          type: array
          items:
            type: string
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
            description: Organization GID (`OFA-GID-` + 16 characters).
            example: OFA-GID-a1B2c3D4e5F6g7H8
          maxItems: 10000
        members:
          type: array
          items:
            type: object
            description: Per-organization submissions.
          maxItems: 10000
    IocList:
      type: object
      properties:
        header:
          $ref: '#/components/schemas/FeedHeader'
        body:
          type: array
          items:
            $ref: '#/components/schemas/IocStaticRecord'
          maxItems: 2000
      required:
        - header
        - body
    SubmissionList:
      type: object
      properties:
        me:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: User GUID (`OFA-GUID-nnnn-nnnn-nnnn` for accounts created by the server).
          example: OFA-GUID-1234-5678-9012
        submissions:
          type: array
          items:
            type: object
            description: 'One submission by the caller''s organization: `{guid, user, ts, confidence, tags, decision...}`.'
          maxItems: 10000
      required:
        - me
        - submissions
    IocSubmit:
      type: object
      properties:
        confidence:
          type: number
          format: double
          minimum: 0
          maximum: 1
          description: Required, 0.0-1.0 (not enforced for the OneFirewall-Cloud organization).
        decision:
          type: integer
          format: int32
          minimum: -1
          maximum: 1
          enum:
            - -1
            - 0
            - 1
          description: 'Organization decision: 1 block, 0 unblock (allow), -1 no decision.'
        tags:
          type: array
          items:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_.:\- ]+$
          maxItems: 50
          description: Free tags. The server caps the number of tags stored per submission.
    DomainSubmit:
      allOf:
        - $ref: '#/components/schemas/IocSubmit'
        - type: object
          properties:
            domain:
              type: string
              maxLength: 253
              pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
              description: Domain (normalized and checked against the reserved-domain list). A bare IPv4 is also recorded as an IP submission.
          required:
            - domain
    UrlSubmit:
      allOf:
        - $ref: '#/components/schemas/IocSubmit'
        - type: object
          properties:
            url:
              type: string
              maxLength: 4096
              pattern: ^\S+$
          required:
            - url
    Ipv6Submit:
      allOf:
        - $ref: '#/components/schemas/IocSubmit'
        - type: object
          properties:
            ipv6:
              type: string
              format: ipv6
              maxLength: 45
          required:
            - ipv6
    FileSubmit:
      allOf:
        - $ref: '#/components/schemas/IocSubmit'
        - type: object
          description: At least one of md5, sha1, sha256 is required.
          properties:
            md5:
              type: string
              maxLength: 32
              pattern: ^[A-Fa-f0-9]{32}$
            sha1:
              type: string
              maxLength: 40
              pattern: ^[A-Fa-f0-9]{40}$
            sha256:
              type: string
              maxLength: 64
              pattern: ^[A-Fa-f0-9]{64}$
            file_name:
              type: string
              maxLength: 1024
              pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
            file_type:
              type: string
              maxLength: 128
              pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
            file_bytes:
              type: integer
              format: int64
              minimum: 0
              maximum: 9007199254740991
            source:
              type: string
              maxLength: 256
              pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
    DecisionUpdate:
      type: object
      properties:
        decision:
          type: integer
          format: int32
          minimum: 0
          maximum: 1
          enum:
            - 0
            - 1
          description: 1 block, 0 unblock.
      required:
        - decision
    IpSubmit:
      type: object
      properties:
        ip:
          type: string
          maxLength: 18
          pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:/(?:3[0-2]|[12]?\d))?$
          description: IPv4 address or network ('y.x.z.w' or 'y.x.z.w/n'). Reserved (global or organization) addresses are refused.
        lid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: Event id. When the organization already has an event with this id, it is updated instead of added.
        notes:
          type: array
          items:
            type: string
            maxLength: 2000
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          maxItems: 15
          description: Free notes (capped by the server).
        source:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        ttl:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          nullable: true
          description: Unix time (seconds) when the decision expires; null = permanent.
        decision:
          type: integer
          format: int32
          minimum: -1
          maximum: 1
          enum:
            - -1
            - 0
            - 1
          description: 'Organization decision: 1 block, 0 unblock (allow), -1 no decision.'
        contribute:
          type: boolean
          description: Also share with the OneFirewall Alliance. The organization policy can force or forbid it.
        confidence:
          type: number
          format: double
          minimum: -1
          maximum: 1
          description: '-1.0 (benign) to 1.0 (malicious). Not enforced for OneFirewall-Cloud.'
        tags:
          type: array
          items:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_.:\- ]+$
          maxItems: 50
          description: Free tags. The server caps the number of tags stored per submission.
        ts:
          type: integer
          format: int64
          minimum: 0
          maximum: 99999999999999
          description: Event time (seconds or milliseconds). Future or invalid values become "now".
      required:
        - ip
    IpDecision:
      type: object
      description: At least one of decision or ttl.
      properties:
        decision:
          type: integer
          format: int32
          minimum: -1
          maximum: 1
          enum:
            - -1
            - 0
            - 1
          description: 'Organization decision: 1 block, 0 unblock (allow), -1 no decision.'
        ttl:
          type: integer
          format: int64
          minimum: 1
          maximum: 9999999999
          nullable: true
          description: Unix time (seconds) when the decision expires; null makes it permanent.
    Note:
      type: object
      properties:
        note:
          type: string
          maxLength: 2000
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
      required:
        - note
    IpHistory:
      type: object
      properties:
        header:
          type: object
          properties:
            type:
              type: string
              enum:
                - IPv4 History
            version:
              type: integer
              format: int32
              minimum: 4
              maximum: 4
            ts:
              type: integer
              format: int64
              minimum: 0
              maximum: 9999999999
              nullable: true
            user:
              $ref: '#/components/schemas/UserPublic'
        body:
          type: array
          items:
            type: object
            description: Historical snapshot of the rule.
          maxItems: 1000
      required:
        - header
        - body
    IpNetworks:
      type: object
      description: Network owner of each requested IP, keyed by IP.
      properties:
        networks:
          type: object
          additionalProperties:
            type: object
            nullable: true
            properties:
              id:
                type: string
                maxLength: 64
                description: Provider / scanner id, or the ASN when the owner is only known from the AS.
              name:
                type: string
                maxLength: 128
              category_label:
                type: string
                maxLength: 64
              logo:
                type: string
                maxLength: 256
                description: Path of a 64x64 PNG logo on this server, empty when none.
              asn:
                type: string
                maxLength: 16
              as_name:
                type: string
                maxLength: 128
      required:
        - networks
    IpProvider:
      type: object
      description: Public provider (cloud, CDN, crawler, VPN, uptime monitor) whose published ranges contain the IP.
      properties:
        ip:
          type: string
          maxLength: 45
        found:
          type: boolean
        provider:
          type: object
          nullable: true
          properties:
            id:
              type: string
              maxLength: 32
              description: Stable provider id, also the logo file name.
            name:
              type: string
              maxLength: 64
            category:
              type: string
              enum: [cloud, cdn, crawler, ai_crawler, vpn, proxy, monitoring, social, messaging, platform, scanner, security]
            category_label:
              type: string
              maxLength: 64
            website:
              type: string
              maxLength: 256
            logo:
              type: string
              maxLength: 256
              description: Path of a 64x64 PNG logo on this server.
            network:
              type: string
              maxLength: 49
              description: Provider range (CIDR) the IP matched.
      required:
        - ip
        - found
        - provider
    IpGeo:
      type: object
      description: ASN/geo information from the local IPinfo Lite database (ip-api.com compatible field names).
      properties:
        status:
          type: string
          enum:
            - success
            - fail
        query:
          type: string
          maxLength: 15
          pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$
        continent:
          type: string
          maxLength: 64
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        continentCode:
          type: string
          maxLength: 8
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        country:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        countryCode:
          type: string
          maxLength: 8
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        region:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        regionName:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        city:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        district:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        zip:
          type: string
          maxLength: 32
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        lat:
          type: number
          format: double
          minimum: -90
          maximum: 90
          nullable: true
        lon:
          type: number
          format: double
          minimum: -180
          maximum: 180
          nullable: true
        timezone:
          type: string
          maxLength: 64
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        offset:
          type: integer
          format: int32
          minimum: -50400
          maximum: 50400
          nullable: true
        currency:
          type: string
          maxLength: 8
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        isp:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        org:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        as:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        asname:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        as_domain:
          type: string
          maxLength: 253
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        reverse:
          type: string
          maxLength: 253
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        mobile:
          type: boolean
          nullable: true
        proxy:
          type: boolean
          nullable: true
        hosting:
          type: boolean
          nullable: true
        source:
          type: string
          enum:
            - local
    Intel:
      type: object
      description: Cross-type intelligence for one indicator.
      properties:
        organizations:
          type: object
          description: Caller's organization.
        type:
          type: string
          maxLength: 16
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        request:
          type: string
          maxLength: 4096
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        timestamp:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          description: Unix time in seconds.
        timestamp_readable:
          type: string
          format: date-time
          maxLength: 64
        request_id:
          type: string
          maxLength: 12
          pattern: ^[A-Za-z0-9]{12}$
        body:
          type: object
          description: IPv4 rule (IpRule) or the domain/URL/IPv6/file record; a zero-score placeholder when unknown.
        events:
          type: array
          items:
            type: object
            description: Connector events of the caller's organization for this indicator.
          maxItems: 10000
        traffic:
          type: array
          items:
            type: object
            description: Traffic events of the caller's organization (`src_reserved`/`dst_reserved` flags added).
          maxItems: 10000
        stix:
          type: array
          items:
            type: object
            description: STIX 2.1 object.
          maxItems: 10000
    StixObject:
      type: object
      description: STIX 2.x object (indicator, bundle, ...). Other STIX properties are returned as stored.
      properties:
        type:
          type: string
          maxLength: 64
          pattern: ^[a-z0-9-]+$
        id:
          type: string
          maxLength: 128
          pattern: ^[a-z0-9-]+--[0-9a-fA-F-]{36}$
        spec_version:
          type: string
          maxLength: 8
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
      required:
        - type
        - id
    Connector:
      type: object
      description: Connector (agent) status record.
      properties:
        agid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: Connector (agent) id.
        mgid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: Organization GID (`OFA-GID-` + 16 characters).
          example: OFA-GID-a1B2c3D4e5F6g7H8
        code:
          type: integer
          format: int32
          minimum: -1
          maximum: 1000
        score_threshold:
          type: integer
          format: int32
          minimum: 0
          maximum: 1000
        sync_time:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        maximum_rules:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        hostname:
          type: string
          maxLength: 253
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        plugin:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        active:
          type: boolean
        blacklist_size:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        ts:
          type: integer
          format: int64
          minimum: 0
          maximum: 99999999999999
          description: Unix time in milliseconds.
        version:
          type: string
          maxLength: 64
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        config:
          type: object
          description: 'Connector configuration (`running`: yes|no, `score_threshold`, `proxy`: LOCAL|CLOUD, `score_threshold_cloud`, plugin settings). Secrets are masked unless the caller may read them.'
    ConnectorReport:
      type: object
      properties:
        agid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: Connector (agent) id.
        mgid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: Organization GID (`OFA-GID-` + 16 characters).
          example: OFA-GID-a1B2c3D4e5F6g7H8
        code:
          type: integer
          format: int32
          minimum: -1
          maximum: 1000
          description: '-1 updates the stored record of the connector; other values insert a new status record.'
        score_threshold:
          type: integer
          format: int32
          minimum: 0
          maximum: 1000
        sync_time:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        maximum_rules:
          type: integer
          format: int32
          minimum: 0
          maximum: 2147483647
        hostname:
          type: string
          maxLength: 253
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        plugin:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        blacklist:
          type: array
          items:
            type: string
            maxLength: 4096
            pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          maxItems: 1000000
          description: Rules currently applied by the connector.
        config:
          type: object
          description: Connector configuration, merged with the stored one (stored values win where the connector omits them).
        active:
          type: boolean
        ts:
          type: integer
          format: int64
          minimum: 0
          maximum: 99999999999999
          description: Unix time in milliseconds.
      required:
        - agid
    ConnectorStatus:
      type: object
      properties:
        agid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
          description: Connector (agent) id.
        running:
          type: string
          enum:
            - 'yes'
            - 'no'
      required:
        - agid
        - running
    ConnectorLogEntry:
      type: object
      properties:
        message:
          type: string
          minLength: 1
          description: Text of the log. Cut after 600 characters.
        level:
          type: string
          enum:
            - debug
            - info
            - warning
            - error
          default: info
        event:
          type: string
          description: Short name of the event. Cut after 100 characters.
        ts:
          description: 'When it happened (default: when it is received).'
          oneOf:
            - type: number
              description: Unix time, in seconds or milliseconds.
            - type: string
              format: date-time
              description: ISO 8601 date with its time zone.
      required:
        - message
    ConnectorLog:
      type: object
      properties:
        received_at:
          type: string
          format: date-time
          description: When the server received it.
        ts:
          type: string
          format: date-time
          description: When it happened, as reported by the connector.
        level:
          type: string
          enum:
            - debug
            - info
            - warning
            - error
        event:
          type: string
          maxLength: 100
          description: Empty when not sent.
        message:
          type: string
          maxLength: 300
      required:
        - received_at
        - ts
        - level
        - event
        - message
    AgentRegistration:
      type: object
      description: Connector registration. The whole body is stored as the connector configuration.
      properties:
        gaid:
          type: string
          maxLength: 128
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]*$
        score_threshold:
          type: integer
          format: int32
          minimum: 0
          maximum: 1000
        installation_name:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        plugin:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
      required:
        - gaid
    TrafficEvent:
      type: object
      description: One firewall traffic event. Ports are integers; at most 10 tags and 10 notes.
      properties:
        src_ip:
          type: string
          maxLength: 15
          pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$
        dst_ip:
          type: string
          maxLength: 15
          pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$
        src_port:
          type: integer
          format: int32
          minimum: 0
          maximum: 65535
        dst_port:
          type: integer
          format: int32
          minimum: 0
          maximum: 65535
        service:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        firewall:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        action:
          type: string
          maxLength: 64
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        request_id:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          description: Tag used to group/retrieve events.
        details:
          type: string
          maxLength: 4000
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        notes:
          type: string
          maxLength: 4000
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
        tags:
          type: array
          items:
            type: string
            maxLength: 64
            pattern: ^[A-Za-z0-9_.:\- ]+$
          maxItems: 10
        event_id:
          type: string
          maxLength: 256
          pattern: ^[^\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]*$
          description: Client event id; the same id is stored once (idempotent).
      required:
        - src_ip
        - dst_ip
    TrafficEventResult:
      allOf:
        - $ref: '#/components/schemas/TrafficEvent'
        - type: object
          properties:
            ofa_exist:
              type: boolean
            ofa_action:
              type: string
              enum:
                - allow
                - block
            ofa_risk:
              type: string
              enum:
                - low
                - medium
                - high
                - critical
            ofa:
              type: object
              description: Matching OneFirewall rule (score, live_score, ip_info...) when the IP is known.
    QueueAck:
      type: object
      properties:
        message:
          type: string
          enum:
            - ok
            - queued
        queued:
          type: integer
          format: int32
          minimum: 0
          maximum: 1000000
        skipped:
          type: integer
          format: int32
          minimum: 0
          maximum: 1000000
      required:
        - message
    GraphResult:
      type: object
      description: Traffic dashboard data computed from the organization's configured `live` Elasticsearch integration.
    DefenseSummary:
      type: object
      properties:
        attacks:
          type: integer
          format: int64
          minimum: 0
          maximum: 9007199254740991
        actors:
          type: integer
          format: int64
          minimum: 0
          maximum: 9007199254740991
        devices:
          type: array
          items:
            type: object
            description: Connector status (config and blocklist removed).
          maxItems: 10000
        top_actors:
          type: array
          items:
            type: object
            properties:
              ip:
                type: string
                maxLength: 18
                pattern: ^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:/(?:3[0-2]|[12]?\d))?$
              count:
                type: integer
                format: int64
                minimum: 0
                maximum: 9007199254740991
              ofa:
                type: object
                description: Matching rule with ip_info.
          maxItems: 1000
        timeline:
          type: object
          properties:
            start:
              type: integer
              format: int64
              minimum: 0
              maximum: 9999999999
              description: Unix time in seconds.
            bucket_sec:
              type: integer
              format: int32
              minimum: 1
              maximum: 86400
            blocked:
              type: array
              items:
                type: integer
                format: int64
                minimum: 0
                maximum: 9007199254740991
              maxItems: 1000
            blocked_autonomy:
              type: array
              items:
                type: integer
                format: int64
                minimum: 0
                maximum: 9007199254740991
              maxItems: 1000
    Updates:
      type: object
      description: 'Threat landscape summary for the window: submission counts and deltas vs the previous window, new IPs, top IPs/domains/URLs, score velocity, geo distribution, tag aggregations, new users/organizations.'
