{
  "openapi": "3.0.1",
  "info": {
    "title": "Water Network Analyzer: EPANET Pressure, Fire Flow, Criticality",
    "description": "Analyze water distribution networks with EPANET 2.2: .inp files from EPANET, WaterGEMS, InfoWater or QGIS by link, upload or paste. Get pressures, tanks, pump energy, fire flow at every junction, pipe-break criticality, water age, findings, maps, CSV, Excel and GeoJSON. For engineers and AI agents.",
    "version": "0.1",
    "x-build-id": "GZP5dbiMwcJodboQK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~water-network-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-water-network-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jumblemog~water-network-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-water-network-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jumblemog~water-network-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-water-network-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "networks": {
            "title": "Networks: links or example names",
            "type": "array",
            "description": "One network per line. A link to an EPANET .inp file (as EPANET, WaterGEMS, InfoWater, WNTR and the QGIS plugins export them), a ZIP archive or a GitHub folder of .inp files (add #net3 to take only the files whose path holds net3), a GitHub or GitLab file page, Google Drive or Dropbox. Or an example network by name: Net1, Net2 or Net3 (EPANET's own examples), Net6 (3,323 junctions), ky4 or ky10 (Kentucky benchmark networks).",
            "items": {
              "type": "string"
            }
          },
          "upload": {
            "title": "Or upload an .inp file",
            "type": "string",
            "description": "An EPANET .inp file (or a ZIP of them) from your computer, analysed together with the networks above."
          },
          "inpText": {
            "title": "Or paste an .inp file",
            "type": "string",
            "description": "The text of an EPANET input file: [JUNCTIONS], [RESERVOIRS], [TANKS], [PIPES], [PUMPS], [PATTERNS], [OPTIONS], [TIMES] and the other sections, ending with [END]."
          },
          "analyses": {
            "title": "Analyses",
            "type": "array",
            "description": "The hydraulic run itself (pressures, velocities, tanks, pumps and energy, EPANET's warnings) and the model checks always run. Fire flow and criticality solve the network again for every junction or pipe: on networks of thousands of junctions they take a few minutes, so raise the time limit there.",
            "items": {
              "type": "string",
              "enum": [
                "waterAge",
                "fireFlow",
                "criticality"
              ],
              "enumTitles": [
                "Water age: EPANET's age simulation (at least a week), or travel time from the sources for a steady state",
                "Fire flow: the most each junction can deliver with the residual pressure kept everywhere",
                "Pipe criticality: each pipe closed in turn, with the demand left unmet (pressure-driven)"
              ]
            },
            "default": [
              "waterAge",
              "fireFlow",
              "criticality"
            ]
          },
          "analysisHour": {
            "title": "Hour for fire flow and criticality",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Hours from the start of the run (to the nearest reporting time). Tank levels, pump states and demands of that hour are frozen for the fire flow and pipe tests. Empty: the busiest hour (the most demand)."
          },
          "durationHours": {
            "title": "Run length (hours)",
            "minimum": 0,
            "maximum": 8760,
            "type": "number",
            "description": "Overrides the file's duration: 0 for a single steady state, 24 or 168 for a day or a week of demand patterns, controls and tanks filling and draining. Empty: as the file says."
          },
          "demandMultiplier": {
            "title": "Demand multiplier",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Scales every demand, such as 1.5 for a maximum day or 2.5 for a peak hour, or 1.2 for growth. Empty: the file's own (usually 1)."
          },
          "fireFlowNodes": {
            "title": "Junctions for the fire flow test",
            "type": "array",
            "description": "Junction IDs to test, such as hydrant locations. Empty: every junction with a demand.",
            "items": {
              "type": "string"
            }
          },
          "pressureUnit": {
            "title": "Pressure unit",
            "enum": [
              "auto",
              "psi",
              "m",
              "kPa",
              "bar"
            ],
            "type": "string",
            "description": "The unit of every pressure in the results, and of the criteria below when they're given as bare numbers.",
            "default": "auto"
          },
          "minPressure": {
            "title": "Minimum service pressure",
            "type": "string",
            "description": "Junctions with demand below this are flagged, and pipe criticality takes it as the pressure for full service (pressure-driven demand: full demand at this pressure, none at zero). A number in the pressure unit, or with its own unit: 40 psi, 28 m, 280 kPa, 2.8 bar. Empty: 35 psi (US units) or 25 m."
          },
          "maxPressure": {
            "title": "Maximum pressure",
            "type": "string",
            "description": "Junctions with demand above this are flagged as candidates for pressure-reducing valves. Empty: 100 psi (US units) or 70 m."
          },
          "fireResidualPressure": {
            "title": "Residual pressure during a fire",
            "type": "string",
            "description": "The fire flow test keeps the pressure at the hydrant junction, and at every junction that starts above it, at or above this. Empty: 20 psi (US units) or 14 m (about 140 kPa)."
          },
          "fireFlowRequired": {
            "title": "Fire flow required",
            "type": "string",
            "description": "The flow each tested junction should deliver: 1500 gpm, 95 L/s, 340 m3/h. A bare number is in the network's flow unit. The search goes up to five times this, so the results show the full available flow. Empty: 1,000 gpm (US units) or 60 L/s."
          },
          "maxVelocity": {
            "title": "Maximum velocity",
            "type": "string",
            "description": "Pipes faster than this are flagged: 5 ft/s or 1.5 m/s. A bare number is in ft/s for US units, m/s for metric. Empty: 5 ft/s or 1.5 m/s."
          },
          "waterAgeLimitHours": {
            "title": "Water age limit (hours)",
            "minimum": 1,
            "maximum": 10000,
            "type": "number",
            "description": "Junctions with demand whose average water age (or travel time) is older than this are flagged. Empty: 72 hours."
          },
          "outputs": {
            "title": "Files to make",
            "type": "array",
            "description": "The dataset row with the main numbers and the findings is always made.",
            "items": {
              "type": "string",
              "enum": [
                "pictures",
                "tables",
                "excel",
                "geojson",
                "report"
              ],
              "enumTitles": [
                "Pictures: pressure, water age, fire flow and criticality maps, tank levels and demand over time",
                "CSV tables: every junction and pipe with its results, and pressures over time",
                "Excel workbook: summary, findings, junctions, pipes, tanks, pumps, fire flow and criticality",
                "GeoJSON: the network with its results, in the file's own coordinates, for QGIS or a web map",
                "EPANET's own report (warnings and the energy summary)"
              ]
            },
            "default": [
              "pictures",
              "tables",
              "excel",
              "geojson",
              "report"
            ]
          },
          "timeLimitSeconds": {
            "title": "Time limit (seconds)",
            "minimum": 10,
            "maximum": 3300,
            "type": "integer",
            "description": "Downloading and analysing stop after this long; what was done is kept. Fire flow and criticality tests that wouldn't fit are cut short and say so. Each network is billed for its own time.",
            "default": 300
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}