openapi: 3.1.0
info:
  title: 'Forward Networks: System Administration API'
  description: Administer the system, including database backups
  contact:
    email: support@forwardnetworks.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  version: ${apiVersion}
servers:
  - url: /api
security:
  - api_token: []
tags:
  - name: System Administration
    description: Administer the system, including database backups
paths:
  /cve-index:
    get:
      tags:
        - System Administration
      summary: Exports the CVE index
      description: |-
        The CVE index is a gzipped binary (.bin.gz) file.

        To download the latest one from fwd.app:

        `curl -vu <user>:<pass> https://fwd.app/api/cve-index -o cve-index.bin.gz`

        The response includes a `Digest` header containing the file’s SHA-256 digest.
      operationId: getCveIndexUsingGET
      responses:
        '200':
          description: OK
          content:
            application/gzip:
              schema:
                type: string
                format: byte
    put:
      tags:
        - System Administration
      summary: Imports a new CVE index
      description: |-
        Replaces the CVE index in use.

        To upload a CVE index gzipped binary (.bin.gz) file downloaded from fwd.app:

        `curl -vu <user>:<pass> https://<host>/api/cve-index?sha=<digest> -T cve-index.bin.gz`

        The `sha` parameter is optional but recommended. The `<digest>` value can be found in the `Digest` response
        header when a CVE index is downloaded from fwd.app.

        **Note:** This operation is for on-premises deployments only.
      operationId: putCveIndexUsingPUT
      parameters:
        - name: sha
          in: query
          description: |-
            Optional SHA-256 digest (consisting of 64 hex digits) to use to verify the integrity of the CVE
            index
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
              format: byte
        required: true
      responses:
        '200':
          description: OK
          content: {}
components:
  securitySchemes:
    api_token:
      type: http
      scheme: basic
