{
  "$id": "https://schemas.sand.binaryedge.io/minion/modules/influxdb",
  "title": "InfluxDB Module Body",
  "type": "object",
  "properties": {
    "auth_enabled": {
      "type": "boolean"
    },
    "databases": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/database"
      }
    },
    "influxdb_version": {
      "type": "string"
    },
    "server_info": {
      "$ref": "#/$defs/server_info"
    }
  },
  "required": [
    "auth_enabled",
    "influxdb_version"
  ],
  "additionalProperties": false,
  "$defs": {
    "database": {
      "type": "object",
      "properties": {
        "db_name": {
          "type": "string"
        },
        "measurements": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "db_name"
      ],
      "additionalProperties": false
    },
    "server_info": {
      "type": "object",
      "properties": {
        "hostname": {
          "type": "string"
        },
        "runtime": {
          "$comment": "This object comes directly from the server, so its keys are unknown.",
          "type": "object"
        },
        "system": {
          "$comment": "This object comes mostly from the server, so its keys are unknown.",
          "type": "object"
        },
        "usernames": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    }
  }
}
