{"components":{"parameters":{"featureFilter":{"description":"A FeatureFilter as JSON, with predicates a row must all meet. The map draws with the same predicates. Longer than 16,000 characters returns 422.","in":"query","name":"filter","schema":{"maxLength":16000,"type":"string"}},"featureScenario":{"description":"A scenario of the layer's model. Returns the rows as the scenario has them, including what it inherits. Added elements have negative fids; switched-off elements are left out.","in":"query","name":"scenario","schema":{"format":"uuid","type":"string"}},"featureSearch":{"description":"Free text, matched against every attribute's value, case ignored.","in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},"featureSource":{"description":"Reads the layer as a simulation or forecast wrote it: `latest`, `simulation:<id>`, `forecast:<id>`, or `own` for the layer's own rows. Can't be combined with `scenario`.","in":"query","name":"source","schema":{"maxLength":60,"pattern":"^(latest|own|(simulation|forecast|sensor):[0-9a-fA-F-]{36})$","type":"string"}},"floodColormap":{"description":"`classes`, depth bands, by default; or a ramp from 0 to 5 m: `depth`, `ylgnbu`, `blues`, `gnbu`, `pubu`, `viridis`, `turbo`, `spectral` or `rdylbu`.","in":"query","name":"colormap","schema":{"default":"classes","enum":["classes","depth","ylgnbu","blues","gnbu","pubu","viridis","turbo","spectral","rdylbu"],"type":"string"}},"floodEvent":{"description":"The return period. Plans other than Enterprise have `100yr` alone.","in":"query","name":"event","schema":{"default":"100yr","enum":["2yr","5yr","10yr","25yr","50yr","100yr","500yr","1000yr"],"type":"string"}},"floodScenario":{"description":"The climate scenario. The 2100 projections need the Enterprise plan.","in":"query","name":"scenario","schema":{"default":"current","enum":["current","2100-ssp245","2100-ssp585"],"type":"string"}},"floodTileEvent":{"description":"The return period. Only `100yr` is drawn today.","in":"path","name":"event","required":true,"schema":{"enum":["2yr","5yr","10yr","25yr","50yr","100yr","500yr","1000yr"],"type":"string"}},"floodTileToken":{"description":"A tile token, for a web page, in place of an API key.","in":"query","name":"token","schema":{"type":"string"}},"layerId":{"description":"The layer's id, from `GET /projects/{projectId}/contents`.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},"modelId":{"description":"The model's id, from `GET /projects/{projectId}/contents` or `GET /models`.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},"projectId":{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},"rasterId":{"description":"The raster's id, from `GET /projects/{projectId}/contents`.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},"scenarioId":{"description":"The scenario's id, from the model's scenarios.","in":"path","name":"scenarioId","required":true,"schema":{"format":"uuid","type":"string"}},"seriesName":{"description":"The series' name in the model.","in":"path","name":"name","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},"serviceId":{"description":"The ArcGIS service's id, from `GET /projects/{projectId}/contents`.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},"siteId":{"description":"The sensor site's id, from `GET /sensors`.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},"workspace":{"description":"A team id, or your user id for your personal workspace. `GET /me` lists them. Default is your first team.","in":"header","name":"X-NEER-Workspace","required":false,"schema":{"format":"uuid","type":"string"}}},"responses":{"AllowanceSpent":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Weather allowance used up. It renews with your billing cycle, or each month."},"Conflict":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Changed since you read it. `detail` says by whom."},"Failed":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Server error. On 503, retry shortly."},"FloodAllowanceSpent":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Flood allowance used up for the month. It renews on the 1st (UTC); a higher Flood plan has a larger one."},"Invalid":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Invalid parameters. `detail` lists them."},"NotFound":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found."},"Refused":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not allowed. `detail` says why."},"Throttled":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too many requests. Wait for `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit resets","schema":{"type":"integer"}}}},"Unauthorized":{"content":{"application/problem+json":{"example":{"status":401,"title":"Unauthorized","type":"urn:neer:problem:unauthorized"},"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not signed in, or a bad key."}},"schemas":{"Account":{"properties":{"connected":{"items":{"properties":{"connectedAt":{"format":"date-time","type":"string"},"provider":{"enum":["google","apple"],"type":"string"}},"required":["provider","connectedAt"],"type":"object"},"type":"array"},"email":{"type":"string"},"hasPassword":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"image":{"description":"A short-lived address for the user's picture.","type":["string","null"]},"name":{"description":"The stored name. Null when none was given.","type":["string","null"]},"pendingEmail":{"description":"The new address an email change is waiting to confirm. The link is valid for 24 hours.","type":["string","null"]},"secondFactor":{"enum":["totp","sms","email",null],"type":["string","null"]},"teamsBeingDeleted":{"description":"Teams the user owns that are scheduled for deletion. They can be restored during the 30 days.","items":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"purgeAfter":{"format":"date-time","type":"string"}},"required":["id","name","purgeAfter"],"type":"object"},"type":"array"}},"required":["id","name","email","image","hasPassword","connected","secondFactor","pendingEmail","teamsBeingDeleted"],"type":"object"},"ActionContext":{"properties":{"groupId":{"format":"uuid","type":"string"},"layerId":{"format":"uuid","type":"string"},"modelId":{"format":"uuid","type":"string"},"projectId":{"format":"uuid","type":"string"},"rasterId":{"format":"uuid","type":"string"},"selection":{"description":"Feature ids are per layer, so a selection includes its layer.","items":{"properties":{"ids":{"items":{"type":"string"},"type":"array"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","ids"],"type":"object"},"type":"array"},"serviceId":{"format":"uuid","type":"string"}},"type":"object"},"ActionResult":{"description":"What an action did, or would do when previewed: its changes, a receipt, and an undo while it can be reversed.","properties":{"changes":{"items":{"$ref":"#/components/schemas/Change"},"type":"array"},"created":{"description":"What the action created, if anything: its type, id and label. Absent on a preview.","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["type","id","label"],"type":"object"},"mode":{"description":"What was done: a preview, an apply or an undo.","enum":["preview","apply","undo"],"type":"string"},"name":{"description":"The action, by its name in the catalog (`GET /actions`).","type":"string"},"previewId":{"description":"Present after a preview. Send the same request with `previewId` to apply it.","type":"string"},"receipt":{"$ref":"#/components/schemas/Receipt"},"summary":{"description":"One line, past tense when applied: \"Renamed Gravity mains\".","type":"string"},"undo":{"description":"Present while the change can be undone. Call `POST /undo/{token}` before `until`.","properties":{"token":{"type":"string"},"until":{"format":"date-time","type":"string"}},"required":["token","until"],"type":"object"}},"required":["mode","name","summary","changes","receipt"],"type":"object"},"AwayItem":{"properties":{"at":{"format":"date-time","type":"string"},"target":{"$ref":"#/components/schemas/Target"},"text":{"type":"string"},"via":{"description":"The registered name of the agent the change came through. Absent for a user's own changes and for NEER's.","type":"string"},"where":{"description":"The project the change was made in.","type":"string"},"who":{"properties":{"initials":{"maxLength":2,"type":"string"},"name":{"type":"string"},"neer":{"description":"The agent, acting for the named user.","type":"boolean"}},"required":["name","initials"],"type":"object"}},"required":["who","at","text"],"type":"object"},"Billing":{"properties":{"cards":{"items":{"properties":{"brand":{"type":"string"},"expMonth":{"type":"integer"},"expYear":{"type":"integer"},"id":{"type":"string"},"last4":{"type":"string"}},"required":["id","brand","last4","expMonth","expYear"],"type":"object"},"type":"array"},"flood":{"description":"The payer's Flood API plan. Null when it can't be read.","properties":{"plan":{"enum":["free","starter","enterprise"],"type":"string"},"prices":{"description":"Starter's prices, monthly and yearly, from Stripe. Empty when Stripe doesn't respond.","items":{"properties":{"amount":{"description":"In cents.","type":"integer"},"currency":{"type":"string"},"interval":{"enum":["monthly","yearly"],"type":"string"}},"required":["interval","amount","currency"],"type":"object"},"type":"array"},"subscription":{"oneOf":[{"$ref":"#/components/schemas/BillingPlan"},{"type":"null"}]}},"required":["plan","subscription","prices"],"type":["object","null"]},"free":{"description":"What Free includes, for a person on it, from its entitlement feature: left out for a team, for a person on a plan, and where Stripe didn't respond.","properties":{"creditsYearly":{"description":"Dollars a year.","type":"number"},"projects":{"description":"Left out when unlimited.","type":"integer"},"sharing":{"type":"boolean"},"storageGb":{"type":"number"},"weatherRequests":{"description":"Weather API requests a month.","type":"integer"}},"required":["sharing"],"type":"object"},"history":{"items":{"properties":{"amount":{"description":"In cents.","type":"integer"},"at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"status":{"type":"string"},"url":{"type":["string","null"]}},"required":["id","at","description","amount","currency","status","url"],"type":"object"},"type":"array"},"may":{"properties":{"plan":{"type":"boolean"},"wallet":{"type":"boolean"}},"required":["plan","wallet"],"type":"object"},"offers":{"description":"The plans this payer can buy, with Stripe's monthly and yearly prices. Shown to whoever manages the plan, when there is no plan yet, and on Enterprise its bands to change between. Empty when Stripe isn't set up or doesn't respond.","items":{"properties":{"amount":{"description":"In cents. A seat plan's is its price with the included seats.","type":"integer"},"band":{"description":"Enterprise's price band, by the population a utility serves: its price is this offer's amount, a year at a time. Left out for the other plans.","properties":{"from":{"description":"The fewest people it covers.","type":"integer"},"key":{"enum":["up_to_10k","10k_25k","25k_50k","50k_100k"],"type":"string"},"to":{"description":"The most; each edge is in its lower band.","type":"integer"},"twinAmount":{"description":"In cents: the price with the digital twin, which doubles it. Left out where that price isn't for sale.","type":"integer"}},"required":["key","from"],"type":"object"},"currency":{"type":"string"},"includes":{"description":"What the plan includes, from its entitlement feature: a seat plan's amounts per seat, any other plan's for the plan. Left out where it couldn't be read.","properties":{"admins":{"description":"The admins it seats, where named.","type":"integer"},"credits":{"description":"Dollars a month.","type":"number"},"creditsPerSeat":{"description":"Dollars a month for each seat.","type":"number"},"creditsYearly":{"description":"Dollars a year: Free's.","type":"number"},"guests":{"description":"The guests it seats, where named.","type":"integer"},"members":{"description":"The members it seats, where named.","type":"integer"},"projects":{"description":"Left out when unlimited.","type":"integer"},"sharing":{"type":"boolean"},"storageGb":{"type":"number"},"storageGbPerSeat":{"type":"number"},"weatherRequests":{"description":"Weather API requests a month.","type":"integer"}},"required":["sharing"],"type":"object"},"interval":{"enum":["monthly","yearly"],"type":"string"},"product":{"enum":["personal_professional","team_seats","enterprise"],"type":"string"},"seats":{"description":"A seat plan's seats and their price; left out for the other plans.","properties":{"extra":{"description":"In cents, for each seat beyond those.","type":"integer"},"included":{"description":"The seats the amount covers.","type":"integer"},"max":{"description":"The most seats; more is Enterprise.","type":"integer"}},"required":["included","extra","max"],"type":"object"}},"required":["product","interval","amount","currency"],"type":"object"},"type":"array"},"plan":{"properties":{"amount":{"description":"In cents.","type":["integer","null"]},"cancelsAt":{"format":"date-time","type":["string","null"]},"coupon":{"description":"A coupon on the subscription. `amount` is the price before it.","properties":{"amountOff":{"description":"In cents.","type":["integer","null"]},"percentOff":{"type":["number","null"]}},"required":["percentOff","amountOff"],"type":["object","null"]},"currency":{"type":["string","null"]},"enterprise":{"description":"An Enterprise plan's population band and digital twin. `band` is left out on a plan sold before the bands. Left out on any other plan.","properties":{"band":{"enum":["up_to_10k","10k_25k","25k_50k","50k_100k"],"type":"string"},"digitalTwin":{"type":"boolean"}},"required":["digitalTwin"],"type":"object"},"interval":{"type":["string","null"]},"name":{"type":"string"},"renewsAt":{"format":"date-time","type":["string","null"]},"seats":{"description":"The seats of a Team plan sold by the seat: its owner and admins. Left out on any other plan.","type":"integer"},"status":{"type":"string"}},"required":["name","interval","amount","currency","status","renewsAt","cancelsAt","coupon"],"type":["object","null"]},"planUnread":{"description":"True when the payer has a plan but Stripe didn't respond. `plan` is then null, which doesn't mean the free plan.","type":"boolean"},"seats":{"description":"A team's member count against its plan's seats, shown to whoever can see its billing. Null for a personal account, or when the plan's seats can't be read.","properties":{"admins":{"properties":{"limit":{"minimum":0,"type":"integer"},"used":{"minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"},"guests":{"properties":{"limit":{"minimum":0,"type":"integer"},"used":{"minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"},"members":{"properties":{"limit":{"minimum":0,"type":"integer"},"used":{"minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"},"owners":{"properties":{"limit":{"minimum":0,"type":"integer"},"used":{"minimum":0,"type":"integer"}},"required":["used","limit"],"type":"object"}},"required":["owners","admins","members","guests"],"type":["object","null"]},"wallet":{"properties":{"autoTopUp":{"properties":{"amount":{"type":"number"},"enabled":{"type":"boolean"},"paymentMethodId":{"type":["string","null"]},"threshold":{"type":"number"}},"required":["enabled","threshold","amount","paymentMethodId"],"type":"object"},"credits":{"type":"number"},"freeCredits":{"type":"number"}},"required":["credits","freeCredits","autoTopUp"],"type":["object","null"]},"weather":{"description":"The payer's Weather API use this period. Requests made against the plan's limit, or the free allowance without a subscription. Null when it can't be read.","properties":{"allowed":{"minimum":0,"type":"integer"},"periodEnd":{"format":"date-time","type":"string"},"subscribed":{"type":"boolean"},"subscription":{"oneOf":[{"$ref":"#/components/schemas/BillingPlan"},{"type":"null"}]},"used":{"minimum":0,"type":"integer"}},"required":["subscribed","used","allowed","periodEnd","subscription"],"type":["object","null"]}},"required":["may","plan","planUnread","offers","wallet","cards","history","seats","weather","flood"],"type":"object"},"BillingPlan":{"description":"A subscription as a plan, with its price.","properties":{"amount":{"description":"In cents.","type":["integer","null"]},"cancelsAt":{"format":"date-time","type":["string","null"]},"coupon":{"description":"A coupon on the subscription. `amount` is the price before it.","properties":{"amountOff":{"description":"In cents.","type":["integer","null"]},"percentOff":{"type":["number","null"]}},"required":["percentOff","amountOff"],"type":["object","null"]},"currency":{"type":["string","null"]},"interval":{"type":["string","null"]},"name":{"type":"string"},"renewsAt":{"format":"date-time","type":["string","null"]},"status":{"type":"string"}},"required":["name","interval","amount","currency","status","renewsAt","cancelsAt","coupon"],"type":"object"},"Bounds":{"description":"West, south, east, north, in longitude and latitude.","items":{"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"BriefItem":{"properties":{"at":{"format":"date-time","type":"string"},"kind":{"enum":["Instrument","Regulatory","Public","Field","Billing"],"type":"string"},"target":{"$ref":"#/components/schemas/Target"},"text":{"type":"string"},"tone":{"enum":["accent","ok","warn","danger","pending"],"type":"string"}},"required":["kind","text","at","target"],"type":"object"},"CalibrationAttachment":{"properties":{"contentType":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"description":"Who added it. Null when no one is recorded.","oneOf":[{"$ref":"#/components/schemas/CalibrationAttachmentPerson"},{"type":"null"}]},"fileName":{"description":"The file's name as it downloads.","type":"string"},"id":{"format":"uuid","type":"string"},"modelId":{"format":"uuid","type":"string"},"name":{"description":"What the list calls it.","type":"string"},"note":{"type":["string","null"]},"purpose":{"description":"What it's for. dry and wet are shown with that calibration, qa is QA/QC.","enum":["dry","wet","qa","other"],"type":"string"},"sizeBytes":{"type":"integer"},"uploaded":{"description":"False while its bytes haven't been sent and completed; it can't be opened yet.","type":"boolean"},"uploadedAt":{"format":"date-time","type":["string","null"]}},"required":["id","modelId","purpose","name","note","fileName","contentType","sizeBytes","uploaded","uploadedAt","createdAt","createdBy"],"type":"object"},"CalibrationAttachmentPerson":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"CalibrationAttachments":{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/CalibrationAttachment"},"type":"array"}},"required":["attachments"],"type":"object"},"CalibrationDepthCheck":{"properties":{"dryEvents":{"type":"integer"},"drySetId":{"format":"uuid","type":["string","null"]},"meters":{"items":{"$ref":"#/components/schemas/DepthCheckMeter"},"type":"array"},"modelId":{"format":"uuid","type":"string"},"wetEvents":{"type":"integer"},"wetSetId":{"format":"uuid","type":["string","null"]}},"required":["modelId","drySetId","wetSetId","dryEvents","wetEvents","meters"],"type":"object"},"CalibrationEvent":{"properties":{"createdAt":{"format":"date-time","type":"string"},"endAt":{"format":"date-time","type":"string"},"gage":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"modelId":{"description":"The model the event belongs to. Null for an event with no model, which counts for every model of the project.","format":"uuid","type":["string","null"]},"note":{"type":["string","null"]},"ordinal":{"description":"The event's number in the survey.","type":["integer","null"]},"qa":{"additionalProperties":true,"description":"The event's QA/QC result, if checked. Contains checkedAt, weather, grade (good, usable, reject), score, checks, rain, and response or dry figures.","type":["object","null"]},"reported":{"additionalProperties":{"type":["number","null"]},"description":"The survey's figures, in the project's units (observedPeak, observedVolume, observedDepth, simulatedPeak, simulatedVolume, simulatedDepth, rainfallIn).","type":"object"},"role":{"enum":["calibration","validation"],"type":"string"},"setId":{"description":"The event set it is in.","format":"uuid","type":["string","null"]},"siteId":{"format":"uuid","type":"string"},"siteName":{"type":["string","null"]},"startAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"weather":{"enum":["wet","dry"],"type":"string"}},"required":["id","modelId","siteId","siteName","weather","role","ordinal","startAt","endAt","gage","reported","note","setId","qa","createdAt","updatedAt"],"type":"object"},"CalibrationEventRain":{"properties":{"figures":{"description":"Asked with `report`, when there are readings: the storm's figures over the window.","properties":{"antecedentDryDays":{"description":"Days from the last rain before the storm to its first. Null when none fell in the 14 days before.","type":["number","null"]},"averageIntensityInHr":{"description":"The total over the hours it rained. Null when it didn't rain.","type":["number","null"]},"durationHours":{"description":"From the first wet reading to the last, the last reading's interval included.","type":"number"},"peakIntensityInHr":{"description":"The wettest rolling hour's rain, in/hr; for a gauge read less often than hourly, its wettest reading as an hourly rate.","type":"number"},"returnPeriod":{"description":"How rare the storm's peak intensity was by NOAA Atlas 14 at the rain site: its wettest hour against the 60-minute row. Null when the site has no place, NOAA has no table for it, or the gage reads less often than hourly.","oneOf":[{"properties":{"duration":{"description":"NOAA's duration label it was read at, always 60-min.","type":"string"},"years":{"type":"number"}},"required":["years","duration"],"type":"object"},{"type":"null"}]},"totalIn":{"type":"number"}},"required":["totalIn","peakIntensityInHr","averageIntensityInHr","durationHours","returnPeriod","antecedentDryDays"],"type":"object"},"gaugeName":{"description":"Asked with `report`: the site the rain was read from.","type":"string"},"points":{"description":"Each reading as [epoch milliseconds, inches].","items":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"source":{"description":"Where the rain is from: the gage or the radar at the meter the QA/QC chose; `model` where it chose none, the model's own gage; and asked with `report`, `meter_gage` in place of `model`, the gage bound to the meter.","enum":["model","gage","radar_point","meter_gage"],"type":"string"},"stepSeconds":{"description":"The usual spacing between readings (the median gap), in seconds. Null with fewer than three readings.","type":["integer","null"]},"unit":{"enum":["in"],"type":"string"}},"required":["source","unit","stepSeconds","points"],"type":"object"},"CalibrationEventSet":{"properties":{"counts":{"properties":{"calibration":{"description":"Events marked to calibrate on.","type":"integer"},"dry":{"type":"integer"},"events":{"type":"integer"},"meters":{"type":"integer"},"storms":{"type":"integer"}},"required":["events","storms","dry","calibration","meters"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"modelId":{"format":"uuid","type":["string","null"]},"name":{"type":"string"},"origin":{"additionalProperties":true,"description":"Where the set came from, as stored (file and importedAt, copiedFrom, sentAt).","type":"object"},"source":{"description":"How the set was made: imported from a list (`POST /models/{modelId}/calibration-events/import`), sent from a flow analysis (`POST /models/{modelId}/calibration-events/send`), or entered by hand.","enum":["imported","monitoring","manual"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","modelId","name","source","origin","createdAt","updatedAt","counts"],"type":"object"},"CalibrationProposal":{"properties":{"applied":{"description":"The scenario the proposal was applied as, while that scenario exists.","properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["object","null"]},"changes":{"description":"The section changes that applying would write.","type":"integer"},"problems":{"description":"Problems that block applying the proposal.","items":{"type":"string"},"type":"array"},"proposals":{"items":{"properties":{"baseFitted":{"description":"Storm fit only. False when no storm fell in the base months, so the base set is left unchanged.","type":"boolean"},"conduitId":{"type":["string","null"]},"dry":{"properties":{"alpha":{"type":"number"},"alphaWanted":{"type":["number","null"]},"baseline":{"properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"],"type":"object"},"clamped":{"type":"boolean"},"heldCfs":{"description":"The dry-weather flow those nodes deliver at their fitted multipliers.","type":"number"},"infiltration":{"description":"The seasons as infiltration, flat through the day. Applying writes this instead of `monthly`. It adds an [INFLOWS] baseline at each of the meter's nodes under a MONTHLY pattern, and removes the MONTHLY pattern from their dry-weather rows. Absent without a name and twelve factors.","properties":{"cfs":{"description":"The wettest month's infiltration above the driest's.","type":"number"},"factors":{"description":"Each month's share of `cfs`, 0 to 1.","items":{"type":"number"},"maxItems":12,"minItems":12,"type":"array"},"name":{"type":"string"},"nodes":{"additionalProperties":{"type":"number"},"description":"Each node's share of `cfs`, used as its inflow baseline.","type":"object"},"referenceMonth":{"description":"The driest month, 1 to 12.","type":"number"}},"required":["name","cfs","factors","referenceMonth","nodes"],"type":"object"},"monthly":{"description":"The seasonal pattern. Applying writes one MONTHLY pattern and sets it on each of the meter's flow rows, in the slot of its existing monthly pattern or else its first empty slot. Absent without a name and twelve factors.","properties":{"factors":{"items":{"type":"number"},"maxItems":12,"minItems":12,"type":"array"},"name":{"type":"string"}},"required":["name","factors"],"type":"object"},"nodes":{"type":"integer"},"patterns":{"items":{"properties":{"dayType":{"type":"string"},"gamma":{"type":"number"},"name":{"type":["string","null"]},"shift":{"description":"Hours.","type":"number"},"volumeKept":{"type":["number","null"]}},"required":["name","dayType","gamma","shift","volumeKept"],"type":"object"},"type":"array"},"swmmCheck":{"additionalProperties":true,"description":"The dry day run through SWMM. For each day type, the peaking used (gammas) against the fit's (analyticalGammas), the daily peak error, whether it passed, and the number of runs.","type":"object"},"upstream":{"description":"Meters within this meter's reach whose nodes keep their own fit.","items":{"type":"string"},"type":"array"}},"required":["alpha","alphaWanted","clamped","baseline","nodes","patterns","upstream","heldCfs"],"type":"object"},"heldAcres":{"description":"Storm fit only. The sewer area those meters cover.","type":"number"},"hydrographs":{"items":{"properties":{"gage":{"type":["string","null"]},"month":{"description":"The month set the fit replaces.","type":["string","null"]},"name":{"type":"string"},"otherMonths":{"items":{"type":"string"},"type":"array"},"ratio":{"description":"The factor applied to R in the other month sets.","type":["number","null"]},"responses":{"description":"Null when the hydrograph is no longer in the model.","items":{"properties":{"from":{"$ref":"#/components/schemas/CalibrationRtk"},"label":{"type":"string"},"to":{"$ref":"#/components/schemas/CalibrationRtk"}},"required":["label","from","to"],"type":"object"},"type":["array","null"]},"seasons":{"description":"Seasons fitted on their own storms. Written as fitted, not scaled.","items":{"properties":{"label":{"type":"string"},"months":{"items":{"type":"integer"},"type":"array"},"responses":{"items":{"properties":{"from":{"$ref":"#/components/schemas/CalibrationRtk"},"label":{"type":"string"},"to":{"$ref":"#/components/schemas/CalibrationRtk"}},"required":["label","from","to"],"type":"object"},"type":"array"}},"required":["months","label","responses"],"type":"object"},"type":"array"}},"required":["name","responses","gage","month","otherMonths","ratio"],"type":"object"},"type":"array"},"passed":{"type":"integer"},"polished":{"description":"Whether the model was run to rescale the fit.","type":"boolean"},"scored":{"type":"integer"},"siteId":{"type":"string"},"storms":{"description":"Storm fit only. The size check for each storm.","items":{"additionalProperties":true,"type":"object"},"type":"array"},"subcatchments":{"description":"Subcatchment fit only. The point the meter settled on and each of its subcatchments' values now and after. Absent for any other fit.","properties":{"buckets":{"description":"The meter's buckets, in order.","items":{"properties":{"label":{"type":"string"},"names":{"items":{"type":"string"},"type":"array"}},"required":["label","names"],"type":"object"},"type":"array"},"method":{"description":"The infiltration method the study fitted with.","type":"string"},"missing":{"description":"Subcatchments the study moved that the model no longer has.","items":{"type":"string"},"type":"array"},"point":{"additionalProperties":{"type":"number"},"description":"The value each variable settled on, by key; a per-bucket one is key:bucket.","type":"object"},"rows":{"items":{"properties":{"fields":{"items":{"properties":{"field":{"type":"string"},"from":{"description":"The value now; null when there is none."},"section":{"enum":["subcatchments","groundwater"],"type":"string"},"to":{"description":"The value after; null clears it."}},"required":["section","field","from","to"],"type":"object"},"type":"array"},"method":{"description":"The subcatchment's infiltration method now.","type":"string"},"name":{"type":"string"},"switchedTo":{"description":"The method it switches to. Absent when it keeps its own.","type":"string"}},"required":["name","method","fields"],"type":"object"},"type":"array"},"stages":{"description":"What each stage (A to D) found and the runs it took, as the study reported it."},"switched":{"description":"How many subcatchments switch infiltration method.","type":"integer"}},"required":["point","method","buckets","stages","rows","missing","switched"],"type":"object"},"totalR":{"description":"Total R in the model now and as fitted. The current value comes from the base set of the first hydrograph found.","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"],"type":"object"},"upstream":{"description":"Storm fit only. Meters within this meter's reach whose hydrographs keep their own fit.","items":{"type":"string"},"type":"array"}},"required":["siteId","conduitId","totalR","hydrographs","passed","scored","polished","upstream","heldAcres"],"type":"object"},"type":"array"},"warnings":{"description":"Warnings from the study (clamped multipliers, peaking at its limit, nested meters).","items":{"type":"string"},"type":"array"}},"required":["proposals","problems","warnings","changes","applied"],"type":"object"},"CalibrationQaRun":{"properties":{"createdAt":{"format":"date-time","type":"string"},"currentStep":{"type":["string","null"]},"error":{"type":["string","null"]},"finishedAt":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"progress":{"type":["integer","null"]},"rainSource":{"enum":["best","gage","radar_point","radar_sewershed"],"type":"string"},"setId":{"description":"The set that was checked. Null for the whole register.","type":["string","null"]},"status":{"enum":["queued","running","completed","failed"],"type":"string"},"summary":{"additionalProperties":true,"description":"What the check found. Good, usable and reject counts, unchecked meters ({siteId, why}) and the radar used.","type":["object","null"]}},"required":["id","status","rainSource","setId","progress","currentStep","summary","error","createdAt","finishedAt"],"type":"object"},"CalibrationRecord":{"properties":{"appliedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"eventSetId":{"type":["string","null"]},"id":{"description":"Null for a finished study's meter not recorded yet.","format":"uuid","type":["string","null"]},"method":{"additionalProperties":true,"description":"How the values were found (analytical, swmmCheck, passed, scored, alphaClamped).","type":"object"},"modelId":{"format":"uuid","type":"string"},"modelVersion":{"type":["integer","null"]},"periodLabel":{"type":["string","null"]},"promotedAt":{"format":"date-time","type":["string","null"]},"scenarioId":{"format":"uuid","type":["string","null"]},"siteId":{"format":"uuid","type":"string"},"status":{"enum":["proposed","applied","in_model","superseded"],"type":"string"},"studyId":{"format":"uuid","type":"string"},"studyName":{"type":"string"},"supersededAt":{"format":"date-time","type":["string","null"]},"updatedAt":{"format":"date-time","type":"string"},"values":{"additionalProperties":true,"description":"Storms: r, t, k (and seasons). Dry weather: alpha, patterns, infiltration.","type":"object"},"verification":{"additionalProperties":true,"description":"Scorecards of runs of the record's scenario or version, combined event by event.","type":["object","null"]},"weather":{"enum":["wet","dry"],"type":"string"}},"required":["id","modelId","siteId","weather","periodLabel","studyId","studyName","eventSetId","values","method","verification","status","scenarioId","modelVersion","appliedAt","promotedAt","supersededAt","createdAt"],"type":"object"},"CalibrationRtk":{"properties":{"k":{"type":"number"},"r":{"type":"number"},"t":{"type":"number"}},"required":["r","t","k"],"type":"object"},"CalibrationScorecard":{"properties":{"criteria":{"additionalProperties":true,"type":"object"},"criteriaBase":{"description":"The standard the criteria are built on: US practice, or WaPUG (whose surcharged band and dry peak the card follows).","enum":["us","wapug"],"type":"string"},"criteriaName":{"type":"string"},"criteriaSetId":{"type":"string"},"flowUnits":{"type":"string"},"meters":{"description":"Each meter's storms, judged by the criteria's eventsOf rule (for example, two of every three pass), with its dry periods counted alongside.","items":{"properties":{"dry":{"type":"integer"},"dryPassed":{"type":"integer"},"eventsOf":{"items":{"type":"integer"},"maxItems":2,"minItems":2,"type":"array"},"pass":{"description":"Null while fewer storms are scored than the rule's first count.","type":["boolean","null"]},"siteId":{"format":"uuid","type":"string"},"siteName":{"type":"string"},"storms":{"type":"integer"},"stormsPassed":{"type":"integer"}},"required":["siteId","siteName","storms","stormsPassed","dry","dryPassed","eventsOf","pass"],"type":"object"},"type":"array"},"rows":{"items":{"$ref":"#/components/schemas/ScorecardRow"},"type":"array"},"runEnd":{"format":"date-time","type":"string"},"runStart":{"format":"date-time","type":"string"},"simulationId":{"format":"uuid","type":"string"},"simulationLabel":{"type":"string"},"skipped":{"items":{"properties":{"siteId":{"format":"uuid","type":"string"},"siteName":{"type":"string"},"why":{"description":"Why the meter wasn't scored at all.","type":"string"}},"required":["siteId","siteName","why"],"type":"object"},"type":"array"},"source":{"description":"What the run is based on. Its scenario, the calibration study the scenario was applied from (by tag), and the model version it ran.","properties":{"calibrationStudyId":{"format":"uuid","type":["string","null"]},"calibrationStudyName":{"type":["string","null"]},"modelVersion":{"type":["integer","null"]},"scenarioId":{"format":"uuid","type":["string","null"]},"scenarioName":{"type":["string","null"]}},"required":["scenarioId","scenarioName","calibrationStudyId","calibrationStudyName","modelVersion"],"type":"object"},"summary":{"properties":{"covered":{"type":"integer"},"events":{"type":"integer"},"meters":{"type":"integer"},"passed":{"type":"integer"},"scored":{"type":"integer"}},"required":["events","covered","scored","passed","meters"],"type":"object"},"uncovered":{"description":"Registered events outside the run's window. These have no measures.","items":{"$ref":"#/components/schemas/ScorecardRow"},"type":"array"}},"required":["simulationId","simulationLabel","criteriaSetId","criteriaName","criteriaBase","criteria","flowUnits","runStart","runEnd","rows","uncovered","skipped","meters","summary","source"],"type":"object"},"CalibrationStudy":{"properties":{"config":{"properties":{"afterHours":{"description":"Storms only. Hours after the last rain that each storm is scored through. Default 72.","type":"number"},"beforeHours":{"description":"Storms only. Hours before each window read for its baseline. Default 24.","type":"number"},"buckets":{"description":"Subcatchments only. How many buckets each meter's subcatchments are split into, by soil group or % impervious. Absent is 2.","maximum":3,"minimum":1,"type":"integer"},"budget":{"type":"integer"},"calibrationShare":{"type":"number"},"checkInSwmm":{"description":"Storms only. Whether each meter's fit is checked in SWMM.","type":"boolean"},"concurrency":{"type":"integer"},"criteriaSetId":{"description":"Null uses the set the project enforces.","type":["string","null"]},"engineVersion":{"description":"The SWMM version every trial runs on, from GET /engines. Absent uses the newest stable version available.","type":"string"},"eventSetId":{"description":"The event set the study fits.","type":["string","null"]},"fits":{"description":"Storms only. What the study fits: the RDII unit hydrographs (absent or hydrograph), or the subcatchments, in stages. For the subcatchments, budget is the most runs in all, at most 40.","enum":["hydrograph","subcatchments"],"type":"string"},"groundwater":{"description":"Subcatchments only. Whether the groundwater flow coefficient and exponent are searched.","type":"boolean"},"infiltration":{"description":"Subcatchments only. The infiltration method the study fits with; subcatchments on another method are switched to it.","enum":["HORTON","MODIFIED_HORTON","GREEN_AMPT","MODIFIED_GREEN_AMPT","CURVE_NUMBER"],"type":"string"},"meterBuckets":{"additionalProperties":{"maximum":3,"minimum":1,"type":"integer"},"description":"Subcatchments only. A meter's own bucket count, by sensor site id.","type":"object"},"method":{"enum":["grid","sampled"],"type":"string"},"nseFloor":{"type":"number"},"period":{"description":"The calibration period, in whole calendar years. Absent means all the data.","properties":{"fromYear":{"type":"integer"},"label":{"type":"string"},"toYear":{"type":"integer"}},"required":["label","fromYear","toYear"],"type":"object"},"rainSource":{"description":"Storms only. The model's gages, or each storm's QA/QC source.","enum":["model","qa"],"type":"string"},"shapeWeight":{"type":"number"},"splits":{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"description":"Flow splits observed in the field. For each manhole, each outlet's fraction.","type":"object"},"swmmTrials":{"description":"Maximum SWMM trials per meter.","type":"integer"}},"type":"object"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"type":["string","null"]},"endedAt":{"format":"date-time","type":["string","null"]},"error":{"type":["string","null"]},"eventIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"modelId":{"format":"uuid","type":"string"},"name":{"type":"string"},"perMeter":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/CalibrationStudySetting"},"type":"object"},"description":"A meter's own settings, by sensor site id.","type":"object"},"progress":{"type":["integer","null"]},"projectId":{"format":"uuid","type":"string"},"results":{"additionalProperties":true,"description":"The study's results. For each meter, the fitted parameters and each event's score.","type":["object","null"]},"runInputs":{"properties":{"boundarySetId":{"format":"uuid","type":["string","null"]},"inflowSetId":{"format":"uuid","type":["string","null"]},"modelStorms":{"items":{"type":"string"},"type":"array"},"periodId":{"format":"uuid","type":["string","null"]},"rainfallInputIds":{"items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object"},"siteIds":{"description":"The meters where the study's events are.","items":{"format":"uuid","type":"string"},"type":"array"},"startedAt":{"format":"date-time","type":["string","null"]},"status":{"enum":["draft","queued","starting","running","importing","completed","failed","cancelled"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"variables":{"additionalProperties":{"$ref":"#/components/schemas/CalibrationStudySetting"},"description":"Keyed by variable. Wet weather uses r1-r3, t1-t3, k1-k3, velocity, rScale and tShift. Dry weather uses alpha, gamma and shift. A subcatchment study uses imperv, width, nImperv, nPerv, sImperv and sPerv, its method's maxRate, minRate and decay (Horton), suction, ksat and imd (Green-Ampt) or cn (curve number), and gwFlow and gwExponent.","type":"object"},"weather":{"enum":["wet","dry"],"type":"string"}},"required":["id","projectId","modelId","name","status","weather","eventIds","siteIds","config","variables","perMeter","runInputs","results","progress","currentStep","error","createdAt","updatedAt","startedAt","endedAt"],"type":"object"},"CalibrationStudySetting":{"properties":{"held":{"type":["number","null"]},"hi":{"type":"number"},"lo":{"type":"number"},"step":{"type":"number"}},"type":"object"},"CalibrationSubcatchments":{"properties":{"doubleCounted":{"description":"Nodes a meter's subcatchments drain to that also have RDII.","items":{"type":"string"},"type":"array"},"groundwater":{"description":"Whether the model has [GROUNDWATER] rows.","type":"boolean"},"meters":{"items":{"properties":{"buckets":{"description":"The meter's buckets with 1, 2 and 3 asked for, in that order.","items":{"items":{"properties":{"label":{"type":"string"},"names":{"items":{"type":"string"},"type":"array"}},"required":["label","names"],"type":"object"},"type":"array"},"type":["array","null"]},"found":{"description":"False when the meter is bound to no pipe of this model.","type":"boolean"},"link":{"description":"The pipe the meter is bound to.","type":["string","null"]},"rdiiElsewhere":{"description":"Other nodes in its reach with RDII.","type":"integer"},"rdiiNodes":{"description":"Nodes its subcatchments drain to that also have RDII.","items":{"type":"string"},"type":"array"},"siteId":{"type":"string"},"subcatchments":{"description":"How many subcatchments it answers for.","type":"integer"},"upstream":{"description":"Meters inside its reach, whose subcatchments keep their own answer.","items":{"type":"string"},"type":"array"}},"required":["siteId","link","found","subcatchments","upstream","rdiiNodes","rdiiElsewhere"],"type":"object"},"type":"array"},"method":{"description":"The model's [OPTIONS] INFILTRATION, HORTON when it names none.","type":"string"},"methods":{"additionalProperties":{"type":"integer"},"description":"How many subcatchments use each infiltration method.","type":"object"},"metric":{"description":"SI flow units, so Green-Ampt's suction is in mm and conductivity in mm/h.","type":"boolean"}},"required":["method","metric","methods","groundwater","doubleCounted","meters"],"type":"object"},"Candidate":{"additionalProperties":true,"description":"A candidate project. A scenario of the model, with what the optimizer needs to choose it. Other stored fields, such as a water candidate's mains, are returned as stored.","properties":{"annualCost":{"description":"An operational project's yearly cost.","type":["number","null"]},"cost":{"description":"Capital cost in base-year dollars. For an operational project, its first-year cost. For an I/I candidate, the cost of its programs.","type":"number"},"dependsOn":{"description":"Groups that must be complete before it starts.","items":{"type":"string"},"type":"array"},"durationYears":{"maximum":30,"minimum":1,"type":"integer"},"earliestYear":{"type":["integer","null"]},"effects":{"additionalProperties":{"type":"number"},"description":"A desktop study's change per objective when this candidate is built alone, for example {\"buildingsFlooded\": -12}.","type":["object","null"]},"fund":{"description":"The fund that pays for it. Null means the general budget.","type":["string","null"]},"group":{"description":"The decision this is an alternative for. Its own name when it stands alone.","type":"string"},"ii":{"description":"An I/I reduction candidate's slice and percentages. Its cost and its RDII and hydrograph changes follow from them.","properties":{"nodes":{"description":"The RDII nodes it treats.","items":{"type":"string"},"type":"array"},"parcels":{"type":"number"},"perParcel":{"type":"number"},"privatePct":{"type":"number"},"publicCost":{"type":"number"},"publicPct":{"type":"number"}},"type":["object","null"]},"kind":{"enum":["capital","operational","ii_reduction","green","treatment","renewal"],"type":"string"},"mandatory":{"type":"boolean"},"name":{"description":"The scenario's name, made of the group and its option, for example \"North interceptor · 18 in\".","type":"string"},"note":{"type":["string","null"]},"option":{"description":"The alternative's name in its group. Null for a group of one.","type":["string","null"]},"renewal":{"description":"A condition renewal's yearly budget and how many years it runs.","properties":{"annualBudget":{"type":"number"},"indexed":{"type":"boolean"},"priority":{"properties":{"fromYear":{"type":["integer","null"]},"materials":{"items":{"type":"string"},"type":"array"}},"type":["object","null"]},"years":{"type":"integer"}},"type":["object","null"]},"riskProjectId":{"description":"The capital project this candidate delivers. Accepting a program writes that project's year.","type":["string","null"]},"scenarioId":{"format":"uuid","type":"string"}},"required":["scenarioId","name","group","option","kind","cost","annualCost","earliestYear","durationYears","dependsOn","mandatory","riskProjectId","fund","ii","renewal","note"],"type":"object"},"CellFlag":{"properties":{"fid":{"type":"integer"},"flagId":{"format":"uuid","type":"string"},"key":{"type":"string"}},"required":["fid","key","flagId"],"type":"object"},"Change":{"properties":{"count":{"description":"How many items like this the change covers.","minimum":1,"type":"integer"},"field":{"type":"string"},"from":{},"kind":{"enum":["set","create","delete","restore","move"],"type":"string"},"target":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["type","id","label"],"type":"object"},"to":{}},"required":["kind","target"],"type":"object"},"Charges":{"properties":{"charges":{"items":{"properties":{"amount":{"description":"In credits (dollars).","type":"number"},"from":{"description":"The first charge.","format":"date-time","type":"string"},"id":{"description":"The id of the machine, run, build or forecast. A forecast is charged for its ML cycles' GPU time.","type":"string"},"kind":{"type":"string","x-extensible-enum":["machine","run","build","forecast"]},"name":{"type":"string"},"project":{"type":["string","null"]},"to":{"description":"The last charge.","format":"date-time","type":"string"}},"required":["kind","id","name","project","amount","from","to"],"type":"object"},"type":"array"}},"required":["charges"],"type":"object"},"ChosenProgram":{"description":"The program chosen from the results, with its years, the rules it was sequenced under, and when it was accepted into capital projects.","properties":{"acceptedAt":{"format":"date-time","type":["string","null"]},"constraints":{"$ref":"#/components/schemas/OptimizerConstraints"},"frontierId":{"type":"string"},"schedule":{"items":{"properties":{"endYear":{"description":"Inclusive.","type":"integer"},"scenarioId":{"type":"string"},"startYear":{"type":"integer"}},"required":["scenarioId","startYear","endYear"],"type":"object"},"type":"array"}},"required":["frontierId","schedule","constraints","acceptedAt"],"type":"object"},"Classes":{"properties":{"classes":{"items":{"$ref":"#/components/schemas/StyleClass"},"type":"array"},"equalInterval":{"oneOf":[{"type":"integer"},{"type":"null"}]},"legendFormat":{"type":"string"},"legendPrecision":{"type":"integer"},"property":{"type":"string"},"propertyLegend":{"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","classes"],"type":"object"},"Collection":{"properties":{"counts":{"properties":{"mine":{"type":"integer"},"shared":{"type":"integer"},"trash":{"type":"integer"}},"required":["mine","shared","trash"],"type":"object"},"items":{"items":{"$ref":"#/components/schemas/CollectionItem"},"type":"array"},"kind":{"$ref":"#/components/schemas/CollectionKind"},"tab":{"enum":["mine","shared","trash"],"type":"string"}},"required":["kind","tab","items","counts"],"type":"object"},"CollectionItem":{"properties":{"center":{"$ref":"#/components/schemas/LngLat","description":"Where the item's map opens, for its list picture: a project's own, a field map's project, or the project a dashboard's map tile shows."},"id":{"type":"string"},"kind":{"enum":["project","dashboard","field-map","survey","machine"],"type":"string"},"layout":{"description":"A dashboard's tiles where they sit on its 12-column grid, for a sketch in the list. An interactive panel is its map beside its first tab's widgets, so positions can be fractional.","items":{"properties":{"color":{"description":"A header's or footer's background, as a hex color.","type":"string"},"h":{"type":"number"},"kind":{"enum":["header","footer","map","chart","number","table","text","other"],"type":"string"},"w":{"type":"number"},"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y","w","h","kind"],"type":"object"},"maxItems":40,"type":"array"},"locked":{"description":"A project its workspace's plan holds closed: past the Free plan's projects, or a team with no plan. It lists, with the status Locked, but can't be opened.","enum":["project_limit","no_plan"],"type":"string"},"meta":{"type":"string"},"name":{"type":"string"},"openedAt":{"format":"date-time","type":"string"},"questions":{"description":"The first questions of a survey's current version, for a sketch in the list.","items":{"properties":{"label":{"maxLength":80,"type":"string"},"type":{"type":"string"}},"required":["label","type"],"type":"object"},"maxItems":3,"type":"array"},"shared":{"properties":{"owner":{"description":"The email of the person who owns it. Absent when it belongs to a team.","type":"string"},"restriction":{"enum":["viewer","commenter","editor"],"type":"string"},"team":{"description":"The team the project or dashboard belongs to. Absent for a person's own.","type":"string"}},"required":["restriction"],"type":"object"},"status":{"$ref":"#/components/schemas/Tag"},"trashedAt":{"description":"When the item was moved to the trash (archived, for a field map or survey). Only on trash rows.","format":"date-time","type":"string"},"zoom":{"description":"The zoom that map opens at.","maximum":24,"minimum":0,"type":"integer"}},"required":["id","kind","name","meta","status"],"type":"object"},"CollectionKind":{"enum":["projects","dashboards","field-maps","surveys","machines"],"type":"string"},"Column":{"properties":{"key":{"type":"string"},"type":{"enum":["string","number","boolean","unknown"],"type":"string"}},"required":["key","type"],"type":"object"},"ColumnStats":{"properties":{"count":{"description":"Number of rows in the layer.","minimum":0,"type":"integer"},"distinct":{"description":"Distinct non-null values.","minimum":0,"type":"integer"},"empty":{"description":"Rows whose value is \"\".","minimum":0,"type":"integer"},"key":{"type":"string"},"missing":{"description":"Rows without the key, or null.","minimum":0,"type":"integer"},"numbers":{"properties":{"max":{"type":"number"},"mean":{"type":"number"},"min":{"type":"number"},"stddev":{"description":"Sample standard deviation. Absent for a single value.","type":"number"},"sum":{"type":"number"}},"required":["min","max","mean","sum"],"type":"object"},"type":{"enum":["string","number","boolean","unknown"],"type":"string"},"types":{"properties":{"boolean":{"minimum":0,"type":"integer"},"number":{"minimum":0,"type":"integer"},"other":{"description":"Objects and arrays.","minimum":0,"type":"integer"},"string":{"minimum":0,"type":"integer"}},"required":["string","number","boolean","other"],"type":"object"},"values":{"items":{"properties":{"count":{"minimum":1,"type":"integer"},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["value","count"],"type":"object"},"maxItems":100,"type":"array"}},"required":["key","type","count","missing","empty","types","distinct","values"],"type":"object"},"Content":{"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"importing":{"$ref":"#/components/schemas/ContentImporting"},"kind":{"$ref":"#/components/schemas/ContentKind"},"name":{"type":"string"},"projects":{"description":"Every project that has it, the trash and projects you don't see counted. It can be deleted at 0.","type":"integer"},"size":{"description":"The bytes its versions take, each once.","format":"int64","type":"integer"},"tags":{"description":"The words the Contents page filters it by, in the order set (content.tag).","items":{"type":"string"},"type":"array"},"updatedAt":{"format":"date-time","type":"string"},"usedIn":{"description":"The projects you see that have it, their trash left out.","items":{"$ref":"#/components/schemas/ContentUsedIn"},"type":"array"},"version":{"description":"Its latest version, which every project that has it shows.","type":"integer"}},"required":["id","kind","name","size","version","tags","createdAt","updatedAt","createdBy","usedIn","projects"],"type":"object"},"ContentDetail":{"allOf":[{"$ref":"#/components/schemas/Content"},{"properties":{"address":{"description":"A link's or a video's web address, its latest version's. Absent for any other kind.","type":"string"},"placements":{"description":"Each project's raster, service or note showing it, in the projects you see, the trash left out: what a file replacing it is sent against.","items":{"$ref":"#/components/schemas/ContentPlacement"},"type":"array"},"versions":{"description":"Newest first.","items":{"$ref":"#/components/schemas/ContentVersion"},"type":"array"}},"required":["versions","placements"],"type":"object"}]},"ContentImporting":{"description":"A layer or a raster being imported into a project now: added there first (content.place), or an earlier version restored (content.restore). Absent when none is.","properties":{"name":{"description":"The project's name, when you see it.","type":"string"},"projectId":{"format":"uuid","type":"string"},"version":{"description":"The earlier version being restored; absent when it is being added.","type":"integer"}},"required":["projectId"],"type":"object"},"ContentKind":{"enum":["raster","service","link","document","image","video","model_file","layer"],"type":"string"},"ContentPlacement":{"properties":{"id":{"description":"The project's row showing it.","format":"uuid","type":"string"},"projectId":{"format":"uuid","type":"string"}},"required":["projectId","id"],"type":"object"},"ContentUsedIn":{"properties":{"name":{"type":"string"},"projectId":{"format":"uuid","type":"string"}},"required":["projectId","name"],"type":"object"},"ContentVersion":{"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"format":"uuid","type":["string","null"]},"size":{"format":"int64","type":"integer"},"version":{"type":"integer"}},"required":["version","size","createdAt","createdBy"],"type":"object"},"Contents":{"properties":{"groups":{"description":"All the project's groups, including empty ones, lowest order first.","items":{"$ref":"#/components/schemas/Group"},"type":"array"},"imports":{"description":"Files being imported that haven't created anything yet, oldest first. Absent when there are none.","items":{"$ref":"#/components/schemas/Import"},"type":"array"},"layers":{"items":{"$ref":"#/components/schemas/Layer"},"type":"array"},"rasters":{"items":{"$ref":"#/components/schemas/Raster"},"type":"array"},"services":{"items":{"$ref":"#/components/schemas/Service"},"type":"array"}},"required":["groups","layers","rasters","services"],"type":"object"},"Crs":{"properties":{"authority":{"description":"Whose code srid is, shown before it, as ESRI:102698.","enum":["EPSG","ESRI"],"type":"string"},"name":{"description":"The name from its WKT, such as \"NAD83 / North Carolina (ftUS)\".","type":"string"},"srid":{"description":"The code: an EPSG code, or an ESRI code from 100000 up.","type":"integer"}},"required":["srid","name"],"type":"object"},"CustomAttribute":{"properties":{"choices":{"description":"For a choice, the allowed values in order.","items":{"type":"string"},"type":["array","null"]},"default":{"description":"The value written to elements without one when the attribute was added.","type":["string","number","null"]},"description":{"type":["string","null"]},"filled":{"description":"How many elements have a value.","type":"integer"},"key":{"description":"The key the value is stored under on each element.","type":"string"},"label":{"type":"string"},"type":{"enum":["number","text","date","choice"],"type":"string"},"unit":{"type":["string","null"]}},"required":["key","label","type","filled"],"type":"object"},"CustomAttributes":{"properties":{"layers":{"items":{"properties":{"attributes":{"items":{"$ref":"#/components/schemas/CustomAttribute"},"type":"array"},"engineKeys":{"description":"The fields the elements carry that aren't custom attributes.","items":{"type":"string"},"type":"array"},"features":{"description":"How many elements the layer has.","type":"integer"},"layerId":{"format":"uuid","type":"string"},"name":{"type":"string"},"role":{"description":"The layer's role in the model, such as junction or conduit.","type":"string"}},"required":["layerId","name","role","features","attributes","engineKeys"],"type":"object"},"type":"array"}},"required":["layers"],"type":"object"},"Customers":{"properties":{"allocation":{"additionalProperties":true,"description":"The last allocation (method, maxDistanceFt, minDiameterIn, at).","type":["object","null"]},"appliedAt":{"type":["string","null"]},"billing":{"additionalProperties":true,"description":"The last billing file's matches and summary.","type":["object","null"]},"check":{"description":"Unallocated customers and the farthest allocated ones, for review.","items":{"properties":{"distanceFt":{"type":["number","null"]},"id":{"type":"string"},"junction":{"type":["string","null"]}},"required":["id","junction","distanceFt"],"type":"object"},"type":"array"},"defaultPattern":{"type":["string","null"]},"demandOptions":{"additionalProperties":true,"description":"The patterns by category and the unbilled percent last written.","type":["object","null"]},"demandsCurrent":{"type":"boolean"},"distances":{"properties":{"max":{"type":["number","null"]},"within200":{"type":"number"},"within50":{"type":"number"},"within500":{"type":"number"}},"required":["within50","within200","within500","max"],"type":"object"},"imported":{"additionalProperties":true,"description":"Where the customers were imported from (from, at, count, layerName, idField).","type":["object","null"]},"layerId":{"format":"uuid","type":["string","null"]},"linesLayerId":{"format":"uuid","type":["string","null"]},"patterns":{"items":{"type":"string"},"type":"array"},"summary":{"properties":{"allocated":{"type":"integer"},"billedFlow":{"type":"number"},"byCategory":{"items":{"properties":{"category":{"type":"string"},"count":{"type":"integer"},"demand":{"type":"number"}},"required":["category","count","demand"],"type":"object"},"type":"array"},"customers":{"type":"integer"},"junctions":{"type":"integer"},"totalFlow":{"type":"number"},"totalGpd":{"type":"number"},"unallocated":{"type":"integer"},"unbilledFlow":{"type":"number"},"units":{"type":"string"}},"required":["customers","allocated","unallocated","junctions","billedFlow","unbilledFlow","totalFlow","totalGpd","units","byCategory"],"type":"object"},"units":{"description":"The model's flow units.","type":"string"}},"required":["layerId","linesLayerId","units","patterns","defaultPattern","summary","distances","imported","allocation","demandOptions","appliedAt","demandsCurrent","billing","check"],"type":"object"},"Dashboard":{"properties":{"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"private":{"description":"A team dashboard visible only to its creator and the team's owners and admins. A personal dashboard is always private.","type":"boolean"},"standing":{"description":"`owner`, a team role, or the grant it is shared with.","type":"string"},"teamId":{"description":"The team it belongs to. None for a personal dashboard.","format":"uuid","type":["string","null"]},"tiles":{"items":{"$ref":"#/components/schemas/DashboardTile"},"type":"array"},"version":{"description":"The stored layout's fingerprint (SHA-256 of its text). Send it as `was` in `POST /dashboards/{dashboardId}/edit`.","type":"string"}},"required":["id","name","description","createdAt","standing","teamId","private","version","tiles"],"type":"object"},"DashboardPanelTab":{"properties":{"bgColor":{"type":["string","null"]},"id":{"type":"string"},"layerId":{"description":"The layer the tab is bound to. This is the layer of its first table, chart or dropdown.","type":["string","null"]},"name":{"description":"Rich text (HTML): sanitize it before showing it.","type":"string"},"selectedLayers":{"description":"The layers the tab hides on the map, as saved by the project map widget."},"sourceKind":{"description":"Where the tab's map reads its forecasts from. Absent where the tab does not say, which reads as modeling.","enum":["contents","modeling","monitoring"],"type":"string"},"tiles":{"items":{"$ref":"#/components/schemas/DashboardTile"},"type":"array"}},"required":["id","name","bgColor","selectedLayers","layerId","tiles"],"type":"object"},"DashboardSeriesPoints":{"description":"Times and values. A gauge's times are in UTC, and a forecast's have no time zone. A null value is a gap.","properties":{"x":{"items":{"type":"string"},"type":"array"},"y":{"items":{"type":["number","null"]},"type":"array"}},"required":["x","y"],"type":"object"},"DashboardSource":{"properties":{"createdAt":{"format":"date-time","type":"string"},"forecast":{"description":"The scheduled forecast whose cycle made a run, by name; none for an event run.","type":["string","null"]},"id":{"description":"The source id used by tiles, simulation:<id> or forecast:<id>.","type":"string"},"kind":{"enum":["simulation","forecast"],"type":"string"},"label":{"type":"string"},"model":{"description":"The model that made a run, by name; none for a forecast, or a run no model made.","type":["string","null"]},"projectId":{"format":"uuid","type":"string"},"selectable":{"description":"Whether a dashboard can use the source. True for a completed run or a playable forecast.","type":"boolean"},"state":{"enum":["queued","starting","running","done","failed"],"type":"string"},"timezone":{"description":"The project's time zone. Times are shown in it where the viewer chose it.","type":["string","null"]}},"required":["id","kind","label","createdAt","projectId","timezone","state","selectable","model","forecast"],"type":"object"},"DashboardTile":{"properties":{"h":{"type":"integer"},"id":{"type":"string"},"props":{"additionalProperties":true,"type":"object"},"tabs":{"description":"An interactive panel's tabs. A nested tile's id is `panel~tab~cell`.","items":{"$ref":"#/components/schemas/DashboardPanelTab"},"type":"array"},"unreadable":{"type":"boolean"},"w":{"type":"integer"},"widget":{"description":"The tile's kind, such as TextWidget. Null when the cell can't be read.","type":["string","null"]},"x":{"type":"integer"},"y":{"type":"integer"}},"required":["id","x","y","w","h","widget","props","unreadable"],"type":"object"},"DashboardTileData":{"properties":{"awaiting":{"description":"A chart in a tab with nothing selected. Nothing was read.","type":"boolean"},"boundary":{"description":"The time where observation ends and forecast begins, without a time zone.","type":"string"},"chart":{"description":"The chart's saved Plotly chart type.","enum":["bar","pie","scatter"],"type":"string"},"choices":{"description":"For a chart in a tab, the values of the column its groups map to on the tab's layer, each with its features and label, for choosing a group. A chart that reads Monitoring lists the project's sensors instead, each with its network as `secondary`.","items":{"properties":{"fids":{"items":{"type":"integer"},"type":"array"},"forecast":{"description":"A Monitoring sensor has a forecast that ended well. These come first.","type":"boolean"},"secondary":{"type":["string","null"]},"sensor":{"description":"A Monitoring sensor, where it is on the map: <layerId>:<fid>.","type":"string"},"value":{"type":"string"}},"required":["value","secondary","fids"],"type":"object"},"type":["array","null"]},"columns":{"items":{"type":"string"},"type":"array"},"cutoff":{"description":"A forecast's first forecast time, without a time zone.","type":"string"},"end":{"type":["number","null"]},"extra":{"oneOf":[{"$ref":"#/components/schemas/DashboardSeriesPoints"},{"type":"null"}]},"forecast":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"gauge":{"additionalProperties":true,"description":"An NWS river gauge's record from NWPS.","type":"object"},"group":{"description":"The group drawn.","type":["string","null"]},"groups":{"description":"Every group in the series' group column, in natural order.","items":{"type":"string"},"type":"array"},"historicalForecast":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"kind":{"enum":["statistic","indicator","table","chart","series","options","gauge","stormwatch","forecast","simulation","gone","unsupported"],"type":"string"},"layerName":{"description":"A KPI's or table's layer name. Null when the layer was deleted.","type":["string","null"]},"location":{"description":"A forecast's location, the inference's attribute.","type":"string"},"lower":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"metric":{"description":"A forecast's metric: depth from a radar sensor, else flow.","enum":["Flow","Depth"],"type":"string"},"missing":{"description":"Why a gauge has no chart: NWPS doesn't know it, or didn't respond.","type":"string"},"monitoring":{"description":"A table that reads Monitoring: its columns are `source`, `site`, `kind`, `measures` and `qa`, codes the app words, and each row is a sensor of the project. Also a select dropdown that reads Monitoring: its options are the project's source headers, the networks its sensors are from (`iot-ads`, `iot-fcs`…).","type":"boolean"},"node":{"description":"A simulated layer chart's node, the group its files are read for.","type":"string"},"observed":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"options":{"description":"A dropdown's values of its column over the whole layer (at most 2,000), in case-insensitive order. Each has its features and the first non-blank value of the secondary column among them.","items":{"properties":{"fids":{"items":{"type":"integer"},"type":"array"},"secondary":{"type":["string","null"]},"value":{"type":"string"}},"required":["value","secondary","fids"],"type":"object"},"type":"array"},"page":{"minimum":0,"type":"integer"},"pageSize":{"minimum":1,"type":"integer"},"points":{"description":"A chart's statistic per category, with bars and lines in label order (numbers as numbers).","items":{"properties":{"label":{"type":"string"},"value":{"type":"number"}},"required":["label","value"],"type":"object"},"type":"array"},"rain":{"description":"A Storm Watch gauge's rain in inches, when requested and the gauge has it.","properties":{"x":{"items":{"type":"string"},"type":"array"},"y":{"items":{"type":"number"},"type":"array"}},"type":["object","null"]},"rainForecast":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"rainHistorical":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"rainMissing":{"description":"Rain was requested and the gauge has none.","type":"boolean"},"rainObserved":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"rows":{"items":{"properties":{"fid":{"type":"integer"},"properties":{"additionalProperties":true,"type":"object"},"sensor":{"description":"A Monitoring row's sensor, where it is on the map: <layerId>:<fid>. A fid alone is its layer's.","type":"string"}},"required":["fid","properties"],"type":"object"},"type":"array"},"runs":{"description":"The project's forecasts for a dropdown, each by its latest run, newest first, at most 50.","items":{"properties":{"at":{"description":"When its latest run was made.","type":"string"},"id":{"description":"The forecast, by its parent inference.","format":"uuid","type":"string"}},"required":["id","at"],"type":"object"},"type":"array"},"secondary":{"description":"A time series' secondary traces, each from its own file (its first group). `index` is its position in the saved traces, whose settings style it.","items":{"properties":{"index":{"minimum":0,"type":"integer"},"kind":{"enum":["line","bar"],"type":"string"},"name":{"type":"string"},"x":{"items":{"type":"string"},"type":"array"},"y":{"items":{"type":["number","null"]},"type":"array"}},"required":["index","kind","name","x","y"],"type":"object"},"type":"array"},"selected":{"description":"A simulated layer chart's selected option: the selected label, else the selected feature's own. None while nothing is selected.","type":["string","null"]},"sensor":{"description":"A Monitoring KPI's or indicator's sensor, by name: the one picked in the panel, else the one it was built on.","type":["string","null"]},"series":{"description":"A time series' lines from its uploaded file, each in time order. A null value is a gap.","items":{"properties":{"name":{"type":"string"},"x":{"items":{"description":"A time as written in the file, without a time zone. A time with an offset is converted to UTC.","type":"string"},"type":"array"},"y":{"items":{"type":["number","null"]},"type":"array"}},"required":["name","x","y"],"type":"object"},"type":"array"},"simulation":{"additionalProperties":true,"description":"The run a simulated layer chart reads, the project's latest completed flood forecast.","type":"object"},"stage":{"description":"A Storm Watch gauge's stage in feet, with times as written in the file (US Central) and values.","properties":{"x":{"items":{"type":"string"},"type":"array"},"y":{"items":{"type":"number"},"type":"array"}},"required":["x","y"],"type":"object"},"start":{"type":["number","null"]},"station":{"additionalProperties":true,"description":"A Storm Watch gauge's code, name, file fetch time, and web page.","type":"object"},"thresholdValues":{"description":"The selected features' values of the threshold line's column.","items":{"type":"number"},"type":"array"},"thresholds":{"description":"A Storm Watch gauge's thresholds, highest first.","items":{"properties":{"color":{"type":"string"},"description":{"type":"string"},"label":{"type":"string"},"unit":{"type":"string"},"value":{"type":"number"}},"required":["label","value","unit","description","color"],"type":"object"},"type":"array"},"total":{"minimum":0,"type":"integer"},"truncated":{"description":"There are more categories than a chart returns (500).","type":"boolean"},"upper":{"$ref":"#/components/schemas/DashboardSeriesPoints"},"value":{"type":["number","null"]},"window":{"description":"A forecast's window, from `36h` to `All`.","type":"string"}},"required":["kind"],"type":"object"},"DeliveryDatabase":{"additionalProperties":false,"properties":{"error":{"description":"Why it could not be read.","type":["string","null"]},"inspections":{"minimum":0,"type":"integer"},"media":{"description":"Videos and photos the delivery holds.","minimum":0,"type":"integer"},"mediaMissing":{"description":"Media it names that the delivery lacks.","minimum":0,"type":"integer"},"notes":{"description":"What was left out of an inspection, and why.","items":{"type":"string"},"type":"array"},"observations":{"minimum":0,"type":"integer"},"path":{"description":"Where it is in the delivery.","type":"string"},"standards":{"items":{"enum":["pacp","macp","lacp"],"type":"string"},"type":"array"}},"required":["path","standards","inspections","observations","media","mediaMissing","notes","error"],"type":"object"},"Dependents":{"properties":{"inspections":{"minimum":0,"type":"integer"},"maintenance":{"minimum":0,"type":"integer"},"riskModels":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"roles":{"items":{"enum":["source","context"],"type":"string"},"type":"array"}},"required":["id","name","roles"],"type":"object"},"type":"array"},"scoredRuns":{"minimum":0,"type":"integer"},"simulations":{"minimum":0,"type":"integer"}},"required":["riskModels","inspections","maintenance","scoredRuns","simulations"],"type":"object"},"DepthCheckBand":{"properties":{"areaRatio":{"description":"The flow's area (Q/V) over the circle's at the observed depth.","type":"number"},"band":{"enum":["dry","low","mid","high","wetTop"],"type":"string"},"flowCfs":{"type":"number"},"gapFt":{"description":"Observed less normal depth.","type":"number"},"nNeeded":{"description":"The n the observed velocity and depth need on the clean section.","type":"number"},"nNeededSilt":{"type":["number","null"]},"normalFt":{"description":"The clean pipe's normal depth with the model's n and slope.","type":"number"},"normalSiltFt":{"type":["number","null"]},"observedFt":{"type":"number"},"readings":{"type":"integer"},"siltFt":{"description":"The silt depth that closes the area.","type":"number"},"siltShare":{"description":"The share of the gap the fitted silt explains.","type":["number","null"]}},"required":["band","readings","flowCfs","observedFt","normalFt","gapFt","areaRatio","siltFt","nNeeded","normalSiltFt","nNeededSilt","siltShare"],"type":"object"},"DepthCheckEvent":{"properties":{"band":{"description":"The event's medians: every reading of a dry event, a storm's top 10 % by flow below the crown. Null under 12 readings.","oneOf":[{"$ref":"#/components/schemas/DepthCheckBand"},{"type":"null"}]},"endAt":{"format":"date-time","type":"string"},"eventId":{"format":"uuid","type":"string"},"readings":{"description":"Readings with flow, depth and velocity.","type":"integer"},"startAt":{"format":"date-time","type":"string"},"surcharge":{"oneOf":[{"$ref":"#/components/schemas/DepthCheckSurcharge"},{"type":"null"}]},"weather":{"type":"string"}},"required":["eventId","weather","startAt","endAt","readings","band","surcharge"],"type":"object"},"DepthCheckMeter":{"properties":{"causes":{"description":"What may make the model's depth miss the meter's: the dry verdict's silt, backwater or roughness; a reading point at the other end of the pipe; a storm surcharged from downstream; a meter under-reading in backwater. noBias alone when none and the dry depth matches.","items":{"enum":["noBias","silt","backwater","roughness","readingPoint","surchargedDownstream","underReadsInBackwater"],"type":"string"},"type":"array"},"checked":{"oneOf":[{"$ref":"#/components/schemas/DepthCheckResult"},{"type":"null"}]},"dryReadings":{"description":"Dry readings with flow, depth and velocity the check used.","type":"integer"},"events":{"description":"Each of the meter's events read, dry and storm, in time order.","items":{"$ref":"#/components/schemas/DepthCheckEvent"},"type":"array"},"pipe":{"oneOf":[{"$ref":"#/components/schemas/DepthCheckPipe"},{"type":"null"}]},"readingPoint":{"oneOf":[{"$ref":"#/components/schemas/DepthCheckReadingPoint"},{"type":"null"}]},"siteId":{"format":"uuid","type":"string"},"siteName":{"type":"string"},"skipped":{"enum":["unbound","noPipe","notCircular","noGeometry","noVelocity","noReadings","fewReadings","units",null],"type":["string","null"]},"wetReadings":{"type":"integer"},"why":{"description":"The English for `skipped`.","type":["string","null"]}},"required":["siteId","siteName","pipe","dryReadings","wetReadings","skipped","why","checked","readingPoint","events","causes"],"type":"object"},"DepthCheckPipe":{"properties":{"diameterFt":{"type":["number","null"]},"downstreamInvertFt":{"type":["number","null"]},"lengthFt":{"type":["number","null"]},"link":{"type":"string"},"roughness":{"type":["number","null"]},"shape":{"type":"string"},"slope":{"description":"From the end inverts, at least 1e-5.","type":["number","null"]},"upstreamInvertFt":{"type":["number","null"]}},"required":["link","shape","diameterFt","roughness","lengthFt","upstreamInvertFt","downstreamInvertFt","slope"],"type":"object"},"DepthCheckReadingPoint":{"properties":{"along":{"description":"How far along the pipe's drawn line the meter sits: 0 at its upstream end, 1 at its downstream. Null when either isn't drawn or the meter is more than 100 ft off the line.","type":["number","null"]},"depthAt":{"description":"Where the model's depth is read on the pipe.","enum":["downstream","upstream","average","manhole"],"type":"string"},"mismatch":{"description":"The model's depth is read at the other end from the meter.","type":"boolean"},"offPipeFt":{"description":"The meter's distance from the pipe's line.","type":["number","null"]},"sensorEnd":{"enum":["upstream","downstream",null],"type":["string","null"]}},"required":["depthAt","along","offPipeFt","sensorEnd","mismatch"],"type":"object"},"DepthCheckResult":{"properties":{"curve":{"properties":{"doubleNFt":{"items":{"type":["number","null"]},"type":"array"},"flowCfs":{"items":{"type":"number"},"type":"array"},"normalFt":{"items":{"type":["number","null"]},"type":"array"},"siltFt":{"items":{"type":["number","null"]},"type":["array","null"]}},"required":["flowCfs","normalFt","doubleNFt","siltFt"],"type":"object"},"dry":{"$ref":"#/components/schemas/DepthCheckBand"},"observed":{"properties":{"bins":{"items":{"properties":{"depthFt":{"type":"number"},"flowCfs":{"type":"number"},"readings":{"type":"integer"},"wet":{"type":"boolean"}},"required":["flowCfs","depthFt","readings","wet"],"type":"object"},"type":"array"},"dryPoints":{"description":"A thin sample of the dry readings, each [flow cfs, depth ft].","items":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"wetPoints":{"items":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"}},"required":["bins","dryPoints","wetPoints"],"type":"object"},"reason":{"description":"The verdict's reason in English.","type":"string"},"siltFt":{"description":"The fitted silt depth, when the flow area is short.","type":["number","null"]},"siltStable":{"type":"boolean"},"thirds":{"description":"The dry readings' low, mid and high thirds by flow.","items":{"$ref":"#/components/schemas/DepthCheckBand"},"type":"array"},"verdict":{"enum":["noLowBias","silt","backwater","roughness","siltBackwater","unclear"],"type":"string"},"wetTop":{"oneOf":[{"$ref":"#/components/schemas/DepthCheckBand"},{"type":"null"}]}},"required":["verdict","reason","dry","thirds","wetTop","siltFt","siltStable","curve","observed"],"type":"object"},"DepthCheckSurcharge":{"description":"A storm's readings above the pipe's crown, and what the meter's velocity did meanwhile.","properties":{"flowAtPeakCfs":{"type":["number","null"]},"jumps":{"description":"Changes of more than 1 ft/s from one surcharged reading to the next.","type":"integer"},"minutes":{"type":"number"},"missingVelocity":{"type":"integer"},"peakDepthFt":{"type":"number"},"peakRatio":{"description":"Peak depth over the pipe's diameter.","type":"number"},"readings":{"type":"integer"},"stalled":{"description":"Surcharged readings at or below 0.05 ft/s.","type":"integer"},"underReads":{"description":"Median velocity under 2 ft/s while surcharged and less flow than upstream.","type":"boolean"},"upstream":{"description":"The meters directly upstream, their flow summed over this meter's surcharged readings, beside its own.","properties":{"flowCfs":{"type":"number"},"ownFlowCfs":{"type":"number"},"readings":{"type":"integer"},"sites":{"items":{"type":"string"},"type":"array"}},"required":["sites","readings","flowCfs","ownFlowCfs"],"type":["object","null"]},"velocity":{"description":"Suspect: a stalled reading, two or more jumps, or velocity missing for half the surcharge.","enum":["holds","suspect"],"type":"string"},"velocityAtCrownFts":{"type":["number","null"]},"velocityAtPeakFts":{"type":["number","null"]},"velocityMaxFts":{"type":["number","null"]},"velocityMedianFts":{"type":["number","null"]},"velocityMinFts":{"type":["number","null"]}},"required":["readings","minutes","peakDepthFt","peakRatio","velocityAtCrownFts","velocityAtPeakFts","velocityMinFts","velocityMaxFts","velocityMedianFts","stalled","jumps","missingVelocity","flowAtPeakCfs","velocity","upstream","underReads"],"type":"object"},"DesignConditions":{"properties":{"averageHour":{"properties":{"hour":{"type":"number"},"multiplier":{"type":"number"},"pattern":{"type":"string"}},"required":["hour","multiplier","pattern"],"type":["object","null"]},"billing":{"properties":{"avgDayGpd":{"type":"number"},"customers":{"type":"integer"},"maxDayGpd":{"type":"number"},"sample":{"type":"boolean"}},"required":["avgDayGpd","maxDayGpd","customers","sample"],"type":["object","null"]},"durationHours":{"type":["number","null"]},"factor":{"type":"number"},"factorSource":{"description":"billing: the customers' billed max day over their average day. saved: the Max day scenario's demand multiplier. default: 1.5.","enum":["billing","saved","default"],"type":"string"},"fireflowAtMaxDay":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"],"type":["object","null"]},"latest":{"properties":{"averageDay":{"$ref":"#/components/schemas/DesignSimulation"},"createdAt":{"format":"date-time","type":"string"},"maxDay":{"$ref":"#/components/schemas/DesignSimulation"},"name":{"type":"string"},"runId":{"format":"uuid","type":"string"}},"required":["runId","name","createdAt","averageDay","maxDay"],"type":["object","null"]},"scenario":{"properties":{"id":{"format":"uuid","type":"string"},"multiplier":{"type":["number","null"]},"name":{"type":"string"}},"required":["id","name","multiplier"],"type":["object","null"]}},"required":["factor","factorSource","billing","durationHours","scenario","latest","fireflowAtMaxDay","averageHour"],"type":"object"},"DesignSimulation":{"properties":{"simulationId":{"format":"uuid","type":["string","null"]},"status":{"type":["string","null"]}},"required":["simulationId","status"],"type":"object"},"DiagnosisElement":{"properties":{"bbox":{"items":{"type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"fid":{"type":"integer"},"layerId":{"format":"uuid","type":["string","null"]},"name":{"type":"string"},"role":{"type":"string"}},"required":["role","name","layerId","fid","bbox"],"type":"object"},"DriveConnections":{"properties":{"drives":{"items":{"properties":{"configured":{"type":"boolean"},"connected":{"type":"boolean"},"connectedAt":{"format":"date-time","type":["string","null"]},"email":{"type":["string","null"]},"provider":{"enum":["google_drive","dropbox","onedrive"],"type":"string"}},"required":["provider","configured","connected","email","connectedAt"],"type":"object"},"type":"array"},"picker":{"properties":{"apiKey":{"type":"string"},"appId":{"type":["string","null"]},"clientId":{"type":"string"}},"required":["apiKey","appId","clientId"],"type":["object","null"]}},"required":["drives","picker"],"type":"object"},"DriveListing":{"properties":{"files":{"items":{"properties":{"driveId":{"type":["string","null"]},"id":{"type":"string"},"modifiedAt":{"type":["string","null"]},"name":{"type":"string"},"path":{"type":"string"},"size":{"type":["integer","null"]}},"required":["id","name","path"],"type":"object"},"type":"array"},"folders":{"items":{"properties":{"driveId":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"}},"required":["id","name","path"],"type":"object"},"type":"array"},"more":{"type":"boolean"}},"required":["folders","files","more"],"type":"object"},"DryWeatherFigures":{"properties":{"addf":{"type":["number","null"]},"days":{"type":"integer"},"dpf":{"type":["number","null"]},"hgwf":{"type":["number","null"]},"lgwf":{"type":["number","null"]},"mddf":{"type":["number","null"]},"pddf":{"type":["number","null"]}},"required":["days","addf","mddf","pddf","dpf","lgwf","hgwf"],"type":["object","null"]},"DryWeatherPattern":{"properties":{"count":{"items":{"type":"integer"},"type":"array"},"mean":{"items":{"type":["number","null"]},"type":"array"},"std":{"items":{"type":["number","null"]},"type":"array"}},"required":["mean","std","count"],"type":["object","null"]},"DryWeatherResult":{"properties":{"days":{"properties":{"byDay":{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},"dropped":{"items":{"properties":{"day":{"type":"string"},"group":{"enum":["weekday","weekend"],"type":"string"},"reason":{"type":"string"}},"required":["day","reason","group"],"type":"object"},"type":"array"},"dry":{"items":{"type":"string"},"type":"array"},"holidays":{"items":{"type":"string"},"type":"array"},"inRecord":{"type":"integer"},"weekday":{"items":{"type":"string"},"type":"array"},"weekend":{"items":{"type":"string"},"type":"array"}},"required":["inRecord","dry","weekday","weekend","dropped","holidays"],"type":"object"},"figures":{"properties":{"combined":{"$ref":"#/components/schemas/DryWeatherFigures"},"weekday":{"$ref":"#/components/schemas/DryWeatherFigures"},"weekend":{"$ref":"#/components/schemas/DryWeatherFigures"}},"required":["weekday","weekend","combined"],"type":"object"},"gwi":{"properties":{"estimates":{"properties":{"kcmo":{"type":["number","null"]},"minimum":{"type":["number","null"]},"mitchell":{"type":["number","null"]},"stevens_schutzbach":{"type":["number","null"]},"wastewater_production":{"type":["number","null"]}},"required":["minimum","wastewater_production","stevens_schutzbach","mitchell","kcmo"],"type":"object"},"method":{"$ref":"#/components/schemas/SensorGwiMethod"},"value":{"type":["number","null"]}},"required":["method","value","estimates"],"type":"object"},"gwiByMonth":{"additionalProperties":{"type":["number","null"]},"type":["object","null"]},"meterUnit":{"type":"string"},"multipliers":{"properties":{"byDay":{"items":{"items":{"type":["number","null"]},"type":["array","null"]},"type":"array"},"daily":{"items":{"type":["number","null"]},"type":["array","null"]},"weekday":{"items":{"type":["number","null"]},"type":["array","null"]},"weekend":{"items":{"type":["number","null"]},"type":["array","null"]}},"required":["weekday","weekend"],"type":"object"},"pattern":{"properties":{"byDay":{"items":{"$ref":"#/components/schemas/DryWeatherPattern"},"type":"array"},"weekday":{"$ref":"#/components/schemas/DryWeatherPattern"},"weekend":{"$ref":"#/components/schemas/DryWeatherPattern"}},"required":["weekday","weekend"],"type":"object"},"problem":{"type":["string","null"]},"qaProblem":{"description":"Why the dry windows could not be checked, when they could not.","type":["string","null"]},"slotMinutes":{"type":"number"},"slots":{"items":{"type":"number"},"type":"array"},"timeZone":{"type":"string"},"unit":{"enum":["MGD"],"type":"string"},"windowChecks":{"description":"The windows made by the dry days, as sent to calibration, each with its calibration check. Absent on analyses run before the check existed.","items":{"properties":{"endAt":{"type":"number"},"qa":{"$ref":"#/components/schemas/WetWeatherEventQa"},"startAt":{"type":"number"}},"required":["startAt","endAt","qa"],"type":"object"},"type":"array"}},"required":["unit","meterUnit","timeZone","slotMinutes","slots","days","pattern","figures","gwi","problem"],"type":"object"},"EndedMachine":{"properties":{"cost":{"type":"number"},"cpus":{"type":"number"},"endedAt":{"format":"date-time","type":"string"},"endedBy":{"description":"Who deleted the machine, when a user did.","oneOf":[{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"},{"type":"null"}]},"gpuCount":{"type":"integer"},"gpuModel":{"type":["string","null"]},"hours":{"description":"Hours from creation to end.","type":"number"},"id":{"format":"uuid","type":"string"},"location":{"type":"string"},"name":{"type":"string"},"offerId":{"description":"The offer the machine was made from, for deploying again. Null when it wasn't stored.","type":["string","null"]},"pricePerHour":{"description":"Dollars an hour, markup included.","type":"number"},"ramGb":{"type":"number"},"reason":{"enum":["deleted","timer","wallet","failed","no_owner","vanished",null],"type":["string","null"]},"startedAt":{"format":"date-time","type":"string"},"startedBy":{"oneOf":[{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"},{"type":"null"}]},"storageGb":{"type":"number"}},"required":["id","name","location","cpus","ramGb","storageGb","gpuModel","gpuCount","startedAt","endedAt","hours","pricePerHour","cost","reason","startedBy","endedBy","offerId"],"type":"object"},"Engine":{"properties":{"defaultVersion":{"description":"The version a run uses when it names none. The newest stable version, or a pinned one (HEC-RAS 7.0.1).","type":"string"},"type":{"description":"swmm, epanet or hec_ras. A model's engine names HEC-RAS hecras.","enum":["swmm","epanet","hec_ras"],"type":"string"},"versions":{"description":"Oldest first.","items":{"properties":{"stage":{"description":"A preview version runs only when requested by name, and is never the default.","enum":["stable","preview"],"type":"string"},"version":{"description":"Such as 5.2.4, 6.0.0-alpha.4 or 7.0.1.","type":"string"}},"required":["version","stage"],"type":"object"},"type":"array"}},"required":["type","versions","defaultVersion"],"type":"object"},"Feature":{"properties":{"bbox":{"description":"West, south, east, north. Absent for an empty geometry.","items":{"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"fid":{"type":"integer"},"geometry":{"additionalProperties":true,"description":"GeoJSON geometry.","type":"object"},"properties":{"additionalProperties":true,"type":"object"},"shapeVersion":{"description":"The md5 of the stored shape's EWKB. A save that moves the shape sends it as wasShape and is refused if the shape changed since.","pattern":"^[0-9a-f]{32}$","type":"string"},"version":{"description":"The row's version, as returned with a page of rows. A delete sends it as wasVersion. The delete is refused if the row changed since or another feature has taken its fid.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["fid","properties","geometry","shapeVersion","version"],"type":"object"},"FeatureClasses":{"properties":{"breaks":{"description":"Class breaks in ascending order, one more than the number of classes. Computed breaks run from min to max and are empty when no row has a number. Manual breaks are returned as given.","items":{"type":"number"},"type":"array"},"counts":{"description":"Rows in each class.","items":{"minimum":0,"type":"integer"},"type":"array"},"exact":{"description":"False when natural breaks were found over a histogram of the values.","type":"boolean"},"histogram":{"description":"The values in 20 equal bins from min to max. One bin when all values are equal.","properties":{"counts":{"items":{"minimum":0,"type":"integer"},"type":"array"},"max":{"type":"number"},"min":{"type":"number"}},"required":["min","max","counts"],"type":"object"},"key":{"type":"string"},"max":{"oneOf":[{"type":"number"},{"type":"null"}]},"method":{"enum":["equal","quantile","jenks","manual"],"type":"string"},"min":{"oneOf":[{"type":"number"},{"type":"null"}]},"missing":{"description":"Rows whose value is not a number.","minimum":0,"type":"integer"},"n":{"description":"Rows whose value is a number.","minimum":0,"type":"integer"}},"required":["key","method","n","missing","min","max","breaks","counts","histogram","exact"],"type":"object"},"FeatureCopyJobReport":{"description":"What a copy of features into a layer did, once it is done (layer.features.copy): the features it copied, those made by splitting multipart shapes, those whose shape the layer doesn't take, the values that didn't fit their column's type and were left blank, the features renamed because their name was taken and those named because they had none, a model's link ends found by name, snapped to a node or left on none, and the copied features deleted since they were chosen.","properties":{"blank":{"minimum":0,"type":"integer"},"copied":{"minimum":0,"type":"integer"},"ends":{"properties":{"byName":{"minimum":0,"type":"integer"},"open":{"description":"Links with an end on no node.","minimum":0,"type":"integer"},"snapped":{"minimum":0,"type":"integer"}},"required":["byName","snapped","open"],"type":"object"},"gone":{"minimum":0,"type":"integer"},"layer":{"description":"The layer copied into.","type":"string"},"layerId":{"format":"uuid","type":"string"},"named":{"minimum":0,"type":"integer"},"parts":{"minimum":0,"type":"integer"},"renamed":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"}},"required":["layerId","layer","copied","parts","skipped","blank","renamed","named","ends","gone"],"type":"object"},"FeatureCount":{"properties":{"matched":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["total","matched"],"type":"object"},"FeatureFilter":{"description":"Predicates a row must all match. The same filter applies to the map and the table, so each predicate means the same in SQL and in a MapLibre expression. Equality is by JSON type (12 is not \"12\"). Ordering compares numbers only. Text matches compare text only and ignore case. A missing value counts as null.","items":{"$ref":"#/components/schemas/Predicate"},"maxItems":20,"type":"array"},"FeatureIds":{"properties":{"count":{"minimum":0,"type":"integer"},"runs":{"description":"Runs of consecutive fids, each as [first, last], in ascending order. At most 50,000.","items":{"items":{"type":"integer"},"maxItems":2,"minItems":2,"type":"array"},"maxItems":50000,"type":"array"}},"required":["count","runs"],"type":"object"},"FeatureNarrowing":{"additionalProperties":false,"description":"A search and a filter sent in a body, the filter as predicates.","properties":{"filter":{"$ref":"#/components/schemas/FeatureFilter"},"q":{"maxLength":200,"type":"string"},"scenario":{"description":"Same as the featureScenario parameter.","format":"uuid","type":"string"},"source":{"description":"Same as the featureSource parameter.","maxLength":60,"type":"string"}},"type":"object"},"FeaturePage":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/Column"},"type":"array"},"matched":{"type":"integer"},"rows":{"items":{"$ref":"#/components/schemas/FeatureRow"},"type":"array"},"total":{"type":"integer"}},"required":["columns","rows","total","matched"],"type":"object"},"FeatureQuery":{"additionalProperties":false,"description":"The parameters of `GET /layers/{layerId}/features`, sent in a body. The filter is sent as predicates and the fids as runs.","properties":{"dir":{"default":"asc","enum":["asc","desc"],"type":"string"},"fids":{"description":"Runs of fids to page through, each as [first, last].","items":{"items":{"type":"integer"},"maxItems":2,"minItems":2,"type":"array"},"maxItems":50000,"type":"array"},"filter":{"$ref":"#/components/schemas/FeatureFilter"},"page":{"default":0,"minimum":0,"type":"integer"},"pageSize":{"default":100,"maximum":500,"minimum":1,"type":"integer"},"q":{"maxLength":200,"type":"string"},"scenario":{"description":"Same as the featureScenario parameter.","format":"uuid","type":"string"},"sort":{"maxLength":100,"type":"string"},"source":{"description":"Same as the featureSource parameter.","maxLength":60,"type":"string"}},"type":"object"},"FeatureRow":{"properties":{"fid":{"type":"integer"},"properties":{"additionalProperties":true,"type":"object"},"version":{"description":"Changes whenever any value in the row changes. A delete sends the version it read (layer.edits.save's wasVersion). A row changed since isn't deleted.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["fid","properties","version"],"type":"object"},"FeatureSummary":{"properties":{"groupBy":{"type":"string"},"groups":{"items":{"$ref":"#/components/schemas/FeatureSummaryGroup"},"maxItems":200,"type":"array"},"more":{"description":"More groups than were answered.","type":"boolean"},"sumOf":{"type":"string"},"total":{"$ref":"#/components/schemas/FeatureSummaryGroup"}},"required":["groups","more","total"],"type":"object"},"FeatureSummaryAsk":{"additionalProperties":false,"description":"A summary's narrowing (as FeatureNarrowing), the column to group by and the one to sum.","properties":{"filter":{"$ref":"#/components/schemas/FeatureFilter"},"groupBy":{"description":"A column whose values the rows are grouped by (MATERIAL); none for one total.","maxLength":200,"type":"string"},"q":{"maxLength":200,"type":"string"},"scenario":{"description":"Same as the `scenario` query parameter of layer.feature.list.","format":"uuid","type":"string"},"source":{"description":"Same as the `source` query parameter of layer.feature.list.","maxLength":60,"type":"string"},"sum":{"description":"A column summed over the rows whose value reads as a number (LENGTH).","maxLength":200,"type":"string"}},"type":"object"},"FeatureSummaryGroup":{"properties":{"areaM2":{"description":"Polygons' area on the ground, in square meters.","type":"number"},"count":{"minimum":0,"type":"integer"},"lengthM":{"description":"Lines' length on the ground, in meters.","type":"number"},"sum":{"description":"The sum column's total, when one was asked.","type":"number"},"summed":{"description":"How many rows held a number for it.","minimum":0,"type":"integer"},"value":{"description":"The group's value; absent for the total and for rows with none."}},"required":["count","summed","lengthM","areaM2"],"type":"object"},"FieldMap":{"properties":{"canEdit":{"type":"boolean"},"description":{"type":["string","null"]},"editableLayers":{"items":{"properties":{"allowGeometryEdit":{"type":"boolean"},"attributes":{"items":{"$ref":"#/components/schemas/FieldMapAttribute"},"type":"array"},"geometryType":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"layerId":{"format":"uuid","type":"string"},"name":{"type":["string","null"]},"orphan":{"type":"boolean"}},"required":["id","layerId","name","geometryType","orphan","allowGeometryEdit","attributes"],"type":"object"},"type":"array"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"on":{"description":"Whether NEER Field lists it and accepts its submissions. When off, its users still see it here.","type":"boolean"},"projectId":{"format":"uuid","type":"string"},"projectLayers":{"items":{"properties":{"geometryType":{"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name","geometryType"],"type":"object"},"type":"array"},"projectName":{"type":"string"},"referenceLayers":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"layerId":{"format":"uuid","type":"string"},"name":{"type":["string","null"]},"orphan":{"type":"boolean"}},"required":["id","layerId","name","orphan"],"type":"object"},"type":"array"},"referenceMode":{"enum":["all_other_layers","specific_layers","none"],"type":"string"},"submissionCount":{"minimum":0,"type":"integer"},"teamId":{"format":"uuid","type":["string","null"]}},"required":["id","name","description","projectId","projectName","teamId","referenceMode","canEdit","editableLayers","referenceLayers","projectLayers","submissionCount","on"],"type":"object"},"FieldMapAttribute":{"properties":{"attributeKey":{"type":"string"},"dataType":{"enum":["text","textarea","number","integer","boolean","choice","multiselect","date","datetime","media"],"type":"string"},"displayOrder":{"type":"integer"},"helpText":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"label":{"type":"string"},"options":{"description":"A choice or multiselect field's options. Null otherwise."},"required":{"type":"boolean"}},"required":["id","attributeKey","label","helpText","dataType","required","options","displayOrder"],"type":"object"},"FieldMapSubmissionStatus":{"enum":["submitted","under_review","approved","rejected"],"type":"string"},"FileKind":{"description":"Open-ended, so more kinds may be added. csv and shapefile are the layer's current rows, made on request.","type":"string","x-extensible-enum":["original","geojson","pmtiles","parquet","flatgeobuf","csv","shapefile"]},"FireflowConfig":{"properties":{"availableFlow":{"enum":["all","failures","none"],"type":"string"},"demandBasis":{"type":"string"},"flowGpm":{"type":"number"},"hour":{"oneOf":[{"enum":["peak"],"type":"string"},{"type":"number"}]},"hydrants":{"properties":{"kind":{"enum":["all","junctions","customers","mainline","list","names"],"type":"string"},"listId":{"type":"string"},"names":{"items":{"type":"string"},"type":"array"}},"required":["kind"],"type":"object"},"maxSearchGpm":{"type":"number"},"multipliers":{"description":"Demand multipliers. The first is the design case. The rest show the effect of higher demand.","items":{"type":"number"},"type":"array"},"residualPsi":{"type":"number"},"scenarioId":{"type":["string","null"]},"velocityLimitFps":{"type":["number","null"]},"zoneMinPsi":{"type":"number"},"zoneNodes":{"enum":["all","demand"],"type":"string"}},"required":["hour","multipliers","demandBasis","residualPsi","zoneMinPsi","zoneNodes","velocityLimitFps","maxSearchGpm","availableFlow","flowGpm","hydrants","scenarioId"],"type":"object"},"FireflowResults":{"properties":{"layerId":{"format":"uuid","type":["string","null"]},"marginal":{"items":{"properties":{"failsAt":{"type":"number"},"id":{"type":"string"}},"required":["id","failsAt"],"type":"object"},"type":"array"},"multipliers":{"items":{"type":"number"},"type":"array"},"rows":{"items":{"$ref":"#/components/schemas/FireflowRow"},"type":"array"},"study":{"$ref":"#/components/schemas/FireflowStudy"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["study","multipliers","rows","layerId","warnings","marginal"],"type":"object"},"FireflowRow":{"properties":{"available_gpm":{"type":["number","null"]},"fid":{"type":["integer","null"]},"id":{"type":"string"},"lat":{"type":["number","null"]},"limit":{"enum":["hydrant_pressure","zone_pressure","velocity","max_search","unsolved",null],"type":["string","null"]},"limiting_link":{"type":["string","null"]},"limiting_node":{"type":["string","null"]},"limiting_psi":{"type":["number","null"]},"lng":{"type":["number","null"]},"low_nodes":{"items":{"properties":{"id":{"type":"string"},"psi_at_needed":{"type":["number","null"]},"psi_static":{"type":["number","null"]}},"required":["id"],"type":"object"},"type":"array"},"multiplier":{"type":"number"},"needed_gpm":{"type":"number"},"no_supply":{"type":"boolean"},"pass":{"type":["boolean","null"]},"residual_at_needed_psi":{"type":["number","null"]},"shortfall_gpm":{"type":["number","null"]},"shortfall_pct":{"type":["number","null"]},"skipped_reason":{"type":["string","null"]},"static_psi":{"type":["number","null"]},"zone":{"type":["string","null"]}},"required":["id","multiplier","needed_gpm","pass","fid"],"type":"object"},"FireflowStudy":{"properties":{"config":{"$ref":"#/components/schemas/FireflowConfig"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"type":["string","null"]},"endedAt":{"format":"date-time","type":["string","null"]},"error":{"type":["string","null"]},"hydrantCount":{"type":["integer","null"]},"id":{"format":"uuid","type":"string"},"kind":{"enum":["study","quick"],"type":"string"},"modelId":{"format":"uuid","type":"string"},"modelVersion":{"description":"The model version it ran on.","type":["integer","null"]},"name":{"type":"string"},"progress":{"type":["integer","null"]},"projectId":{"format":"uuid","type":"string"},"startedAt":{"format":"date-time","type":["string","null"]},"status":{"enum":["draft","queued","starting","running","importing","completed","failed","cancelled"],"type":"string"},"summary":{"oneOf":[{"$ref":"#/components/schemas/FireflowSummary"},{"type":"null"}]}},"required":["id","projectId","modelId","name","kind","status","config","hydrantCount","modelVersion","summary","progress","currentStep","error","createdAt","startedAt","endedAt"],"type":"object"},"FireflowSummary":{"properties":{"cases":{"items":{"properties":{"multiplier":{"type":"number"},"summary":{"properties":{"fail":{"type":"integer"},"hydrants":{"type":"integer"},"pass":{"type":"integer"},"shortfall_bands":{"additionalProperties":{"type":"integer"},"type":"object"},"skipped":{"type":"integer"}},"required":["hydrants","pass","fail","skipped","shortfall_bands"],"type":"object"}},"required":["multiplier","summary"],"type":"object"},"type":"array"},"demand_basis":{"type":["string","null"]},"hour_label":{"type":["string","null"]},"runtime_s":{"type":["number","null"]},"warnings":{"items":{"type":"string"},"type":"array"},"zones":{"items":{"properties":{"hydrants":{"type":"integer"},"junctions":{"type":"integer"},"name":{"type":"string"},"pre_existing_low":{"type":"integer"}},"required":["name","junctions","hydrants"],"type":"object"},"type":"array"}},"required":["hour_label","demand_basis","cases","warnings","runtime_s","zones"],"type":"object"},"FlagDefinition":{"properties":{"code":{"description":"A short code shown in the cell, as in ICM (for example SRV or ASM).","type":["string","null"]},"color":{"description":"A CSS color, usually hex.","type":"string"},"description":{"type":["string","null"]},"enabled":{"description":"Whether the flag can be applied. A disabled flag stays on the cells it already marks but can't be added to more.","type":"boolean"},"id":{"format":"uuid","type":"string"},"label":{"type":"string"}},"required":["id","label","color","code","enabled"],"type":"object"},"FloodCriteria":{"description":"What a forecast's flood impact counts a feature by. Depths are in the model's units (ft under US, m under SI) and the island filter's area in acres or hectares. A feature deeper than wetDepthFt is wet; its maximum depth is Minor below minorMaxFt, Moderate below moderateMaxFt, Major below recordMinFt and Record from it.","properties":{"minIslandAcres":{"description":"Wet areas smaller than this are taken as dry.","type":"number"},"minorMaxFt":{"type":"number"},"moderateMaxFt":{"type":"number"},"recordMinFt":{"type":"number"},"wetDepthFt":{"type":"number"}},"required":["wetDepthFt","minorMaxFt","moderateMaxFt","recordMinFt","minIslandAcres"],"type":"object"},"FloodExposure":{"properties":{"areaKm2":{"description":"A custom area's box, in km².","type":"number"},"buildings":{"properties":{"byDepthBand":{"additionalProperties":{"type":"integer"},"description":"Exposed buildings by depth band, in metres.","type":"object"},"exposed":{"description":"Footprints with a 100-year depth above 0.","type":"integer"},"meanDepth":{"description":"The exposed buildings' mean depth.","type":"number"},"pct":{"type":"number"},"total":{"description":"Building footprints.","type":"integer"},"unit":{"const":"m","type":"string"}},"required":["total","exposed","pct","meanDepth","unit","byDepthBand"],"type":"object"},"code":{"type":"string"},"damageCurve":{"type":"string"},"damageRatio":{"description":"Mean damage over all the place's buildings, 0 to 1, each band at its middle depth. Not for a custom area.","type":"number"},"event":{"type":"string"},"exposureValue":{"type":"number"},"level":{"enum":["state","district","pincode","area"],"type":"string"},"loss100yr":{"description":"The asset value times the damage ratio.","type":"number"},"name":{"type":"string"},"note":{"type":"string"},"pincode":{"type":"string"},"rail":{"$ref":"#/components/schemas/FloodTransport"},"roads":{"$ref":"#/components/schemas/FloodTransport"},"scenario":{"type":"string"},"state":{"type":"string"}},"required":["level","buildings","roads","rail","event","scenario","note"],"type":"object"},"FloodImpactLayers":{"properties":{"buildings":{"description":"A polygon layer.","format":"uuid","type":["string","null"]},"damageMissing":{"description":"The damage attributes none of the buildings layer's first 1,000 features has, of occtype (or st_damcat), val_struct, val_cont and found_ht. Without them the impact counts buildings and depths and leaves damage empty.","items":{"enum":["occtype","val_struct","val_cont","found_ht"],"type":"string"},"type":"array"},"rails":{"description":"A line layer. Optional.","format":"uuid","type":["string","null"]},"streets":{"description":"A line layer.","format":"uuid","type":["string","null"]},"terrain":{"description":"A raster of the project's the impact reads the ground from, in place of the model's terrain: one with bridge and culvert decks raised, so water passing under a deck isn't counted as flooding the street or railways on it. Null reads the model's terrain.","format":"uuid","type":["string","null"]}},"required":["buildings","streets","rails","terrain","damageMissing"],"type":"object"},"FloodPoint":{"properties":{"category":{"enum":["None","Minimal","Minor","Moderate","Major","Severe"],"type":"string"},"chance100yrIn30Years":{"description":"The chance of at least one 100-year flood in 30 years, 0 to 1.","type":"number"},"depth":{"additionalProperties":{"type":"number"},"description":"Depth by return period, in metres. Only `100yr` is published today.","type":"object"},"floodsFrom":{"description":"The most frequent return period that floods the location, or null when dry.","type":["string","null"]},"lat":{"type":"number"},"lon":{"type":"number"},"modelVersion":{"description":"The India Flood Atlas release.","type":"string"},"scenario":{"type":"string"},"score":{"description":"The NEER Flood Score, from the 100-year depth.","maximum":100,"minimum":0,"type":"integer"},"scoreVersion":{"type":"string"},"unit":{"const":"m","type":"string"}},"required":["lat","lon","score","category","unit","depth","floodsFrom","chance100yrIn30Years","scenario","scoreVersion","modelVersion"],"type":"object"},"FloodPortfolio":{"properties":{"assets":{"items":{"properties":{"category":{"type":["string","null"]},"chance100yrIn30Years":{"type":"number"},"coverage":{"type":"boolean"},"damageRatio":{"type":"number"},"depth":{"description":"100-year depth in metres, to the centimetre.","type":"number"},"floodsFrom":{"type":["string","null"]},"id":{"type":["string","null"]},"lat":{"type":"number"},"lon":{"type":"number"},"loss100yr":{"type":"number"},"score":{"type":["integer","null"]},"value":{"type":"number"}},"required":["lat","lon","coverage","score","category"],"type":"object"},"type":"array"},"summary":{"properties":{"assets":{"type":"integer"},"byCategory":{"additionalProperties":{"type":"integer"},"type":"object"},"event":{"type":"string"},"exposed":{"description":"Assets with a 100-year depth above 0.","type":"integer"},"loss":{"description":"With any asset's value.","properties":{"damageCurve":{"type":"string"},"damageRatio":{"type":"number"},"totalLoss100yr":{"type":"number"},"totalValue":{"type":"number"},"valued":{"type":"integer"}},"type":"object"},"maxScore":{"type":["integer","null"]},"meanScore":{"type":["number","null"]},"modelVersion":{"type":"string"},"outOfCoverage":{"type":"integer"},"scenario":{"type":"string"},"scoreVersion":{"type":"string"},"scored":{"type":"integer"}},"required":["assets","scored","outOfCoverage","exposed","byCategory","meanScore","maxScore","event","scenario","scoreVersion","modelVersion"],"type":"object"}},"required":["summary","assets"],"type":"object"},"FloodPortfolioAsk":{"properties":{"assets":{"items":{"properties":{"id":{"description":"Your own id, returned with the asset.","type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"value":{"description":"Sum insured or total insured value, for the 100-year modelled loss.","minimum":0,"type":"number"}},"required":["lat","lon"],"type":"object"},"maxItems":5000,"minItems":1,"type":"array"},"damageCurve":{"description":"A built-in curve by `curveId`, or your own `points`. Without it, `asia_residential`.","properties":{"curveId":{"enum":["asia_residential","asia_commercial","asia_industrial"],"type":"string"},"points":{"description":"Depth in metres and damage ratio, 0 to 1, linear between points.","items":{"maxItems":2,"minItems":2,"prefixItems":[{"minimum":0,"type":"number"},{"maximum":1,"minimum":0,"type":"number"}],"type":"array"},"type":"array"}},"type":"object"}},"required":["assets"],"type":"object"},"FloodTransport":{"description":"Kilometres within 0.15 m (6 in) of the modelled extent; null for a pincode or area.","properties":{"atRiskKm":{"type":"number"},"pct":{"type":"number"},"totalKm":{"type":"number"}},"type":["object","null"]},"FlowRecipeOverrides":{"properties":{"dryDay":{"properties":{"antecedentDryDays":{"type":"number"},"maxDailyRainIn":{"type":"number"},"rule":{"enum":["dayCount","wetnessIndex"],"type":"string"},"wetnessDays":{"type":"number"},"wetnessDecay":{"type":"number"},"wetnessMaxIn":{"type":"number"}},"type":"object"},"groundwater":{"properties":{"method":{"enum":["minimum","wastewater_production","stevens_schutzbach","mitchell","kcmo"],"type":"string"},"monthly":{"type":"boolean"},"nightWindow":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"}},"type":"object"},"normalise":{"properties":{"bands":{"properties":{"designPeakVsCapacity":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"dwfPerCapita":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"gwiPerIdm":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"gwiShare":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"peakFactor":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"peakVsCapacity":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"r":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"rdiiPerAcrePerInch":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"wetPerCapita":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"}},"type":"object"},"percentileBands":{"type":"boolean"},"scoreMetrics":{"items":{"enum":["addf","mddf","dpf","gwi","gwiShare","gwiPerIdm","gwiPerCapita","gwiPerAcre","wastewaterProduction","dwfPerCapita","rdiiVolume","peakRdii","peakFlow","peakFactor","r","rPerInch","rdiiPerAcrePerInch","rdiiPerIdmPerInch","leakageSeverity","peakRdiiPerInch","peakVsCapacity","wetPerCapita","designRdiiVolume","designRdiiPerAcre","designRdiiPerIdm","designRdiiPerInch","designPeakVsCapacity","rainAtCapacity"],"type":"string"},"type":"array"}},"type":"object"},"pattern":{"properties":{"dayTypes":{"enum":["two","seven"],"type":"string"},"holidaysAsWeekend":{"type":"boolean"},"minDaysPerGroup":{"type":"number"},"strictness":{"enum":["mild","normal","strict"],"type":"string"}},"type":"object"},"qc":{"properties":{"minDurationHours":{"type":"number"},"minPeakRdiiMgd":{"type":"number"},"minRPerInch":{"type":"number"},"minRainIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"minVolumeMg":{"type":"number"},"outlierSigma":{"type":"number"}},"type":"object"},"regression":{"properties":{"designRegime":{"enum":["governing","pooled","winter","summer","wet","dry"],"type":"string"},"designStorm":{"properties":{"depthIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"durationHours":{"type":"number"},"returnPeriodYears":{"type":"number"}},"type":"object"},"minStorms":{"type":"number"},"perRegime":{"type":"boolean"},"prune":{"type":"boolean"},"r2Target":{"type":"number"},"regimeMinR2":{"type":"number"},"regimeMinStorms":{"type":"number"},"wetAntecedentDays":{"type":"number"},"wetAntecedentIn":{"type":"number"},"winterMonths":{"items":{"type":"number"},"type":"array"},"x":{"enum":["depth","peak1h"],"type":"string"}},"type":"object"},"response":{"properties":{"lagHours":{"type":"number"},"maxDurationHours":{"type":"number"},"terminationSteps":{"type":"number"},"thresholdMgd":{"type":"number"}},"type":"object"},"rtk":{"properties":{"bounds":{"properties":{"k":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"r":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"t":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"}},"type":"object"},"iterations":{"type":"number"},"rainBucketMinutes":{"type":"number"},"responseBucketMinutes":{"type":"number"},"storms":{"type":"number"},"windowHours":{"type":"number"}},"type":"object"},"storm":{"properties":{"interEventHours":{"type":"number"},"minRainfallIn":{"type":"number"}},"type":"object"}},"type":"object"},"FlowRecipeParams":{"properties":{"dryDay":{"properties":{"antecedentDryDays":{"type":"number"},"maxDailyRainIn":{"type":"number"},"rule":{"enum":["dayCount","wetnessIndex"],"type":"string"},"wetnessDays":{"type":"number"},"wetnessDecay":{"type":"number"},"wetnessMaxIn":{"type":"number"}},"required":["rule","antecedentDryDays","maxDailyRainIn","wetnessDecay","wetnessMaxIn","wetnessDays"],"type":"object"},"groundwater":{"properties":{"method":{"enum":["minimum","wastewater_production","stevens_schutzbach","mitchell","kcmo"],"type":"string"},"monthly":{"type":"boolean"},"nightWindow":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"}},"required":["method","monthly","nightWindow"],"type":"object"},"normalise":{"$ref":"#/components/schemas/SensorNormaliseParams"},"pattern":{"properties":{"dayTypes":{"enum":["two","seven"],"type":"string"},"holidaysAsWeekend":{"type":"boolean"},"minDaysPerGroup":{"type":"number"},"strictness":{"enum":["mild","normal","strict"],"type":"string"}},"required":["holidaysAsWeekend","strictness","dayTypes","minDaysPerGroup"],"type":"object"},"qc":{"properties":{"minDurationHours":{"type":"number"},"minPeakRdiiMgd":{"type":"number"},"minRPerInch":{"type":"number"},"minRainIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"minVolumeMg":{"type":"number"},"outlierSigma":{"type":"number"}},"required":["minRainIn","minPeakRdiiMgd","minVolumeMg","minDurationHours","minRPerInch","outlierSigma"],"type":"object"},"regression":{"$ref":"#/components/schemas/RegressionParams"},"response":{"properties":{"lagHours":{"type":"number"},"maxDurationHours":{"type":"number"},"terminationSteps":{"type":"number"},"thresholdMgd":{"type":"number"}},"required":["thresholdMgd","lagHours","terminationSteps","maxDurationHours"],"type":"object"},"rtk":{"properties":{"bounds":{"properties":{"k":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"r":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"t":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"}},"required":["r","t","k"],"type":"object"},"iterations":{"type":"number"},"rainBucketMinutes":{"type":"number"},"responseBucketMinutes":{"type":"number"},"storms":{"type":"number"},"windowHours":{"type":"number"}},"required":["storms","windowHours","rainBucketMinutes","responseBucketMinutes","iterations","bounds"],"type":"object"},"storm":{"properties":{"interEventHours":{"type":"number"},"minRainfallIn":{"type":"number"}},"required":["minRainfallIn","interEventHours"],"type":"object"}},"required":["storm","dryDay","pattern","groundwater","response","qc","rtk","normalise","regression"],"type":"object"},"FlowSplit":{"properties":{"node":{"type":"string"},"outlets":{"items":{"properties":{"diameterFt":{"description":"The link's cross-section height (its first geometry value) as the model stores it, in the model's length units. Null when blank or not a number.","type":["number","null"]},"link":{"type":"string"},"offsetFt":{"description":"The link's inlet offset as the model stores it, in the model's length units. Null when blank or not a number.","type":["number","null"]},"role":{"type":"string"},"toNode":{"type":["string","null"]}},"required":["link","toNode","role","offsetFt","diameterFt"],"type":"object"},"type":"array"}},"required":["node","outlets"],"type":"object"},"ForecastCycle":{"properties":{"createdAt":{"format":"date-time","type":"string"},"endAt":{"format":"date-time","type":"string"},"error":{"type":["string","null"]},"hecrasRun":{"properties":{"error":{"type":["string","null"]},"id":{"type":"string"},"impact":{"additionalProperties":true,"description":"The run's flood impact in summary, once computed: the settings, the island filter and each layer's counts (FloodImpact without its features), and computedAt. The features are at getRunFloodImpact.","type":["object","null"]},"status":{"type":["string","null"]},"viewId":{"type":["string","null"]}},"type":["object","null"]},"hecrasRunId":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"inferenceId":{"format":"uuid","type":["string","null"]},"issuedAt":{"format":"date-time","type":"string"},"ml":{"description":"The model from AI Studio this cycle ran, where its forecast takes one: the version asked and the one it resolved to. fallback is true when the studio couldn't be reached and the last cycle's model was used.","properties":{"asked":{"description":"As the forecast asks: a number, latest or @alias.","type":"string"},"digest":{"type":"string"},"fallback":{"type":"boolean"},"model":{"type":"string"},"runId":{"type":["string","null"]},"version":{"type":"string"},"weights":{"description":"Where this environment's copy of its weights is.","type":"string"}},"required":["model","asked","version"],"type":["object","null"]},"postError":{"type":["string","null"]},"postStatus":{"description":"The forecast's post-process on this cycle's run: queued, running, done or failed; none when it has none.","type":["string","null"]},"rain":{"additionalProperties":true,"description":"The rain the cycle used (observedIn, forecastIn, missingMinutes, products, warnings, points).","type":"object"},"runId":{"format":"uuid","type":["string","null"]},"simulations":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"label":{"type":"string"},"status":{"type":"string"}},"required":["id","label","status"],"type":"object"},"type":"array"},"startAt":{"format":"date-time","type":"string"},"status":{"description":"starting, started, completed, failed or skipped: started while its run or its ML model's results are under way, then how it ended.","type":"string"},"trigger":{"description":"scheduler or person.","type":"string"}},"required":["id","issuedAt","startAt","endAt","status","trigger","runId","hecrasRunId","inferenceId","rain","error","postStatus","postError","ml","createdAt","simulations","hecrasRun"],"type":"object"},"FormBand":{"description":"The header or the footer, as the author styled it.","properties":{"backdrop":{"properties":{"overlay":{"description":"How much of the band's color covers the picture, so text on it is readable.","maximum":100,"minimum":0,"type":"integer"},"url":{"type":"string"}},"required":["url"],"type":"object"},"colors":{"$ref":"#/components/schemas/FormColors"},"image":{"properties":{"align":{"enum":["left","center","right"],"type":"string"},"alt":{"description":"Absent means decorative.","type":"string"},"height":{"maximum":320,"minimum":16,"type":"integer"},"url":{"type":"string"}},"required":["url"],"type":"object"},"text":{"description":"The footer's text.","type":"string"}},"type":"object"},"FormColors":{"description":"Hex colors only, `#rgb` or `#rrggbb`. Other values in the stored look are dropped.","properties":{"background":{"pattern":"^#([0-9a-f]{3}|[0-9a-f]{6})$","type":"string"},"text":{"pattern":"^#([0-9a-f]{3}|[0-9a-f]{6})$","type":"string"}},"type":"object"},"FormLook":{"properties":{"footer":{"$ref":"#/components/schemas/FormBand"},"header":{"$ref":"#/components/schemas/FormBand"},"theme":{"$ref":"#/components/schemas/FormColors"}},"type":"object"},"GaugeInfo":{"description":"NWPS details for the gauge. Its location, who issues its forecast, and who supplies the data, whose credit NWPS asks for.","properties":{"county":{"type":["string","null"]},"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"page":{"description":"The gauge's page at water.noaa.gov/gauges/<id>, by its NWS location id. Null when the record has none.","type":["string","null"]},"providers":{"items":{"properties":{"abbreviation":{"type":"string"},"text":{"type":"string"},"url":{"description":"Only an http(s) link.","type":["string","null"]}},"required":["abbreviation","text","url"],"type":"object"},"type":"array"},"rfc":{"$ref":"#/components/schemas/GaugeOffice"},"state":{"$ref":"#/components/schemas/GaugeOffice"},"wfo":{"$ref":"#/components/schemas/GaugeOffice"}},"required":["latitude","longitude","county","rfc","state","wfo","page","providers"],"type":"object"},"GaugeOffice":{"properties":{"text":{"description":"The office's abbreviation.","type":"string"},"url":{"description":"Its page at water.noaa.gov.","type":"string"}},"required":["text","url"],"type":["object","null"]},"Generation":{"properties":{"createdAt":{"format":"date-time","type":"string"},"download":{"description":"A link to the model's zip, good for an hour. Present once done.","format":"uri","type":"string"},"endedAt":{"format":"date-time","type":"string"},"engine":{"enum":["hecras","swmm","epanet"],"type":"string"},"error":{"description":"Why it failed.","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"progress":{"description":"How far along it is, in percent.","maximum":100,"minimum":0,"type":"integer"},"startedAt":{"format":"date-time","type":"string"},"state":{"enum":["queued","running","done","failed","stopped"],"type":"string"},"step":{"description":"What the generator is doing now, such as Meshing.","type":"string"}},"required":["id","engine","name","state","createdAt"],"type":"object"},"Grant":{"description":"What a person the project is shared with can do. The app shows viewer as Guest.","enum":["viewer","commenter","editor"],"type":"string"},"Group":{"properties":{"holdsNotes":{"description":"True for a group of notes.","type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"order":{"type":"integer"}},"required":["id","name","order","holdsNotes"],"type":"object"},"Health":{"properties":{"databases":{"properties":{"default":{"enum":["ok","down"],"type":"string"},"gis":{"enum":["ok","down"],"type":"string"}},"required":["default","gis"],"type":"object"},"ok":{"description":"True only when both databases respond.","type":"boolean"}},"required":["ok","databases"],"type":"object"},"HecRas":{"description":"A HEC-RAS model as recorded on import. Present on a hecras model whose source_manifest has a status, plans and files. Cell counts and land-cover class counts are in the converter's files, not here.","properties":{"baseEdited":{"description":"True when Base has changed since import, so the imported results and runs made with another Base are out of date.","type":"boolean"},"converted":{"description":"The plans whose results were read, and so can be played.","items":{"type":"string"},"type":"array"},"defaultEngine":{"description":"The HEC-RAS version a Windows run uses unless the run names another. The newest (7.0.2) for a project saved by HEC-RAS 7 or made by NEER. 6.6 for a project saved by HEC-RAS 5 or 6.","type":"string"},"derivedPlans":{"description":"Plans made in NEER from an imported one.","type":"integer"},"engineVersion":{"description":"The HEC-RAS version the project was saved in.","type":"string"},"events":{"description":"The unsteady flow files (.uNN), which are the events the plans run.","type":"integer"},"geometries":{"description":"The geometries the plans run and the layers were made from (g01), in order.","items":{"type":"string"},"type":"array"},"geometryLayers":{"description":"The geometry's layers, each assigned to its geometry and element kind.","items":{"$ref":"#/components/schemas/HecRasGeometryLayer"},"type":"array"},"geometryLayersError":{"description":"Why the geometry couldn't be made into layers.","type":"string"},"infiltration":{"description":"The infiltration class raster.","format":"uuid","type":"string"},"landCover":{"description":"The land-cover class raster.","format":"uuid","type":"string"},"landCoverEdits":{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"description":"Land-cover Manning's n set per scenario, keyed by scenario id, then class name, with n as the value.","type":"object"},"madeEvents":{"description":"Events made in NEER from an imported one, from the manifest's derivedEvents.","items":{"$ref":"#/components/schemas/HecRasMadeEvent"},"type":"array"},"madeGeometries":{"description":"Geometries made in NEER from one of the model's, from the manifest's madeGeometries.","items":{"$ref":"#/components/schemas/HecRasMadeGeometry"},"type":"array"},"madePlans":{"description":"Plans made in NEER from an imported one, from the manifest's derivedPlans.","items":{"$ref":"#/components/schemas/HecRasMadePlan"},"type":"array"},"plans":{"items":{"$ref":"#/components/schemas/HecRasPlan"},"type":"array"},"resultsBytes":{"description":"Bytes of the upload that are imported results.","type":"integer"},"runs":{"description":"The plan runs started in NEER, oldest first. An ml run is a linked ML model's forecast.","items":{"$ref":"#/components/schemas/HecRasRun"},"type":"array"},"sending":{"description":"Plan runs being sent, or that failed to send in the last day. A run moves to runs once its simulation is created.","items":{"$ref":"#/components/schemas/HecRasSending"},"type":"array"},"status":{"description":"One of generating, uploading, uploaded, converting, ready or failed.","type":"string"},"terrain":{"description":"The model's terrain, as project rasters.","items":{"format":"uuid","type":"string"},"type":"array"},"terrainError":{"description":"Why the terrain couldn't be imported.","type":"string"},"units":{"description":"us or si.","type":"string"},"uploadBytes":{"description":"Bytes uploaded.","type":"integer"},"warnings":{"description":"Warnings from the converter.","items":{"type":"string"},"type":"array"}},"required":["status","geometries","events","terrain","plans","derivedPlans","runs","baseEdited","warnings","sending","madePlans","madeEvents","madeGeometries","landCoverEdits","converted","geometryLayers","uploadBytes","resultsBytes"],"type":"object"},"HecRasGeometryLayer":{"properties":{"geometry":{"description":"The geometry id, such as g01.","type":"string"},"id":{"description":"The layer's id.","format":"uuid","type":"string"},"key":{"description":"The element kind, such as areas, bcLines or pipes.","type":"string"}},"required":["geometry","key","id"],"type":"object"},"HecRasMadeEvent":{"additionalProperties":true,"description":"An event made in NEER.","properties":{"baseEventId":{"type":"string"},"boundaries":{"items":{"additionalProperties":true,"properties":{"label":{"type":"string"},"path":{"type":"string"},"scale":{"type":"number"},"series":{"items":{"items":{"type":"number"},"type":"array"},"type":"array"}},"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"design":{"additionalProperties":true,"description":"The NOAA Atlas 14 design storm the series was made from.","type":"object"},"id":{"description":"The event id, such as e1.","type":"string"},"title":{"type":"string"}},"required":["id"],"type":"object"},"HecRasMadeGeometry":{"additionalProperties":true,"description":"A HEC-RAS geometry made in NEER: a copy of one of the model's geometries under a number of its own, with the spec its mesh is built from (model.hecras.geometry.save) and the mesh's build (model.hecras.geometry.build).","properties":{"baseGeometry":{"description":"The model geometry it started from, such as g01.","type":"string"},"build":{"additionalProperties":true,"description":"The mesh's build: status (building, ready or failed), the spec's fingerprint, the report (each 2D area's status, message, cells, faces and bad cells), the files and the viewer's, and an error when it failed. None until built.","type":["object","null"]},"createdAt":{"format":"date-time","type":"string"},"id":{"description":"Its HEC-RAS number, such as g05.","type":"string"},"spec":{"additionalProperties":true,"description":"Its 2D areas by name (cellSize, and optionally perimeter, shift and mann), breaklines (name, points, near, far, repeats, protection) and refinement regions (name, polygon, cellSize, shift, perimeterSpacing, farSpacing, repeats, protection), and connections made here (name, line, area, width, coef, ogee, near, far, profile as [station, elevation], culverts: name, shape, rise, span, length, nTop, nBottom, entranceLoss, exitLoss, chart, scale, usInvert, dsInvert, barrels as name and a two-point line; gates: name, width, height, invert, method, opening held through a run, sluiceCoef, radialCoef, weirCoef, openings as name and a point on the centerline; or a bridge: deckWidth, distance, highChord, lowChord, coef, n, piers as a point and a width, its four sections cut from the terrain). A connection without a profile, or a culvert or gate without its inverts or length, takes them from the terrain. Points are [longitude, latitude].","type":"object"},"title":{"type":"string"}},"required":["id"],"type":"object"},"HecRasMadePlan":{"additionalProperties":true,"description":"A plan made in NEER.","properties":{"basePlanId":{"type":"string"},"changes":{"additionalProperties":true,"description":"The changed settings (start, end, computeInterval, outputInterval, hydrographInterval, mappingInterval, boundaries).","type":"object"},"createdAt":{"format":"date-time","type":"string"},"eventId":{"description":"An event made in NEER that the plan runs instead of its own.","type":["string","null"]},"geometryId":{"description":"A geometry made in NEER that the plan runs on instead of its own, such as g05.","type":["string","null"]},"id":{"description":"The plan id, such as n1.","type":"string"},"scenarioId":{"description":"The scenario whose edits the plan runs with.","type":["string","null"]},"title":{"type":"string"}},"required":["id"],"type":"object"},"HecRasPlan":{"properties":{"flow":{"description":"The flow file the plan runs.","type":"string"},"geometry":{"description":"The geometry the plan runs.","type":"string"},"id":{"description":"The plan id, such as p01.","type":"string"},"linuxEngine":{"description":"The HEC-RAS version a Linux run uses unless the run names another. This is the version that wrote the results file of the last Windows run, or 7.0.1 when none is recorded.","type":"string"},"linuxMissing":{"description":"Files a Linux run needs that the upload is missing (such as Mill.p01.hdf, Mill.b01). Empty when the plan can run on Linux. Otherwise it runs on Windows.","items":{"type":"string"},"type":"array"},"read":{"description":"True when the converter read the plan's results.","type":"boolean"},"results":{"description":"True when the upload included the plan's results.","type":"boolean"},"shortId":{"type":"string"},"title":{"type":"string"}},"required":["id","title","results","read","linuxMissing","linuxEngine"],"type":"object"},"HecRasPlanSummary":{"additionalProperties":false,"properties":{"computeTime":{"description":"As HEC-RAS reports it, hh:mm:ss.","type":"string"},"computed":{"description":"UNSURE: copied from the reader's model.json; appears to say whether HEC-RAS computed the plan.","type":"boolean"},"flow":{"type":"string"},"geometry":{"type":"string"},"id":{"description":"The plan, p01, or a run of it, p01.r1.","type":"string"},"log":{"description":"Up to 40 lines of the compute log that mention errors, warnings, instability, failure, exceedance, convergence, iterations or volume accounting, in order, then its last 5 lines.","items":{"type":"string"},"type":"array"},"peaks":{"items":{"additionalProperties":true,"properties":{"kind":{"enum":["boundary","reference"],"type":"string"},"name":{"type":"string"},"peakAt":{"type":["string","null"]},"peakFlow":{"type":["number","null"]},"peakWse":{"type":["number","null"]}},"type":"object"},"type":"array"},"peaksLeftOut":{"description":"How many more peaks there were past the 25 listed.","minimum":0,"type":"integer"},"run":{"additionalProperties":true,"description":"Present for a run read since import: its id (the simulation), plan, number, engine version and end time.","properties":{"endedAt":{"type":["string","null"]},"engineVersion":{"type":["string","null"]},"id":{"type":"string"},"number":{"type":"integer"},"planId":{"type":"string"}},"type":"object"},"title":{"type":["string","null"]},"volumeAccounting":{"additionalProperties":true,"type":"object"},"volumeErrorAf":{"description":"Acre-feet, or the model's volume unit.","type":"number"},"volumeErrorPct":{"description":"The volume error as a percent of the volume in.","type":"number"}},"required":["id","title","peaks","peaksLeftOut","log"],"type":"object"},"HecRasRun":{"properties":{"changes":{"additionalProperties":true,"description":"The changes a run of a NEER-made plan applied, as of the run.","type":"object"},"computeSize":{"description":"A Windows run's machine size: standard, large or xlarge.","type":"string"},"currentBase":{"description":"True when the run used the model's current Base.","type":"boolean"},"derivedPlanId":{"description":"The NEER-made plan this run is of.","type":"string"},"details":{"additionalProperties":true,"description":"The run's plan as described in the reader's model.json (computeTime, volumeErrorAf, peaks).","type":"object"},"endedAt":{"format":"date-time","type":"string"},"engineVersion":{"type":"string"},"error":{"type":"string"},"followUp":{"description":"True when the run was made to build a scenario's pipe tables for a later run.","type":"boolean"},"geometryId":{"description":"A geometry made in NEER the run computed on instead of its plan's own, such as g05.","type":"string"},"id":{"description":"The run's simulation id.","type":"string"},"issuedAt":{"description":"A forecast's issue time.","format":"date-time","type":"string"},"number":{"description":"1 for a plan's first run, 2 for its second.","type":"integer"},"planId":{"type":"string"},"runner":{"description":"linux, windows (also runs from before Linux) or ml (a forecast).","type":"string"},"scenarioName":{"type":"string"},"sendingAt":{"description":"Set while a building run's zip is being sent.","format":"date-time","type":"string"},"status":{"description":"One of building, running, reading, ready or failed.","type":"string"},"submittedAt":{"format":"date-time","type":"string"},"title":{"description":"That plan's title at the time of the run.","type":"string"},"viewId":{"description":"The id the run's results use, next to the plan's, such as p01.r1.","type":"string"}},"required":["id","planId","viewId","number","runner","status","followUp","currentBase"],"type":"object"},"HecRasSending":{"properties":{"derivedPlanId":{"description":"The NEER-made plan the run uses, such as n1, if any.","type":"string"},"error":{"description":"Why the run wasn't sent.","type":"string"},"jobId":{"format":"uuid","type":"string"},"planId":{"type":"string"},"runner":{"description":"linux or windows.","type":"string"},"status":{"description":"sending or failed.","type":"string"}},"required":["jobId","planId","status"],"type":"object"},"HecRasSummary":{"additionalProperties":false,"properties":{"plans":{"items":{"$ref":"#/components/schemas/HecRasPlanSummary"},"type":"array"}},"required":["plans"],"type":"object"},"Home":{"properties":{"activePeople":{"description":"Users who changed something this week in the workspace's projects you can see.","type":"integer"},"away":{"items":{"$ref":"#/components/schemas/AwayItem"},"type":"array"},"brief":{"items":{"$ref":"#/components/schemas/BriefItem"},"type":"array"},"counts":{"$ref":"#/components/schemas/HomeCounts"},"empty":{"description":"True when the workspace is empty, trash included, with no project, dashboard, field map, survey or machine. The app then shows its first-run screen.","type":"boolean"},"neer":{"properties":{"allowance":{"description":"Null while the plan records no allowance.","type":["integer","null"]},"used":{"type":"integer"}},"required":["used","allowance"],"type":"object"},"resume":{"items":{"$ref":"#/components/schemas/ResumeItem"},"type":"array"},"since":{"description":"When you last visited. Null on your first visit.","format":"date-time","type":["string","null"]},"storage":{"$ref":"#/components/schemas/Storage"},"waiting":{"items":{"$ref":"#/components/schemas/WaitingItem"},"type":"array"}},"required":["since","empty","brief","resume","waiting","storage","neer","away","counts","activePeople"],"type":"object"},"HomeCounts":{"description":"Counts of items in the workspace, not counting the trash.","properties":{"dashboards":{"type":"integer"},"fieldMaps":{"type":"integer"},"projects":{"type":"integer"}},"required":["projects","dashboards","fieldMaps"],"type":"object"},"HydrantRow":{"properties":{"durationH":{"type":["number","null"]},"elevation":{"type":["number","null"]},"fid":{"type":"integer"},"landUse":{"type":["string","null"]},"name":{"type":"string"},"neededGpm":{"type":["number","null"]},"rule":{"type":["string","null"]}},"required":["fid","name","rule","neededGpm","durationH","landUse","elevation"],"type":"object"},"HydrantRule":{"properties":{"distanceFt":{"description":"The farthest a layer rule's point can be from its junction, in feet. Default 50.","type":["number","null"]},"id":{"description":"Any text unique among the rules. The review's `ruleId` and each marked junction's `rule` name it.","type":"string"},"kind":{"description":"prefix: the junction's name starts with `value` (case matters). regex: its name matches the pattern. tag: its tag equals `value`, ignoring case. description: its description contains `value`, ignoring case. layer: the junction nearest each point of `layerId`.","enum":["prefix","regex","tag","description","layer"],"type":"string"},"layerId":{"description":"A layer rule's hydrant point layer, one of the project's. Required for a layer rule; its review shows a problem without it.","type":["string","null"]},"on":{"description":"Whether the rule marks the junctions it matches. A rule that's off is still reviewed. Default false.","type":"boolean"},"value":{"description":"The prefix, pattern, tag or description text. For a layer rule, the layer's name.","type":"string"}},"required":["id","kind","value","on"],"type":"object"},"HydrantRuleSet":{"properties":{"exclude":{"description":"Junctions a rule matched that are not hydrants.","items":{"type":"string"},"type":"array"},"include":{"description":"Junctions marked by hand.","items":{"type":"string"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/HydrantRule"},"type":"array"}},"required":["rules"],"type":"object"},"Hydrants":{"properties":{"current":{"properties":{"layerId":{"format":"uuid","type":"string"},"marked":{"description":"Junctions marked now.","type":"integer"}},"required":["marked","layerId"],"type":"object"},"hydrants":{"description":"The hydrants marked now, with the values a study reads from each.","items":{"$ref":"#/components/schemas/HydrantRow"},"type":"array"},"nodata":{"description":"Nodes anywhere in the model with a no-data elevation (such as a reservoir's head).","items":{"properties":{"fid":{"type":"integer"},"field":{"type":"string"},"layerId":{"format":"uuid","type":"string"},"name":{"type":"string"},"role":{"type":"string"},"value":{"type":["number","null"]}},"required":["role","layerId","fid","name","field","value"],"type":"object"},"type":"array"},"review":{"properties":{"marked":{"description":"Junctions the rules would mark.","items":{"properties":{"fid":{"type":"integer"},"name":{"type":"string"},"rule":{"type":"string"}},"required":["fid","name","rule"],"type":"object"},"type":"array"},"nodata":{"description":"Hydrants the rules would mark whose elevation is a no-data value.","items":{"properties":{"elevation":{"type":["number","null"]},"fid":{"type":"integer"},"name":{"type":"string"}},"required":["fid","name","elevation"],"type":"object"},"type":"array"},"review":{"description":"Matched junctions that carry customer demand. They're marked only by hand.","items":{"properties":{"demand":{"type":"number"},"fid":{"type":"integer"},"name":{"type":"string"},"rule":{"type":"string"}},"required":["fid","name","rule","demand"],"type":"object"},"type":"array"},"rules":{"items":{"properties":{"examples":{"items":{"type":"string"},"type":"array"},"label":{"type":"string"},"matches":{"type":"integer"},"on":{"type":"boolean"},"problem":{"description":"Why the rule cannot be read.","type":["string","null"]},"ruleId":{"type":"string"},"withDemand":{"description":"Matches that carry customer demand.","type":"integer"}},"required":["ruleId","label","on","matches","withDemand","examples","problem"],"type":"object"},"type":"array"}},"required":["rules","marked","review","nodata"],"type":"object"},"ruleSet":{"properties":{"exclude":{"items":{"type":"string"},"type":"array"},"include":{"items":{"type":"string"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/HydrantRule"},"type":"array"},"saved":{"description":"False for rules suggested from the names, or previewed.","type":"boolean"}},"required":["rules","include","exclude","saved"],"type":"object"}},"required":["ruleSet","review","current","nodata","hydrants"],"type":"object"},"ImageLegend":{"properties":{"layers":{"items":{"properties":{"layerName":{"type":"string"},"legend":{"items":{"properties":{"contentType":{"type":"string"},"imageData":{"description":"A base64 image.","type":"string"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"},"Import":{"properties":{"at":{"description":"When the import started, or when it failed.","format":"date-time","type":"string"},"id":{"description":"The job's id.","format":"uuid","type":"string"},"message":{"description":"Why the import failed.","type":"string"},"name":{"description":"The file's name.","type":"string"},"objectId":{"description":"The id the first layer or raster will get. For a replacement, the replaced object's id.","format":"uuid","type":"string"},"replaces":{"properties":{"id":{"format":"uuid","type":"string"},"kind":{"enum":["layer","raster"],"type":"string"}},"required":["kind","id"],"type":"object"},"state":{"description":"downloading means a linked file is being fetched before it is read.","enum":["queued","downloading","reading","failed"],"type":"string"},"via":{"description":"How the file arrived. Sent, by its link, or listed from a sensor network. The last two can be stopped (import.stop) while being fetched.","enum":["upload","link","sensors"],"type":"string"}},"required":["id","objectId","name","state","via","at"],"type":"object"},"Job":{"description":"Background work running or done for the user, with its kind, status, steps and progress.","properties":{"at":{"description":"When the work started, or when it ended for finished work.","format":"date-time","type":"string"},"cancel":{"$ref":"#/components/schemas/JobCall","description":"The action Cancel runs, if the work can still be stopped."},"featureCopy":{"$ref":"#/components/schemas/FeatureCopyJobReport"},"id":{"type":"string"},"inspectionImport":{"$ref":"#/components/schemas/RiskInspectionImportJobReport"},"kind":{"enum":["run","transfer","layer","risk","import","purge"],"type":"string"},"maintenanceImport":{"$ref":"#/components/schemas/RiskMaintenanceImportJobReport"},"meta":{"type":"string"},"networkBuild":{"$ref":"#/components/schemas/NetworkBuildJobReport"},"progress":{"description":"Progress, if the work reports it.","maximum":100,"minimum":0,"type":"integer"},"purgeCheck":{"$ref":"#/components/schemas/PurgeCheckJobReport"},"retry":{"$ref":"#/components/schemas/JobCall","description":"The action Retry runs, if the work can be started again."},"said":{"$ref":"#/components/schemas/Said","description":"Codes are delete-project, check-project-deletion, engine-run (engine), scheduled (name) with flow-analysis, import-inspections, import-work-orders, import and export (folder, with import-folder and export-folder), risk-run, layers-building, layers-stalled, layers-failed and layers-never-finished (count), layer-never-finished (name), copy-features with features-copied (project, layer, count), copy-risk-record-files with risk-record-files (project, count), and build-model or build-into-model with model-built (project, model, nodes, links). A sensor job's code is its title."},"status":{"$ref":"#/components/schemas/Tag"},"steps":{"description":"The work's stages in order, if it has any.","items":{"properties":{"code":{"description":"The step's code, made from its name the same way as a tag's.","type":"string"},"name":{"type":"string"},"state":{"enum":["done","active","queued","failed"],"type":"string"}},"required":["name","state"],"type":"object"},"type":"array"},"target":{"$ref":"#/components/schemas/Target"},"title":{"type":"string"}},"required":["id","kind","title","meta","status","at","target"],"type":"object"},"JobCall":{"description":"An action and its parameters, as queued.","properties":{"action":{"type":"string"},"context":{"$ref":"#/components/schemas/ActionContext"},"params":{"additionalProperties":true,"type":"object"}},"required":["action","params","context"],"type":"object"},"Jobs":{"properties":{"done":{"description":"Finished in the last 7 days and not cleared. Newest first.","items":{"$ref":"#/components/schemas/Job"},"type":"array"},"elsewhere":{"description":"Your other workspaces with items to act on, most first.","items":{"$ref":"#/components/schemas/JobsElsewhere"},"type":"array"},"running":{"items":{"$ref":"#/components/schemas/Job"},"type":"array"},"todo":{"description":"Failed, or stopped for a decision, in the last 30 days and not dismissed. Newest first.","items":{"$ref":"#/components/schemas/Job"},"type":"array"}},"required":["todo","running","done","elsewhere"],"type":"object"},"JobsElsewhere":{"properties":{"todo":{"minimum":1,"type":"integer"},"workspace":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["workspace","todo"],"type":"object"},"JunctionCustomers":{"properties":{"customers":{"items":{"properties":{"category":{"type":"string"},"demand":{"type":"number"},"distanceFt":{"type":["number","null"]},"fid":{"type":"integer"},"id":{"type":"string"},"method":{"type":["string","null"]}},"required":["fid","id","category","demand","method","distanceFt"],"type":"object"},"type":"array"},"demandsCurrent":{"type":"boolean"},"layerId":{"format":"uuid","type":["string","null"]},"total":{"type":"number"},"units":{"type":"string"}},"required":["layerId","units","customers","total","demandsCurrent"],"type":"object"},"JunctionTypes":{"properties":{"counts":{"properties":{"customer":{"type":"integer"},"dead_end":{"type":"integer"},"fitting":{"type":"integer"},"hydrant":{"type":"integer"},"other":{"type":"integer"},"tap":{"type":"integer"},"unclassified":{"description":"Junctions with no type yet.","type":"integer"},"valve":{"type":"integer"}},"required":["customer","hydrant","tap","valve","fitting","dead_end","other","unclassified"],"type":"object"},"layerId":{"description":"The model's junction layer.","format":"uuid","type":"string"},"total":{"description":"Total junctions in the layer.","type":"integer"}},"required":["layerId","counts","total"],"type":"object"},"Label":{"properties":{"id":{"format":"uuid","type":"string"},"layout":{"$ref":"#/components/schemas/Paint"},"paint":{"$ref":"#/components/schemas/Paint"},"property":{"oneOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["Symbol","Icon","Text"],"type":"string"}},"required":["id","type","paint","layout"],"type":"object"},"LabelEntry":{"allOf":[{"$ref":"#/components/schemas/Label"},{"properties":{"active":{"type":"boolean"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"version":{"description":"A digest of the stored label, including whether it is on.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["name","active","version"],"type":"object"}]},"Layer":{"properties":{"bounds":{"description":"Null for a model's network layer, since a model can have hundreds and their archive headers aren't read for the contents. The map reads the header when it draws the layer.","oneOf":[{"$ref":"#/components/schemas/Bounds"},{"type":"null"}]},"createdAt":{"description":"When the layer was created. A background pass can write a sharper archive at the same address a few minutes after the first, so the app keeps requesting it for a while.","format":"date-time","type":"string"},"featureCount":{"description":"The layer's row count. Counted once per version, and again in the background every 10 minutes. Counted on every read for a layer drawn from its rows. Null for a model's network layer, since a project can have hundreds of them. The model's own count covers them.","minimum":0,"type":["integer","null"]},"geometry":{"enum":["point","line","polygon"],"type":"string"},"groupId":{"oneOf":[{"format":"uuid","type":"string"},{"type":"null"}]},"heldElsewhere":{"description":"Present and true for a layer added from another project's, which keeps its features. layer.own makes it this project's own copy.","type":"boolean"},"id":{"format":"uuid","type":"string"},"label":{"oneOf":[{"$ref":"#/components/schemas/Label"},{"type":"null"}]},"model":{"description":"The model whose network this layer belongs to, and the layer's role in it.","properties":{"id":{"format":"uuid","type":"string"},"name":{"description":"Empty when the model is deleted and its layer isn't.","type":"string"},"role":{"type":"string"},"symbols":{"description":"Whether the layer uses its network's symbols, one per kind (layers.metadata networkSymbols, on unless false). When off, plain dots and lines. Sent on every read. Absent means on.","type":"boolean"}},"required":["id","name"],"type":"object"},"name":{"type":"string"},"observedData":{"description":"Present and true for the Observed data layer of meters from a model file (sensors as its source). Its sites are listed under monitoring, so it is left out of the project's contents.","type":"boolean"},"order":{"description":"The layer's position among its group's objects. The highest draws on top.","type":"integer"},"pendingEdits":{"description":"Features with saved edits not yet in the archive (gis.layer_feature_deltas). Absent when there are none. The map requests the layer's changes only when present.","minimum":1,"type":"integer"},"placedIn":{"description":"Present when more than one project has a layer showing its features (gis.layers rows with its content_id), this one counted.","type":"integer"},"projectId":{"format":"uuid","type":"string"},"rebuilding":{"description":"Present and true while tiles are rebuilt from rows after edits. The old tiles show with the edits on top until the new ones arrive. Saves are still accepted.","type":"boolean"},"replacing":{"$ref":"#/components/schemas/Replacing"},"source":{"enum":["import","survey","riskProjects","sensors","model"],"type":"string"},"status":{"$ref":"#/components/schemas/LayerStatus"},"style":{"oneOf":[{"$ref":"#/components/schemas/LayerStyle"},{"type":"null"}]},"tiles":{"description":"Null while building or failed, and for a layer with no archive that isn't drawn from its rows.","oneOf":[{"$ref":"#/components/schemas/Tiles"},{"type":"null"}]},"updatedAt":{"format":"date-time","type":"string"},"visible":{"description":"Whether the layer shows by default for users who haven't chosen. The project's view.","type":"boolean"}},"required":["id","projectId","name","geometry","order","groupId","visible","featureCount","status","source","tiles","bounds","style","label","updatedAt","createdAt"],"type":"object"},"LayerStatus":{"properties":{"message":{"description":"Why it failed, when failed.","type":"string"},"state":{"enum":["ready","building","failed"],"type":"string"},"step":{"description":"The current step, while building.","enum":["input","geojson","features","tiles","geotiff","cog"],"type":"string"}},"required":["state"],"type":"object"},"LayerStyle":{"properties":{"categorical":{"oneOf":[{"$ref":"#/components/schemas/Classes"},{"type":"null"}]},"category":{"enum":["SingleSymbol","Categorical","Graduated"],"type":"string"},"graduated":{"oneOf":[{"$ref":"#/components/schemas/Classes"},{"type":"null"}]},"id":{"format":"uuid","type":"string"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"singleSymbol":{"oneOf":[{"properties":{"paint":{"$ref":"#/components/schemas/Paint"}},"required":["paint"],"type":"object"},{"type":"null"}]},"type":{"enum":["Background","Circle","Fill","FillExtrusion","Heatmap","Hillshade","Line","Raster","Symbol"],"type":"string"}},"required":["id","name","type","category","singleSymbol","categorical","graduated"],"type":"object"},"LayerStyles":{"properties":{"labels":{"items":{"$ref":"#/components/schemas/LabelEntry"},"type":"array"},"styles":{"items":{"$ref":"#/components/schemas/StyleEntry"},"type":"array"}},"required":["styles","labels"],"type":"object"},"LevelOfService":{"properties":{"criteria":{"properties":{"flood":{"properties":{"si":{"$ref":"#/components/schemas/FloodCriteria"},"us":{"$ref":"#/components/schemas/FloodCriteria"}},"required":["us","si"],"type":"object"},"sewer":{"properties":{"si":{"$ref":"#/components/schemas/SewerCriteria"},"us":{"$ref":"#/components/schemas/SewerCriteria"}},"required":["us","si"],"type":"object"},"stormwater":{"properties":{"si":{"$ref":"#/components/schemas/StormwaterCriteria"},"us":{"$ref":"#/components/schemas/StormwaterCriteria"}},"required":["us","si"],"type":"object"},"water":{"properties":{"si":{"$ref":"#/components/schemas/WaterLevelOfService"},"us":{"$ref":"#/components/schemas/WaterLevelOfService"}},"required":["us","si"],"type":"object"}},"required":["water","sewer","stormwater","flood"],"type":"object"},"floodImpact":{"$ref":"#/components/schemas/FloodImpactLayers"},"models":{"description":"The project's models in the list's order, each with its system and the criteria group it is judged by.","items":{"$ref":"#/components/schemas/ModelLevelOfService"},"type":"array"},"placeholders":{"description":"Group and key of each value with no number yet, such as sewer.basementDepthFt.","items":{"type":"string"},"type":"array"},"sources":{"additionalProperties":true,"type":"object"},"units":{"description":"The project's units, which values are in.","enum":["us","si"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/LevelOfServiceValue"},"type":"array"}},"required":["criteria","placeholders","sources","units","values","floodImpact","models"],"type":"object"},"LevelOfServiceOrigins":{"additionalProperties":{"enum":["default","project","request"],"type":"string"},"description":"Where each criterion of a check came from, by key: request when the check was given it, project when the project set it, else default.","type":"object"},"LevelOfServiceValue":{"properties":{"default":{"description":"The default, in the project's units."},"group":{"enum":["water","sewer","stormwater","flood"],"type":"string"},"key":{"type":"string"},"max":{"type":["number","null"]},"min":{"type":["number","null"]},"origin":{"enum":["default","project"],"type":"string"},"unit":{"description":"The unit's symbol in the project's units; empty for a ratio, factor, flag or name.","type":"string"},"value":{"description":"What the project's runs are judged by: its own value, else the default."}},"required":["group","key","unit","value","default","origin","min","max"],"type":"object"},"Library":{"properties":{"categories":{"description":"The categories of published datasets, for filtering. Not affected by the search.","items":{"$ref":"#/components/schemas/LibraryCategory"},"type":"array"},"datasets":{"items":{"$ref":"#/components/schemas/LibraryDataset"},"type":"array"},"regions":{"description":"The regions published datasets cover, alphabetical. Not affected by the search.","items":{"type":"string"},"type":"array"}},"required":["datasets","categories","regions"],"type":"object"},"LibraryCategory":{"enum":["hydrologyFlood","administrativeBoundaries","buildingsStructures","infrastructureUtilities","environmentLandCover","demographics","imageryBasemaps"],"type":"string"},"LibraryDataset":{"properties":{"added":{"description":"True when the project already has the dataset.","type":"boolean"},"attribution":{"type":"string"},"bounds":{"$ref":"#/components/schemas/Bounds"},"category":{"$ref":"#/components/schemas/LibraryCategory"},"dataUpdatedAt":{"format":"date-time","type":"string"},"description":{"type":"string"},"id":{"format":"uuid","type":"string"},"license":{"type":"string"},"publisher":{"description":"Who prepared the dataset for the library.","type":"string"},"region":{"type":"string"},"source":{"description":"Where the data comes from.","type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"thumbnail":{"format":"uri","type":"string"},"title":{"type":"string"},"type":{"description":"Vector data is added as a service drawn from its archive. Raster data is added as a raster.","enum":["vector","raster"],"type":"string"},"updateFrequency":{"enum":["static","monthly","quarterly","semiAnnually","annually"],"type":"string"}},"required":["id","title","category","type","region","source","tags","added"],"type":"object"},"LiningAdjustments":{"description":"Feet added to a pipe's total length, or taken off when negative, one per pipe. Rounded to a tenth of a foot; zeros are dropped.","items":{"additionalProperties":false,"properties":{"fid":{"type":"integer"},"ft":{"maximum":10000,"minimum":-10000,"type":"number"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid","ft"],"type":"object"},"maxItems":5000,"type":"array"},"LiningByDiameter":{"items":{"properties":{"diameterIn":{"type":["number","null"]},"lengthFt":{"type":"number"},"segments":{"type":"integer"}},"required":["diameterIn","segments","lengthFt"],"type":"object"},"type":"array"},"LiningDepthSource":{"enum":["data","inferred","assumed",null],"type":["string","null"]},"LiningGuess":{"properties":{"linedLayerIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"nodeLayerIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"pipeLayerIds":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["pipeLayerIds","nodeLayerIds","linedLayerIds"],"type":"object"},"LiningHealth":{"properties":{"defaultDepths":{"description":"The depth given to manholes with no other depth source, per node layer, and for the network (no layer).","items":{"properties":{"basis":{"$ref":"#/components/schemas/LiningSaid"},"depthFt":{"type":"number"},"layerId":{"format":"uuid","type":["string","null"]}},"required":["layerId","depthFt","basis"],"type":"object"},"type":"array"},"depthDefault":{"type":"integer"},"depthInferred":{"type":"integer"},"duplicateNodeNames":{"$ref":"#/components/schemas/LiningRepeated"},"duplicatePipeNames":{"$ref":"#/components/schemas/LiningRepeated"},"ends":{"description":"Pipe ends joined by name, to the nearest node within the tolerance, or to nothing.","properties":{"byName":{"type":"integer"},"snapped":{"type":"integer"},"unmatched":{"type":"integer"}},"required":["byName","snapped","unmatched"],"type":"object"},"linedUnmatched":{"description":"Pipes on the lined layers whose name matched no pipe.","type":"integer"},"nodes":{"type":"integer"},"nodesMissingInvert":{"type":"integer"},"nodesMissingRim":{"type":"integer"},"nodesRimAtOrBelowInvert":{"type":"integer"},"pieces":{"description":"Separate connected pieces of the network.","type":"integer"},"pipes":{"type":"integer"},"pipesAlreadyLined":{"type":"integer"},"pipesFullyMatched":{"type":"integer"},"pipesLengthMismatch":{"type":"integer"},"pipesMissingDiameter":{"type":"integer"},"pipesMissingLength":{"type":"integer"},"snapToleranceM":{"type":"number"}},"required":["pipes","nodes","ends","pipesFullyMatched","duplicatePipeNames","duplicateNodeNames","nodesMissingRim","nodesMissingInvert","nodesRimAtOrBelowInvert","depthInferred","depthDefault","pipesMissingLength","pipesLengthMismatch","pipesMissingDiameter","pipesAlreadyLined","linedUnmatched","pieces","snapToleranceM","defaultDepths"],"type":"object"},"LiningLayerKind":{"enum":["line","point","other"],"type":"string"},"LiningLayers":{"properties":{"layers":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/LiningLayerKind"},"name":{"type":"string"}},"required":["id","name","kind"],"type":"object"},"type":"array"},"systems":{"properties":{"sewer":{"$ref":"#/components/schemas/LiningGuess"},"storm":{"$ref":"#/components/schemas/LiningGuess"}},"required":["sewer","storm"],"type":"object"}},"required":["layers","systems"],"type":"object"},"LiningNetwork":{"properties":{"health":{"$ref":"#/components/schemas/LiningHealth"},"keys":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"The columns of each layer, by layer id.","type":"object"},"layers":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"role":{"enum":["pipes","nodes","lined"],"type":"string"}},"required":["id","name","role"],"type":"object"},"type":"array"},"mapping":{"properties":{"nodes":{"additionalProperties":{"$ref":"#/components/schemas/LiningNodeMapping"},"type":"object"},"pipes":{"additionalProperties":{"$ref":"#/components/schemas/LiningPipeMapping"},"type":"object"}},"required":["pipes","nodes"],"type":"object"}},"required":["mapping","keys","layers","health"],"type":"object"},"LiningNode":{"properties":{"depthBasis":{"oneOf":[{"$ref":"#/components/schemas/LiningSaid"},{"type":"null"}]},"depthFt":{"type":["number","null"]},"depthSource":{"enum":["data","inferred","default",null],"type":["string","null"]},"fid":{"type":["integer","null"]},"flags":{"items":{"$ref":"#/components/schemas/LiningNodeFlag"},"type":"array"},"invertFt":{"type":["number","null"]},"key":{"type":"string"},"lat":{"type":"number"},"layerId":{"description":"None for a node named only by a pipe.","format":"uuid","type":["string","null"]},"lng":{"type":"number"},"name":{"type":["string","null"]},"rimFt":{"type":["number","null"]},"structureType":{"type":["string","null"]}},"required":["key","name","layerId","fid","structureType","lng","lat","rimFt","invertFt","depthFt","depthSource","depthBasis","flags"],"type":"object"},"LiningNodeAsk":{"description":"A manhole, by its feature or by its name as the pipes spell it.","oneOf":[{"additionalProperties":false,"properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},{"additionalProperties":false,"properties":{"name":{"minLength":1,"type":"string"}},"required":["name"],"type":"object"}]},"LiningNodeCorrection":{"additionalProperties":false,"description":"A correction to a node layer's guessed columns, as for a pipe layer.","properties":{"depth":{"type":["string","null"]},"id":{"type":["string","null"]},"invert":{"type":["string","null"]},"rim":{"type":["string","null"]},"structureType":{"type":["string","null"]}},"type":"object"},"LiningNodeFlag":{"enum":["missingRim","missingInvert","rimAtOrBelowInvert","duplicateName","notOnNodeLayers"],"type":"string"},"LiningNodeMapping":{"properties":{"depth":{"type":["string","null"]},"id":{"type":["string","null"]},"invert":{"type":["string","null"]},"rim":{"type":["string","null"]},"structureType":{"type":["string","null"]}},"required":["id","rim","invert","depth","structureType"],"type":"object"},"LiningPackage":{"properties":{"cost":{"description":"Only when cost is on. A planning estimate, not a quote.","properties":{"assumptions":{"items":{"$ref":"#/components/schemas/LiningSaid"},"type":"array"},"contingency":{"type":"number"},"contingencyPct":{"type":"number"},"label":{"type":"string"},"lining":{"properties":{"lines":{"items":{"properties":{"amount":{"type":"number"},"lengthFt":{"type":"number"},"perFt":{"type":"number"},"rateDiameterIn":{"type":"number"},"segments":{"type":"integer"}},"required":["rateDiameterIn","perFt","segments","lengthFt","amount"],"type":"object"},"type":"array"},"subtotal":{"type":"number"},"unpricedLengthFt":{"type":"number"},"unpricedSegments":{"type":"integer"}},"required":["lines","subtotal","unpricedSegments","unpricedLengthFt"],"type":"object"},"manholes":{"description":"Only when manhole rehab is on.","properties":{"count":{"type":"integer"},"perVf":{"type":"number"},"subtotal":{"type":"number"},"unpriced":{"type":"integer"},"verticalFt":{"type":"number"}},"required":["perVf","count","verticalFt","subtotal","unpriced"],"type":"object"},"rates":{"items":{"$ref":"#/components/schemas/LiningRate"},"type":"array"},"subtotal":{"type":"number"},"total":{"type":"number"}},"required":["label","lining","subtotal","contingencyPct","contingency","total","rates","assumptions"],"type":"object"},"manholes":{"items":{"properties":{"connectedPipes":{"items":{"type":"string"},"type":"array"},"cost":{"description":"Only when cost and manhole rehab are on.","properties":{"amount":{"type":["number","null"]},"note":{"oneOf":[{"$ref":"#/components/schemas/LiningSaid"},{"type":"null"}]},"perVf":{"type":"number"}},"required":["perVf","amount","note"],"type":"object"},"depthBasis":{"oneOf":[{"$ref":"#/components/schemas/LiningSaid"},{"type":"null"}]},"depthFt":{"type":["number","null"]},"depthSource":{"$ref":"#/components/schemas/LiningDepthSource"},"fid":{"type":["integer","null"]},"flags":{"items":{"$ref":"#/components/schemas/LiningNodeFlag"},"type":"array"},"invertFt":{"type":["number","null"]},"key":{"type":"string"},"lat":{"type":"number"},"layerId":{"format":"uuid","type":["string","null"]},"lng":{"type":"number"},"mhId":{"type":"string"},"no":{"type":"integer"},"notes":{"items":{"$ref":"#/components/schemas/LiningSaid"},"type":"array"},"rimFt":{"type":["number","null"]},"structureType":{"type":["string","null"]}},"required":["no","key","layerId","fid","mhId","structureType","rimFt","invertFt","depthFt","depthSource","depthBasis","connectedPipes","lat","lng","flags","notes"],"type":"object"},"type":"array"},"missing":{"$ref":"#/components/schemas/LiningPipesAsk"},"package":{"properties":{"date":{"format":"date","type":["string","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"system":{"oneOf":[{"$ref":"#/components/schemas/LiningSystem"},{"type":"null"}]},"units":{"description":"The project's units. The schedules are in feet and inches either way.","enum":["us","metric"],"type":"string"}},"required":["name","notes","system","units","date"],"type":"object"},"segments":{"items":{"properties":{"adjustmentFt":{"description":"The pipe's hand adjustment in feet, negative when taken off. Null when there is none.","type":["number","null"]},"alreadyLined":{"enum":["lined","rehabbed",null],"type":["string","null"]},"cost":{"description":"Only when cost is on.","properties":{"amount":{"type":["number","null"]},"note":{"oneOf":[{"$ref":"#/components/schemas/LiningSaid"},{"type":"null"}]},"perFt":{"type":["number","null"]},"rateDiameterIn":{"description":"The rate's diameter: the pipe's, or the next size up.","type":["number","null"]}},"required":["rateDiameterIn","perFt","amount","note"],"type":"object"},"diameterIn":{"type":["number","null"]},"downstreamDepthFt":{"type":["number","null"]},"downstreamDepthSource":{"$ref":"#/components/schemas/LiningDepthSource"},"downstreamMh":{"type":["string","null"]},"fid":{"type":"integer"},"flags":{"items":{"$ref":"#/components/schemas/LiningSegmentFlag"},"type":"array"},"layerId":{"format":"uuid","type":"string"},"lengthFt":{"type":["number","null"]},"lengthSource":{"enum":["data","measured",null],"type":["string","null"]},"manholeDepthFt":{"description":"Upstream plus downstream manhole depth. The liner runs manhole to manhole, so a manhole between two chosen pipes counts on both.","type":["number","null"]},"manholesCounted":{"description":"The manholes whose depth is in manholeDepthFt.","items":{"type":"string"},"type":"array"},"material":{"type":["string","null"]},"no":{"description":"From 1, in flow order.","type":"integer"},"notes":{"items":{"$ref":"#/components/schemas/LiningSaid"},"type":"array"},"pipeId":{"type":"string"},"shape":{"type":["string","null"]},"totalLengthFt":{"description":"Pipe length plus manholeDepthFt plus adjustmentFt. The column adds up to the summary.","type":["number","null"]},"upstreamDepthFt":{"type":["number","null"]},"upstreamDepthSource":{"$ref":"#/components/schemas/LiningDepthSource"},"upstreamMh":{"type":["string","null"]}},"required":["no","layerId","fid","pipeId","upstreamMh","downstreamMh","diameterIn","shape","material","lengthFt","lengthSource","upstreamDepthFt","upstreamDepthSource","downstreamDepthFt","downstreamDepthSource","manholeDepthFt","manholesCounted","adjustmentFt","totalLengthFt","alreadyLined","flags","notes"],"type":"object"},"type":"array"},"summary":{"properties":{"adjustmentFt":{"description":"The hand adjustments summed, in feet.","type":"number"},"byDiameter":{"$ref":"#/components/schemas/LiningByDiameter"},"depthMaxFt":{"type":["number","null"]},"depthMinFt":{"type":["number","null"]},"depthSources":{"properties":{"assumed":{"type":"integer"},"data":{"type":"integer"},"inferred":{"type":"integer"}},"required":["data","inferred","assumed"],"type":"object"},"flaggedManholes":{"type":"integer"},"flaggedSegments":{"type":"integer"},"lengthFt":{"type":"number"},"manholeDepthFt":{"description":"Every manhole's depth, each counted once: the manhole schedule's total.","type":"number"},"manholes":{"type":"integer"},"runs":{"description":"Separate connected runs among the chosen pipes.","type":"integer"},"segmentDepthFt":{"description":"The segment rows' manhole depths summed, both ends of every pipe.","type":"number"},"segments":{"type":"integer"},"totalLengthFt":{"description":"The segment rows' total lengths summed. Lining is priced on it.","type":"number"},"warnings":{"description":"Warnings to check before sending the package.","items":{"$ref":"#/components/schemas/LiningSaid"},"type":"array"}},"required":["segments","lengthFt","manholeDepthFt","segmentDepthFt","adjustmentFt","totalLengthFt","byDiameter","manholes","depthMinFt","depthMaxFt","depthSources","runs","flaggedSegments","flaggedManholes","warnings"],"type":"object"}},"required":["package","segments","manholes","summary","missing"],"type":"object"},"LiningPackageAsk":{"allOf":[{"$ref":"#/components/schemas/LiningSpec"},{"properties":{"options":{"additionalProperties":false,"properties":{"adjustments":{"$ref":"#/components/schemas/LiningAdjustments"},"cost":{"additionalProperties":false,"description":"A planning estimate, off unless `enabled`. Options left out use their defaults.","properties":{"contingencyPct":{"maximum":100,"minimum":0,"type":"number"},"enabled":{"type":"boolean"},"liningRates":{"description":"$ per linear foot by nominal diameter. A size between rows uses the next size up. Default is planning-level CIPP rates.","items":{"$ref":"#/components/schemas/LiningRate"},"maxItems":50,"type":"array"},"manholeRehab":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"perVf":{"description":"$ per vertical foot. Default 350.","maximum":100000,"minimum":0,"type":"number"}},"type":"object"}},"type":"object"},"date":{"description":"The package's date. Default is today in the project's time zone.","format":"date","type":"string"},"name":{"maxLength":200,"type":"string"},"notes":{"maxLength":5000,"type":"string"}},"type":"object"},"pipes":{"$ref":"#/components/schemas/LiningPipesAsk"}},"required":["pipes"],"type":"object"}]},"LiningPipeCorrection":{"additionalProperties":false,"description":"A correction to a pipe layer's guessed columns. A key left out keeps the guess. Null means the layer has no such column.","properties":{"diameter":{"type":["string","null"]},"diameterUnit":{"enum":["in","ft","mm","m"],"type":"string"},"downInvert":{"type":["string","null"]},"from":{"type":["string","null"]},"id":{"type":["string","null"]},"length":{"type":["string","null"]},"lengthUnit":{"enum":["ft","m"],"type":"string"},"material":{"type":["string","null"]},"rehabAction":{"type":["string","null"]},"rehabbed":{"type":["string","null"]},"shape":{"type":["string","null"]},"to":{"type":["string","null"]},"upInvert":{"type":["string","null"]}},"type":"object"},"LiningPipeMapping":{"properties":{"diameter":{"type":["string","null"]},"diameterUnit":{"enum":["in","ft","mm","m"],"type":"string"},"downInvert":{"type":["string","null"]},"from":{"type":["string","null"]},"id":{"type":["string","null"]},"length":{"type":["string","null"]},"lengthUnit":{"enum":["ft","m"],"type":"string"},"material":{"type":["string","null"]},"rehabAction":{"description":"A rehab method recorded on the pipe.","type":["string","null"]},"rehabbed":{"description":"A yes or no \"has been rehabbed\" field.","type":["string","null"]},"shape":{"type":["string","null"]},"to":{"type":["string","null"]},"upInvert":{"type":["string","null"]}},"required":["id","from","to","diameter","diameterUnit","length","lengthUnit","material","shape","rehabAction","rehabbed","upInvert","downInvert"],"type":"object"},"LiningPipesAsk":{"items":{"additionalProperties":false,"properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"maxItems":5000,"type":"array"},"LiningRate":{"additionalProperties":false,"properties":{"diameterIn":{"maximum":240,"minimum":0.1,"type":"number"},"perFt":{"maximum":100000,"minimum":0,"type":"number"}},"required":["diameterIn","perFt"],"type":"object"},"LiningRepeated":{"properties":{"count":{"type":"integer"},"examples":{"items":{"type":"string"},"maxItems":10,"type":"array"}},"required":["count","examples"],"type":"object"},"LiningRun":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/LiningNode"},"type":"array"},"segments":{"items":{"$ref":"#/components/schemas/LiningSegment"},"type":"array"},"totals":{"properties":{"byDiameter":{"$ref":"#/components/schemas/LiningByDiameter"},"depthMaxFt":{"type":["number","null"]},"depthMinFt":{"type":["number","null"]},"depthSources":{"properties":{"data":{"type":"integer"},"default":{"type":"integer"},"inferred":{"type":"integer"}},"required":["data","inferred","default"],"type":"object"},"flaggedManholes":{"type":"integer"},"flaggedSegments":{"type":"integer"},"lengthFt":{"type":"number"},"manholes":{"type":"integer"},"segments":{"type":"integer"}},"required":["segments","lengthFt","byDiameter","manholes","depthMinFt","depthMaxFt","depthSources","flaggedSegments","flaggedManholes"],"type":"object"}},"required":["segments","nodes","totals"],"type":"object"},"LiningSaid":{"description":"A lining result in words. Includes a code the app translates, its placeholder values, and the English text that agents and the CSV use.","properties":{"code":{"type":"string"},"text":{"type":"string"},"values":{"additionalProperties":{"type":["string","number"]},"type":"object"}},"required":["code","text"],"type":"object"},"LiningSavedAsk":{"additionalProperties":false,"properties":{"packageId":{"description":"A saved package, built from current data.","format":"uuid","type":"string"}},"required":["packageId"],"type":"object"},"LiningSavedPackage":{"allOf":[{"$ref":"#/components/schemas/LiningSavedSummary"},{"properties":{"bounds":{"description":"The footprint's extent: west, south, east, north.","items":{"type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"createdAt":{"format":"date-time","type":"string"},"missingLayers":{"description":"Layers it was built on that were deleted.","items":{"format":"uuid","type":"string"},"type":"array"},"missingPipes":{"$ref":"#/components/schemas/LiningPipesAsk"},"options":{"properties":{"adjustments":{"allOf":[{"$ref":"#/components/schemas/LiningAdjustments"}],"description":"The length adjustments saved. Empty for a package saved before they were kept."},"cost":{"description":"All cost options. Saved even when cost is off.","properties":{"contingencyPct":{"type":"number"},"enabled":{"type":"boolean"},"liningRates":{"items":{"$ref":"#/components/schemas/LiningRate"},"type":"array"},"manholeRehab":{"properties":{"enabled":{"type":"boolean"},"perVf":{"type":"number"}},"required":["enabled","perVf"],"type":"object"}},"required":["enabled","liningRates","manholeRehab","contingencyPct"],"type":"object"},"notes":{"type":["string","null"]}},"required":["notes","cost","adjustments"],"type":"object"},"pipes":{"$ref":"#/components/schemas/LiningPipesAsk"},"spec":{"allOf":[{"$ref":"#/components/schemas/LiningSpec"}],"description":"The layers still in the project, and the field mapping."},"warnings":{"items":{"$ref":"#/components/schemas/LiningSaid"},"type":"array"}},"required":["spec","pipes","options","missingLayers","missingPipes","warnings","bounds","createdAt"],"type":"object"}]},"LiningSavedSummary":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"riskProjectId":{"description":"The planned project it was saved as.","format":"uuid","type":"string"},"stage":{"enum":["planned","designed","construction","constructed","closed"],"type":"string"},"system":{"$ref":"#/components/schemas/LiningSystem"},"totals":{"$ref":"#/components/schemas/LiningSavedTotals"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","riskProjectId","name","system","stage","totals","updatedAt"],"type":"object"},"LiningSavedTotals":{"description":"The package totals when last saved.","properties":{"costTotal":{"description":"The planning estimate's total. Null when cost is off.","type":["number","null"]},"depthMaxFt":{"type":["number","null"]},"depthMinFt":{"type":["number","null"]},"lengthFt":{"type":"number"},"manholes":{"type":"integer"},"pipes":{"type":"integer"}},"required":["pipes","lengthFt","manholes","depthMinFt","depthMaxFt","costTotal"],"type":"object"},"LiningSegment":{"properties":{"againstFlow":{"description":"The path follows this pipe against its flow.","type":"boolean"},"diameterIn":{"type":["number","null"]},"fid":{"type":"integer"},"flags":{"items":{"$ref":"#/components/schemas/LiningSegmentFlag"},"type":"array"},"from":{"description":"The node the flow comes from, according to the layer.","type":["string","null"]},"fromKey":{"description":"The node's key in this network, as a manhole's `key`.","type":"string"},"geometryLengthFt":{"type":["number","null"]},"layerId":{"format":"uuid","type":"string"},"lengthFt":{"type":["number","null"]},"lengthSource":{"enum":["data","geometry",null],"type":["string","null"]},"material":{"type":["string","null"]},"name":{"type":["string","null"]},"recordedLengthFt":{"type":["number","null"]},"shape":{"type":["string","null"]},"to":{"type":["string","null"]},"toKey":{"type":"string"}},"required":["layerId","fid","name","from","to","fromKey","toKey","lengthFt","lengthSource","recordedLengthFt","geometryLengthFt","diameterIn","material","shape","againstFlow","flags"],"type":"object"},"LiningSegmentFlag":{"enum":["missingLength","lengthMismatch","missingDiameter","missingMaterial","alreadyLined","rehabbed","unmatchedEnd","duplicateName","diameterDrop"],"type":"string"},"LiningSelection":{"allOf":[{"$ref":"#/components/schemas/LiningRun"},{"properties":{"missing":{"$ref":"#/components/schemas/LiningPipesAsk"}},"required":["missing"],"type":"object"}]},"LiningSpec":{"description":"The layers and settings a lining package's network is built from.","properties":{"defaultDepthFt":{"description":"The depth of a manhole with no other depth source. Default is its layer's median recorded depth.","exclusiveMaximum":200,"exclusiveMinimum":0,"type":"number"},"linedLayerIds":{"description":"Line layers of pipes already lined. A pipe with the same name is flagged.","items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"mapping":{"additionalProperties":false,"description":"Corrections to the guessed columns, by layer id.","properties":{"nodes":{"additionalProperties":{"$ref":"#/components/schemas/LiningNodeCorrection"},"type":"object"},"pipes":{"additionalProperties":{"$ref":"#/components/schemas/LiningPipeCorrection"},"type":"object"}},"type":"object"},"nodeLayerIds":{"description":"Every point layer the pipes run between. For example, a storm network has inlets, boxes and junctions. A name on two layers belongs to the earlier layer.","items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"pipeLayerIds":{"description":"The line layers of pipes to line.","items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"snapToleranceM":{"description":"How far a pipe end can be from a node and still join it when no name matches, in meters. Default 3 m.","maximum":50,"minimum":0,"type":"number"},"system":{"$ref":"#/components/schemas/LiningSystem"}},"required":["pipeLayerIds","nodeLayerIds"],"type":"object"},"LiningSystem":{"enum":["sewer","storm"],"type":"string"},"LiningTrace":{"allOf":[{"$ref":"#/components/schemas/LiningRun"},{"properties":{"direction":{"enum":["downstream","upstream","undirected",null],"type":["string","null"]},"end":{"oneOf":[{"$ref":"#/components/schemas/LiningNode"},{"type":"null"}]},"found":{"type":"boolean"},"reason":{"$ref":"#/components/schemas/LiningSaid"},"start":{"oneOf":[{"$ref":"#/components/schemas/LiningNode"},{"type":"null"}]}},"required":["found","direction","reason","start","end"],"type":"object"}]},"LinkProbe":{"properties":{"added":{"description":"True when the project already has a service at this address.","type":"boolean"},"file":{"properties":{"size":{"description":"Size in bytes, when the host reports it.","format":"int64","minimum":1,"type":"integer"},"type":{"description":"What the file becomes, layers or a raster.","enum":["vector","raster"],"type":"string"}},"required":["type"],"type":"object"},"kind":{"description":"What the link is, a service (service) or a file to import (file).","enum":["service","file"],"type":"string"},"name":{"description":"A service's name from its address, which the user can change, or a file's name from its host, which the import uses.","type":"string"},"service":{"properties":{"layers":{"description":"What can be drawn. An ArcGIS service's feature layers (tables and groups left out), or an archive's vector layers. Empty for a service drawn whole.","items":{"properties":{"geometry":{"enum":["point","line","polygon"],"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"login":{"description":"none means no login is needed. needed means one is needed and none was given. refused means the given login was refused (see why). given means the given login works (see loginToken).","enum":["none","needed","refused","given"],"type":"string"},"loginToken":{"description":"The working login, sealed for service.add for 30 minutes.","type":"string"},"tiles":{"description":"A PMTiles archive's tiles.","enum":["vector","raster"],"type":"string"},"type":{"enum":["FeatureServer","MapServer","ImageServer","VectorServer","PMTiles"],"type":"string"},"why":{"description":"Why the login was refused, in the portal's words.","type":"string"}},"required":["type","login","layers"],"type":"object"},"url":{"description":"The address to add or fetch. A service's address without its query, or a file link rewritten to its download.","type":"string"}},"required":["kind","url","name"],"type":"object"},"LiveSensorReadings":{"allOf":[{"$ref":"#/components/schemas/SensorReadings"},{"properties":{"forecastPoints":{"description":"NWPS predictions after the latest observation, inside the requested window. Buckets may align with observed buckets. Empty for stored reads and sources without forecasts. Never flagged or archived.","items":{"properties":{"at":{"format":"date-time","type":"string"},"value":{"type":"number"}},"required":["at","value"],"type":"object"},"maxItems":20000,"type":"array"},"forecastStep":{"description":"Seconds per forecast point, independently bounded to 20,000 points.","minimum":0,"type":"integer"},"gauge":{"description":"A USGS site's river gauge, read with its forecast. Its name and the NWPS flood stages. Null for stored reads, other networks and gauges NWPS doesn't know.","oneOf":[{"properties":{"action":{"type":["number","null"]},"info":{"$ref":"#/components/schemas/GaugeInfo"},"major":{"type":["number","null"]},"minor":{"type":["number","null"]},"moderate":{"type":["number","null"]},"name":{"type":["string","null"]},"stageUnits":{"type":["string","null"]}},"required":["name","stageUnits","action","minor","moderate","major","info"],"type":"object"},{"type":"null"}]},"origin":{"enum":["stored","live"],"type":"string"}},"required":["origin","forecastStep","forecastPoints","gauge"],"type":"object"}]},"LngLat":{"properties":{"lat":{"maximum":90,"minimum":-90,"type":"number"},"lng":{"maximum":180,"minimum":-180,"type":"number"}},"required":["lng","lat"],"type":"object"},"Machine":{"properties":{"cpus":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"deleteAt":{"description":"When the machine deletes itself, if a timer is set.","format":"date-time","type":["string","null"]},"gpuCount":{"type":"integer"},"gpuModel":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"jupyter":{"description":"Whether Jupyter has been set up on the machine.","type":"boolean"},"location":{"type":"string"},"mayManage":{"description":"Whether you manage the machine and can get its keys, restart, restore or delete it.","type":"boolean"},"name":{"type":"string"},"pricePerHour":{"type":"number"},"ramGb":{"type":"number"},"startedBy":{"description":"Who deployed the machine. Null for a row made without one.","oneOf":[{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"},{"type":"null"}]},"state":{"description":"The machine's state, in one vocabulary for every provider.","enum":["starting","running","restarting","restoring","deleting","failed","unknown"],"type":"string"},"status":{"description":"The provider's latest status, in its own words.","type":"string"},"step":{"description":"While starting, one of ordered, the provider creating it, or Jupyter being set up.","enum":["ordered","provisioning","setting_up",null],"type":["string","null"]},"storageGb":{"type":"number"}},"required":["id","name","status","state","step","startedBy","location","cpus","ramGb","storageGb","gpuModel","gpuCount","pricePerHour","jupyter","createdAt","mayManage","deleteAt"],"type":"object"},"MachineHeartbeat":{"properties":{"gpu":{"properties":{"memory":{"type":"string"},"utilization":{"items":{"type":"string"},"type":"array"}},"required":["memory","utilization"],"type":"object"},"jupyter":{"type":"string"},"network":{"properties":{"interface":{"type":"string"},"received":{"type":"string"},"transmitted":{"type":"string"}},"required":["interface","received","transmitted"],"type":"object"},"ram":{"type":"string"},"status":{"type":"string"},"storage":{"type":"string"}},"required":["status","ram","storage","jupyter","gpu","network"],"type":"object"},"MachineOffer":{"properties":{"cloud":{"type":"string"},"cpus":{"type":"number"},"gpuCount":{"type":"integer"},"gpuModel":{"type":["string","null"]},"id":{"description":"\"instance type:region\", the value a deploy names.","type":"string"},"instanceType":{"type":"string"},"location":{"type":"string"},"pricePerHour":{"description":"Dollars an hour, markup included.","type":"number"},"ramGb":{"type":"number"},"region":{"type":"string"},"storageGb":{"type":"number"},"vramGbPerGpu":{"type":"number"}},"required":["id","cloud","instanceType","region","location","cpus","ramGb","storageGb","gpuModel","gpuCount","vramGbPerGpu","pricePerHour"],"type":"object"},"MachineUsage":{"properties":{"machines":{"items":{"properties":{"cost":{"type":"number"},"endedAt":{"format":"date-time","type":["string","null"]},"hours":{"type":"number"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"pricePerHour":{"type":"number"},"startedAt":{"format":"date-time","type":"string"}},"required":["id","name","startedAt","endedAt","pricePerHour","hours","cost"],"type":"object"},"type":"array"}},"required":["machines"],"type":"object"},"Me":{"properties":{"badges":{"properties":{"jobs":{"type":"integer"},"jobsRunning":{"type":"boolean"},"notifications":{"type":"integer"}},"required":["jobs","jobsRunning","notifications"],"type":"object"},"email":{"format":"email","type":"string"},"id":{"format":"uuid","type":"string"},"image":{"description":"The user's picture, as a short-lived presigned address. Left out when there is none.","type":"string"},"initials":{"maxLength":2,"type":"string"},"modules":{"properties":{"agent":{"description":"Ask is available only with this module.","type":"boolean"},"export":{"description":"Export, and publishing through it, are available only with this module.","type":"boolean"},"risk":{"description":"Risk and Plan are available only with this module.","type":"boolean"}},"required":["risk","export","agent"],"type":"object"},"name":{"type":"string"},"preferences":{"$ref":"#/components/schemas/Preferences"},"standing":{"$ref":"#/components/schemas/Standing"},"workspace":{"$ref":"#/components/schemas/Workspace"},"workspaces":{"items":{"$ref":"#/components/schemas/Membership"},"type":"array"}},"required":["id","name","initials","email","workspace","workspaces","standing","badges","modules","preferences"],"type":"object"},"Membership":{"properties":{"id":{"format":"uuid","type":"string"},"image":{"description":"The team's logo, or the user's picture for their personal workspace, as a short-lived presigned address. Left out when there is none.","type":"string"},"initials":{"maxLength":2,"type":"string"},"locked":{"description":"A team with no plan. Its workspace answers 402 `no-team-plan` to everything but its billing, the team, its invitations, the account and the project list, until it subscribes. Left out when false.","type":"boolean"},"name":{"type":"string"},"personal":{"description":"The user's personal workspace, which contains their personal projects.","type":"boolean"},"role":{"enum":["owner","admin","member","guest"],"type":"string"},"unseated":{"description":"The members and guests a team's plan has no seats for (the seat plan has owners and admins only), so the app can warn of them. Left out when none.","minimum":1,"type":"integer"}},"required":["id","name","initials","role"],"type":"object"},"Model":{"description":"A hydraulic model in a project, with its engine, network layers and import status.","properties":{"conversion":{"description":"A SWMM model's latest conversion to HEC-RAS (model.hecras.convert), returned in the list only. Running while the generator builds the model and the project imports it. Failed with the reason. Absent when there is none, when it was stopped, or when it finished, since the new model is then listed with the project's models.","properties":{"at":{"description":"When the conversion was requested, or when it ended.","format":"date-time","type":"string"},"error":{"description":"Why the conversion failed, as reported by the generator.","type":"string"},"state":{"enum":["running","failed"],"type":"string"}},"required":["state","at"],"type":"object"},"engine":{"description":"hecras is an imported HEC-RAS model. It runs one plan at a time with `model.run` and is changed with the `model.hecras.*` actions. Actions that change SWMM or EPANET data refuse it.","enum":["swmm","epanet","hecras"],"type":"string"},"error":{"description":"Why the import failed.","type":"string"},"groupId":{"format":"uuid","type":"string"},"hidden":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"latestVersion":{"description":"The model's newest version, returned in the list only, so a row can show it without loading the whole model. Absent before the first version.","properties":{"at":{"format":"date-time","type":"string"},"number":{"type":"integer"},"reason":{"type":"string"}},"required":["number","reason","at"],"type":"object"},"layers":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"role":{"type":"string"}},"required":["id","role","name"],"type":"object"},"type":"array"},"making":{"description":"A HEC-RAS model the model generator is building from an area on the map (model.hecras.generate), or failed to build. Present until the model is ready.","properties":{"step":{"description":"The generator's current step, as it reports it.","type":"string"}},"type":"object"},"name":{"type":"string"},"openswmm":{"description":"Present for a SWMM model that is OpenSWMM 6's: made or imported as SWMM 6 in New model (gis.hydraulic_models.source_manifest.engine = openswmm), or with a 2D surface. Its run, forecast and calibration forms start on OpenSWMM 6. Without a surface it is a 1D model, which EPA SWMM 5 can still run. Absent otherwise.","type":"boolean"},"order":{"description":"Its place in the project's list of models. The list is sorted by it, lowest first.","type":"integer"},"quietLayers":{"description":"A HEC-RAS model's geometry layers that are too dense to draw at first (mesh, break lines and refinement regions), or an OpenSWMM 2D model's 2D Cells layer when the import marked it too large to draw at first. The app hides them the first time it loads them. Absent when there are none.","items":{"format":"uuid","type":"string"},"type":"array"},"rasters":{"description":"A HEC-RAS model's own project rasters, as named in its source_manifest (terrainRasters, then landRasters' land cover and infiltration). They are listed under the model, not in the project's contents. Absent when there are none.","items":{"format":"uuid","type":"string"},"type":"array"},"split":{"description":"True when the model's data is in sections and series. False while it is still one file.","type":"boolean"},"state":{"enum":["importing","ready","failed"],"type":"string"},"surface":{"description":"Present for an OpenSWMM 6 model with a 2D surface, found from OpenSWMM's [2D_*] mesh on import. Only OpenSWMM 6 can run it, and a run on EPA SWMM 5 is refused. Absent otherwise, including for a PCSWMM 1D/2D model, whose 2D cells are junctions and conduits that EPA SWMM 5 runs.","type":"boolean"},"version":{"type":"integer"}},"required":["id","name","engine","order","state","version","hidden","split","layers"],"type":"object"},"ModelCheck":{"properties":{"drawnLengths":{"description":"How links' drawn lengths were measured for `length_mismatch`. A model's coordinates are in its project's system, so its links are measured there (`projected`, in the system's units made meters); a geographic system is measured along the ground (`geodesic`).","properties":{"measure":{"enum":["projected","geodesic"],"type":"string"},"srid":{"description":"The project's system, as its EPSG code.","type":"integer"}},"required":["measure","srid"],"type":"object"},"engine":{"enum":["swmm","epanet"],"type":"string"},"errors":{"minimum":0,"type":"integer"},"groups":{"description":"Each code's issues at one severity, in the order `issues` lists them, counted past the first 2,000. The app shows each as one entry.","items":{"$ref":"#/components/schemas/ModelCheckGroup"},"type":"array"},"issues":{"description":"By severity (errors first) and code; within a code by name, except `length_mismatch`, whose largest discrepancy comes first, so the first 2,000 keep the largest.","items":{"$ref":"#/components/schemas/ModelCheckIssue"},"type":"array"},"links":{"minimum":0,"type":"integer"},"nodes":{"minimum":0,"type":"integer"},"scenarioId":{"format":"uuid","type":["string","null"]},"sectionsRead":{"description":"Whether the model's sections were read. A data file too large to read here leaves references and options unchecked; the network itself is still checked.","type":"boolean"},"truncated":{"description":"Whether issues past the first 2,000 were left out.","type":"boolean"},"warnings":{"minimum":0,"type":"integer"}},"required":["engine","scenarioId","sectionsRead","drawnLengths","errors","warnings","nodes","links","issues","truncated","groups"],"type":"object"},"ModelCheckGroup":{"properties":{"code":{"type":"string"},"count":{"minimum":0,"type":"integer"},"listed":{"description":"How many of them `issues` lists.","minimum":0,"type":"integer"},"severity":{"enum":["error","warning"],"type":"string"}},"required":["code","severity","count","listed"],"type":"object"},"ModelCheckIssue":{"properties":{"bbox":{"items":{"type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"code":{"description":"What is wrong, for the app to word: orphan_node, missing_node, missing_end, same_ends, stacked_nodes, duplicate_link, duplicate_id, no_outfall, no_outfall_reached, no_source, no_source_reached, too_few_nodes, bad_length, length_mismatch, bad_roughness, bad_size, missing_shape, bad_barrels, pump_curve_missing, negative_depth, initial_above_max, offset_above_rim, offset_below_invert, adverse_slope, drop_exceeds_length, missing_elevation, missing_head, tank_levels, negative_demand, valve_at_tank, bad_area, bad_imperv, missing_outlet, unknown_reference, missing_flow_units, routing_over_report, routing_over_wet, dry_under_wet, start_after_end, bad_option. New codes may be added.","type":"string"},"fid":{"description":"Below zero for an element a scenario adds.","type":["integer","null"]},"layerId":{"format":"uuid","type":["string","null"]},"name":{"type":["string","null"]},"params":{"additionalProperties":true,"description":"The values the code names, such as the other node (`with`), the missing name (`value`) or the lengths compared. `length_mismatch` has `length` (as the model says it), `drawn` (in the model's units) and `ratio` (length over drawn length, to three significant figures).","type":"object"},"role":{"description":"The element's role; null for the model as a whole.","type":["string","null"]},"severity":{"enum":["error","warning"],"type":"string"}},"required":["code","severity","role","name","layerId","fid","bbox","params"],"type":"object"},"ModelDetail":{"allOf":[{"$ref":"#/components/schemas/Model"},{"properties":{"etag":{"description":"The value to send with model.data.save to name the data it changes. Null while the model has no data.","type":["string","null"]},"hecras":{"$ref":"#/components/schemas/HecRas"},"mesh":{"$ref":"#/components/schemas/ModelMesh"},"resultsSymbology":{"additionalProperties":true,"description":"The colors results are drawn in, per class (nodes, links, subcatchments), each with its metricId, classes and ramp. Null until someone saves them.","type":["object","null"]},"scenarios":{"items":{"properties":{"base":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"locked":{"description":"True for Base once a scenario is made from it.","type":"boolean"},"name":{"type":"string"},"parentId":{"format":"uuid","type":"string"},"tags":{"items":{"type":"string"},"type":"array"}},"required":["id","name","base","locked","tags"],"type":"object"},"type":"array"},"sections":{"items":{"properties":{"name":{"type":"string"},"size":{"description":"The section's entry count, or its key count for an options section.","type":"integer"}},"required":["name","size"],"type":"object"},"type":"array"},"series":{"items":{"properties":{"count":{"type":"integer"},"first":{"type":"string"},"kind":{"type":"string"},"last":{"type":"string"},"name":{"type":"string"}},"required":["name","kind","count"],"type":"object"},"type":"array"},"unread":{"description":"Why the sections and series of a single-file model aren't listed. Its data.json is missing from storage, is larger than 256 MB, or couldn't be read.","enum":["missing","tooLarge","failed"],"type":"string"},"versions":{"items":{"properties":{"at":{"format":"date-time","type":"string"},"by":{"description":"Who committed the version, if known.","type":"string"},"number":{"type":"integer"},"reason":{"description":"One of imported, edited, calibrated, run, agent or promoted.","type":"string"}},"required":["number","reason","at"],"type":"object"},"type":"array"}},"required":["etag","sections","series","versions","scenarios","resultsSymbology"],"type":"object"}]},"ModelLevelOfService":{"properties":{"engine":{"enum":["swmm","epanet","hecras"],"type":"string"},"group":{"description":"The criteria it is judged by.","enum":["water","sewer","stormwater"],"type":"string"},"id":{"format":"uuid","type":"string"},"system":{"description":"water for EPANET, stormwater for HEC-RAS; a SWMM model's is sanitary until it is set (model.system.set).","enum":["water","sanitary","combined","stormwater"],"type":"string"}},"required":["id","engine","system","group"],"type":"object"},"ModelMesh":{"description":"An OpenSWMM 2D model's mesh, as its Geometry view shows it. Present on a model with a 2D surface. The counts, sizes and outline come with its 2D Cells layer and are absent until it is made (model.swmm.cells for a model imported before the import made one).","properties":{"area":{"description":"Cell areas in the mesh's units squared.","properties":{"max":{"type":"number"},"mean":{"type":"number"},"min":{"type":"number"},"total":{"type":"number"}},"required":["total","min","mean","max"],"type":"object"},"bedElevation":{"description":"The lowest and highest cell beds (each cell's lowest vertex).","properties":{"max":{"type":"number"},"min":{"type":"number"}},"required":["min","max"],"type":"object"},"boundaryCells":{"description":"Cells with a boundary condition on an edge.","type":"integer"},"cells":{"type":"integer"},"coupledCells":{"description":"Cells coupled to the network's nodes.","type":"integer"},"crs":{"description":"The coordinates' CRS, e.g. EPSG:25832.","type":"string"},"dem":{"description":"The DEM that came with the model, its terrain.","type":"string"},"file":{"description":"The mesh file the .inp names. Absent for a mesh written in the .inp.","type":"string"},"fileMissing":{"description":"The mesh file the .inp names didn't come with the model.","type":"boolean"},"layerId":{"description":"The 2D Cells layer.","format":"uuid","type":"string"},"manningsN":{"description":"The cells' lowest and highest Manning's n.","properties":{"max":{"type":"number"},"min":{"type":"number"}},"required":["min","max"],"type":"object"},"outline":{"additionalProperties":true,"description":"The mesh's extent, a GeoJSON Polygon or MultiPolygon in longitude and latitude.","type":"object"},"units":{"description":"Metres (SI) or feet (US): the units of the areas and elevations.","enum":["SI","US"],"type":"string"},"vertices":{"type":"integer"}},"required":["fileMissing"],"type":"object"},"ModelNetwork":{"properties":{"modelId":{"format":"uuid","type":"string"},"sections":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"description":"conduits, pumps, orifices, weirs, outlets, junctions, outfalls, storage, dividers, subcatchments and xsections, each a list of rows from the decoded model.","type":"object"}},"required":["modelId","sections"],"type":"object"},"ModelRain":{"properties":{"gauges":{"items":{"$ref":"#/components/schemas/RainGauge"},"type":"array"},"split":{"description":"Whether the model is split, with each series stored as its own rows. A split model is needed to apply a storm or to run with inputs.","type":"boolean"},"storms":{"items":{"$ref":"#/components/schemas/ModelStorm"},"type":"array"}},"required":["split","gauges","storms"],"type":"object"},"ModelSections":{"properties":{"etag":{"type":["string","null"]},"sections":{"additionalProperties":true,"description":"Each section's body by name, in the shape the engine uses.","type":"object"}},"required":["etag","sections"],"type":"object"},"ModelStorm":{"properties":{"first":{"type":["string","null"]},"gauges":{"items":{"$ref":"#/components/schemas/ModelStormGauge"},"type":"array"},"inUse":{"description":"Whether every gauge the storm feeds reads its series now.","type":"boolean"},"last":{"type":["string","null"]},"name":{"type":"string"},"relative":{"description":"Counted from the start rather than dated.","type":"boolean"},"unread":{"description":"A series of the storm couldn't be read, so its format is unknown. The storm can't be applied or run.","type":"boolean"}},"required":["name","relative","first","last","inUse","gauges"],"type":"object"},"ModelStormGauge":{"properties":{"count":{"type":"integer"},"first":{"type":["string","null"]},"format":{"enum":["VOLUME","CUMULATIVE"],"type":"string"},"gauge":{"type":"string"},"last":{"type":["string","null"]},"series":{"type":"string"},"stepSeconds":{"type":["integer","null"]}},"required":["gauge","series","count","first","last","stepSeconds","format"],"type":"object"},"ModelVersionDetail":{"properties":{"at":{"format":"date-time","type":"string"},"by":{"description":"Who committed the version, if known.","type":"string"},"elements":{"items":{"properties":{"count":{"type":"integer"},"role":{"type":"string"}},"required":["role","count"],"type":"object"},"type":"array"},"number":{"type":"integer"},"reason":{"description":"One of imported, edited, calibrated, run, agent or promoted.","type":"string"},"sections":{"items":{"properties":{"name":{"type":"string"},"size":{"type":"integer"}},"required":["name","size"],"type":"object"},"type":"array"},"series":{"items":{"properties":{"count":{"type":"integer"},"first":{"type":"string"},"kind":{"type":"string"},"last":{"type":"string"},"name":{"type":"string"}},"required":["name","kind","count"],"type":"object"},"type":"array"}},"required":["number","reason","at","elements","sections","series"],"type":"object"},"MonitoringPeriod":{"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"format":"uuid","type":["string","null"]},"endAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"note":{"type":["string","null"]},"projectId":{"format":"uuid","type":"string"},"siteIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"source":{"enum":["typed","storm"],"type":"string"},"startAt":{"format":"date-time","type":"string"},"stormId":{"format":"uuid","type":["string","null"]}},"required":["id","projectId","name","startAt","endAt","siteIds","source","stormId","note","createdBy","createdAt"],"type":"object"},"MonitoringPeriods":{"properties":{"nextCursor":{"type":["string","null"]},"periods":{"items":{"$ref":"#/components/schemas/MonitoringPeriod"},"type":"array"}},"required":["periods","nextCursor"],"type":"object"},"NetworkBuildJobReport":{"description":"What a build of a model from GIS layers did, once it is done (model.build): the features it wrote into the new model's layers, its nodes, links and subcatchments, the junctions it made where bare ends met or links crossed, the link ends it snapped to a node, the links it dropped (a bare end, both ends on one node, or shorter than the tolerance), the links it split at a node and turned to run downhill, the outfalls it made, and the model check's errors and warnings on the network built. Built into an existing model, what it added to it, and the model's links it split.","properties":{"areas":{"description":"SWMM subcatchments.","minimum":0,"type":"integer"},"endsSnapped":{"minimum":0,"type":"integer"},"engine":{"enum":["swmm","epanet"],"type":"string"},"errors":{"minimum":0,"type":"integer"},"into":{"description":"Built into a model that was there before, rather than into a new one.","type":"boolean"},"links":{"minimum":0,"type":"integer"},"linksDropped":{"minimum":0,"type":"integer"},"model":{"description":"The model built.","type":"string"},"modelId":{"format":"uuid","type":"string"},"nodes":{"minimum":0,"type":"integer"},"nodesCreated":{"minimum":0,"type":"integer"},"outfalls":{"minimum":0,"type":"integer"},"reversed":{"minimum":0,"type":"integer"},"splitLinks":{"description":"The model's links the build split, each with a part split off it, by name, for the model rows the link has beside its feature to be copied to the part.","items":{"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"type":"array"},"splits":{"minimum":0,"type":"integer"},"warnings":{"minimum":0,"type":"integer"},"written":{"minimum":0,"type":"integer"}},"required":["modelId","model","engine","written","nodes","links","areas","nodesCreated","endsSnapped","linksDropped","splits","reversed","outfalls","errors","warnings"],"type":"object"},"Note":{"properties":{"author":{"description":"The note's author. Null when no author is recorded or the user was deleted.","oneOf":[{"$ref":"#/components/schemas/NoteAuthor"},{"type":"null"}]},"contentId":{"description":"Present when an image or a document note shows a workspace content's file (gis.annotations.content_id). Attaching a file makes that file a new content.","format":"uuid","type":"string"},"createdAt":{"description":"When the note was created. Null for notes created before notes had dates.","format":"date-time","type":["string","null"]},"geometry":{"additionalProperties":true,"description":"GeoJSON geometry, in WGS84.","type":"object"},"groupId":{"oneOf":[{"format":"uuid","type":"string"},{"type":"null"}]},"id":{"format":"uuid","type":"string"},"kind":{"description":"The note's kind. A highlight is a Line whose style is named \"Highlight\". Irregular is a drawn area.","enum":["Point","PointMarker","Notes","Text","Link","Video","Line","Irregular","Rectangle","Square","Circle","Image","Document"],"type":"string"},"mayEdit":{"description":"Whether the caller can edit or delete the note. Callers can edit their own notes while they can add notes, and anyone's notes while they can edit the project's contents.","type":"boolean"},"name":{"type":"string"},"order":{"description":"Position among the project's notes. The highest draws on top.","type":"integer"},"paint":{"additionalProperties":true,"description":"The note's appearance. Fill, stroke and text colors and sizes. For a balloon, also its box, scale and the zoom it was drawn at.","type":"object"},"pin":{"description":"The feature the note is pinned to. Null when the note is only on the map.","oneOf":[{"$ref":"#/components/schemas/NotePin"},{"type":"null"}]},"placedIn":{"description":"The projects with a note showing its content, this one counted: more than one is shared.","type":"integer"},"styleName":{"description":"The name of the style the paint comes from. \"Highlight\" marks a highlighter line.","type":["string","null"]},"text":{"description":"The note's content. Text for a Text or a Note, the address for a Link or a Video, and the file for an Image or a Document.","type":["string","null"]}},"required":["id","kind","name","text","geometry","groupId","order","author","paint","styleName","createdAt","pin","mayEdit"],"type":"object"},"NoteAuthor":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"NotePin":{"properties":{"fid":{"description":"The feature's current fid, or its last fid if it was deleted.","type":"integer"},"gone":{"description":"Whether the feature is deleted or replaced, or its layer is in the trash.","type":"boolean"},"label":{"description":"The feature's name when the note was pinned to it.","type":"string"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid","label","gone"],"type":"object"},"NoteUpload":{"properties":{"expiresAt":{"format":"date-time","type":"string"},"fields":{"additionalProperties":{"type":"string"},"description":"The form fields to post before the file field (`file`). Their signed policy limits the file's key, type and size.","type":"object"},"key":{"description":"The file's storage key. Pass it to note.file once the upload finishes.","type":"string"},"url":{"description":"The URL to post the file to as a form. It's a simple request, so the bucket's CORS doesn't need to allow it.","type":"string"}},"required":["key","url","fields","expiresAt"],"type":"object"},"NoteUploadStart":{"additionalProperties":false,"properties":{"contentType":{"maxLength":255,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"size":{"minimum":1,"type":"integer"}},"required":["name","contentType","size"],"type":"object"},"Notification":{"properties":{"at":{"format":"date-time","type":"string"},"body":{"type":"string"},"id":{"format":"uuid","type":"string"},"read":{"type":"boolean"},"title":{"type":"string"},"tone":{"enum":["ok","accent","warn","danger"],"type":"string"}},"required":["id","title","tone","at","read"],"type":"object"},"Notifications":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Notification"},"type":"array"},"unread":{"minimum":0,"type":"integer"}},"required":["unread","items"],"type":"object"},"ObjectFile":{"properties":{"behind":{"description":"True when a GeoJSON, Parquet or FlatGeobuf file was written before a later edit, so it lacks that edit.","type":"boolean"},"bytes":{"format":"int64","minimum":0,"type":"integer"},"kind":{"$ref":"#/components/schemas/FileKind"},"label":{"description":"The file's display name, such as Original file or GeoJSON.","type":"string"},"name":{"description":"The file name to save it as.","type":"string"},"url":{"description":"Where to download the file: a redirect to it for 5 minutes, as a download. A layer's is `GET /layers/{layerId}/files/{kind}`, an absolute address on the API host for an API key; a raster's is the app's getRasterFile.","type":"string"}},"required":["kind","label","name","bytes","url"],"type":"object"},"OptimizerConstraints":{"additionalProperties":true,"description":"The schedule rules. Also includes the level of service, used to generate programs.","properties":{"annualBudget":{"type":["number","null"]},"baseYear":{"type":"integer"},"budgetEscalationPct":{"type":"number"},"costEscalationPct":{"type":"number"},"deadlines":{"items":{"properties":{"byYear":{"type":"integer"},"group":{"type":"string"}},"required":["group","byYear"],"type":"object"},"type":"array"},"discountRatePct":{"type":"number"},"funds":{"items":{"properties":{"annualBudget":{"type":["number","null"]},"fromYear":{"type":["integer","null"]},"name":{"type":"string"},"toYear":{"type":["integer","null"]}},"required":["name"],"type":"object"},"type":"array"},"horizonYears":{"type":"integer"},"levelOfService":{"additionalProperties":true,"type":"object"},"maxConcurrent":{"type":["integer","null"]},"startYear":{"type":"integer"}},"required":["startYear","horizonYears","annualBudget","maxConcurrent","deadlines"],"type":"object"},"OptimizerEvents":{"additionalProperties":true,"description":"The events the programs run against.","properties":{"boundarySetId":{"type":["string","null"]},"conditions":{"items":{"properties":{"label":{"type":"string"},"scenarioId":{"type":"string"}},"required":["scenarioId","label"],"type":"object"},"type":"array"},"inflowSetId":{"type":["string","null"]},"modelStorms":{"items":{"type":"string"},"type":"array"},"periodId":{"type":["string","null"]},"rainfallInputIds":{"items":{"type":"string"},"type":"array"}},"required":["rainfallInputIds","modelStorms","periodId","inflowSetId","boundarySetId"],"type":"object"},"OptimizerObjective":{"properties":{"direction":{"enum":["min","max"],"type":"string"},"key":{"description":"An objective key, for example capital, spill, flooding or risk.","type":"string"},"label":{"type":"string"},"outfalls":{"items":{"type":"string"},"type":"array"},"treatedOutfalls":{"items":{"type":"string"},"type":"array"}},"required":["key","label","direction"],"type":"object"},"OptimizerRiskPoint":{"additionalProperties":true,"description":"One year of a risk curve.","properties":{"byCategory":{"items":{"type":"number"},"type":"array"},"byClass":{"additionalProperties":{"properties":{"mean":{"type":"number"},"scored":{"type":"number"},"topBand":{"type":"number"}},"required":["mean"],"type":"object"},"type":"object"},"mean":{"description":"Mean BRE over the assets scored that year.","type":["number","null"]},"renewalSpend":{"type":"number"},"renewed":{"type":"number"},"renewedThisYear":{"type":"number"},"scored":{"type":"number"},"topBand":{"type":"number"},"topBandShare":{"type":["number","null"]},"year":{"type":"integer"}},"required":["year","mean"],"type":"object"},"OptimizerRiskProjection":{"description":"A study's average risk by year, for doing nothing and for each requested program.","properties":{"asOf":{"type":["string","null"]},"doNothing":{"items":{"$ref":"#/components/schemas/OptimizerRiskPoint"},"type":["array","null"]},"error":{"type":["string","null"]},"horizonYears":{"type":["integer","null"]},"method":{"type":["string","null"]},"missing":{"items":{"type":"string"},"type":"array"},"programs":{"items":{"properties":{"id":{"type":"string"},"mapping":{"additionalProperties":true,"type":["object","null"]},"points":{"items":{"$ref":"#/components/schemas/OptimizerRiskPoint"},"type":"array"},"renewals":{"additionalProperties":true,"type":["object","null"]},"source":{"enum":["optimizer","projection"],"type":"string"},"stale":{"type":"boolean"}},"required":["id","points","renewals","mapping","stale","source"],"type":"object"},"type":"array"},"requestedAt":{"type":["string","null"]},"riskRunId":{"type":"string"},"startYear":{"type":["integer","null"]},"status":{"enum":["none","running","ready","failed"],"type":"string"}},"required":["status","riskRunId","asOf","startYear","horizonYears","method","doNothing","programs","missing","requestedAt","error"],"type":"object"},"OptimizerStudy":{"description":"An optimizer study. Contains the candidates it searches, what it scores, what it runs against, the schedule rules, how it searches, and its status. Candidates are a snapshot from when the study was created or last run.","properties":{"candidates":{"items":{"$ref":"#/components/schemas/Candidate"},"type":"array"},"chosenProgram":{"oneOf":[{"$ref":"#/components/schemas/ChosenProgram"},{"type":"null"}]},"config":{"additionalProperties":true,"description":"Search settings. Other stored settings are returned as stored.","properties":{"closeGap":{"additionalProperties":true,"type":"object"},"concurrency":{"type":"number"},"desktop":{"additionalProperties":true,"type":["object","null"]},"evaluation":{"enum":["model","desktop"],"type":"string"},"generations":{"type":"number"},"losMode":{"enum":["constrain","report"],"type":"string"},"mode":{"enum":["matrix","full"],"type":"string"},"population":{"type":"number"},"renewAfterProjects":{"type":"boolean"},"reuse":{"type":"boolean"},"riskModelId":{"type":["string","null"]},"riskYear":{"type":["integer","null"]},"verify":{"type":"number"},"verifyLadder":{"type":"number"}},"required":["mode","population","generations","verify","concurrency","riskModelId"],"type":"object"},"constraints":{"$ref":"#/components/schemas/OptimizerConstraints"},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"type":["string","null"]},"endedAt":{"format":"date-time","type":["string","null"]},"error":{"type":["string","null"]},"events":{"$ref":"#/components/schemas/OptimizerEvents"},"id":{"format":"uuid","type":"string"},"milestones":{"items":{"properties":{"growthFactor":{"type":"number"},"year":{"type":"integer"}},"required":["year","growthFactor"],"type":"object"},"type":"array"},"modelId":{"format":"uuid","type":"string"},"name":{"type":"string"},"objectives":{"items":{"$ref":"#/components/schemas/OptimizerObjective"},"type":"array"},"progress":{"type":["integer","null"]},"projectId":{"format":"uuid","type":"string"},"results":{"additionalProperties":true,"description":"Null in the list and before results are ready. Either packed (`packed: {v: 1, ids, risk}`, with each program's `choice` as `c`) or as first written.","type":["object","null"]},"riskAssets":{"description":"What the study's risk runs score, the same for every program. Null before the first risk run.","properties":{"byClass":{"additionalProperties":{"type":"number"},"type":"object"},"scored":{"type":"number"}},"required":["scored","byClass"],"type":["object","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"status":{"enum":["draft","queued","starting","running","importing","completed","failed","cancelled"],"type":"string"},"summary":{"description":"Programs on the frontier and the runs made. Null until results are ready.","properties":{"frontier":{"type":"integer"},"simulations":{"type":"integer"}},"required":["frontier","simulations"],"type":["object","null"]}},"required":["id","projectId","modelId","name","status","candidates","objectives","events","milestones","constraints","config","results","summary","chosenProgram","riskAssets","progress","currentStep","error","createdAt","startedAt","endedAt"],"type":"object"},"Paint":{"additionalProperties":true,"description":"Paint as stored. MapLibre's keys, plus NEER's own (outlines as fill-outline-*, arrows as line-arrow-*, circle-size, and an opacity above 1 as a percentage).","type":"object"},"People":{"properties":{"invitations":{"items":{"properties":{"email":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"grant":{"$ref":"#/components/schemas/Grant"},"invitedAt":{"format":"date-time","type":"string"},"sent":{"description":"False until this invitation's current link is emailed. Resending makes a new link and resets this to false.","type":"boolean"}},"required":["email","grant","invitedAt","expiresAt","sent"],"type":"object"},"type":"array"},"named":{"items":{"properties":{"email":{"type":"string"},"grant":{"$ref":"#/components/schemas/Grant"},"id":{"format":"uuid","type":"string"},"image":{"description":"Their picture, as a signed URL that expires. Null when they have none.","type":["string","null"]},"name":{"type":"string"},"since":{"format":"date-time","type":"string"}},"required":["id","name","email","grant","since","image"],"type":"object"},"type":"array"},"team":{"items":{"properties":{"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"image":{"description":"Their picture, as a signed URL that expires. Null when they have none.","type":["string","null"]},"name":{"type":"string"},"role":{"enum":["owner","admin","member","guest"],"type":"string"}},"required":["id","name","email","role","image"],"type":"object"},"type":"array"}},"required":["team","named","invitations"],"type":"object"},"PhotoLimits":{"properties":{"maxBytes":{"type":"integer"},"perReport":{"type":"integer"}},"required":["perReport","maxBytes"],"type":"object"},"PictureUpload":{"description":"A presigned PUT address for one picture. The write that saves it names the uri.","properties":{"expiresAt":{"format":"date-time","type":"string"},"headers":{"additionalProperties":{"type":"string"},"type":"object"},"method":{"enum":["PUT"],"type":"string"},"uri":{"description":"s3://bucket/key, for the write that saves the picture.","type":"string"},"url":{"type":"string"}},"required":["uri","method","url","headers","expiresAt"],"type":"object"},"PostScript":{"properties":{"engines":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"inputs":{"items":{"properties":{"default":{"type":"integer"},"kind":{"enum":["layer","folder","names","hours","secret"],"type":"string"},"label":{"type":"string"},"max":{"type":"integer"},"min":{"type":"integer"},"path":{"description":"Where the input sits in the stored inputs, as layers.manholes.","type":"string"},"required":{"type":"boolean"}},"required":["path","kind","required","label"],"type":"object"},"type":"array"},"summary":{"type":"string"},"title":{"type":"string"},"version":{"type":"integer"}},"required":["id","version","title","summary","engines","inputs"],"type":"object"},"PreStep":{"properties":{"engines":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"inputs":{"items":{"properties":{"default":{"type":"integer"},"kind":{"enum":["hours"],"type":"string"},"label":{"type":"string"},"max":{"type":"integer"},"min":{"type":"integer"},"path":{"description":"Where the input sits in the stored inputs.","type":"string"},"required":{"type":"boolean"}},"required":["path","kind","required","label"],"type":"object"},"type":"array"},"summary":{"type":"string"},"title":{"type":"string"},"version":{"type":"integer"}},"required":["id","version","title","summary","engines","inputs"],"type":"object"},"Predicate":{"additionalProperties":false,"properties":{"key":{"maxLength":255,"minLength":1,"type":"string"},"op":{"description":"How the predicate compares. eq and ne compare by JSON type, and ne includes rows without a value. lt, lte, gt, gte and between compare numbers only, and between includes both ends of [low, high]. contains and startsWith match text values only, ignore case, and never match an empty value. They don't match numbers, because the database and the browser format numbers differently. in and notIn take up to 200 values, and notIn includes rows without a value. empty matches a missing value, null or \"\". notEmpty matches the rest.","enum":["eq","ne","lt","lte","gt","gte","between","contains","startsWith","in","notIn","empty","notEmpty"],"type":"string"},"value":{"description":"The value to compare with. A scalar for eq, ne, lt, lte, gt, gte, contains and startsWith (a number for the orderings, text for the matches). [low, high] for between. A list for in and notIn. Nothing for empty and notEmpty.","oneOf":[{"maxLength":500,"type":"string"},{"type":"number"},{"type":"boolean"},{"items":{"oneOf":[{"maxLength":500,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":200,"type":"array"}]}},"required":["key","op"],"type":"object"},"Preferences":{"additionalProperties":false,"description":"The user's preferences, stored on their account and used on every device. A left-out preference uses the app's default. Per-browser settings, such as the theme, aren't included.","properties":{"dateFormat":{"description":"Date format: \"Mar 4, 2026\", \"2026-03-04\" or \"4 Mar 2026\". Default us.","enum":["us","iso","day-first"],"type":"string"},"timeFormat":{"description":"Time format: \"2:30 PM\" or \"14:30\". Default 12h.","enum":["12h","24h"],"type":"string"}},"type":"object"},"Problem":{"description":"An error, in RFC 9457 format.","properties":{"detail":{"type":"string"},"issues":{"description":"Returned when `model.run` is refused because the model check found errors: the first of the check's issues, errors first, as `GET …/models/{modelId}/check` lists them.","items":{"$ref":"#/components/schemas/ModelCheckIssue"},"type":"array"},"stale":{"description":"Returned when a save is refused because data it read has changed. Lists the features changed since and those deleted since, so each can be marked.","properties":{"changed":{"items":{"type":"integer"},"type":"array"},"gone":{"items":{"type":"integer"},"type":"array"}},"required":["changed","gone"],"type":"object"},"status":{"type":"integer"},"title":{"type":"string"},"type":{"default":"about:blank","format":"uri","type":"string"}},"required":["type","title","status"],"type":"object"},"Project":{"description":"A project, with its name, working coordinate system and units, time zone, and where its map opens.","properties":{"center":{"$ref":"#/components/schemas/LngLat"},"copy":{"description":"Present while the project is being filled from the one it was duplicated from (`POST /projects/{projectId}/duplicate`), and once that failed. Its contents arrive together when the copy ends.","properties":{"from":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"state":{"enum":["copying","failed"],"type":"string"}},"required":["from","state"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"crsName":{"description":"The CRS name from PostGIS's spatial_ref_sys, such as \"NAD83 / North Carolina (ftUS)\". Absent for an unknown code.","type":"string"},"crsProj4":{"description":"The CRS as proj4 text from spatial_ref_sys, for showing positions in it, such as \"+proj=lcc +lat_1=36.16666666666666 … +units=us-ft +no_defs\". Absent when there is none.","type":"string"},"description":{"type":"string"},"id":{"format":"uuid","type":"string"},"layerCount":{"minimum":0,"type":"integer"},"locked":{"description":"Present when the workspace's plan holds the project closed: past the Free plan's projects (`project_limit`), or a team with no plan (`no_plan`). A locked project lists but can't be opened; deleting one frees its place.","enum":["project_limit","no_plan"],"type":"string"},"name":{"type":"string"},"openedAt":{"description":"When you last opened the project. Absent if never.","format":"date-time","type":"string"},"srid":{"description":"The project's working CRS: an EPSG code, or an ESRI code from 100000 up (102698 is ESRI:102698).","type":"integer"},"timezone":{"description":"The project's time zone, as an IANA name (America/New_York). Absent when not set.","type":"string"},"units":{"description":"The project's units of measure, also used by the scale bar.","enum":["us","metric"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"workspace":{"$ref":"#/components/schemas/Workspace"},"zoom":{"maximum":24,"minimum":0,"type":"integer"}},"required":["id","name","workspace","srid","units","center","zoom","layerCount","createdAt","updatedAt"],"type":"object"},"ProjectDelivery":{"additionalProperties":false,"properties":{"bytes":{"minimum":0,"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"databases":{"items":{"$ref":"#/components/schemas/DeliveryDatabase"},"type":"array"},"drive":{"enum":["google_drive","dropbox","onedrive"],"type":"string"},"error":{"description":"Why it failed.","type":"string"},"files":{"description":"Files copied from the drive.","minimum":0,"type":"integer"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"progress":{"additionalProperties":true,"description":"Where a copy is: its step, how much is done of how much, and the file at hand.","type":"object"},"state":{"enum":["copying","ready","failed"],"type":"string"}},"required":["id","name","drive","state","files","bytes","databases","createdAt"],"type":"object"},"ProjectHistory":{"properties":{"entries":{"items":{"properties":{"at":{"format":"date-time","type":"string"},"byId":{"format":"uuid","type":"string"},"byName":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"description":"The action's name.","type":"string"},"neer":{"description":"Whether NEER made the change.","type":"boolean"},"reverses":{"description":"Whether this write undid another.","type":"boolean"},"summary":{"type":"string"},"undoToken":{"description":"Undo token. Present for the caller's own write while its undo window is open.","type":["string","null"]},"undone":{"type":"boolean"},"via":{"description":"The agent the write came through, by its registered name.","type":["string","null"]}},"required":["id","at","name","summary","byId","byName","neer","via","undone","reverses","undoToken"],"type":"object"},"type":"array"},"next":{"description":"The `before` value for the next page. Null at the end.","format":"date-time","type":["string","null"]}},"required":["entries","next"],"type":"object"},"ProjectLink":{"properties":{"createdAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":["string","null"]},"includeSurveyResponses":{"description":"Whether link visitors see survey response layers. Off by default.","type":"boolean"},"restriction":{"$ref":"#/components/schemas/Grant"},"token":{"description":"Plaintext bearer token, shown only to users who can share.","type":"string"},"url":{"description":"The address to hand on: the app origin, `/l/`, and the token. Absent where the app origin is not configured.","format":"uri","type":"string"}},"required":["restriction","token","createdAt","expiresAt","includeSurveyResponses"],"type":"object"},"ProjectLinks":{"properties":{"links":{"items":{"$ref":"#/components/schemas/ProjectLink"},"type":"array"}},"required":["links"],"type":"object"},"ProjectReport":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"error":{"description":"Why it failed.","type":"string"},"file":{"description":"The .docx file's name, once ready.","type":"string"},"id":{"format":"uuid","type":"string"},"state":{"enum":["making","ready","failed"],"type":"string"},"title":{"type":"string"}},"required":["id","title","state","createdAt"],"type":"object"},"PublicForm":{"properties":{"answers":{"additionalProperties":true,"description":"The JSON Schema (draft 2020-12) a report's answers must match. The form checks it before sending and the server checks it again. It is an object of the questions' keys and no others, each in its own shape, with the required ones present. Text is trimmed before either check, and an empty text or list counts as no answer.","type":"object"},"look":{"$ref":"#/components/schemas/FormLook"},"photos":{"$ref":"#/components/schemas/PhotoLimits"},"questions":{"items":{"$ref":"#/components/schemas/Question"},"type":"array"},"subtitle":{"type":"string"},"ticket":{"description":"Proof the form was loaded, sent back with the report. Its format is `<issued ms>.<base64url HMAC-SHA256 of \"<token>.<issued ms>\">`, keyed with HKDF-SHA256(NEER_SESSION_SECRET, salt neer-api, info \"form ticket v1\"). Valid for 12 hours. A report sent less than 3 seconds after issue is held for review.","type":"string"},"title":{"type":"string"}},"required":["title","questions","answers","look","photos","ticket"],"type":"object"},"PurgeCheckJobReport":{"description":"Known deletion blockers only. This report never authorizes a purge.","properties":{"blockers":{"items":{"enum":["project_missing","project_not_trashed","field_maps","field_map_layer_references","survey_map_fields","survey_response_layer_references","dashboard_references","dashboard_content_unreadable"],"type":"string"},"type":"array"},"purgeAvailable":{"type":"boolean"},"references":{"properties":{"dashboards":{"minimum":0,"type":"integer"},"fieldMapLayerReferences":{"minimum":0,"type":"integer"},"fieldMaps":{"minimum":0,"type":"integer"},"surveyMapFields":{"minimum":0,"type":"integer"},"surveyResponseLayerReferences":{"minimum":0,"type":"integer"},"unreadableDashboards":{"minimum":0,"type":"integer"}},"required":["fieldMaps","fieldMapLayerReferences","surveyMapFields","surveyResponseLayerReferences","dashboards","unreadableDashboards"],"type":"object"}},"required":["blockers","references","purgeAvailable"],"type":"object"},"QualitySignal":{"properties":{"at":{"description":"When, in the run's clock: the first and the last times.","items":{"type":"string"},"type":"array"},"count":{"description":"How many elements or times it counts.","type":"integer"},"elements":{"description":"The elements it names, the worst first, at most 10.","items":{"properties":{"element":{"oneOf":[{"$ref":"#/components/schemas/DiagnosisElement"},{"type":"null"}]},"name":{"type":"string"},"value":{"type":"number"}},"required":["name","element"],"type":"object"},"type":"array"},"kind":{"enum":["runoff_continuity","routing_continuity","node_continuity","flow_instability","nodes_surcharged","nodes_flooded","unbalanced","negative_pressures","disconnected"],"type":"string"},"severity":{"enum":["error","warning","info"],"type":"string"},"unit":{"description":"What value and each element's value are in: % for a continuity error, index for flow instability, hours surcharged, a flood volume in 10^6 gal or 10^6 L as the model's flow units are US (CFS, GPM, MGD) or SI (CMS, LPS, MLD). Absent where it holds no value or the units aren't known.","enum":["%","index","hours","10^6 gal","10^6 L"],"type":"string"},"value":{"description":"A continuity error's percent (the largest node's for node_continuity), or the largest flow instability index.","type":"number"}},"required":["kind","severity","count"],"type":"object"},"Question":{"properties":{"contact":{"description":"Whether the question asks for contact details (stored contact true). Absent means false. When answered, the form tells the respondent the team may contact them.","type":"boolean"},"help":{"description":"Help text shown under the question.","maxLength":300,"type":"string"},"key":{"type":"string"},"kind":{"description":"More kinds may be added. A form shows only the kinds it knows, and the server never serves a form with a kind its own form can't show.","type":"string","x-extensible-enum":["text","long-text","number","whole-number","choice","choices","yes-no","date","date-time","place","photo","email","phone","section"]},"label":{"type":"string"},"layers":{"description":"A map question's reference layers (stored referenceLayers). Layers of its project shown under the answer for context. Their shapes are read through getFormLayer.","items":{"format":"uuid","type":"string"},"maxItems":5,"type":"array"},"max":{"type":"number"},"maxLength":{"minimum":1,"type":"integer"},"maxSelected":{"minimum":1,"type":"integer"},"min":{"type":"number"},"minSelected":{"minimum":0,"type":"integer"},"options":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["value","label"],"type":"object"},"type":"array"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"shape":{"enum":["point","line","area"],"type":"string"},"view":{"description":"Where a map question opens. The center and zoom of the project its answers are saved to (the question's SurveyMapField binding, or else its stored projectId). Absent when that project was deleted.","properties":{"lat":{"type":"number"},"lng":{"type":"number"},"zoom":{"type":"integer"}},"required":["lng","lat","zoom"],"type":"object"}},"required":["key","kind","label","required"],"type":"object"},"QviResult":{"properties":{"design":{"properties":{"depthIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"source":{"type":"string"}},"required":["depthIn","source"],"type":"object"},"facts":{"properties":{"areaAcres":{"anyOf":[{"type":"null"},{"type":"number"}]},"capacityMgd":{"anyOf":[{"type":"null"},{"type":"number"}]},"idm":{"anyOf":[{"type":"null"},{"type":"number"}]}},"required":["areaAcres","idm","capacityMgd"],"type":"object"},"lines":{"items":{"$ref":"#/components/schemas/RegressionResponseLine"},"type":"array"},"problem":{"anyOf":[{"type":"null"},{"type":"string"}]},"storms":{"items":{"$ref":"#/components/schemas/RegressionStormPoint"},"type":"array"},"x":{"enum":["depth","peak1h"],"type":"string"},"xLabel":{"type":"string"}},"required":["x","xLabel","design","facts","storms","lines","problem"],"type":"object"},"RainGauge":{"properties":{"fid":{"description":"The gauge's row on the gauge layer. Null when the gauge hasn't been placed.","type":["integer","null"]},"format":{"type":"string"},"hydrographs":{"description":"Unit hydrographs that use this gauge.","type":"integer"},"interval":{"type":"string"},"name":{"type":"string"},"placed":{"type":"boolean"},"scaleFactor":{"description":"The multiplier on the gauge's rain, as named in its row. Null when the row has none. OpenSWMM 6 applies it; EPA SWMM 5.2.4 ignores it.","type":["string","null"]},"scf":{"type":"string"},"series":{"description":"The series or file the gauge reads, as named in its row.","type":"string"},"seriesExists":{"description":"Whether a TIMESERIES gauge's series exists in the model. Always true for other gauges.","type":"boolean"},"source":{"description":"TIMESERIES or FILE, from the gauge's row.","type":"string"},"start":{"description":"The date a FILE gauge's file is read from, as named in its row (* is its first line). Null when the row has none.","type":["string","null"]},"subcatchments":{"description":"Subcatchments that use this gauge.","type":"integer"}},"required":["name","fid","placed","source","series","seriesExists","format","interval","scf","start","scaleFactor","subcatchments","hydrographs"],"type":"object"},"Raster":{"properties":{"bands":{"items":{"$ref":"#/components/schemas/RasterBand"},"type":"array"},"bitDepth":{"description":"Bits per pixel in its GeoTIFF (gis.rasters.geotiff_bit_depth). Above 8 there are too many values for one class each, so it can't be styled by value.","type":"integer"},"bounds":{"oneOf":[{"$ref":"#/components/schemas/Bounds"},{"type":"null"}]},"cog":{"description":"The raster's presigned Web Mercator COG, for the browser to draw and read values from directly. Missing until the COG is in Web Mercator.","properties":{"expiresAt":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},"contentId":{"description":"Present once it is a workspace content (gis.rasters.content_id): every uploaded raster is one. Its files are the content's latest version; an upload replacing it, or content.replace, gives the content its next version.","format":"uuid","type":"string"},"groupId":{"oneOf":[{"format":"uuid","type":"string"},{"type":"null"}]},"heldElsewhere":{"description":"Present and true for a raster added from another project's, whose folder keeps its files. raster.own makes it this project's own copy.","type":"boolean"},"id":{"format":"uuid","type":"string"},"library":{"description":"Present and true when the imagery comes from the NEER library (its input is in a library bucket) and is shared by every project that added it. No file can replace it.","type":"boolean"},"name":{"type":"string"},"order":{"type":"integer"},"placedIn":{"description":"The projects with a raster showing its content, this one counted: more than one is shared.","type":"integer"},"projectId":{"format":"uuid","type":"string"},"replacing":{"$ref":"#/components/schemas/Replacing"},"status":{"$ref":"#/components/schemas/LayerStatus"},"style":{"oneOf":[{"$ref":"#/components/schemas/RasterStyle"},{"type":"null"}]},"tiles":{"oneOf":[{"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},{"type":"null"}]},"undrawn":{"description":"Why a ready raster with imagery is drawn from neither cog nor tiles. noRenderer means nothing can render it. notWebMercator means its COG hasn't been converted to Web Mercator yet (the worker's rasters.web_cog). Missing otherwise. A ready raster with neither has imagery still to come.","enum":["noRenderer","notWebMercator"],"type":"string"}},"required":["id","projectId","name","order","groupId","status","bands","style","tiles","bounds","bitDepth"],"type":"object"},"RasterBand":{"properties":{"index":{"minimum":1,"type":"integer"},"max":{"type":"number"},"mean":{"type":"number"},"min":{"type":"number"},"name":{"type":"string"}},"required":["index","name","min","max"],"type":"object"},"RasterCategorical":{"description":"Classes by a pixel's numeric value, each with a legend or null.","properties":{"band":{"type":"integer"},"classes":{"items":{"$ref":"#/components/schemas/StyleClass"},"type":"array"},"legendFormat":{"type":"string"},"legendPrecision":{"type":"integer"},"paint":{"$ref":"#/components/schemas/Paint"}},"required":["band","legendFormat","legendPrecision","paint","classes"],"type":"object"},"RasterGraduated":{"description":"Classes by ranges of a pixel's value, each with a legend or null. The linear* fields stretch the band in Linear mode.","properties":{"band":{"type":"integer"},"classes":{"items":{"$ref":"#/components/schemas/StyleClass"},"type":"array"},"equalInterval":{"oneOf":[{"type":"integer"},{"type":"null"}]},"legendFormat":{"type":"string"},"legendPrecision":{"type":"integer"},"linearContrast":{"oneOf":[{"type":"number"},{"type":"null"}]},"linearMax":{"oneOf":[{"type":"number"},{"type":"null"}]},"linearMin":{"oneOf":[{"type":"number"},{"type":"null"}]},"linearOpacity":{"oneOf":[{"type":"number"},{"type":"null"}]},"linearSaturation":{"oneOf":[{"type":"number"},{"type":"null"}]},"mode":{"enum":["EqualInterval","Manual","Linear"],"type":"string"},"paint":{"$ref":"#/components/schemas/Paint"}},"required":["band","legendFormat","legendPrecision","mode","equalInterval","linearMin","linearMax","linearOpacity","linearContrast","linearSaturation","classes","paint"],"type":"object"},"RasterHillshade":{"description":"Relief lit from azimuth and altitude. Colors are null for MapLibre's defaults. With blendWithColor, colorRamp is drawn under it from colorMin to colorMax.","properties":{"accentColor":{"oneOf":[{"type":"string"},{"type":"null"}]},"altitude":{"type":"integer"},"azimuth":{"type":"integer"},"band":{"type":"integer"},"blendWithColor":{"type":"boolean"},"colorMax":{"oneOf":[{"type":"number"},{"type":"null"}]},"colorMin":{"oneOf":[{"type":"number"},{"type":"null"}]},"colorRamp":{"items":{"type":"string"},"type":"array"},"exaggeration":{"type":"number"},"highlightColor":{"oneOf":[{"type":"string"},{"type":"null"}]},"opacity":{"type":"number"},"shadowColor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["band","azimuth","altitude","exaggeration","shadowColor","highlightColor","accentColor","opacity","blendWithColor","colorMin","colorMax","colorRamp"],"type":"object"},"RasterSimple":{"properties":{"band":{"oneOf":[{"type":"integer"},{"type":"null"}]},"max":{"oneOf":[{"type":"number"},{"type":"null"}]},"min":{"oneOf":[{"type":"number"},{"type":"null"}]},"paint":{"$ref":"#/components/schemas/Paint"}},"required":["band","min","max","paint"],"type":"object"},"RasterStyle":{"properties":{"categorical":{"oneOf":[{"$ref":"#/components/schemas/RasterCategorical"},{"type":"null"}]},"category":{"enum":["Simple","Categorical","Graduated","Hillshade"],"type":"string"},"graduated":{"oneOf":[{"$ref":"#/components/schemas/RasterGraduated"},{"type":"null"}]},"hillshade":{"oneOf":[{"$ref":"#/components/schemas/RasterHillshade"},{"type":"null"}]},"id":{"format":"uuid","type":"string"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"simple":{"oneOf":[{"$ref":"#/components/schemas/RasterSimple"},{"type":"null"}]}},"required":["id","name","category","simple","categorical","graduated","hillshade"],"type":"object"},"RasterStyleEntry":{"allOf":[{"$ref":"#/components/schemas/RasterStyle"},{"$ref":"#/components/schemas/Versioned"}]},"RasterStyles":{"properties":{"styles":{"items":{"$ref":"#/components/schemas/RasterStyleEntry"},"type":"array"}},"required":["styles"],"type":"object"},"RasterValue":{"properties":{"bands":{"items":{"properties":{"name":{"type":"string"},"value":{"oneOf":[{"type":"number"},{"type":"null"}]}},"required":["name","value"],"type":"object"},"type":"array"}},"required":["bands"],"type":"object"},"Receipt":{"description":"The fields a claim must include.","properties":{"asOf":{"format":"date-time","type":"string"},"breaksIf":{"type":"string"},"from":{"description":"The run, recipe or source it came from.","type":"string"}},"required":["from","asOf"],"type":"object"},"Reference":{"additionalProperties":false,"properties":{"sections":{"items":{"$ref":"#/components/schemas/ReferenceSection"},"maxItems":8,"type":"array"}},"required":["sections"],"type":"object"},"ReferenceSection":{"additionalProperties":false,"properties":{"cut":{"description":"Whether the text was cut at 6,000 characters.","type":"boolean"},"heading":{"type":"string"},"text":{"description":"The section in Markdown.","type":"string"},"under":{"description":"The headings above it, outermost first.","items":{"type":"string"},"type":"array"}},"required":["heading","under","text","cut"],"type":"object"},"RegressionFit":{"properties":{"intercept":{"type":"number"},"n":{"type":"number"},"r2":{"type":"number"},"slope":{"type":"number"}},"required":["slope","intercept","r2","n"],"type":"object"},"RegressionLineFit":{"properties":{"capacityExceeded":{"anyOf":[{"type":"null"},{"const":false,"type":"boolean"},{"const":true,"type":"boolean"}]},"fit":{"$ref":"#/components/schemas/RegressionFit"},"levelOfProtection":{"anyOf":[{"type":"null"},{"const":"at or above","type":"string"},{"const":"below","type":"string"}]},"note":{"anyOf":[{"type":"null"},{"type":"string"}]},"perAcre":{"anyOf":[{"type":"null"},{"type":"number"}]},"perIdm":{"anyOf":[{"type":"null"},{"type":"number"}]},"perInch":{"anyOf":[{"type":"null"},{"type":"number"}]},"projected":{"anyOf":[{"type":"null"},{"type":"number"}]},"pruned":{"items":{"type":"string"},"type":"array"},"rainAtCapacityIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"used":{"items":{"type":"string"},"type":"array"}},"required":["fit","used","pruned","projected","perAcre","perIdm","perInch","rainAtCapacityIn","capacityExceeded","levelOfProtection","note"],"type":"object"},"RegressionParams":{"properties":{"designRegime":{"enum":["governing","pooled","winter","summer","wet","dry"],"type":"string"},"designStorm":{"properties":{"depthIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"durationHours":{"type":"number"},"returnPeriodYears":{"type":"number"}},"required":["returnPeriodYears","durationHours","depthIn"],"type":"object"},"minStorms":{"type":"number"},"perRegime":{"type":"boolean"},"prune":{"type":"boolean"},"r2Target":{"type":"number"},"regimeMinR2":{"type":"number"},"regimeMinStorms":{"type":"number"},"wetAntecedentDays":{"type":"number"},"wetAntecedentIn":{"type":"number"},"winterMonths":{"items":{"type":"number"},"type":"array"},"x":{"enum":["depth","peak1h"],"type":"string"}},"required":["x","minStorms","prune","r2Target","designStorm","perRegime","regimeMinStorms","regimeMinR2","winterMonths","wetAntecedentDays","wetAntecedentIn","designRegime"],"type":"object"},"RegressionResponseLine":{"properties":{"byRegime":{"properties":{"dry":{"$ref":"#/components/schemas/RegressionLineFit"},"summer":{"$ref":"#/components/schemas/RegressionLineFit"},"wet":{"$ref":"#/components/schemas/RegressionLineFit"},"winter":{"$ref":"#/components/schemas/RegressionLineFit"}},"type":"object"},"capacityExceeded":{"anyOf":[{"type":"null"},{"const":false,"type":"boolean"},{"const":true,"type":"boolean"}]},"chosen":{"enum":["pooled","winter","summer","wet","dry"],"type":"string"},"fit":{"anyOf":[{"type":"null"},{"$ref":"#/components/schemas/RegressionFit"}]},"key":{"enum":["volumeMg","peakRdiiMgd","peakFlowMgd"],"type":"string"},"levelOfProtection":{"anyOf":[{"type":"null"},{"const":"at or above","type":"string"},{"const":"below","type":"string"}]},"note":{"anyOf":[{"type":"null"},{"type":"string"}]},"perAcre":{"anyOf":[{"type":"null"},{"type":"number"}]},"perIdm":{"anyOf":[{"type":"null"},{"type":"number"}]},"perInch":{"anyOf":[{"type":"null"},{"type":"number"}]},"pooled":{"anyOf":[{"type":"null"},{"$ref":"#/components/schemas/RegressionLineFit"}]},"problem":{"anyOf":[{"type":"null"},{"type":"string"}]},"projected":{"anyOf":[{"type":"null"},{"type":"number"}]},"pruned":{"items":{"type":"string"},"type":"array"},"rainAtCapacityIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"used":{"items":{"type":"string"},"type":"array"}},"required":["key","fit","used","pruned","projected","perAcre","perIdm","perInch","rainAtCapacityIn","capacityExceeded","levelOfProtection","note","problem","chosen","pooled","byRegime"],"type":"object"},"RegressionStormPoint":{"properties":{"antecedent":{"enum":["wet","dry"],"type":"string"},"antecedentIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"endAt":{"type":"number"},"peak1hIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"peakFlowMgd":{"type":"number"},"peakRdiiMgd":{"type":"number"},"rainIn":{"type":"number"},"returnPeriodYears":{"anyOf":[{"type":"null"},{"type":"number"}]},"season":{"enum":["winter","summer"],"type":"string"},"startAt":{"type":"number"},"status":{"enum":["keep","drop"],"type":"string"},"stormId":{"type":"string"},"volumeMg":{"type":"number"}},"required":["stormId","startAt","endAt","rainIn","peak1hIn","returnPeriodYears","volumeMg","peakRdiiMgd","peakFlowMgd","status"],"type":"object"},"Replacing":{"description":"A new file being imported for the same object. The object keeps showing its current data until the replacement arrives. A failed replacement leaves it unchanged, with the reason.","properties":{"message":{"type":"string"},"state":{"enum":["building","failed"],"type":"string"}},"required":["state"],"type":"object"},"ResultElementSeries":{"properties":{"id":{"type":"string"},"values":{"items":{"type":["number","null"]},"type":"array"}},"required":["id","values"],"type":"object"},"Results":{"properties":{"classes":{"items":{"$ref":"#/components/schemas/ResultsClass"},"type":"array"},"engine":{"description":"The engine that wrote the results, \"swmm\" or \"epanet\". Null when not recorded.","type":["string","null"]},"flowUnits":{"description":"The run's flow units (CFS, GPM, MGD, CMS, LPS, MLD), from its report.json.","type":["string","null"]},"periods":{"description":"Each period's offset from the simulated start, in seconds.","items":{"type":"integer"},"type":"array"},"start":{"description":"The run's start time by its own clock, as YYYY-MM-DDTHH:MM:SS with no zone, from its report.json. Null when it has none. A period's time is this plus its offset.","type":["string","null"]}},"required":["engine","start","flowUnits","periods","classes"],"type":"object"},"ResultsClass":{"properties":{"count":{"description":"Number of elements in the class.","minimum":0,"type":"integer"},"metrics":{"description":"The metrics recorded, by the engine's names, in the order of the results cube.","items":{"type":"string"},"type":"array"},"name":{"$ref":"#/components/schemas/ResultsClassName"}},"required":["name","count","metrics"],"type":"object"},"ResultsClassName":{"enum":["nodes","links","subcatchments"],"type":"string"},"ResumeItem":{"properties":{"at":{"format":"date-time","type":"string"},"center":{"$ref":"#/components/schemas/LngLat","description":"Where a project's map opens, for its card's picture. Projects only."},"meta":{"type":"string"},"name":{"type":"string"},"tag":{"$ref":"#/components/schemas/Tag"},"target":{"$ref":"#/components/schemas/Target"},"zoom":{"description":"The zoom a project's map opens at. Projects only.","maximum":24,"minimum":0,"type":"integer"}},"required":["target","name","meta","at"],"type":"object"},"RiskAssetKey":{"properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"RiskAssetMatches":{"properties":{"matches":{"items":{"properties":{"attributes":{"additionalProperties":true,"type":"object"},"fid":{"type":["integer","null"]},"viaPair":{"description":"Matched by its two manholes instead of its id.","type":"boolean"}},"required":["fid","viaPair","attributes"],"type":"object"},"type":"array"}},"required":["matches"],"type":"object"},"RiskBenchmarks":{"properties":{"deliveries":{"items":{"properties":{"constructionPaid":{"type":"number"},"estimate":{"type":["number","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"paid":{"type":"number"},"servicesShare":{"type":["number","null"]},"uplift":{"type":["number","null"]},"year":{"type":["integer","null"]}},"required":["id","name","year","paid","constructionPaid","estimate","uplift","servicesShare"],"type":"object"},"type":"array"},"from":{"items":{"type":"string"},"type":"array"},"ownRates":{"description":"Set when the project has its own unit costs for its risk models' system. These rates are already local, so the all-in cost is the estimate plus its markup, instead of the sheets' uplift and services.","oneOf":[{"type":"null"},{"properties":{"markup":{"type":"number"}},"required":["markup"],"type":"object"}]},"programme":{"items":{"properties":{"footage":{"type":"number"},"from":{"type":"string"},"paid":{"type":"number"},"rate":{"type":"number"},"year":{"type":["integer","null"]}},"required":["from","year","paid","footage","rate"],"type":"object"},"type":"array"},"programmeRate":{"description":"Median paid per foot of basin sewer, over deliveries that report their footage.","type":["number","null"]},"servicesShare":{"description":"Median professional services' share of construction.","type":["number","null"]},"shares":{"additionalProperties":{"type":["number","null"]},"type":"object"},"sheets":{"description":"Delivered projects with a construction line. The medians are computed over these.","minimum":0,"type":"integer"},"source":{"enum":["sheets","none"],"type":"string"},"unitRates":{"items":{"properties":{"from":{"type":"string"},"quantity":{"type":"number"},"rate":{"type":"number"},"unit":{"type":"string"},"work":{"type":"string"},"year":{"type":["integer","null"]}},"required":["work","unit","rate","quantity","from","year"],"type":"object"},"type":"array"},"uplift":{"description":"Median construction paid over the unit-rate estimate.","type":["number","null"]}},"required":["source","sheets","uplift","servicesShare","shares","unitRates","from","programmeRate","programme","deliveries","ownRates"],"type":"object"},"RiskBudgetAssets":{"properties":{"assets":{"description":"The first 500 chosen, best ratio first.","items":{"properties":{"assetClass":{"enum":["pipe","structure"],"type":"string"},"assetId":{"type":["string","null"]},"bre":{"type":"number"},"cost":{"type":"number"},"cumulativeCost":{"type":"number"},"cumulativeReduction":{"type":"number"},"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"},"lof":{"type":"number"},"reduction":{"type":"number"}},"required":["layerId","fid","assetId","assetClass","bre","lof","reduction","cost","cumulativeCost","cumulativeReduction"],"type":"object"},"maxItems":500,"type":"array"},"breTotal":{"description":"The run's BRE total, for scale.","type":"number"},"budget":{"type":"number"},"byLayer":{"items":{"properties":{"count":{"minimum":1,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","count"],"type":"object"},"type":"array"},"candidates":{"minimum":0,"type":"integer"},"chosenAssets":{"items":{"properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"type":"array"},"cost":{"type":"number"},"reduction":{"description":"Estimated BRE reduction over the chosen set.","type":"number"},"unpriced":{"minimum":0,"type":"integer"}},"required":["budget","cost","reduction","breTotal","candidates","unpriced","assets","chosenAssets","byLayer"],"type":"object"},"RiskCapitalProject":{"properties":{"assets":{"minimum":0,"type":"integer"},"bounds":{"maxItems":4,"minItems":4,"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":["array","null"]},"constructionPaid":{"description":"The cost sheet's construction phase only.","type":["number","null"]},"cost":{"type":["number","null"]},"costDetail":{"additionalProperties":true,"type":["object","null"]},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"documents":{"items":{"properties":{"fileName":{"type":"string"},"id":{"format":"uuid","type":"string"},"uploaded":{"type":"boolean"}},"required":["id","fileName","uploaded"],"type":"object"},"type":"array"},"firm":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"liningPackageId":{"description":"Set when saved from a lining package, which can reopen it. Its cost is then the package's planning estimate.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"paid":{"description":"The cost sheet's total. Null without a cost sheet.","type":["number","null"]},"records":{"minimum":0,"type":"integer"},"stage":{"enum":["planned","designed","construction","constructed","closed"],"type":"string"},"year":{"type":["integer","null"]}},"required":["id","name","firm","year","stage","description","records","assets","cost","paid","constructionPaid","costDetail","bounds","documents","createdAt"],"type":"object"},"RiskComparison":{"properties":{"adoptedRunId":{"format":"uuid","type":["string","null"]},"baselineState":{"enum":["none","ready","broken"],"type":"string"},"candidateRunId":{"format":"uuid","type":"string"},"comparison":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RiskComparisonValues"}]},"seed":{"minimum":0,"type":"integer"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["candidateRunId","adoptedRunId","seed","baselineState","comparison","warnings"],"type":"object"},"RiskComparisonValues":{"properties":{"candidateAssets":{"minimum":0,"type":"integer"},"candidateScored":{"minimum":0,"type":"integer"},"flagCounts":{"additionalProperties":{"minimum":0,"type":"integer"},"type":"object"},"fromTotals":{"items":{"minimum":0,"type":"integer"},"maxItems":5,"minItems":5,"type":"array"},"gainedScore":{"minimum":0,"type":"integer"},"improved":{"minimum":0,"type":"integer"},"lostScore":{"minimum":0,"type":"integer"},"matrix":{"items":{"items":{"minimum":0,"type":"integer"},"maxItems":5,"minItems":5,"type":"array"},"maxItems":5,"minItems":5,"type":"array"},"movements":{"items":{"$ref":"#/components/schemas/RiskMovement"},"type":"array"},"newAssets":{"minimum":0,"type":"integer"},"nowVeryHigh":{"minimum":0,"type":"integer"},"removedAssets":{"minimum":0,"type":"integer"},"spotCheck":{"items":{"$ref":"#/components/schemas/RiskSpotCheck"},"maxItems":12,"type":"array"},"toTotals":{"items":{"minimum":0,"type":"integer"},"maxItems":5,"minItems":5,"type":"array"},"unchanged":{"minimum":0,"type":"integer"},"unscoredBoth":{"minimum":0,"type":"integer"},"worsened":{"minimum":0,"type":"integer"}},"required":["matrix","fromTotals","toTotals","unchanged","worsened","improved","newAssets","removedAssets","gainedScore","lostScore","unscoredBoth","nowVeryHigh","candidateAssets","candidateScored","flagCounts","movements","spotCheck"],"type":"object"},"RiskCostEstimate":{"description":"Records priced at unit rates, line by line, as stored in risk_projects.cost_detail.","properties":{"estimatedAt":{"format":"date-time","type":"string"},"fromActivity":{"description":"Records priced from their activity, with no method.","minimum":0,"type":"integer"},"lines":{"items":{"properties":{"cost":{"type":"number"},"count":{"minimum":1,"type":"integer"},"label":{"type":"string"},"quantity":{"type":"number"},"unit":{"enum":["ft","each","segment","gal","gpm"],"type":"string"}},"required":["label","unit","count","quantity","cost"],"type":"object"},"type":"array"},"systemType":{"enum":["water","wastewater","stormwater"],"type":"string"},"total":{"type":"number"},"unmeasured":{"description":"Records missing the length, storage volume or pumping capacity required by their rate.","minimum":0,"type":"integer"},"unpriced":{"description":"Records whose method matched no rate.","minimum":0,"type":"integer"}},"required":["total","lines","unpriced","unmeasured","fromActivity","systemType"],"type":"object"},"RiskCostLine":{"properties":{"authorised":{"minimum":0,"type":"number"},"documentId":{"format":"uuid","type":["string","null"]},"final":{"description":"Cost with change orders. When given, this is the line's cost.","minimum":0,"type":["number","null"]},"key":{"description":"The stored line's id, or a key the caller created for a new line.","type":"string"},"label":{"type":"string"},"note":{"type":["string","null"]},"parentKey":{"description":"The top-level line this one belongs to, such as a subconsultant's prime.","type":["string","null"]},"payee":{"type":["string","null"]},"phase":{"enum":["investigation","design","bid","construction","construction_services","program_management","other"],"type":"string"},"quantity":{"minimum":0,"type":["number","null"]},"unit":{"type":["string","null"]}},"required":["key","phase","label","authorised"],"type":"object"},"RiskCostMarkup":{"properties":{"isDefault":{"description":"True when the project sets no markup and the default of 1.35 applies.","type":"boolean"},"markup":{"description":"A multiplier on construction cost. 1.35 means +35%.","maximum":3,"minimum":1,"type":"number"}},"required":["markup","isDefault"],"type":"object"},"RiskCostSheet":{"properties":{"estimate":{"description":"The unit-rate estimate of the same project.","type":["number","null"]},"lines":{"items":{"$ref":"#/components/schemas/RiskCostLine"},"type":"array"},"totals":{"properties":{"byPhase":{"additionalProperties":{"type":"number"},"type":"object"},"changeOrders":{"type":"number"},"constructionPaid":{"type":"number"},"paid":{"type":"number"},"services":{"type":"number"},"servicesShare":{"type":["number","null"]},"shareOfConstruction":{"additionalProperties":{"type":["number","null"]},"type":"object"}},"required":["paid","constructionPaid","byPhase","services","servicesShare","shareOfConstruction","changeOrders"],"type":"object"},"version":{"type":"string"}},"required":["lines","totals","estimate","version"],"type":"object"},"RiskHighest":{"properties":{"models":{"description":"The risk models whose runs were read.","minimum":0,"type":"integer"},"rows":{"items":{"properties":{"action":{"type":["string","null"]},"adopted":{"description":"Whether the run is the model's adopted one.","type":"boolean"},"assetClass":{"enum":["pipe","structure"],"type":"string"},"assetId":{"type":["string","null"]},"bre":{"type":["number","null"]},"category":{"type":["integer","null"]},"cof":{"type":["number","null"]},"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"},"layerName":{"type":["string","null"]},"lof":{"type":["number","null"]},"projectId":{"format":"uuid","type":"string"},"projectName":{"type":"string"},"riskModelId":{"format":"uuid","type":"string"},"riskModelName":{"type":"string"},"runId":{"format":"uuid","type":"string"}},"required":["projectId","projectName","riskModelId","riskModelName","runId","adopted","layerId","fid","assetClass","bre"],"type":"object"},"maxItems":50,"type":"array"}},"required":["rows","models"],"type":"object"},"RiskInspection":{"properties":{"assetRef":{"type":"string"},"fid":{"type":["integer","null"]},"gradedDefects":{"type":["integer","null"]},"heightIn":{"description":"The pipe height recorded by the inspection, in inches.","type":["number","null"]},"id":{"format":"uuid","type":"string"},"inspectedAt":{"format":"date","type":["string","null"]},"layerId":{"format":"uuid","type":["string","null"]},"material":{"description":"The pipe material recorded by the inspection.","type":["string","null"]},"mediaCount":{"minimum":0,"type":"integer"},"observationCount":{"minimum":0,"type":"integer"},"omIndex":{"type":["number","null"]},"omRating":{"type":["number","null"]},"overallIndex":{"type":["number","null"]},"overallRating":{"type":["number","null"]},"projectFirm":{"description":"The firm of the project the inspection was run for.","type":["string","null"]},"projectId":{"format":"uuid","type":"string"},"projectName":{"type":["string","null"]},"projectYear":{"description":"The year of the project the inspection was run for.","type":["integer","null"]},"purposeKind":{"description":"What the inspection was for, inferred from the records around it.","enum":["routine","pre_design","acceptance","follow_up",null],"type":["string","null"]},"quickRating":{"description":"PACP quick rating as delivered, such as 5241. The worst grade and its count, then the next grade and its count.","type":["string","null"]},"rehabbedSince":{"description":"The first age-resetting rehab on the asset after this inspection, or an undated one from a constructed project. The video shows the pipe before that work, and the score doesn't use its grade. Null when there is none.","oneOf":[{"type":"null"},{"properties":{"method":{"type":["string","null"]},"performedAt":{"format":"date","type":["string","null"]},"project":{"type":["string","null"]}},"required":["method","performedAt","project"],"type":"object"}]},"riskProjectId":{"format":"uuid","type":["string","null"]},"source":{"type":["string","null"]},"standard":{"enum":["pacp","macp","lacp","other"],"type":"string"},"structuralIndex":{"type":["number","null"]},"structuralRating":{"type":["number","null"]},"surveyedBy":{"type":["string","null"]},"totalLengthFt":{"type":["number","null"]},"video":{"description":"The inspection's first video. Null when there is none.","oneOf":[{"type":"null"},{"properties":{"fileName":{"type":"string"},"fileRecorded":{"description":"A URI is recorded. Reading the URL checks that the file exists.","type":"boolean"},"id":{"format":"uuid","type":"string"}},"required":["id","fileName","fileRecorded"],"type":"object"}]},"worstGrade":{"type":["integer","null"]}},"required":["id","projectId","layerId","fid","assetRef","standard","inspectedAt","overallRating","structuralRating","omRating","source","purposeKind","worstGrade","overallIndex","gradedDefects","totalLengthFt","surveyedBy","riskProjectId","projectName","projectFirm","projectYear","quickRating","material","heightIn","structuralIndex","omIndex","observationCount","mediaCount","video","rehabbedSince"],"type":"object"},"RiskInspectionDetail":{"allOf":[{"$ref":"#/components/schemas/RiskInspection"},{"properties":{"direction":{"type":["string","null"]},"downstreamRef":{"description":"The downstream manhole, as named by the inspection source.","type":["string","null"]},"geometry":{"additionalProperties":true,"description":"The matched line geometry, when it has at most 10000 vertices.","type":["object","null"]},"lengthSurveyedFt":{"type":["number","null"]},"media":{"items":{"$ref":"#/components/schemas/RiskInspectionMedia"},"type":"array"},"observations":{"items":{"$ref":"#/components/schemas/RiskInspectionObservation"},"type":"array"},"totalLengthFt":{"description":"Full asset length reported by the inspection source.","type":["number","null"]},"upstreamRef":{"description":"The upstream manhole, as named by the inspection source.","type":["string","null"]}},"required":["direction","lengthSurveyedFt","totalLengthFt","geometry","upstreamRef","downstreamRef","observations","media"],"type":"object"}]},"RiskInspectionImportInput":{"additionalProperties":false,"properties":{"inspections":{"items":{"$ref":"#/components/schemas/RiskInspectionImportRow"},"maxItems":2000,"minItems":1,"type":"array"},"schemaVersion":{"enum":[1],"type":"integer"}},"required":["schemaVersion","inspections"],"type":"object"},"RiskInspectionImportJobReport":{"properties":{"duplicate":{"type":"boolean"},"importId":{"format":"uuid","type":["string","null"]},"inspections":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"matchedByPair":{"minimum":0,"type":"integer"},"media":{"minimum":0,"type":"integer"},"observations":{"minimum":0,"type":"integer"},"skippedExisting":{"minimum":0,"type":"integer"},"unmatched":{"items":{"$ref":"#/components/schemas/RiskInspectionUnmatched"},"maxItems":100,"type":"array"},"unmatchedTotal":{"minimum":0,"type":"integer"}},"required":["importId","inspections","matched","matchedByPair","unmatchedTotal","unmatched","observations","skippedExisting","duplicate"],"type":"object"},"RiskInspectionImportMedia":{"additionalProperties":false,"properties":{"caption":{"maxLength":1000,"type":["string","null"]},"contentType":{"enum":["video/mp4","video/quicktime","video/x-msvideo","video/x-ms-wmv","image/jpeg","image/png","application/pdf"],"type":"string"},"fileName":{"maxLength":240,"minLength":1,"type":"string"},"kind":{"enum":["video","photo","report"],"type":"string"},"observationSourceId":{"maxLength":160,"type":["string","null"]},"sizeBytes":{"maximum":3221225472,"minimum":1,"type":"integer"},"videoSeconds":{"maximum":1000000,"minimum":0,"type":["number","null"]}},"required":["kind","fileName","contentType","sizeBytes"],"type":"object"},"RiskInspectionImportMediaCount":{"properties":{"total":{"description":"Distinct file names in the import's rows.","minimum":0,"type":"integer"},"uploaded":{"description":"File names whose file has been uploaded.","minimum":0,"type":"integer"}},"required":["total","uploaded"],"type":"object"},"RiskInspectionImportObservation":{"additionalProperties":false,"properties":{"code":{"maxLength":40,"minLength":1,"type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"distanceFt":{"maximum":1000000,"minimum":0,"type":["number","null"]},"grade":{"maximum":5,"minimum":1,"type":["integer","null"]},"sourceId":{"maxLength":160,"type":["string","null"]},"videoSeconds":{"maximum":1000000,"minimum":0,"type":["number","null"]}},"required":["code"],"type":"object"},"RiskInspectionImportReportPage":{"properties":{"limit":{"maximum":100,"minimum":1,"type":"integer"},"offset":{"maximum":2000,"minimum":0,"type":"integer"},"report":{"$ref":"#/components/schemas/RiskInspectionImportJobReport"}},"required":["limit","offset","report"],"type":"object"},"RiskInspectionImportRow":{"additionalProperties":false,"properties":{"assetRef":{"description":"The asset inspected, as the source names it. Matched to a feature by its id column, or on a line layer by its two manholes.","maxLength":240,"minLength":1,"type":"string"},"direction":{"enum":["U","D","upstream","downstream",null],"type":["string","null"]},"downstreamRef":{"description":"The downstream manhole.","maxLength":240,"type":["string","null"]},"inspectedAt":{"format":"date","type":["string","null"]},"lengthSurveyedFt":{"maximum":1000000,"minimum":0,"type":["number","null"]},"media":{"items":{"$ref":"#/components/schemas/RiskInspectionImportMedia"},"maxItems":5000,"type":"array"},"observations":{"items":{"$ref":"#/components/schemas/RiskInspectionImportObservation"},"type":"array"},"omRating":{"maximum":5,"minimum":0,"type":["number","null"]},"overallRating":{"maximum":5,"minimum":0,"type":["number","null"]},"source":{"maxLength":160,"type":["string","null"]},"sourceId":{"description":"The inspection's id in its source. Unique in the file.","maxLength":160,"minLength":1,"type":"string"},"standard":{"description":"A point layer takes only macp.","enum":["pacp","macp","lacp","other"],"type":"string"},"structuralRating":{"maximum":5,"minimum":0,"type":["number","null"]},"totalLengthFt":{"maximum":1000000,"minimum":0,"type":["number","null"]},"upstreamRef":{"description":"The upstream manhole.","maxLength":240,"type":["string","null"]},"worstGrade":{"maximum":5,"minimum":1,"type":["integer","null"]}},"required":["sourceId","assetRef","standard"],"type":"object"},"RiskInspectionImportStage":{"properties":{"inputToken":{"type":"string"},"inspections":{"minimum":1,"type":"integer"},"observations":{"minimum":0,"type":"integer"}},"required":["inputToken","inspections","observations"],"type":"object"},"RiskInspectionImportSummary":{"properties":{"importId":{"format":"uuid","type":"string"},"importedAt":{"description":"When the import's first row was written.","format":"date-time","type":"string"},"inspections":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"media":{"properties":{"photo":{"$ref":"#/components/schemas/RiskInspectionImportMediaCount"},"report":{"$ref":"#/components/schemas/RiskInspectionImportMediaCount"},"video":{"$ref":"#/components/schemas/RiskInspectionImportMediaCount"}},"required":["video","photo","report"],"type":"object"},"observations":{"minimum":0,"type":"integer"},"source":{"description":"The delivery the import came from, as named in its rows.","type":["string","null"]},"standard":{"enum":["pacp","macp","lacp","other"],"type":"string"},"unmatched":{"minimum":0,"type":"integer"}},"required":["importId","importedAt","source","standard","inspections","matched","unmatched","observations","media"],"type":"object"},"RiskInspectionImports":{"properties":{"imports":{"items":{"$ref":"#/components/schemas/RiskInspectionImportSummary"},"maxItems":20,"type":"array"}},"required":["imports"],"type":"object"},"RiskInspectionMedia":{"properties":{"caption":{"type":["string","null"]},"fileName":{"type":"string"},"fileRecorded":{"description":"A URI is recorded. Reading the URL checks that the file exists.","type":"boolean"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["video","photo","report"],"type":"string"},"observationId":{"format":"uuid","type":["string","null"]},"sizeBytes":{"minimum":0,"type":["integer","null"]},"videoSeconds":{"type":["number","null"]}},"required":["id","kind","fileName","sizeBytes","caption","observationId","videoSeconds","fileRecorded"],"type":"object"},"RiskInspectionMediaCancelInput":{"additionalProperties":false,"properties":{"uploadToken":{"maxLength":8192,"minLength":1,"type":"string"}},"required":["uploadToken"],"type":"object"},"RiskInspectionMediaPage":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RiskInspectionMediaRow"},"maxItems":100,"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total"],"type":"object"},"RiskInspectionMediaPart":{"properties":{"number":{"maximum":192,"minimum":1,"type":"integer"},"sizeBytes":{"maximum":16777216,"minimum":1,"type":"integer"},"url":{"format":"uri","type":"string"}},"required":["number","sizeBytes","url"],"type":"object"},"RiskInspectionMediaRow":{"properties":{"assetRef":{"type":"string"},"caption":{"type":["string","null"]},"fileName":{"type":"string"},"fileRecorded":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"importId":{"format":"uuid","type":"string"},"inspectionId":{"format":"uuid","type":"string"},"kind":{"enum":["video","photo","report"],"type":"string"},"observationId":{"format":"uuid","type":["string","null"]},"projectId":{"format":"uuid","type":"string"},"sizeBytes":{"minimum":0,"type":["integer","null"]},"videoSeconds":{"type":["number","null"]}},"required":["id","inspectionId","projectId","importId","assetRef","kind","fileName","sizeBytes","observationId","caption","videoSeconds","fileRecorded"],"type":"object"},"RiskInspectionMediaUpload":{"properties":{"expiresAt":{"format":"date-time","type":"string"},"partSize":{"minimum":16777216,"type":"integer"},"parts":{"items":{"$ref":"#/components/schemas/RiskInspectionMediaPart"},"maxItems":192,"minItems":1,"type":"array"},"uploadToken":{"type":"string"}},"required":["uploadToken","partSize","parts","expiresAt"],"type":"object"},"RiskInspectionMediaUploadInput":{"additionalProperties":false,"properties":{"sizeBytes":{"maximum":3221225472,"minimum":1,"type":"integer"}},"type":"object"},"RiskInspectionObservation":{"properties":{"code":{"type":"string"},"description":{"type":["string","null"]},"distanceFt":{"type":["number","null"]},"grade":{"type":["integer","null"]},"id":{"format":"uuid","type":"string"},"remarks":{"description":"The surveyor's remarks, as written.","type":["string","null"]},"videoSeconds":{"type":["number","null"]}},"required":["id","distanceFt","code","description","remarks","grade","videoSeconds"],"type":"object"},"RiskInspectionPage":{"properties":{"facets":{"properties":{"layerIds":{"description":"The layers the project's inspections are matched to.","items":{"format":"uuid","type":"string"},"type":"array"},"matched":{"minimum":0,"type":"integer"},"purpose":{"additionalProperties":{"minimum":0,"type":"integer"},"description":"Inspections by purpose across the project.","type":"object"},"rehabbedSince":{"description":"Inspections across the project of assets rehabilitated since. The score doesn't use their grades.","minimum":0,"type":"integer"},"standard":{"additionalProperties":{"minimum":0,"type":"integer"},"type":"object"},"unmatched":{"minimum":0,"type":"integer"},"years":{"description":"Years with inspections in the project, newest first.","items":{"type":"integer"},"type":"array"}},"required":["standard","purpose","matched","unmatched","rehabbedSince","years","layerIds"],"type":"object"},"rows":{"items":{"$ref":"#/components/schemas/RiskInspection"},"maxItems":100,"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total","facets"],"type":"object"},"RiskInspectionUnmatched":{"properties":{"assetRef":{"maxLength":240,"type":"string"},"downstreamRef":{"maxLength":240,"type":["string","null"]},"sourceId":{"maxLength":160,"type":"string"},"upstreamRef":{"maxLength":240,"type":["string","null"]}},"required":["sourceId","assetRef","upstreamRef","downstreamRef"],"type":"object"},"RiskMaintenance":{"properties":{"activity":{"enum":["jetting","root_cutting","cctv","cleaning","repair","rehab","overflow","blockage","main_break","other"],"type":"string"},"assetRef":{"type":"string"},"crew":{"type":["string","null"]},"documentName":{"type":["string","null"]},"documentRecorded":{"description":"A URI is recorded. Reading the URL checks that the file exists.","type":"boolean"},"fid":{"type":["integer","null"]},"id":{"format":"uuid","type":"string"},"importId":{"format":"uuid","type":["string","null"]},"kind":{"enum":["preventive","corrective","emergency","capital",null],"type":["string","null"]},"layerId":{"format":"uuid","type":["string","null"]},"method":{"type":["string","null"]},"notes":{"type":["string","null"]},"performedAt":{"format":"date","type":["string","null"]},"projectFirm":{"description":"The firm of the project the record came from.","type":["string","null"]},"projectId":{"format":"uuid","type":"string"},"projectName":{"type":["string","null"]},"projectYear":{"description":"The year of the project the record came from.","type":["integer","null"]},"riskProjectId":{"format":"uuid","type":["string","null"]},"source":{"type":["string","null"]},"sourceId":{"type":["string","null"]}},"required":["id","projectId","importId","sourceId","layerId","fid","assetRef","activity","kind","riskProjectId","projectName","projectFirm","projectYear","performedAt","crew","method","notes","source","documentName","documentRecorded"],"type":"object"},"RiskMaintenanceDocumentUpload":{"properties":{"expiresAt":{"format":"date-time","type":"string"},"form":{"properties":{"fields":{"items":{"items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"url":{"format":"uri","type":"string"}},"required":["url","fields"],"type":"object"},"uploadToken":{"type":"string"}},"required":["uploadToken","form","expiresAt"],"type":"object"},"RiskMaintenanceImportDocument":{"additionalProperties":false,"properties":{"contentType":{"enum":["application/pdf","image/jpeg","image/png"],"type":"string"},"fileName":{"maxLength":240,"minLength":1,"type":"string"},"sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"sizeBytes":{"maximum":26214400,"minimum":1,"type":"integer"}},"required":["fileName","contentType","sizeBytes","sha256"],"type":"object"},"RiskMaintenanceImportInput":{"additionalProperties":false,"properties":{"records":{"items":{"$ref":"#/components/schemas/RiskMaintenanceImportRow"},"maxItems":2000,"minItems":1,"type":"array"},"riskProjectId":{"format":"uuid","type":["string","null"]},"schemaVersion":{"enum":[1],"type":"integer"},"source":{"description":"Paper requires a document on each row. CSV doesn't allow one.","enum":["csv","paper"],"type":"string"}},"required":["schemaVersion","source","records"],"type":"object"},"RiskMaintenanceImportJobReport":{"properties":{"duplicate":{"type":"boolean"},"importId":{"format":"uuid","type":["string","null"]},"matched":{"minimum":0,"type":"integer"},"matchedByPair":{"minimum":0,"type":"integer"},"records":{"minimum":0,"type":"integer"},"skippedExisting":{"minimum":0,"type":"integer"},"source":{"enum":["csv","paper"],"type":"string"},"unmatched":{"items":{"$ref":"#/components/schemas/RiskInspectionUnmatched"},"maxItems":100,"type":"array"},"unmatchedTotal":{"minimum":0,"type":"integer"}},"required":["importId","records","matched","matchedByPair","unmatchedTotal","unmatched","skippedExisting","duplicate"],"type":"object"},"RiskMaintenanceImportReportPage":{"properties":{"limit":{"maximum":100,"minimum":1,"type":"integer"},"offset":{"maximum":2000,"minimum":0,"type":"integer"},"report":{"$ref":"#/components/schemas/RiskMaintenanceImportJobReport"}},"required":["limit","offset","report"],"type":"object"},"RiskMaintenanceImportRow":{"additionalProperties":false,"properties":{"activity":{"enum":["jetting","root_cutting","cctv","cleaning","repair","rehab","overflow","blockage","main_break","other"],"type":"string"},"assetRef":{"maxLength":240,"minLength":1,"type":"string"},"crew":{"maxLength":160,"type":["string","null"]},"document":{"$ref":"#/components/schemas/RiskMaintenanceImportDocument"},"downstreamRef":{"maxLength":240,"type":["string","null"]},"kind":{"enum":["preventive","corrective","emergency","capital",null],"type":["string","null"]},"method":{"maxLength":240,"type":["string","null"]},"notes":{"maxLength":1000,"type":["string","null"]},"performedAt":{"format":"date","type":["string","null"]},"raw":{"additionalProperties":{"oneOf":[{"maxLength":1000,"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"maxProperties":100,"propertyNames":{"maxLength":160,"minLength":1,"type":"string"},"type":["object","null"]},"sourceId":{"maxLength":160,"minLength":1,"type":"string"},"upstreamRef":{"maxLength":240,"type":["string","null"]}},"required":["sourceId","assetRef","activity"],"type":"object"},"RiskMaintenanceImportStage":{"properties":{"inputToken":{"type":"string"},"records":{"minimum":1,"type":"integer"}},"required":["inputToken","records"],"type":"object"},"RiskMaintenancePage":{"properties":{"facets":{"properties":{"activity":{"additionalProperties":{"minimum":0,"type":"integer"},"type":"object"},"crews":{"description":"Crews named in the project's records, most records first.","items":{"type":"string"},"maxItems":100,"type":"array"},"layerIds":{"description":"The layers the project's records are matched to.","items":{"format":"uuid","type":"string"},"type":"array"},"matched":{"minimum":0,"type":"integer"},"unmatched":{"minimum":0,"type":"integer"},"years":{"description":"Years with records in the project, newest first.","items":{"type":"integer"},"type":"array"}},"required":["activity","crews","matched","unmatched","years","layerIds"],"type":"object"},"rows":{"items":{"$ref":"#/components/schemas/RiskMaintenance"},"maxItems":100,"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total","facets"],"type":"object"},"RiskMediaUrl":{"properties":{"expiresAt":{"format":"date-time","type":["string","null"]},"url":{"format":"uri","type":["string","null"]}},"required":["url","expiresAt"],"type":"object"},"RiskModel":{"properties":{"adoptedRunId":{"format":"uuid","type":["string","null"]},"config":{"additionalProperties":true,"type":"object"},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"lastRunId":{"format":"uuid","type":["string","null"]},"name":{"type":"string"},"projectId":{"format":"uuid","type":"string"},"recipeId":{"format":"uuid","type":"string"},"recipeVersion":{"minimum":1,"type":"integer"},"runs":{"items":{"$ref":"#/components/schemas/RiskRun"},"maxItems":5,"type":"array"},"schedule":{"enum":["manual","on_new_records","weekly","monthly"],"type":"string"},"scheduleNextAt":{"format":"date-time","type":["string","null"]},"serviceLifeOverrides":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"sources":{"items":{"$ref":"#/components/schemas/RiskSource"},"type":"array"},"systemType":{"enum":["water","wastewater","stormwater"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","projectId","name","description","systemType","recipeId","recipeVersion","config","serviceLifeOverrides","lastRunId","adoptedRunId","schedule","scheduleNextAt","createdAt","updatedAt","sources","runs"],"type":"object"},"RiskMovement":{"properties":{"after":{"type":["integer","null"]},"before":{"type":["integer","null"]},"direction":{"enum":["unchanged","worsened","improved","new","gained_score","lost_score","unscored_both","removed"],"type":"string"},"key":{"$ref":"#/components/schemas/RiskAssetKey"}},"required":["key","before","after","direction"],"type":"object"},"RiskPackagePreview":{"properties":{"breMean":{"type":["number","null"]},"breTotal":{"description":"Sum of BRE over the selection. This is the risk the project would address.","type":"number"},"byLayer":{"items":{"properties":{"count":{"minimum":1,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","count"],"type":"object"},"type":"array"},"cost":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RiskCostEstimate"}]},"pipes":{"minimum":0,"type":"integer"},"structures":{"minimum":0,"type":"integer"}},"required":["pipes","structures","breTotal","breMean","byLayer","cost"],"type":"object"},"RiskPlanPreview":{"properties":{"breTotal":{"type":"number"},"budget":{"description":"Requested budget rounded to cents for selection.","maximum":1000000000000,"minimum":0.01,"type":"number"},"candidates":{"maximum":5000,"minimum":0,"type":"integer"},"cost":{"description":"Sum of chosen stored project cost estimates rounded to cents, not actual spend.","minimum":0,"type":"number"},"missingScores":{"description":"Assets the run scored whose scores were deleted, for example when a scored layer was emptied from the trash. The totals cover only the remaining assets.","minimum":0,"type":"integer"},"projects":{"items":{"$ref":"#/components/schemas/RiskPlanPreviewProject"},"maxItems":5000,"type":"array"},"reduction":{"description":"Estimated renewal potential of chosen projects, counting each scored asset once.","minimum":0,"type":"number"},"runId":{"format":"uuid","type":"string"},"unpriced":{"minimum":0,"type":"integer"}},"required":["runId","budget","breTotal","candidates","unpriced","cost","reduction","projects","missingScores"],"type":"object"},"RiskPlanPreviewProject":{"properties":{"assets":{"minimum":0,"type":"integer"},"bounds":{"maxItems":4,"minItems":4,"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":["array","null"]},"cost":{"description":"Stored project cost estimate, not actual spend.","type":["number","null"]},"cumulativeCost":{"description":"Sum of chosen stored cost estimates through this project, rounded to cents.","type":["number","null"]},"cumulativeReduction":{"description":"Estimated renewal potential through this project, counting each scored asset once.","type":["number","null"]},"fits":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"reason":{"enum":["chosen","no_price","no_benefit","overlap","over_budget"],"type":"string"},"reduction":{"description":"Marginal estimated renewal potential for a chosen project. Standalone potential otherwise.","minimum":0,"type":"number"},"stage":{"enum":["planned","designed"],"type":"string"},"year":{"type":["integer","null"]}},"required":["id","name","year","stage","assets","reduction","cost","bounds","fits","reason","cumulativeCost","cumulativeReduction"],"type":"object"},"RiskPrograms":{"properties":{"cleaning":{"properties":{"annualFt":{"type":"number"},"tiers":{"items":{"properties":{"annualFt":{"type":"number"},"count":{"minimum":0,"type":"integer"},"lengthFt":{"type":"number"},"months":{"type":"integer"},"work":{"additionalProperties":{"minimum":0,"type":"integer"},"type":"object"}},"required":["months","count","lengthFt","annualFt","work"],"type":"object"},"type":"array"}},"required":["tiers","annualFt"],"type":"object"},"cyclePaceFt":{"description":"The pace to cover the whole network once per cycle, in feet per year.","type":"number"},"cycleYears":{"type":"number"},"feetPerYear":{"type":"number"},"inspection":{"properties":{"overdue":{"properties":{"count":{"minimum":0,"type":"integer"},"lengthFt":{"type":"number"}},"required":["count","lengthFt"],"type":"object"},"years":{"items":{"properties":{"count":{"minimum":0,"type":"integer"},"lengthFt":{"type":"number"},"pipes":{"minimum":0,"type":"integer"},"structures":{"minimum":0,"type":"integer"},"year":{"type":"integer"}},"required":["year","count","lengthFt","pipes","structures"],"type":"object"},"type":"array"}},"required":["years","overdue"],"type":"object"},"rows":{"items":{"properties":{"action":{"type":["string","null"]},"assetClass":{"enum":["pipe","structure"],"type":"string"},"assetId":{"type":["string","null"]},"bre":{"type":["number","null"]},"category":{"type":["integer","null"]},"cleaningMonths":{"type":["integer","null"]},"cleaningWork":{"type":["string","null"]},"dueYear":{"type":["integer","null"]},"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"},"lengthFt":{"type":"number"},"scheduledYear":{"type":["integer","null"]}},"required":["layerId","fid","assetId","assetClass","bre","category","action","dueYear","lengthFt","cleaningMonths","cleaningWork","scheduledYear"],"type":"object"},"type":"array"},"startYear":{"type":"integer"}},"required":["startYear","feetPerYear","cyclePaceFt","cycleYears","inspection","cleaning","rows"],"type":"object"},"RiskProjectYear":{"properties":{"estimateTotal":{"minimum":0,"type":"number"},"priced":{"minimum":0,"type":"integer"},"projects":{"maximum":5000,"minimum":1,"type":"integer"},"stages":{"$ref":"#/components/schemas/RiskProjectYearStages"},"unpriced":{"minimum":0,"type":"integer"},"year":{"type":["integer","null"]}},"required":["year","projects","stages","priced","unpriced","estimateTotal"],"type":"object"},"RiskProjectYearStages":{"properties":{"closed":{"minimum":0,"type":"integer"},"constructed":{"minimum":0,"type":"integer"},"construction":{"minimum":0,"type":"integer"},"designed":{"minimum":0,"type":"integer"},"planned":{"minimum":0,"type":"integer"}},"required":["planned","designed","construction","constructed","closed"],"type":"object"},"RiskProjectYears":{"properties":{"estimateTotal":{"minimum":0,"type":"number"},"pricedProjects":{"maximum":5000,"minimum":0,"type":"integer"},"totalProjects":{"maximum":5000,"minimum":0,"type":"integer"},"unpricedProjects":{"maximum":5000,"minimum":0,"type":"integer"},"years":{"items":{"$ref":"#/components/schemas/RiskProjectYear"},"maxItems":5000,"type":"array"}},"required":["totalProjects","pricedProjects","unpricedProjects","estimateTotal","years"],"type":"object"},"RiskRecipe":{"properties":{"builtIn":{"type":"boolean"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"params":{"additionalProperties":true,"description":"The published version's parameters. A model's rules start from these defaults.","type":"object"},"systemType":{"enum":["water","wastewater","stormwater"],"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","name","description","systemType","version","builtIn","params"],"type":"object"},"RiskRecordsPage":{"description":"One page of a project's risk records, as `POST /risk-records/import` takes it.","properties":{"files":{"items":{"properties":{"bytes":{"type":["integer","null"]},"kind":{"description":"What the link opens when it isn't the file: a folder's listing (`files`, each with `path`, `url` and `bytes`), or a study's results.","enum":["folder","results"],"type":"string"},"uri":{"description":"Where a row names the file or folder, or `study:{id}` for a study's results.","type":"string"},"url":{"description":"A link that downloads it, for up to 24 hours.","type":"string"}},"required":["uri","url","bytes"],"type":"object"},"type":"array"},"layers":{"additionalProperties":{"properties":{"geometry":{"type":["string","null"]},"name":{"type":"string"}},"required":["name","geometry"],"type":"object"},"description":"Every layer of the source project, by id.","type":"object"},"page":{"minimum":0,"type":"integer"},"pages":{"minimum":1,"type":"integer"},"part":{"enum":["projects","work-orders","inspections","models","runs","hydraulic-models","studies"],"type":"string"},"project":{"description":"The source project.","format":"uuid","type":"string"},"setup":{"additionalProperties":true,"description":"What a page of models, runs, hydraulic models or studies carries beside its rows, for the import to place them; sent back unchanged.","type":"object"},"tables":{"additionalProperties":{"items":{"type":"object"},"type":"array"},"description":"Each table's rows, as the database holds them; geometry as hex EWKB.","type":"object"}},"required":["project","part","page","pages","layers","tables","files"],"type":"object"},"RiskRun":{"properties":{"asOfYear":{"description":"The year a plain run aged the network to, scored as of July 1 of that year. Null means scored as of the day it ran.","type":["integer","null"]},"assetCount":{"type":["integer","null"]},"createdAt":{"format":"date-time","type":"string"},"currentStep":{"type":["string","null"]},"endedAt":{"format":"date-time","type":["string","null"]},"error":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"ingestedAt":{"format":"date-time","type":["string","null"]},"label":{"type":["string","null"]},"progress":{"type":["integer","null"]},"riskModelId":{"format":"uuid","type":"string"},"scenario":{"additionalProperties":true,"type":["object","null"]},"scoredCount":{"type":["integer","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"status":{"enum":["pending","exporting","queued","starting","running","importing","completed","failed","cancelled"],"type":"string"},"summary":{"additionalProperties":true,"type":["object","null"]},"warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"workerMode":{"description":"local_recorded means scored here without spatial context. wrm means scored by the generator's risk job, with spatial context (the value keeps its old name). Null for older runs.","enum":["local_recorded","wrm",null],"type":["string","null"]}},"required":["id","riskModelId","status","workerMode","asOfYear","label","scenario","progress","currentStep","error","assetCount","scoredCount","warnings","summary","createdAt","startedAt","endedAt","ingestedAt"],"type":"object"},"RiskRunDetail":{"allOf":[{"$ref":"#/components/schemas/RiskRun"},{"properties":{"riskModelName":{"type":"string"},"systemType":{"enum":["water","wastewater","stormwater"],"type":"string"}},"required":["riskModelName","systemType"],"type":"object"}]},"RiskRunPairComparison":{"properties":{"after":{"$ref":"#/components/schemas/RiskScenarioTotals"},"againstRunId":{"format":"uuid","type":"string"},"before":{"$ref":"#/components/schemas/RiskScenarioTotals"},"gainedScore":{"minimum":0,"type":"integer"},"improved":{"minimum":0,"type":"integer"},"lostScore":{"minimum":0,"type":"integer"},"matchedScored":{"minimum":0,"type":"integer"},"missingAssets":{"minimum":0,"type":"integer"},"newAssets":{"minimum":0,"type":"integer"},"reduction":{"description":"Positive means lower BRE on matched scored assets. Negative means an increase.","type":"number"},"runId":{"format":"uuid","type":"string"},"warnings":{"items":{"type":"string"},"type":"array"},"worsened":{"minimum":0,"type":"integer"}},"required":["runId","againstRunId","before","after","matchedScored","reduction","improved","worsened","newAssets","missingAssets","gainedScore","lostScore","warnings"],"type":"object"},"RiskScenarioComparison":{"properties":{"after":{"$ref":"#/components/schemas/RiskScenarioTotals"},"afterLayerIds":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"againstRunId":{"format":"uuid","type":"string"},"before":{"$ref":"#/components/schemas/RiskScenarioTotals"},"beforeLayerIds":{"items":{"format":"uuid","type":"string"},"type":"array","uniqueItems":true},"gainedScore":{"minimum":0,"type":"integer"},"improved":{"minimum":0,"type":"integer"},"lostScore":{"minimum":0,"type":"integer"},"matchedScored":{"minimum":0,"type":"integer"},"missingAssets":{"minimum":0,"type":"integer"},"newAssets":{"minimum":0,"type":"integer"},"paired":{"description":"The base is the what-if's own projected baseline. Both are scored from one frozen input at July 1 of the year, so the change comes from the projects alone.","type":"boolean"},"projectIds":{"items":{"format":"uuid","type":"string"},"maxItems":5000,"minItems":1,"type":"array"},"projects":{"description":"The what-if's capital projects as currently stored, largest reduction first. Ties, and projects with no assets after them, keep projectIds order. A deleted project has a null name and no assets. A project's assets are the features its maintenance records name. Projects can share assets, so the rows may not add up to the run's reduction. A run difference doesn't isolate any one project's effect.","items":{"properties":{"assets":{"description":"Distinct features the project's records name, scored or not.","minimum":0,"type":"integer"},"breAfter":{"description":"BRE over its assets the what-if scored, to one decimal. Null with no assets.","type":["number","null"]},"breBefore":{"description":"BRE over its assets the base scored, to one decimal. Null with no assets.","type":["number","null"]},"cost":{"type":["number","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]},"reduction":{"description":"Base minus what-if BRE over its assets both scored, to one decimal. Null with no assets.","type":["number","null"]},"reductionPerThousand":{"description":"The reduction per $1,000 of its stored cost, to two decimals. Null without assets or a nonzero cost.","type":["number","null"]},"year":{"type":["integer","null"]}},"required":["id","name","year","cost","assets","breBefore","breAfter","reduction","reductionPerThousand"],"type":"object"},"maxItems":5000,"minItems":1,"type":"array"},"reduction":{"description":"Positive means lower BRE on matched scored assets. Negative means an increase.","type":"number"},"scenarioRunId":{"format":"uuid","type":"string"},"warnings":{"items":{"type":"string"},"type":"array"},"worsened":{"minimum":0,"type":"integer"},"year":{"maximum":2199,"minimum":1901,"type":"integer"}},"required":["scenarioRunId","againstRunId","year","paired","projectIds","projects","beforeLayerIds","afterLayerIds","before","after","matchedScored","reduction","improved","worsened","newAssets","missingAssets","gainedScore","lostScore","warnings"],"type":"object"},"RiskScenarioTotals":{"properties":{"assets":{"maximum":200000,"minimum":0,"type":"integer"},"bands":{"items":{"minimum":0,"type":"integer"},"maxItems":5,"minItems":5,"type":"array"},"breTotal":{"type":"number"},"scored":{"maximum":200000,"minimum":0,"type":"integer"}},"required":["assets","scored","breTotal","bands"],"type":"object"},"RiskScore":{"properties":{"action":{"type":["string","null"]},"actionHorizonYears":{"type":["integer","null"]},"actionMethod":{"type":["string","null"]},"actionReason":{"type":["string","null"]},"actionRule":{"type":["string","null"]},"ageYears":{"type":["number","null"]},"assetClass":{"enum":["pipe","structure"],"type":"string"},"assetId":{"type":["string","null"]},"bre":{"type":["number","null"]},"category":{"maximum":5,"minimum":1,"type":["integer","null"]},"cleaningIntervalMonths":{"type":["integer","null"]},"cleaningWork":{"type":["string","null"]},"cof":{"type":["number","null"]},"criticalFacility":{"type":["number","null"]},"economic":{"type":["number","null"]},"environmental":{"type":["number","null"]},"fid":{"type":"integer"},"flags":{"items":{"type":"string"},"type":"array"},"landCoverCode":{"type":["integer","null"]},"layerId":{"format":"uuid","type":"string"},"lof":{"type":["number","null"]},"lofAge":{"type":["number","null"]},"lofCondition":{"type":["number","null"]},"lofOverride":{"type":["number","null"]},"nextInspectionYear":{"type":["integer","null"]},"rank":{"minimum":1,"type":["integer","null"]},"remainingLifeYears":{"type":["number","null"]},"rulBasis":{"type":["string","null"]},"rulYears":{"type":["number","null"]},"serviceLifeYears":{"type":["number","null"]},"social":{"type":["number","null"]},"transportation":{"type":["number","null"]},"transportationClass":{"type":["string","null"]}},"required":["layerId","fid","assetClass","assetId","lof","cof","bre","category","rank","lofAge","lofCondition","lofOverride","ageYears","serviceLifeYears","remainingLifeYears","economic","social","environmental","transportation","criticalFacility","transportationClass","landCoverCode","flags","rulYears","rulBasis","action","actionMethod","actionRule","actionReason","actionHorizonYears","nextInspectionYear","cleaningIntervalMonths","cleaningWork"],"type":"object"},"RiskScorePage":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RiskScore"},"maxItems":500,"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total"],"type":"object"},"RiskServiceLife":{"properties":{"rows":{"items":{"properties":{"assetClass":{"enum":["pipe","structure"],"type":"string"},"material":{"type":"string"},"materialKey":{"type":"string"},"serviceLifeYears":{"type":"integer"},"structureType":{"type":"string"},"team":{"description":"The team's own row.","type":"boolean"}},"required":["assetClass","material","materialKey","structureType","serviceLifeYears","team"],"type":"object"},"type":"array"},"teamDefaults":{"description":"Whether you can save the team's defaults.","type":"boolean"}},"required":["rows","teamDefaults"],"type":"object"},"RiskSource":{"properties":{"assetClass":{"enum":["pipe","structure"],"type":"string"},"fieldMapping":{"additionalProperties":true,"type":"object"},"id":{"format":"uuid","type":"string"},"layerId":{"format":"uuid","type":"string"},"order":{"minimum":0,"type":"integer"},"structureType":{"type":["string","null"]}},"required":["id","layerId","assetClass","structureType","fieldMapping","order"],"type":"object"},"RiskSpotCheck":{"properties":{"afterBre":{"type":["number","null"]},"afterCategory":{"maximum":5,"minimum":1,"type":"integer"},"assetId":{"type":["string","null"]},"beforeBre":{"type":["number","null"]},"beforeCategory":{"type":["integer","null"]},"flags":{"items":{"type":"string"},"type":"array"},"key":{"$ref":"#/components/schemas/RiskAssetKey"},"lof":{"type":["number","null"]}},"required":["key","assetId","lof","beforeBre","afterBre","beforeCategory","afterCategory","flags"],"type":"object"},"RiskUnitCost":{"properties":{"assetClass":{"enum":["pipe","structure"],"type":"string"},"cost":{"type":"number"},"diameterMaxIn":{"type":["number","null"]},"diameterMinIn":{"type":["number","null"]},"id":{"format":"uuid","type":"string"},"label":{"type":"string"},"match":{"type":"string"},"note":{"type":["string","null"]},"projectOverride":{"description":"True when this rate belongs to this project rather than its team or global defaults.","type":"boolean"},"systemType":{"enum":["water","wastewater","stormwater"],"type":"string"},"teamOverride":{"type":"boolean"},"unit":{"enum":["ft","each","segment","gal","gpm"],"type":"string"}},"required":["id","systemType","assetClass","label","match","unit","diameterMinIn","diameterMaxIn","cost","note","teamOverride"],"type":"object"},"RowFlag":{"properties":{"attributeKey":{"description":"The column. Empty for the whole entry.","type":"string"},"flagId":{"format":"uuid","type":"string"},"note":{"type":["string","null"]},"rowKey":{"description":"The entry's name, or a node's.","type":"string"},"section":{"description":"The model section (hydrographs, patterns, dwf).","type":"string"}},"required":["section","rowKey","attributeKey","flagId","note"],"type":"object"},"RunUpload":{"properties":{"expiresAt":{"description":"When the part addresses and the upload expire.","format":"date-time","type":"string"},"name":{"description":"The name the file is stored under.","type":"string"},"partSize":{"description":"Bytes in each part except the last, which contains the rest.","minimum":1,"type":"integer"},"parts":{"description":"Where to send each part. PUT exactly that part's bytes to its url, with no Content-Type and no Authorization header (the address is signed). Send each part's number and the ETag header its PUT returned to simulation.run, every part once.","items":{"properties":{"number":{"maximum":10000,"minimum":1,"type":"integer"},"url":{"format":"uri","type":"string"}},"required":["number","url"],"type":"object"},"minItems":1,"type":"array"},"upload":{"description":"The upload, signed. Send it as `input.upload` to simulation.run (without a projectId) once every part is sent. Opaque.","type":"string"}},"required":["upload","name","partSize","parts","expiresAt"],"type":"object"},"RunUploadStart":{"additionalProperties":false,"properties":{"name":{"description":"The file name, with its extension: .inp, or .zip (one holding an .inp and the files it names, or a HEC-RAS project with its .prj). With projectId, any file the project imports (see upload.start).","maxLength":255,"minLength":1,"type":"string"},"projectId":{"description":"The project the file is for: to import with object.import, or to run there with simulation.run. The answer is then an Upload. Leave it out for a run outside any project.","format":"uuid","type":"string"},"replaces":{"additionalProperties":false,"description":"With projectId only. The layer or raster in that project the file replaces (see upload.start).","properties":{"id":{"format":"uuid","type":"string"},"kind":{"enum":["layer","raster"],"type":"string"}},"required":["kind","id"],"type":"object"},"size":{"description":"Size in bytes, up to 64 GiB; with projectId, up to 3 GiB.","maximum":68719476736,"minimum":1,"type":"integer"}},"required":["name","size"],"type":"object"},"Said":{"description":"A row's title and meta as codes, for rows worded rather than named.","properties":{"meta":{"$ref":"#/components/schemas/Words"},"title":{"$ref":"#/components/schemas/Words"}},"type":"object"},"ScenarioDiff":{"properties":{"byRole":{"items":{"properties":{"adds":{"type":"integer"},"changes":{"type":"integer"},"inactive":{"type":"integer"},"role":{"type":"string"}},"required":["role","adds","changes","inactive"],"type":"object"},"type":"array"},"counts":{"properties":{"adds":{"type":"integer"},"changes":{"type":"integer"},"inactive":{"description":"Elements switched off.","type":"integer"},"sections":{"type":"integer"}},"required":["adds","changes","sections","inactive"],"type":"object"},"items":{"items":{"properties":{"fid":{"type":"integer"},"fields":{"additionalProperties":true,"description":"Each field the change sets, as {from, to}. A moved shape appears as geometry.","type":"object"},"name":{"type":"string"},"op":{"enum":["add","change","inactive"],"type":"string"},"role":{"type":"string"}},"required":["role","fid","op","fields"],"type":"object"},"type":"array"},"sections":{"items":{"properties":{"from":{},"op":{"type":"string"},"path":{"items":{"type":"string"},"type":"array"},"section":{"type":"string"},"to":{}},"required":["section","path","op"],"type":"object"},"type":"array"},"truncated":{"description":"True when more elements changed than are listed.","type":"boolean"}},"required":["counts","byRole","items","sections","truncated"],"type":"object"},"ScheduledForecast":{"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"format":"uuid","type":"string"},"cycles":{"items":{"$ref":"#/components/schemas/ForecastCycle"},"type":"array"},"enabled":{"type":"boolean"},"engineVersion":{"description":"The engine version each cycle's run uses, from GET /engines. Null uses the newest stable version available. Only for a SWMM or EPANET model's own forecast.","type":["string","null"]},"everyHours":{"type":"integer"},"flood":{"description":"A HEC-RAS model's forecast only: the depths its flood impact counts by, in the project's units: the wet depth, the Minor, Moderate and Major bounds, the Record depth and the smallest wet area kept. origin project is a value set, default the default.","items":{"$ref":"#/components/schemas/LevelOfServiceValue"},"type":"array"},"floodImpact":{"allOf":[{"$ref":"#/components/schemas/FloodImpactLayers"},{"properties":{"inherited":{"description":"True while the forecast has no settings of its own and uses the project's. Its first save makes them its own.","type":"boolean"}},"required":["inherited"],"type":"object"}],"description":"A HEC-RAS model's forecast only: the layers and terrain its flood impact counts, set with project.flood.save and its forecastId."},"hindcastHours":{"type":"integer"},"horizonHours":{"type":"integer"},"id":{"format":"uuid","type":"string"},"lastAt":{"format":"date-time","type":["string","null"]},"ml":{"description":"The linked machine-learning model.","properties":{"functionName":{"type":"string"},"kind":{"type":"string"},"studio":{"description":"The model each cycle runs, from the team's AI Studio. Absent, the function runs the weights it already has.","properties":{"model":{"description":"A registered model's name.","type":"string"},"version":{"description":"A version number such as 4, latest, or an alias such as @champion.","type":"string"}},"required":["model","version"],"type":["object","null"]}},"type":["object","null"]},"modelId":{"format":"uuid","type":"string"},"name":{"type":"string"},"nextAt":{"format":"date-time","type":["string","null"]},"planId":{"description":"A HEC-RAS model's plan.","type":["string","null"]},"post":{"description":"The script run on each cycle's finished run, and its inputs.","properties":{"inputs":{"additionalProperties":true,"description":"A SmartCover token is never shown: its place holds tokenSet instead.","type":"object"},"script":{"description":"A script's id in the catalog.","type":"string"},"version":{"type":"integer"}},"required":["script","version","inputs"],"type":["object","null"]},"pre":{"description":"The steps applied to each cycle's run before it runs, in order.","items":{"properties":{"inputs":{"additionalProperties":true,"type":"object"},"step":{"description":"A step's id in the catalog.","type":"string"},"version":{"type":"integer"}},"required":["step","version","inputs"],"type":"object"},"type":["array","null"]},"projectId":{"format":"uuid","type":"string"},"scenarioId":{"format":"uuid","type":["string","null"]},"source":{"description":"A run of this model, or a linked ML model.","enum":["model","ml"],"type":"string"},"stepMinutes":{"type":"integer"}},"required":["id","projectId","modelId","name","source","scenarioId","planId","ml","post","pre","everyHours","hindcastHours","horizonHours","stepMinutes","enabled","nextAt","lastAt","createdBy","engineVersion","createdAt","cycles"],"type":"object"},"SchematicDoc":{"properties":{"lines":{"items":{"properties":{"from":{"description":"The shape upstream.","type":"string"},"id":{"type":"string"},"kind":{"enum":["pipe","overflow"],"type":"string"},"to":{"type":"string"}},"required":["id","from","to","kind"],"type":"object"},"type":"array"},"nodes":{"items":{"properties":{"id":{"type":"string"},"kind":{"enum":["meter","junction","pump","plant","diversion","outfall","note"],"type":"string"},"label":{"type":"string"},"siteId":{"description":"The site a meter box is bound to, or the root an outfall hangs under.","type":"string"},"text":{"type":"string"},"x":{"description":"The node's top-left x, in px.","type":"integer"},"y":{"type":"integer"}},"required":["id","kind","x","y"],"type":"object"},"type":"array"},"version":{"const":1,"type":"integer"}},"required":["version","nodes","lines"],"type":"object"},"ScorecardRow":{"properties":{"depthAt":{"description":"Where on a pipe the model's depth was read; `manhole` is the downstream node's depth with no offset taken off. A pipe end whose node the run has no depth for is read as the average. Null for a meter at a node.","enum":["downstream","upstream","average","manhole",null],"type":["string","null"]},"depthElement":{"description":"The model element the meter's depth is compared with: the pipe, or the node it is bound to.","type":["string","null"]},"endAt":{"format":"date-time","type":"string"},"eventId":{"format":"uuid","type":"string"},"measures":{"items":{"properties":{"checks":{"items":{"properties":{"limit":{"type":"string"},"name":{"type":"string"},"pass":{"type":["boolean","null"]},"value":{"type":["number","null"]}},"required":["name","value","limit","pass"],"type":"object"},"type":"array"},"meanError":{"type":["number","null"]},"measure":{"type":"string"},"n":{"description":"Readings paired with the model.","type":"integer"},"nse":{"type":["number","null"]},"observedPeak":{"type":["number","null"]},"observedVolume":{"description":"Value-hours over the paired readings.","type":["number","null"]},"pass":{"type":["boolean","null"]},"pbiasPct":{"type":["number","null"]},"peakErrorPct":{"type":["number","null"]},"peakTimingHours":{"description":"Hours from the meter's peak to the model's peak. Positive when the model is late.","type":["number","null"]},"r2":{"type":["number","null"]},"rmse":{"type":["number","null"]},"simulatedPeak":{"type":["number","null"]},"simulatedVolume":{"type":["number","null"]},"skipped":{"description":"Why the measure wasn't judged, or what couldn't be converted. Null when it was judged.","type":["string","null"]},"unit":{"type":"string"},"volumeErrorPct":{"type":["number","null"]}},"required":["measure","unit","n","checks","pass","skipped"],"type":"object"},"type":"array"},"ordinal":{"description":"The event's number in the survey.","type":["integer","null"]},"pass":{"description":"Whether every judged measure passed. Null when no measure was judged.","type":["boolean","null"]},"passedBy":{"description":"`surcharge` for a storm passed by the criteria's surcharge rule: on its peak depth in the surcharged band, and its volume when the surcharge was brief, its peak flow not judged. Null otherwise.","enum":["surcharge",null],"type":["string","null"]},"pipeHeightFt":{"description":"The height of the meter's pipe in the model, in feet: the conduit its depth is bound to, or the largest conduit into the node it is bound to. Null when the model has none.","type":["number","null"]},"reported":{"additionalProperties":{"type":["number","null"]},"description":"The survey's figures, in the project's units (observedPeak, observedVolume, observedDepth, simulatedPeak, simulatedVolume, simulatedDepth, rainfallIn).","type":"object"},"role":{"enum":["calibration","validation"],"type":"string"},"setId":{"description":"The event set it is in.","format":"uuid","type":["string","null"]},"siteId":{"format":"uuid","type":"string"},"siteName":{"type":"string"},"startAt":{"format":"date-time","type":"string"},"surchargeBrief":{"description":"Whether that surcharge was brief, 2 h or less and no more than a tenth of the event, so the storm's volume is judged too. Null when the rule did not judge it.","type":["boolean","null"]},"surchargeMinutes":{"description":"The minutes the meter's depth read above its pipe's crown over the event, for a surcharged storm the criteria's surcharge rule judges. Null otherwise.","type":["number","null"]},"surcharged":{"description":"Whether the meter's observed peak depth is above the crown of its pipe. A surcharged storm's peak depth is held to the criteria's surcharged band. Null without a pipe height or depth readings.","type":["boolean","null"]},"weather":{"enum":["wet","dry"],"type":"string"}},"required":["eventId","siteId","siteName","weather","role","ordinal","startAt","endAt","reported","setId","measures","pass"],"type":"object"},"ScorecardScoring":{"description":"The run's scorecard is still being computed. Try again in a few seconds.","properties":{"scoring":{"const":true,"type":"boolean"},"simulationId":{"format":"uuid","type":"string"}},"required":["scoring","simulationId"],"type":"object"},"ScorecardTrace":{"properties":{"eventId":{"format":"uuid","type":"string"},"measures":{"items":{"properties":{"checks":{"items":{"properties":{"limit":{"type":"string"},"name":{"type":"string"},"pass":{"type":["boolean","null"]},"value":{"type":["number","null"]}},"required":["name","value","limit","pass"],"type":"object"},"type":"array"},"measure":{"type":"string"},"metrics":{"additionalProperties":true,"description":"The fit metrics for the row's measure.","type":"object"},"observed":{"items":{"$ref":"#/components/schemas/TracePoint"},"type":"array"},"simulated":{"items":{"$ref":"#/components/schemas/TracePoint"},"type":"array"},"unit":{"type":"string"}},"required":["measure","unit","observed","simulated","metrics","checks"],"type":"object"},"type":"array"},"timeZone":{"description":"The project's time zone.","type":"string"}},"required":["eventId","timeZone","measures"],"type":"object"},"ScorecardTraces":{"properties":{"simulationId":{"format":"uuid","type":"string"},"timeZone":{"description":"The project's time zone.","type":"string"},"traces":{"description":"The trace for each covered event, in the scorecard's row order.","items":{"$ref":"#/components/schemas/ScorecardTrace"},"type":"array"}},"required":["simulationId","timeZone","traces"],"type":"object"},"SearchHit":{"properties":{"detail":{"type":"string"},"id":{"description":"A project, layer, model, run, dashboard, field map or survey uuid. For a feature or a sensor site, its fid as a string.","type":"string"},"kind":{"description":"What was found. More kinds may be added, so a client shows an unknown kind by its label and detail and doesn't open it.","type":"string","x-extensible-enum":["project","layer","feature","model","run","sensor","dashboard","fieldMap","survey"]},"label":{"type":"string"},"layerId":{"format":"uuid","type":"string"},"modelId":{"description":"A model's id, or a run's model id, which opens in Modeling.","format":"uuid","type":"string"},"projectId":{"format":"uuid","type":"string"}},"required":["kind","id","label"],"type":"object"},"SensorAnalyses":{"properties":{"analyses":{"items":{"$ref":"#/components/schemas/SensorAnalysisSummary"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["analyses","nextCursor"],"type":"object"},"SensorAnalysis":{"allOf":[{"$ref":"#/components/schemas/SensorAnalysisSummary"},{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/DryWeatherResult"},{"$ref":"#/components/schemas/WetWeatherResult"},{"$ref":"#/components/schemas/QviResult"},{"$ref":"#/components/schemas/SensorForecastRecord"},{"type":"null"}]}},"required":["result"],"type":"object"}]},"SensorAnalysisSummary":{"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"format":"uuid","type":["string","null"]},"criteria":{"additionalProperties":true,"description":"The criteria set the analysis ran with, with the values it used.","type":"object"},"endAt":{"format":"date-time","type":"string"},"error":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"enum":["dry_weather","wet_weather","regression","forecast"],"type":"string"},"method":{"description":"How it was computed, by kind: the groundwater infiltration method for dry weather, `rtk` when a wet-weather analysis fitted RTK curves, the rain axis (`depth` or `peak1h`) for regression, the rain product used for a forecast. Null when none applies.","type":["string","null"]},"site":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"startAt":{"format":"date-time","type":"string"},"status":{"enum":["done","failed"],"type":"string"},"timeZone":{"type":"string"}},"required":["id","site","kind","startAt","endAt","timeZone","method","criteria","status","error","createdBy","createdAt"],"type":"object"},"SensorArea":{"additionalProperties":false,"description":"USGS gages only: where they are picked from, a state by its two-letter code or inside a GeoJSON Polygon or MultiPolygon in longitude and latitude, at most 10,000 positions. A gage's state is its NWS identifier's.","properties":{"state":{"description":"A state's postal code, such as MO.","maxLength":2,"minLength":2,"type":"string"},"within":{"description":"A GeoJSON Polygon or MultiPolygon geometry, not a Feature.","properties":{"coordinates":{"items":{},"type":"array"},"type":{"enum":["Polygon","MultiPolygon"],"type":"string"}},"required":["type","coordinates"],"type":"object"}},"type":"object"},"SensorBoard":{"properties":{"sites":{"description":"The sites by kind, then name, at most 10,000. A project with more lists its first 10,000 and counts the rest in `total`.","items":{"$ref":"#/components/schemas/SensorSite"},"type":"array"},"total":{"description":"Every site of the project's live sensor layers, listed or not.","minimum":0,"type":"integer"},"unsited":{"description":"Sensor layers with features that aren't sites yet, and how many.","items":{"properties":{"count":{"minimum":1,"type":"integer"},"layerId":{"format":"uuid","type":"string"},"layerName":{"type":"string"}},"required":["layerId","layerName","count"],"type":"object"},"type":"array"}},"required":["sites","total","unsited"],"type":"object"},"SensorColourCandidate":{"properties":{"features":{"type":"integer"},"fields":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"mode":{"enum":["outlet","nodes","name"],"type":"string"},"name":{"type":"string"}},"required":["id","name","mode","features","fields"],"type":"object"},"SensorColourCandidates":{"properties":{"candidates":{"items":{"$ref":"#/components/schemas/SensorColourCandidate"},"type":"array"}},"required":["candidates"],"type":"object"},"SensorConnect":{"additionalProperties":false,"properties":{"area":{"$ref":"#/components/schemas/SensorArea"},"key":{"description":"ADS's developer key, or Smart Cover's token. At most 500 bytes, no control characters.","maxLength":500,"type":"string"},"network":{"$ref":"#/components/schemas/SensorNetwork"},"password":{"description":"At most 500 bytes, no control characters.","maxLength":500,"type":"string"},"tenant":{"description":"Cipher's tenant. At most 500 bytes, no control characters.","maxLength":500,"type":"string"},"username":{"description":"At most 500 bytes, no control characters.","maxLength":500,"type":"string"}},"required":["network"],"type":"object"},"SensorConnection":{"properties":{"inArea":{"description":"The gages with a location inside the area asked about. Only when one was.","minimum":0,"type":"integer"},"listed":{"description":"The sites the connection lists.","minimum":0,"type":"integer"},"loginToken":{"description":"The credentials, sealed for sensors.import for 30 minutes. None for USGS gages.","type":"string"},"network":{"$ref":"#/components/schemas/SensorNetwork"},"placed":{"description":"Sites with a location, which an import makes points of. None for Storm Watch.","minimum":0,"type":"integer"}},"required":["network","listed"],"type":"object"},"SensorCriteria":{"properties":{"dry":{"properties":{"antecedentDryDays":{"type":"number"},"days":{"type":"number"},"maxDailyRainIn":{"type":"number"},"peakMinutes":{"description":"How a dry period's peak flow is read under WaPUG, 5 (the single highest 5-minute reading, the default) or 60 (the highest hourly mean).","enum":[5,60],"type":"number"},"peakPct":{"type":"number"},"timingHours":{"type":"number"},"volumePct":{"type":"number"}},"required":["timingHours","peakPct","volumePct","days","antecedentDryDays","maxDailyRainIn"],"type":"object"},"stats":{"properties":{"nseMin":{"type":"number"},"pbiasPct":{"type":"number"},"r2Min":{"type":"number"}},"required":["nseMin","r2Min","pbiasPct"],"type":"object"},"storm":{"properties":{"interEventHours":{"type":"number"},"minIntensityInPerHr":{"type":"number"},"minIntensityMinutes":{"type":"number"},"minRainfallIn":{"type":"number"}},"required":["minRainfallIn","minIntensityInPerHr","minIntensityMinutes","interEventHours"],"type":"object"},"wet":{"properties":{"depthFt":{"type":"number"},"eventsOf":{"items":{"minimum":1,"type":"integer"},"maxItems":2,"minItems":2,"type":"array"},"peakDownPct":{"type":"number"},"peakUpPct":{"type":"number"},"surchargeDownFt":{"type":"number"},"surchargeRule":{"description":"Whether a surcharged storm is judged on its peak depth in the surcharged band, and its volume too when the surcharge lasted 2 h or less and no more than a tenth of the event, its peak flow not judged. Off by default. A meter marked `surchargeDepthUnreliable` is scored as before.","type":"boolean"},"surchargeUpFt":{"type":"number"},"volumeDownPct":{"type":"number"},"volumeUpPct":{"type":"number"}},"required":["peakUpPct","peakDownPct","volumeUpPct","volumeDownPct","surchargeUpFt","surchargeDownFt","depthFt","eventsOf"],"type":"object"}},"required":["storm","dry","wet","stats"],"type":"object"},"SensorCriteriaSet":{"properties":{"base":{"enum":["us","wapug"],"type":"string"},"builtIn":{"type":"boolean"},"canEdit":{"type":"boolean"},"criteria":{"$ref":"#/components/schemas/SensorCriteria"},"id":{"type":"string"},"name":{"type":"string"},"scope":{"enum":["built-in","project","team"],"type":"string"},"updatedAt":{"format":"date-time","type":["string","null"]}},"required":["id","name","base","builtIn","scope","criteria","updatedAt","canEdit"],"type":"object"},"SensorCriteriaSets":{"properties":{"canWriteTeam":{"description":"Whether you can save sets shared with the project's team (`scope: team`).","type":"boolean"},"defaultId":{"description":"The set used when `POST /projects/{projectId}/sensor-storms/detect` or `POST /projects/{projectId}/sensor-analyses` names none: the project's own saved set, else `us`.","type":"string"},"sets":{"items":{"$ref":"#/components/schemas/SensorCriteriaSet"},"type":"array"}},"required":["sets","defaultId","canWriteTeam"],"type":"object"},"SensorDocument":{"properties":{"contentType":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"fileName":{"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["site_sheet","interrogation","calibration","photo","other"],"type":"string"},"siteId":{"format":"uuid","type":"string"},"sizeBytes":{"type":["integer","null"]},"uploaded":{"type":"boolean"}},"required":["id","siteId","kind","fileName","contentType","sizeBytes","uploaded","createdAt"],"type":"object"},"SensorDocumentDownload":{"properties":{"contentType":{"type":["string","null"]},"fileName":{"type":"string"},"url":{"type":"string"}},"required":["url","fileName","contentType"],"type":"object"},"SensorDocumentUpload":{"properties":{"expiresAt":{"format":"date-time","type":"string"},"fields":{"additionalProperties":{"type":"string"},"type":"object"},"key":{"type":"string"},"url":{"type":"string"}},"required":["key","url","fields","expiresAt"],"type":"object"},"SensorDocuments":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/SensorDocument"},"type":"array"}},"required":["documents"],"type":"object"},"SensorFlag":{"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"description":"Who created the flag, by name. Null for flags made by automatic checks.","type":["string","null"]},"endAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/SensorFlagKind"},"measure":{"description":"The measure the flag covers. Null covers every measure.","type":["string","null"]},"note":{"type":["string","null"]},"source":{"enum":["auto","user"],"type":"string"},"startAt":{"format":"date-time","type":"string"}},"required":["id","measure","kind","startAt","endAt","note","source","createdBy","createdAt"],"type":"object"},"SensorFlagKind":{"enum":["dropout","frozen","spike","out_of_range","maintenance","suspect"],"type":"string"},"SensorFlowAnalyses":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SensorFlowAnalysisSummary"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"type":"object"},"SensorFlowAnalysis":{"allOf":[{"$ref":"#/components/schemas/SensorFlowAnalysisSummary"},{"properties":{"overrides":{"$ref":"#/components/schemas/FlowRecipeOverrides"},"params":{"anyOf":[{"$ref":"#/components/schemas/FlowRecipeParams"},{"type":"null"}]}},"required":["params","overrides"],"type":"object"}]},"SensorFlowAnalysisSummary":{"properties":{"createdAt":{"format":"date-time","type":"string"},"endAt":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"lastAutoRunAt":{"format":"date-time","type":["string","null"]},"lastRun":{"anyOf":[{"$ref":"#/components/schemas/SensorFlowRunSummary"},{"type":"null"}]},"name":{"type":"string"},"recipe":{"type":"string"},"recipeName":{"type":"string"},"recipeVersion":{"type":["integer","null"]},"schedule":{"enum":["manual","hourly","daily"],"type":"string"},"scheduleNextAt":{"format":"date-time","type":["string","null"]},"scheduleSteps":{"items":{"$ref":"#/components/schemas/SensorFlowStep"},"type":"array"},"siteIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"startAt":{"format":"date-time","type":["string","null"]},"timeZone":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","recipe","recipeName","recipeVersion","siteIds","startAt","endAt","timeZone","schedule","scheduleSteps","scheduleNextAt","lastAutoRunAt","lastRun","createdAt","updatedAt"],"type":"object"},"SensorFlowRun":{"allOf":[{"$ref":"#/components/schemas/SensorFlowRunSummary"},{"properties":{"params":{"$ref":"#/components/schemas/FlowRecipeParams"},"summary":{"additionalProperties":true,"type":"object"}},"required":["params","summary"],"type":"object"}]},"SensorFlowRunSummary":{"properties":{"code":{"description":"Why a scheduled slot could not start: its refusal's code, as a problem's type ends.","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":["string","null"]},"error":{"type":["string","null"]},"flowAnalysisId":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"jobId":{"format":"uuid","type":["string","null"]},"progress":{"properties":{"done":{"type":"integer"},"message":{"type":"string"},"site":{"type":"string"},"step":{"$ref":"#/components/schemas/SensorFlowStep"},"total":{"type":"integer"}},"type":"object"},"recipe":{"type":"string"},"recipeVersion":{"type":["integer","null"]},"scheduled":{"description":"Started by the schedule, or a scheduled slot that could not start.","type":"boolean"},"startedAt":{"format":"date-time","type":["string","null"]},"status":{"enum":["pending","running","done","failed"],"type":"string"},"steps":{"items":{"$ref":"#/components/schemas/SensorFlowStep"},"type":"array"}},"required":["id","jobId","flowAnalysisId","status","steps","recipe","recipeVersion","progress","error","createdAt","startedAt","endedAt"],"type":"object"},"SensorFlowRuns":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SensorFlowRunSummary"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"type":"object"},"SensorFlowStep":{"enum":["regression","storms","dry_weather","wet_weather","forecast"],"type":"string"},"SensorForecastCycle":{"properties":{"createdAt":{"format":"date-time","type":"string"},"error":{"description":"Why it failed or was skipped.","type":["string","null"]},"id":{"description":"The cycle's id.","format":"uuid","type":"string"},"inferenceId":{"description":"The forecast the cycle made for the site. Read it with `GET /sensors/{siteId}/ml-forecast`.","format":"uuid","type":["string","null"]},"issuedAt":{"format":"date-time","type":"string"},"stage":{"description":"Where an open cycle has got to, from the worker and the service's own row. Absent once it has ended.","enum":["queued","weather","launching","preparing","running"],"type":"string"},"status":{"description":"Queued, being started, running, or how it ended.","enum":["queued","starting","started","completed","failed","skipped"],"type":"string"},"trigger":{"enum":["scheduler","person"],"type":"string"}},"required":["id","issuedAt","status","trigger","inferenceId","error","createdAt"],"type":"object"},"SensorForecastIssue":{"properties":{"issuedAt":{"type":"integer"},"points":{"items":{"$ref":"#/components/schemas/SensorForecastPoint"},"type":"array"}},"required":["issuedAt","points"],"type":"object"},"SensorForecastPoint":{"description":"One step of a forecast. `at` is epoch milliseconds. `rain` is inches over the step. `dwf`, `rdii` and `total` are dry-weather flow, rain-derived infiltration and inflow, and their sum, in MGD. `low` and `high` bound `total`. A value is null where the forecast has none at that time.","properties":{"at":{"type":"integer"},"dwf":{"anyOf":[{"type":"null"},{"type":"number"}]},"high":{"anyOf":[{"type":"null"},{"type":"number"}]},"low":{"anyOf":[{"type":"null"},{"type":"number"}]},"rain":{"anyOf":[{"type":"null"},{"type":"number"}]},"rdii":{"anyOf":[{"type":"null"},{"type":"number"}]},"total":{"anyOf":[{"type":"null"},{"type":"number"}]}},"required":["at","rain","rdii","dwf","total","low","high"],"type":"object"},"SensorForecastRecord":{"properties":{"anchor":{"anyOf":[{"type":"null"},{"properties":{"factor":{"type":"number"},"hours":{"type":"number"}},"required":["factor","hours"],"type":"object"}]},"capacity":{"properties":{"capacityMgd":{"anyOf":[{"type":"null"},{"type":"number"}]},"firstOverAt":{"anyOf":[{"type":"null"},{"type":"integer"}]},"hoursOver":{"type":"number"},"peakShare":{"anyOf":[{"type":"null"},{"type":"number"}]},"verdict":{"enum":["clears","near","exceeds","unknown"],"type":"string"}},"required":["capacityMgd","peakShare","verdict","firstOverAt","hoursOver"],"type":"object"},"horizonHours":{"type":"number"},"issuedAt":{"type":"integer"},"problem":{"anyOf":[{"type":"null"},{"type":"string"}]},"rain":{"properties":{"firstWetAt":{"anyOf":[{"type":"null"},{"type":"integer"}]},"lastWetAt":{"anyOf":[{"type":"null"},{"type":"integer"}]},"peakAt":{"anyOf":[{"type":"null"},{"type":"integer"}]},"peakIn":{"type":"number"},"totalIn":{"type":"number"}},"required":["totalIn","peakIn","peakAt","firstWetAt","lastWetAt"],"type":"object"},"rdii":{"anyOf":[{"type":"null"},{"properties":{"peakAt":{"anyOf":[{"type":"null"},{"type":"integer"}]},"peakMgd":{"type":"number"},"volumeMg":{"type":"number"}},"required":["peakMgd","peakAt","volumeMg"],"type":"object"}]},"series":{"properties":{"rows":{"type":"integer"}},"required":["rows"],"type":"object"},"source":{"properties":{"at":{"anyOf":[{"type":"null"},{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}]},"distanceKm":{"anyOf":[{"type":"null"},{"type":"number"}]},"nearest":{"anyOf":[{"type":"null"},{"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"}]},"observed":{"properties":{"error":{"anyOf":[{"type":"null"},{"type":"string"}]},"rain":{"type":"integer"},"site":{"type":"integer"}},"required":["site","rain","error"],"type":"object"},"products":{"items":{"type":"string"},"type":"array"},"typed":{"type":"boolean"}},"required":["at","products","nearest","distanceKm","typed"],"type":"object"},"stepMinutes":{"type":"number"},"timeZone":{"type":"string"},"total":{"anyOf":[{"type":"null"},{"properties":{"peakAt":{"anyOf":[{"type":"null"},{"type":"integer"}]},"peakMgd":{"type":"number"}},"required":["peakMgd","peakAt"],"type":"object"}]},"unit":{"const":"MGD","type":"string"}},"required":["unit","timeZone","issuedAt","horizonHours","stepMinutes","rain","rdii","total","anchor","capacity","problem","source"],"type":"object"},"SensorForecasts":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/SensorForecastIssue"},"type":"array"}},"required":["issues"],"type":"object"},"SensorGwiMethod":{"enum":["minimum","wastewater_production","stevens_schutzbach","mitchell","kcmo"],"type":"string"},"SensorLayerSettings":{"properties":{"credentials":{"properties":{"adsRainfall":{"type":"boolean"},"identity":{"type":"boolean"},"identityRefusedAt":{"description":"When the vendor refused the saved login. Pulls wait until a new one is saved.","format":"date-time","type":["string","null"]}},"required":["identity","adsRainfall","identityRefusedAt"],"type":"object"},"settings":{"$ref":"#/components/schemas/SensorSettings"},"sourceType":{"type":"string"}},"required":["sourceType","settings","credentials"],"type":"object"},"SensorMeasure":{"enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"],"type":"string"},"SensorMeterMetrics":{"properties":{"bands":{"properties":{"addf":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"designPeakVsCapacity":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"designRdiiPerAcre":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"designRdiiPerIdm":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"designRdiiPerInch":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"designRdiiVolume":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"dpf":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"dwfPerCapita":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"gwi":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"gwiPerAcre":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"gwiPerCapita":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"gwiPerIdm":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"gwiShare":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"leakageSeverity":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"mddf":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"peakFactor":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"peakFlow":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"peakRdii":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"peakRdiiPerInch":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"peakVsCapacity":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"r":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"rPerInch":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"rainAtCapacity":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"rdiiPerAcrePerInch":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"rdiiPerIdmPerInch":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"rdiiVolume":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"wastewaterProduction":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"},"wetPerCapita":{"properties":{"absolute":{"enum":["green","amber","red",null],"type":["string","null"]},"percentile":{"enum":["green","amber","red",null],"type":["string","null"]}},"required":["absolute","percentile"],"type":"object"}},"type":"object"},"facts":{"properties":{"areaAcres":{"type":["number","null"]},"capacityMgd":{"type":["number","null"]},"conduitSizeIn":{"anyOf":[{"type":"null"},{"type":"number"}]},"idm":{"type":["number","null"]},"pipeLengthFt":{"type":["number","null"]},"population":{"type":["number","null"]},"upstreamSiteIds":{"items":{"type":"string"},"type":"array"}},"required":["areaAcres","pipeLengthFt","idm","population","capacityMgd","conduitSizeIn","upstreamSiteIds"],"type":"object"},"gross":{"description":"The meter's figures before subtracting upstream meters, the schematic's cumulative column.","properties":{"addfMgd":{"type":["number","null"]},"dryDays":{"description":"How many dry days the dry-weather figures are from.","type":["integer","null"]},"dwfGpcd":{"type":["number","null"]},"pddfMgd":{"description":"The dry days' mean daily peak, MGD.","type":["number","null"]},"peakFlowMgd":{"type":["number","null"]},"rainIn":{"description":"The meter's rain over the storms read, inches: the storm's, or every kept storm's together.","type":["number","null"]},"rdiiVolumeMg":{"type":["number","null"]}},"required":["addfMgd","dwfGpcd","rdiiVolumeMg","peakFlowMgd"],"type":"object"},"metrics":{"properties":{"addf":{"type":["number","null"]},"designPeakVsCapacity":{"type":["number","null"]},"designRdiiPerAcre":{"type":["number","null"]},"designRdiiPerIdm":{"type":["number","null"]},"designRdiiPerInch":{"type":["number","null"]},"designRdiiVolume":{"type":["number","null"]},"dpf":{"type":["number","null"]},"dwfPerCapita":{"type":["number","null"]},"gwi":{"type":["number","null"]},"gwiPerAcre":{"type":["number","null"]},"gwiPerCapita":{"type":["number","null"]},"gwiPerIdm":{"type":["number","null"]},"gwiShare":{"type":["number","null"]},"leakageSeverity":{"type":["number","null"]},"mddf":{"type":["number","null"]},"peakFactor":{"type":["number","null"]},"peakFlow":{"type":["number","null"]},"peakRdii":{"type":["number","null"]},"peakRdiiPerInch":{"type":["number","null"]},"peakVsCapacity":{"type":["number","null"]},"r":{"type":["number","null"]},"rPerInch":{"type":["number","null"]},"rainAtCapacity":{"type":["number","null"]},"rdiiPerAcrePerInch":{"type":["number","null"]},"rdiiPerIdmPerInch":{"type":["number","null"]},"rdiiVolume":{"type":["number","null"]},"wastewaterProduction":{"type":["number","null"]},"wetPerCapita":{"type":["number","null"]}},"required":["addf","mddf","dpf","gwi","gwiShare","gwiPerIdm","gwiPerCapita","gwiPerAcre","wastewaterProduction","dwfPerCapita","rdiiVolume","peakRdii","peakFlow","peakFactor","r","rPerInch","rdiiPerAcrePerInch","rdiiPerIdmPerInch","leakageSeverity","peakRdiiPerInch","peakVsCapacity","wetPerCapita","designRdiiVolume","designRdiiPerAcre","designRdiiPerIdm","designRdiiPerInch","designPeakVsCapacity","rainAtCapacity"],"type":"object"},"missing":{"properties":{"addf":{"type":"string"},"designPeakVsCapacity":{"type":"string"},"designRdiiPerAcre":{"type":"string"},"designRdiiPerIdm":{"type":"string"},"designRdiiPerInch":{"type":"string"},"designRdiiVolume":{"type":"string"},"dpf":{"type":"string"},"dwfPerCapita":{"type":"string"},"gwi":{"type":"string"},"gwiPerAcre":{"type":"string"},"gwiPerCapita":{"type":"string"},"gwiPerIdm":{"type":"string"},"gwiShare":{"type":"string"},"leakageSeverity":{"type":"string"},"mddf":{"type":"string"},"peakFactor":{"type":"string"},"peakFlow":{"type":"string"},"peakRdii":{"type":"string"},"peakRdiiPerInch":{"type":"string"},"peakVsCapacity":{"type":"string"},"r":{"type":"string"},"rPerInch":{"type":"string"},"rainAtCapacity":{"type":"string"},"rdiiPerAcrePerInch":{"type":"string"},"rdiiPerIdmPerInch":{"type":"string"},"rdiiVolume":{"type":"string"},"wastewaterProduction":{"type":"string"},"wetPerCapita":{"type":"string"}},"type":"object"},"name":{"type":"string"},"net":{"properties":{"negative":{"items":{"enum":["addf","mddf","dpf","gwi","gwiShare","gwiPerIdm","gwiPerCapita","gwiPerAcre","wastewaterProduction","dwfPerCapita","rdiiVolume","peakRdii","peakFlow","peakFactor","r","rPerInch","rdiiPerAcrePerInch","rdiiPerIdmPerInch","leakageSeverity","peakRdiiPerInch","peakVsCapacity","wetPerCapita","designRdiiVolume","designRdiiPerAcre","designRdiiPerIdm","designRdiiPerInch","designPeakVsCapacity","rainAtCapacity"],"type":"string"},"type":"array"},"unsubtracted":{"items":{"properties":{"name":{"type":"string"},"reason":{"type":"string"},"siteId":{"type":"string"}},"required":["siteId","name","reason"],"type":"object"},"type":"array"},"upstream":{"items":{"properties":{"name":{"type":"string"},"siteId":{"type":"string"}},"required":["siteId","name"],"type":"object"},"type":"array"}},"required":["upstream","negative","unsubtracted"],"type":"object"},"rank":{"anyOf":[{"type":"null"},{"type":"number"}]},"score":{"anyOf":[{"type":"null"},{"type":"number"}]},"siteId":{"type":"string"},"sources":{"properties":{"dryAnalysisId":{"anyOf":[{"type":"null"},{"type":"string"}]},"regressionAnalysisId":{"anyOf":[{"type":"null"},{"type":"string"}]},"storms":{"type":"number"},"wetAnalysisId":{"anyOf":[{"type":"null"},{"type":"string"}]}},"required":["dryAnalysisId","wetAnalysisId","regressionAnalysisId","storms"],"type":"object"}},"required":["siteId","name","facts","sources","metrics","gross","missing","bands","rank","score","net"],"type":"object"},"SensorMetrics":{"properties":{"params":{"$ref":"#/components/schemas/SensorNormaliseParams"},"recipe":{"properties":{"analysisId":{"format":"uuid","type":["string","null"]},"name":{"type":"string"},"ref":{"type":"string"},"runId":{"format":"uuid","type":["string","null"]},"version":{"type":["integer","null"]}},"required":["ref","name","version","analysisId","runId"],"type":"object"},"rows":{"items":{"$ref":"#/components/schemas/SensorMeterMetrics"},"type":"array"},"stormId":{"format":"uuid","type":["string","null"]},"storms":{"items":{"properties":{"gauge":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"meters":{"type":"integer"},"rainIn":{"type":"number"},"startAt":{"format":"date-time","type":"string"}},"required":["id","startAt","rainIn","gauge","meters"],"type":"object"},"type":"array"}},"required":["recipe","params","stormId","storms","rows"],"type":"object"},"SensorMlForecast":{"properties":{"forecast":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SensorMlForecastView"}]}},"required":["forecast"],"type":"object"},"SensorMlForecastFigures":{"description":"A meter's ML forecast result. Flow in MGD or depth in feet, its peak, and for flow, the peak against pipe capacity.","properties":{"capacity":{"properties":{"capacityMgd":{"type":["number","null"]},"firstOverAt":{"type":["number","null"]},"hoursOver":{"type":"number"},"peakShare":{"type":["number","null"]},"verdict":{"enum":["clears","near","exceeds","unknown"],"type":"string"}},"required":["capacityMgd","peakShare","verdict","firstOverAt","hoursOver"],"type":"object"},"horizonHours":{"type":"number"},"inferenceId":{"format":"uuid","type":"string"},"issuedAt":{"description":"When the forecast was issued, in epoch milliseconds.","type":"number"},"measure":{"enum":["flow","depth"],"type":"string"},"model":{"type":"string"},"nse":{"description":"The model's Nash-Sutcliffe efficiency from training. Null when not reported.","type":["number","null"]},"peak":{"properties":{"at":{"type":["number","null"]},"value":{"type":"number"}},"required":["value","at"],"type":["object","null"]},"siteId":{"format":"uuid","type":"string"},"stepMinutes":{"type":"number"},"unit":{"enum":["MGD","ft"],"type":"string"},"version":{"type":"string"}},"required":["siteId","measure","unit","inferenceId","model","version","nse","issuedAt","horizonHours","stepMinutes","peak","capacity"],"type":"object"},"SensorMlForecastView":{"description":"A meter's ML forecast. Flow in MGD or depth in feet, with its band, the rain it used, and earlier forecasts.","properties":{"capacity":{"properties":{"capacityMgd":{"type":["number","null"]},"firstOverAt":{"type":["number","null"]},"hoursOver":{"type":"number"},"peakShare":{"type":["number","null"]},"verdict":{"enum":["clears","near","exceeds","unknown"],"type":"string"}},"required":["capacityMgd","peakShare","verdict","firstOverAt","hoursOver"],"type":"object"},"earlier":{"items":{"$ref":"#/components/schemas/SensorMlPoint"},"type":"array"},"horizonHours":{"type":"number"},"inferenceId":{"format":"uuid","type":"string"},"issuedAt":{"description":"When the forecast was issued, in epoch milliseconds.","type":"number"},"measure":{"enum":["flow","depth"],"type":"string"},"model":{"type":"string"},"nse":{"type":["number","null"]},"peak":{"properties":{"at":{"type":["number","null"]},"value":{"type":"number"}},"required":["value","at"],"type":["object","null"]},"points":{"items":{"properties":{"at":{"description":"Epoch milliseconds.","type":"number"},"high":{"type":["number","null"]},"low":{"type":["number","null"]},"total":{"type":"number"}},"required":["at","total","low","high"],"type":"object"},"type":"array"},"rain":{"items":{"$ref":"#/components/schemas/SensorMlPoint"},"type":"array"},"siteId":{"format":"uuid","type":"string"},"stepMinutes":{"type":"number"},"unit":{"enum":["MGD","ft"],"type":"string"},"version":{"type":"string"}},"required":["siteId","measure","unit","inferenceId","model","version","nse","issuedAt","horizonHours","stepMinutes","peak","capacity","points","rain","earlier"],"type":"object"},"SensorMlForecasts":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SensorMlForecastFigures"},"type":"array"}},"required":["items"],"type":"object"},"SensorMlPoint":{"properties":{"at":{"type":"number"},"value":{"type":"number"}},"required":["at","value"],"type":"object"},"SensorNetwork":{"enum":["ads","cipher","fcs","smartcover","stormwatch","usgs"],"type":"string"},"SensorNormaliseParams":{"properties":{"bands":{"properties":{"designPeakVsCapacity":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"dwfPerCapita":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"gwiPerIdm":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"gwiShare":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"peakFactor":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"peakVsCapacity":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"r":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"rdiiPerAcrePerInch":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"wetPerCapita":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"}},"required":["gwiShare","gwiPerIdm","dwfPerCapita","peakFactor","r","rdiiPerAcrePerInch","peakVsCapacity","wetPerCapita","designPeakVsCapacity"],"type":"object"},"percentileBands":{"type":"boolean"},"scoreMetrics":{"items":{"enum":["addf","mddf","dpf","gwi","gwiShare","gwiPerIdm","gwiPerCapita","gwiPerAcre","wastewaterProduction","dwfPerCapita","rdiiVolume","peakRdii","peakFlow","peakFactor","r","rPerInch","rdiiPerAcrePerInch","rdiiPerIdmPerInch","leakageSeverity","peakRdiiPerInch","peakVsCapacity","wetPerCapita","designRdiiVolume","designRdiiPerAcre","designRdiiPerIdm","designRdiiPerInch","designPeakVsCapacity","rainAtCapacity"],"type":"string"},"type":"array"}},"required":["bands","percentileBands","scoreMetrics"],"type":"object"},"SensorRainfall":{"properties":{"missing":{"description":"What the source still needs. Nothing was read. Values are `column` (the target attribute), `target` (the feature has no value in it), `columns` (the latitude and longitude attributes), `coordinates` (the feature has no number in them), `login` (the layer's ADS rain login), `allowance` (the caller can't spend weather allowance) and `unavailable` (the source isn't offered yet).","enum":["column","target","columns","coordinates","login","allowance","unavailable",null],"type":["string","null"]},"points":{"items":{"properties":{"at":{"format":"date-time","type":"string"},"value":{"description":"Inches. Null where nothing was published.","type":["number","null"]}},"required":["at","value"],"type":"object"},"type":"array"},"source":{"description":"The layer's rainfall source. Null when it has none.","enum":["ads","stormwatch","neer-weather-api","neer-geospatial-fetch",null],"type":["string","null"]},"step":{"description":"Seconds a point's depth covers, when the source has a fixed step.","type":["integer","null"]},"unit":{"enum":["in"],"type":"string"}},"required":["source","missing","unit","step","points"],"type":"object"},"SensorReadings":{"properties":{"figures":{"description":"The window's readings outside a flag, every one whatever the step: what a chart of bucket means understates. Absent with none, and for a live read.","properties":{"avg":{"type":"number"},"count":{"minimum":1,"type":"integer"},"max":{"type":"number"},"min":{"type":"number"}},"required":["min","max","avg","count"],"type":"object"},"flags":{"items":{"$ref":"#/components/schemas/SensorFlag"},"type":"array"},"measure":{"$ref":"#/components/schemas/SensorMeasure"},"points":{"items":{"properties":{"at":{"description":"Time of the reading, or the bucket's start.","format":"date-time","type":"string"},"max":{"description":"A bucket's greatest reading, so a peak its mean averages away still shows. Absent for a single reading and for rain.","type":"number"},"min":{"description":"A bucket's least reading. Absent for a single reading and for rain.","type":"number"},"raw":{"description":"The reading, or the bucket's mean (sum for rain), before flags are applied.","type":"number"},"value":{"description":"The raw value. Null inside a flag.","type":["number","null"]}},"required":["at","raw","value"],"type":"object"},"maxItems":20000,"type":"array"},"series":{"description":"What is stored for the measure, regardless of the window. Null when nothing is stored.","properties":{"count":{"minimum":0,"type":"integer"},"firstAt":{"format":"date-time","type":["string","null"]},"lastAt":{"format":"date-time","type":["string","null"]}},"required":["count","firstAt","lastAt"],"type":["object","null"]},"step":{"description":"Seconds per point. 0 when each point is one reading.","minimum":0,"type":"integer"},"surcharge":{"description":"A depth's readings at or above its pipe's crown (the site's `catchment.conduitSizeIn`, in the readings' unit), every reading outside a flag whatever the step. Absent for another measure, a site with no pipe size, a unit the crown isn't converted to, and a live read.","properties":{"crown":{"description":"The crown, in the readings' unit.","type":"number"},"readings":{"description":"Readings at or above it.","minimum":0,"type":"integer"},"spans":{"description":"Each run of readings at or above it, ended by a reading below. Its minutes count each reading until the next, at most the series' usual step.","items":{"properties":{"endAt":{"description":"The run's last reading.","format":"date-time","type":"string"},"minutes":{"minimum":0,"type":"number"},"peak":{"description":"The run's highest reading.","type":"number"},"startAt":{"description":"The run's first reading.","format":"date-time","type":"string"}},"required":["startAt","endAt","minutes","peak"],"type":"object"},"type":"array"}},"required":["crown","readings","spans"],"type":"object"},"unit":{"description":"The unit the measure's readings are stored in. Null when nothing is stored.","type":["string","null"]}},"required":["measure","unit","step","series","points","flags"],"type":"object"},"SensorReadingsInput":{"additionalProperties":false,"properties":{"measure":{"$ref":"#/components/schemas/SensorMeasure"},"points":{"description":"Readings as `[at, value]` pairs: `at` in epoch milliseconds, `value` in `unit`. 1 to 2,000,000.","items":{"maxItems":2,"minItems":2,"prefixItems":[{"maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},{"type":"number"}],"type":"array"},"maxItems":2000000,"minItems":1,"type":"array"},"unit":{"description":"The readings' unit, such as `in`, `ft`, `mgd` or `fps`. Read without case. A known unit must suit the measure: a length for depth, level, stage and rain, a velocity for velocity, a flow for flow.","maxLength":80,"minLength":1,"type":"string"}},"required":["measure","unit","points"],"type":"object"},"SensorRecipe":{"allOf":[{"$ref":"#/components/schemas/SensorRecipeBase"},{"properties":{"canEdit":{"type":"boolean"}},"required":["canEdit"],"type":"object"}]},"SensorRecipeBase":{"properties":{"base":{"enum":["ssoap","us","wapug"],"type":"string"},"builtIn":{"type":"boolean"},"description":{"anyOf":[{"type":"null"},{"type":"string"}]},"id":{"type":"string"},"name":{"type":"string"},"params":{"$ref":"#/components/schemas/FlowRecipeParams"},"scope":{"enum":["built-in","project","team"],"type":"string"},"updatedAt":{"anyOf":[{"type":"null"},{"type":"string"}]},"version":{"type":"number"}},"required":["id","name","description","base","version","builtIn","scope","params","updatedAt"],"type":"object"},"SensorRecipes":{"properties":{"canWriteTeam":{"type":"boolean"},"recipes":{"items":{"$ref":"#/components/schemas/SensorRecipe"},"type":"array"}},"required":["recipes","canWriteTeam"],"type":"object"},"SensorScheduledForecast":{"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"format":"uuid","type":"string"},"cycles":{"description":"Its newest cycles, newest first.","items":{"$ref":"#/components/schemas/SensorForecastCycle"},"type":"array"},"enabled":{"type":"boolean"},"everyHours":{"type":"integer"},"hindcastHours":{"description":"Hours of the site's readings the model reads before each cycle.","type":"integer"},"horizonHours":{"type":"integer"},"id":{"format":"uuid","type":"string"},"lastAt":{"format":"date-time","type":["string","null"]},"ml":{"description":"What each cycle runs.","properties":{"kind":{"type":"string"},"service":{"description":"The service that runs the model.","type":"string"}},"type":["object","null"]},"name":{"type":"string"},"nextAt":{"format":"date-time","type":["string","null"]},"projectId":{"format":"uuid","type":"string"},"siteId":{"format":"uuid","type":"string"},"source":{"description":"A trained model.","enum":["ml"],"type":"string"}},"required":["id","projectId","siteId","name","source","ml","everyHours","hindcastHours","horizonHours","enabled","nextAt","lastAt","createdBy","createdAt","cycles"],"type":"object"},"SensorScheduledForecasts":{"properties":{"forecasts":{"items":{"$ref":"#/components/schemas/SensorScheduledForecast"},"type":"array"},"trained":{"description":"The sites the sewer forecast service has a trained model for.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["forecasts","trained"],"type":"object"},"SensorSchematic":{"properties":{"doc":{"oneOf":[{"$ref":"#/components/schemas/SchematicDoc"},{"type":"null"}]},"source":{"enum":["saved","computed"],"type":"string"},"updatedAt":{"format":"date-time","type":["string","null"]},"updatedBy":{"description":"The name of the person who saved it. Null while computed.","type":["string","null"]},"version":{"description":"The version a save must send. 0 while the schematic is computed.","type":"integer"}},"required":["source","version","doc","updatedAt","updatedBy"],"type":"object"},"SensorSettings":{"description":"The layer's sensor settings from layers.metadata. Never includes credentials.","properties":{"label":{"description":"The statistics label's segments, each text or an attribute's value.","items":{"properties":{"attributeKey":{"type":"string"},"text":{"type":"string"},"type":{"enum":["text","attribute"],"type":"string"}},"required":["type"],"type":"object"},"type":["array","null"]},"rainfall":{"properties":{"chartKinds":{"items":{"type":"string"},"type":"array"},"latitudeDataKey":{"type":"string"},"longitudeDataKey":{"type":"string"},"source":{"enum":["ads","stormwatch","neer-weather-api","neer-geospatial-fetch"],"type":"string"},"targetDataKey":{"type":"string"}},"required":["source","chartKinds"],"type":["object","null"]}},"required":["rainfall","label"],"type":"object"},"SensorSite":{"properties":{"asset":{"description":"The asset the site is on, a feature in the project's contents. Null until bound.","properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":["object","null"]},"catchment":{"description":"The meter's basin facts, each a number above 0 or null. Also the meters upstream of it and the trace's source, if any.","properties":{"areaAcres":{"type":["number","null"]},"capacityMgd":{"type":["number","null"]},"conduitSizeIn":{"type":["number","null"]},"idm":{"description":"Inch-diameter-miles of sewer upstream of the meter.","type":["number","null"]},"pipeLengthFt":{"type":["number","null"]},"population":{"type":["number","null"]},"source":{"properties":{"links":{"type":"integer"},"modelId":{"format":"uuid","type":"string"},"nodes":{"type":"integer"},"tracedAt":{"type":"string"}},"required":["tracedAt","modelId","nodes","links"],"type":["object","null"]},"upstreamSiteIds":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["areaAcres","pipeLengthFt","idm","population","capacityMgd","conduitSizeIn","upstreamSiteIds","source"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deployment":{"description":"When the sensor was installed. A temporary sensor, such as a study's, has an end.","properties":{"from":{"format":"date-time","type":["string","null"]},"temporary":{"type":"boolean"},"to":{"format":"date-time","type":["string","null"]}},"required":["from","to","temporary"],"type":"object"},"documentCount":{"minimum":0,"type":"integer"},"element":{"description":"The model element the site is compared with, by the model's name for it. Null until bound.","properties":{"depthAt":{"description":"Where a site bound to a pipe has its model depth read: the pipe's downstream end (the default), its upstream end, the engine's average over the pipe, or the downstream manhole's depth with no offset taken off. An end's depth is the node's there less the pipe's offset at that end.","enum":["downstream","upstream","average","manhole"],"type":"string"},"id":{"type":"string"},"modelId":{"format":"uuid","type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["modelId","type","id"],"type":["object","null"]},"externalId":{"description":"The vendor's own id for the site.","type":"string"},"fid":{"type":"integer"},"flagCount":{"minimum":0,"type":"integer"},"forecast":{"description":"A meter's latest forecast. Null for other sites.","properties":{"capacityMgd":{"type":["number","null"]},"createdAt":{"format":"date-time","type":"string"},"horizonHours":{"type":["number","null"]},"issuedAt":{"description":"Epoch milliseconds.","type":["number","null"]},"peakMgd":{"type":["number","null"]},"peakShare":{"type":["number","null"]},"verdict":{"enum":["clears","near","exceeds","unknown"],"type":"string"}},"required":["verdict","peakMgd","peakShare","capacityMgd","issuedAt","horizonHours","createdAt"],"type":["object","null"]},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/SensorSiteKind"},"lastFlag":{"description":"The flag with the latest end.","properties":{"endAt":{"format":"date-time","type":"string"},"kind":{"$ref":"#/components/schemas/SensorFlagKind"},"source":{"enum":["auto","user"],"type":"string"},"startAt":{"format":"date-time","type":"string"}},"required":["kind","startAt","endAt","source"],"type":["object","null"]},"layerId":{"format":"uuid","type":"string"},"location":{"description":"The feature's location as WGS84 longitude and latitude. Null when the feature was deleted.","items":{"type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"measures":{"items":{"$ref":"#/components/schemas/SensorMeasure"},"type":"array"},"modelId":{"description":"The model the site is bound to, or the model it was imported from. Null otherwise.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"qa":{"properties":{"approvedAt":{"format":"date-time","type":["string","null"]},"approvedBy":{"description":"Who approved it, by name.","type":["string","null"]},"note":{"type":["string","null"]},"status":{"enum":["unchecked","checked","approved"],"type":"string"}},"required":["status","approvedAt","approvedBy","note"],"type":"object"},"rainGauge":{"description":"The rain gauge site this site's rain is read from, set with `PATCH /sensors/{siteId}`. Null when none is set.","properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["object","null"]},"rainSource":{"description":"The site's rain source. Its gauge, or radar stored at its location.","properties":{"id":{"format":"uuid","type":"string"},"kind":{"enum":["gauge","radar"],"type":"string"},"name":{"type":"string"}},"required":["kind","id","name"],"type":["object","null"]},"series":{"description":"What is stored for each measure, without storage locations.","items":{"properties":{"count":{"minimum":0,"type":"integer"},"element":{"description":"The measure's own binding when it differs from the site's.","properties":{"id":{"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":["object","null"]},"firstAt":{"format":"date-time","type":["string","null"]},"lastAt":{"format":"date-time","type":["string","null"]},"measure":{"$ref":"#/components/schemas/SensorMeasure"},"unit":{"type":["string","null"]}},"required":["measure","unit","count","firstAt","lastAt","element"],"type":"object"},"type":"array"},"sourceType":{"description":"The network: iot-ads, iot-cipher, iot-fcs, iot-smart-cover, iot-stormwatch, iot-usgs, iot-model.","type":"string"},"state":{"description":"The US state the site stands in, as a postal code: a USGS gage's NWS identifier's, or its feature's state attribute. Null when neither says.","type":["string","null"]},"storms":{"description":"The storms found at a rain gauge. Null for other sites.","minimum":0,"type":["integer","null"]},"sync":{"description":"Readings pulled from the vendor. Whether pulling is possible (ADS and FCS), how often, when last, and a history backfill.","properties":{"backfill":{"additionalProperties":true,"description":"A backfill of the site's history (since, until, cursor, stored, done, error).","type":["object","null"]},"everyHours":{"minimum":1,"type":["integer","null"]},"lastAt":{"format":"date-time","type":["string","null"]},"live":{"description":"Whether readings can be pulled from the vendor on a schedule. ADS and FCS sites only.","type":"boolean"},"loginRefusedAt":{"description":"When the vendor refused the layer's saved login. Scheduled pulls wait until a new login is saved. Null while the login works or none was refused.","format":"date-time","type":["string","null"]}},"required":["live","everyHours","lastAt","backfill","loginRefusedAt"],"type":"object"},"thresholds":{"additionalProperties":{"additionalProperties":false,"properties":{"above":{"type":"number"},"below":{"type":"number"}},"type":"object"},"description":"Alerts set on the site's measures (sensor.alert.set), by measure. Above, below or both, in the measure's unit. Missing where none is set.","type":"object"}},"required":["id","layerId","fid","sourceType","externalId","name","kind","measures","asset","element","qa","catchment","rainSource","rainGauge","documentCount","series","flagCount","lastFlag","location","createdAt","deployment","sync","forecast","storms"],"type":"object"},"SensorSiteDetail":{"allOf":[{"$ref":"#/components/schemas/SensorSite"},{"properties":{"attributes":{"additionalProperties":true,"description":"The feature's own attributes, as shown when it is clicked on the map.","type":"object"},"documents":{"items":{"properties":{"contentType":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"fileName":{"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["site_sheet","interrogation","calibration","photo","other"],"type":"string"},"sizeBytes":{"type":["integer","null"]},"uploaded":{"type":"boolean"}},"required":["id","kind","fileName","contentType","sizeBytes","uploaded","createdAt"],"type":"object"},"type":"array"},"fetch":{"description":"The caller's latest fetch of this site's readings in the last day, from the sensors.fetch job. Either a Pull now of the last three days (sensor.readings.sync), or a requested Fetch and store window. Null when there is none. Scheduled pulls and history backfill pieces aren't included.","oneOf":[{"type":"null"},{"properties":{"at":{"description":"When the fetch ended, or was requested.","format":"date-time","type":"string"},"done":{"description":"Pieces of the window fetched.","minimum":0,"type":"integer"},"end":{"format":"date-time","type":"string"},"error":{"type":["string","null"]},"jobId":{"description":"The job id to pass to sensors.fetch.stop.","format":"uuid","type":"string"},"pull":{"description":"Whether the fetch was a Pull now rather than a Fetch and store.","type":"boolean"},"series":{"description":"What each measure stored, once the fetch has succeeded.","items":{"properties":{"measure":{"type":"string"},"stored":{"minimum":0,"type":"integer"},"unit":{"type":["string","null"]}},"required":["measure","unit","stored"],"type":"object"},"type":"array"},"start":{"format":"date-time","type":"string"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"type":"string"},"stored":{"description":"Readings stored so far, over every measure.","minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["jobId","pull","status","start","end","done","total","stored","series","error","at"],"type":"object"}]},"flags":{"description":"All flags for the site, across measures and dates.","items":{"$ref":"#/components/schemas/SensorFlag"},"type":"array"},"layerName":{"type":"string"},"radarEligible":{"description":"Whether this located site, not a rain gauge, can receive its own radar rain without replacing measured rain or a gauge binding.","type":"boolean"},"settings":{"$ref":"#/components/schemas/SensorSettings"}},"required":["layerName","attributes","documents","settings","flags","fetch"],"type":"object"}]},"SensorSiteKind":{"enum":["flow_meter","depth_sensor","rain_gauge","stage_gauge","pressure_sensor","level_sensor","acoustic_logger","water_meter","other"],"type":"string"},"SensorStorm":{"properties":{"antecedentDryHours":{"type":["number","null"]},"criteria":{"additionalProperties":true,"type":"object"},"depthIn":{"type":"number"},"detectedAt":{"format":"date-time","type":"string"},"durationHours":{"description":"Stored duration, in hours. Detection includes one reporting interval. Older rows keep their stored duration until storms are detected again.","type":"number"},"endAt":{"format":"date-time","type":"string"},"gauge":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"id":{"format":"uuid","type":"string"},"note":{"type":["string","null"]},"peak1hIn":{"type":["number","null"]},"peak2hIn":{"type":["number","null"]},"peak3hIn":{"type":["number","null"]},"peakIntensityInPerHr":{"description":"The wettest rolling hour's rain, in/hr.","type":["number","null"]},"readings":{"type":"integer"},"returnPeriod":{"additionalProperties":true,"properties":{"total":{"description":"The storm's whole depth against NOAA Atlas 14 over its own duration, interpolated log-log between tabulated durations. Absent on storms detected before it was kept, or outside the table's durations.","properties":{"depthIn":{"type":"number"},"hours":{"type":"number"},"years":{"type":"number"}},"required":["years","hours","depthIn"],"type":"object"}},"type":"object"},"returnPeriodYears":{"type":["number","null"]},"startAt":{"format":"date-time","type":"string"},"status":{"description":"`keep` counts the storm in analyses. `drop` leaves it out. Change it with `PATCH /projects/{projectId}/sensor-storms/{eventId}`.","enum":["keep","drop"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","gauge","startAt","endAt","durationHours","depthIn","peak1hIn","peak2hIn","peak3hIn","peakIntensityInPerHr","antecedentDryHours","returnPeriodYears","returnPeriod","criteria","status","note","readings","detectedAt","updatedAt"],"type":"object"},"SensorStorms":{"properties":{"events":{"items":{"$ref":"#/components/schemas/SensorStorm"},"type":"array"},"nextCursor":{"type":["string","null"]}},"required":["events","nextCursor"],"type":"object"},"SensorWeather":{"description":"The weather allowance the project's weather reads spend, and its status this period.","properties":{"allowed":{"description":"Weather requests allowed this period. Requests that would spend more are refused with 402 until the period ends.","minimum":0,"type":"integer"},"payer":{"description":"Who the allowance belongs to: `team` when the project belongs to a team, `owner` when it's a personal project and its owner pays.","enum":["team","owner"],"type":"string"},"periodEnd":{"description":"When this period ends and `used` starts again from 0.","format":"date-time","type":"string"},"used":{"description":"Weather requests spent this period.","minimum":0,"type":"integer"}},"required":["payer","used","allowed","periodEnd"],"type":"object"},"SeriesPage":{"properties":{"name":{"type":"string"},"offset":{"type":"integer"},"rows":{"items":{"$ref":"#/components/schemas/SeriesRow"},"type":"array"},"total":{"type":"integer"}},"required":["name","total","offset","rows"],"type":"object"},"SeriesRow":{"properties":{"date":{"description":"Blank for a series counted from the start.","type":"string"},"time":{"type":"string"},"value":{"description":"Null where the row's value can't be read.","type":["number","null"]}},"required":["date","time","value"],"type":"object"},"Service":{"properties":{"archive":{"oneOf":[{"properties":{"expiresAt":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},{"type":"null"}]},"bounds":{"description":"A PMTiles service's bounds, from its archive header, when it could be read. An ArcGIS service's bounds come with its definition.","oneOf":[{"$ref":"#/components/schemas/Bounds"},{"type":"null"}]},"contentId":{"description":"Present once it is a workspace content (gis.servers.content_id): every added service is one. A new address is the content's next version, shown wherever it is.","format":"uuid","type":"string"},"groupId":{"oneOf":[{"format":"uuid","type":"string"},{"type":"null"}]},"id":{"format":"uuid","type":"string"},"kind":{"enum":["pmtiles","arcgisFeatures","arcgisImage","arcgisTiles","unknown"],"type":"string"},"labels":{"items":{"$ref":"#/components/schemas/ServiceLabel"},"type":"array"},"layerIds":{"description":"The sub-layers to draw. All of them when empty.","items":{"type":"string"},"type":"array"},"login":{"type":"boolean"},"name":{"type":"string"},"order":{"type":"integer"},"placedIn":{"description":"The projects with a service showing its content, this one counted: more than one is shared.","type":"integer"},"projectId":{"format":"uuid","type":"string"},"styles":{"items":{"$ref":"#/components/schemas/ServiceStyle"},"type":"array"},"type":{"enum":["FeatureServer","MapServer","VectorServer","PMTiles"],"type":"string"},"url":{"type":"string"}},"required":["id","projectId","name","order","groupId","type","kind","url","layerIds","login","styles","labels","archive"],"type":"object"},"ServiceDefinition":{"properties":{"layers":{"items":{"properties":{"bandCount":{"description":"An image service's band count, which its style's composite picks from.","oneOf":[{"type":"integer"},{"type":"null"}]},"extent":{"oneOf":[{"$ref":"#/components/schemas/Bounds"},{"type":"null"}]},"geometry":{"oneOf":[{"enum":["point","line","polygon"],"type":"string"},{"type":"null"}]},"id":{"type":"string"},"maxRecordCount":{"oneOf":[{"type":"integer"},{"type":"null"}]},"name":{"type":"string"},"raster":{"description":"A raster layer of a map or image service. It has no features: the map draws it as images (GET .../image/tile, with `layer` for a map service).","type":"boolean"}},"required":["id","name","geometry","raster","extent","maxRecordCount"],"type":"object"},"type":"array"}},"required":["layers"],"type":"object"},"ServiceLabel":{"allOf":[{"$ref":"#/components/schemas/Label"},{"properties":{"layerId":{"type":"string"}},"required":["layerId"],"type":"object"}]},"ServiceLabelEntry":{"allOf":[{"$ref":"#/components/schemas/LabelEntry"},{"properties":{"layerId":{"type":"string"}},"required":["layerId"],"type":"object"}]},"ServiceStyle":{"properties":{"category":{"enum":["FeatureSingleSymbol","FeatureCategorical","FeatureGraduated","RasterSimple","RasterCategorical","RasterGraduated"],"type":"string"},"featureCategorical":{"oneOf":[{"$ref":"#/components/schemas/Classes"},{"type":"null"}]},"featureGraduated":{"oneOf":[{"$ref":"#/components/schemas/Classes"},{"type":"null"}]},"featureSingleSymbol":{"oneOf":[{"properties":{"paint":{"$ref":"#/components/schemas/Paint"}},"required":["paint"],"type":"object"},{"type":"null"}]},"id":{"format":"uuid","type":"string"},"layerId":{"description":"The sub-layer the style applies to, as named by the service.","type":"string"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"rasterCategorical":{"oneOf":[{"$ref":"#/components/schemas/RasterCategorical"},{"type":"null"}]},"rasterGraduated":{"oneOf":[{"$ref":"#/components/schemas/RasterGraduated"},{"type":"null"}]},"rasterSimple":{"oneOf":[{"$ref":"#/components/schemas/RasterSimple"},{"type":"null"}]}},"required":["id","layerId","name","category","featureSingleSymbol","featureCategorical","featureGraduated","rasterSimple","rasterCategorical","rasterGraduated"],"type":"object"},"ServiceStyleEntry":{"allOf":[{"$ref":"#/components/schemas/ServiceStyle"},{"$ref":"#/components/schemas/Versioned"}]},"ServiceStyles":{"properties":{"labels":{"items":{"$ref":"#/components/schemas/ServiceLabelEntry"},"type":"array"},"styles":{"items":{"$ref":"#/components/schemas/ServiceStyleEntry"},"type":"array"}},"required":["styles","labels"],"type":"object"},"SewerCheck":{"properties":{"applies":{"description":"Whether the run is in the condition the criterion holds in. Null when that can't be told.","type":["boolean","null"]},"appliesIn":{"enum":["dryWeather","designStorm","any"],"type":"string"},"failing":{"type":"integer"},"items":{"items":{"properties":{"fid":{"type":["integer","null"]},"hours":{"description":"Hours surcharged or flooded.","type":"number"},"id":{"type":"string"},"layerId":{"format":"uuid","type":["string","null"]},"value":{"type":"number"}},"required":["id","value","layerId","fid"],"type":"object"},"type":"array"},"key":{"enum":["depth_ratio","surcharge","flooding","freeboard","basement","min_velocity","max_velocity"],"type":"string"},"limit":{"type":["number","null"]},"of":{"enum":["conduit","node"],"type":"string"},"status":{"enum":["pass","fail","unset","noData"],"type":"string"},"tested":{"type":"integer"},"unit":{"enum":["ratio","length","velocity","volume"],"type":"string"},"worst":{"description":"The worst value over every element tested: the highest d/D, surcharge or velocity, the lowest freeboard or velocity, the total flood volume.","type":["number","null"]}},"required":["key","of","appliesIn","applies","unit","limit","tested","failing","status","worst","items"],"type":"object"},"SewerChecks":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/SewerCheck"},"type":"array"},"condition":{"enum":["dryWeather","designStorm","wetWeather","unknown"],"type":"string"},"criteria":{"$ref":"#/components/schemas/SewerCriteria"},"flowUnits":{"type":"string"},"origins":{"$ref":"#/components/schemas/LevelOfServiceOrigins"},"simulation":{"properties":{"id":{"format":"uuid","type":"string"},"label":{"type":"string"},"scenarioId":{"format":"uuid","type":["string","null"]}},"required":["id","label","scenarioId"],"type":"object"},"stormYears":{"type":["number","null"]},"units":{"properties":{"length":{"type":"string"},"ratio":{"type":"string"},"system":{"enum":["us","si"],"type":"string"},"velocity":{"type":"string"},"volume":{"type":"string"}},"required":["length","velocity","volume","ratio","system"],"type":"object"},"verdict":{"description":"fail when a check that applies fails; unclear when one fails whose condition can't be told.","enum":["pass","fail","unclear"],"type":"string"}},"required":["simulation","condition","stormYears","flowUnits","units","criteria","origins","verdict","checks"],"type":"object"},"SewerCriteria":{"description":"Lengths are in the model's units: ft under US flow units, m under SI. Null is unset, and not checked.","properties":{"basementDepthFt":{"type":["number","null"]},"designStormYears":{"type":"number"},"designStorms":{"items":{"type":"number"},"type":"array"},"maxDepthRatio":{"type":["number","null"]},"maxSurchargeFt":{"type":["number","null"]},"maxVelocity":{"type":["number","null"]},"minFreeboardFt":{"type":["number","null"]},"minVelocity":{"type":["number","null"]},"noOverflow":{"type":"boolean"},"standard":{"description":"The design standard, such as Ten States Standards.","type":"string"}},"required":["standard","designStorms","designStormYears","maxDepthRatio","maxSurchargeFt","noOverflow","minFreeboardFt","basementDepthFt","minVelocity","maxVelocity"],"type":"object"},"Simulation":{"properties":{"cost":{"description":"Total billed in credits, from creation to the latest charge. Absent before the first charge.","type":"number"},"createdAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":"string"},"engine":{"description":"The engine's display name, such as SWMM, EPANET or HEC-RAS.","type":"string"},"engineVersion":{"description":"The engine version the simulation ran on, as recorded by the engine, such as 5.2.4 or 6.0.0-alpha.4. Absent when none was recorded.","type":"string"},"failure":{"description":"Why the simulation failed when the engine reported no reason, from the task's context.failure.","type":"string"},"id":{"format":"uuid","type":"string"},"label":{"type":"string"},"links":{"description":"Where to read it and its outputs, on the API host. Present for an API key.","properties":{"cancel":{"description":"Where to POST to stop it (`POST /simulations/{simulationId}/cancel`).","format":"uri","type":"string"},"files":{"description":"Its files (`GET /simulations/{simulationId}/files`).","format":"uri","type":"string"},"input":{"description":"The .inp it ran (`GET /simulations/{simulationId}/input`).","format":"uri","type":"string"},"report":{"description":"Its report (`GET /simulations/{simulationId}/report`).","format":"uri","type":"string"},"reportFile":{"description":"Its report.json (`GET /simulations/{simulationId}/report.json`).","format":"uri","type":"string"},"results":{"description":"What its results hold (`GET /simulations/{simulationId}/results`).","format":"uri","type":"string"},"self":{"description":"This simulation (`GET /simulations/{simulationId}`).","format":"uri","type":"string"},"zip":{"description":"Its files in one zip (`GET /simulations/{simulationId}/files.zip`).","format":"uri","type":"string"}},"required":["self","report","reportFile","input","results","files","zip","cancel"],"type":"object"},"modelId":{"description":"The project's model it ran. Absent for a file's run.","format":"uuid","type":"string"},"preview":{"description":"True when the engine version is a preview (see the stage in GET /engines), so results aren't from a release. Absent otherwise.","type":"boolean"},"projectId":{"description":"The project it is in. Absent for a run outside any project.","format":"uuid","type":"string"},"rainfall":{"description":"The rain input's name.","type":"string"},"runId":{"description":"The model run it is one of. Absent outside one.","format":"uuid","type":"string"},"scenario":{"description":"The scenario's name.","type":"string"},"scenarioId":{"description":"The scenario's id.","format":"uuid","type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"$ref":"#/components/schemas/SimulationState"}},"required":["id","label","engine","state","createdAt"],"type":"object"},"SimulationFile":{"properties":{"bytes":{"format":"int64","minimum":0,"type":"integer"},"id":{"format":"uuid","type":"string"},"name":{"description":"The file name, the last part of its key.","type":"string"},"type":{"description":"The file's type as recorded by the engine: input, report, output, report_json, results_parquet, results_zarr, auxiliary, swmm_ini or flood_forecasting.","type":"string"},"url":{"description":"Where to download the file: a redirect to it for 5 minutes, as a download under its own name. For an API key it is `GET /simulations/{simulationId}/files/{fileId}`, an absolute address on the API host; in the app, the app's own path. Null for a folder.","type":["string","null"]}},"required":["id","type","name","bytes","url"],"type":"object"},"SimulationInput":{"properties":{"text":{"type":"string"}},"required":["text"],"type":"object"},"SimulationReport":{"properties":{"balances":{"additionalProperties":true,"description":"The report's balances, by dotted name.","type":"object"},"continuity":{"description":"SWMM's continuity tables (runoff, groundwater, flow routing), each figure in the unit its column heads: volumes in acre-feet and 10^6 gal, or hectare-m and 10^6 ltr; depths in inches or mm; the continuity error in %. Read from the report text. `balances` holds the same figures as the engine's report.json writes them, without units, its figure in parentheses a second volume rather than a percent.","items":{"properties":{"name":{"description":"As the report names it, such as Dry Weather Inflow.","type":"string"},"table":{"enum":["runoff","groundwater","flow_routing"],"type":"string"},"values":{"items":{"properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["value","unit"],"type":"object"},"type":"array"}},"required":["table","name","values"],"type":"object"},"type":"array"},"cut":{"description":"True when the text was cut at 2 MiB. The whole report is the `report` file (`GET /simulations/{simulationId}/files`).","type":"boolean"},"endingDate":{"type":"string"},"errors":{"items":{"type":"string"},"type":"array"},"flowUnits":{"type":"string"},"startingDate":{"description":"The simulated start, as written in the report.","type":"string"},"summary":{"description":"SWMM's and EPANET's summaries judged (as simulation.diagnose reads them): continuity errors, surcharged and flooded nodes, unbalanced runs or negative pressures, each with its worst elements. Empty for HEC-RAS.","items":{"$ref":"#/components/schemas/QualitySignal"},"type":"array"},"text":{"description":"The report text, as written by the engine.","type":"string"},"timestamps":{"additionalProperties":true,"description":"The timestamps in report.json, as written by the engine (start_date, end_date, flow_units, flow_routing_method, analysis_begun, analysis_ended). Absent when the engine wrote no report.json, such as a failed run that left only its text report.","type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["warnings","errors","balances","summary","continuity","text","cut"],"type":"object"},"SimulationReportFile":{"additionalProperties":true,"description":"The engine's report.json, with its timestamps, warnings, errors, balances and per-element tables (node_flooding, link_flow and the rest), as written after the run.","type":"object"},"SimulationState":{"description":"stuck is a queued simulation the engine hasn't started after 15 minutes. finishing is one the engine completed whose results aren't written yet.","enum":["queued","starting","running","finishing","done","failed","stuck"],"type":"string"},"Standing":{"properties":{"restriction":{"enum":["viewer","commenter","editor"],"type":"string"},"role":{"enum":["owner","admin","member","guest","link"],"type":"string"}},"required":["role"],"type":"object"},"Storage":{"properties":{"totalGb":{"description":"Null while the plan records no quota.","type":["number","null"]},"usedGb":{"description":"Null while sizes aren't recorded.","type":["number","null"]}},"required":["usedGb","totalGb"],"type":"object"},"StorageUse":{"description":"Storage used by an owner's files against their plan, in bytes.","properties":{"limitBytes":{"description":"The plan's storage limit. Null when the plan includes no file storage.","minimum":0,"type":["integer","null"]},"usedBytes":{"minimum":0,"type":"integer"}},"required":["usedBytes","limitBytes"],"type":"object"},"StormChecks":{"properties":{"criteria":{"$ref":"#/components/schemas/StormwaterCriteria"},"failing":{"type":"integer"},"flowUnits":{"type":"string"},"origins":{"$ref":"#/components/schemas/LevelOfServiceOrigins"},"outfalls":{"items":{"properties":{"change":{"type":["number","null"]},"id":{"type":"string"},"post":{"type":["number","null"]},"pre":{"type":["number","null"]},"status":{"enum":["pass","fail","noPre","noPost"],"type":"string"}},"required":["id","pre","post","change","status"],"type":"object"},"type":"array"},"post":{"$ref":"#/components/schemas/StormRun"},"pre":{"$ref":"#/components/schemas/StormRun"},"storms":{"properties":{"judged":{"type":["boolean","null"]},"post":{"type":["number","null"]},"pre":{"type":["number","null"]},"same":{"type":["boolean","null"]}},"required":["pre","post","same","judged"],"type":"object"},"tested":{"type":"integer"},"verdict":{"enum":["pass","fail","unset","noData"],"type":"string"},"waterQuality":{"properties":{"limit":{"type":["number","null"]},"status":{"enum":["unset","notChecked"],"type":"string"}},"required":["limit","status"],"type":"object"}},"required":["verdict","storms","tested","failing","outfalls","waterQuality","pre","post","flowUnits","criteria","origins"],"type":"object"},"StormRun":{"properties":{"id":{"format":"uuid","type":"string"},"label":{"type":"string"},"modelId":{"format":"uuid","type":["string","null"]}},"required":["id","label","modelId"],"type":"object"},"StormwaterCriteria":{"properties":{"postAtMostPre":{"type":"boolean"},"storms":{"items":{"type":"number"},"type":"array"},"waterQualityVolume":{"type":["number","null"]}},"required":["storms","postAtMostPre","waterQualityVolume"],"type":"object"},"Studio":{"properties":{"detail":{"description":"Current lifecycle or readiness information, when available.","type":"string"},"mayBuy":{"description":"True when you can buy or change the team's plan. Only owners can.","type":"boolean"},"mayTrack":{"description":"True when you can have a tracking token. Members and above can.","type":"boolean"},"prices":{"description":"AI Studio's monthly and yearly prices from Stripe. Only returned when the team has no plan to open (none, ended). Left out when Stripe isn't set up or doesn't respond.","items":{"properties":{"amount":{"description":"In cents.","type":"integer"},"currency":{"type":"string"},"interval":{"enum":["monthly","yearly"],"type":"string"}},"required":["interval","amount","currency"],"type":"object"},"type":"array"},"state":{"enum":["none","ended","pending","deploying","running","stopped","unavailable"],"type":"string"},"url":{"type":["string","null"]}},"required":["state","url","mayBuy","mayTrack"],"type":"object"},"StudioModels":{"properties":{"models":{"items":{"properties":{"aliases":{"items":{"properties":{"alias":{"type":"string"},"version":{"type":"string"}},"required":["alias","version"],"type":"object"},"type":"array"},"description":{"type":["string","null"]},"name":{"type":"string"},"updatedAt":{"format":"date-time","type":["string","null"]},"versions":{"items":{"properties":{"aliases":{"items":{"type":"string"},"type":"array"},"createdAt":{"format":"date-time","type":["string","null"]},"description":{"type":["string","null"]},"runId":{"type":["string","null"]},"version":{"type":"string"}},"required":["version","createdAt","description","runId","aliases"],"type":"object"},"type":"array"}},"required":["name","description","updatedAt","aliases","versions"],"type":"object"},"type":"array"},"state":{"enum":["ready","noTeam","notMember","off","notRunning","unreachable"],"type":"string"}},"required":["state","models"],"type":"object"},"StyleClass":{"additionalProperties":true,"description":"One class as stored, with isActive, value (categorical, a feature's as a string, a raster's as a number), start and end (graduated), legend and paint. Stored whole, including keys this version doesn't know.","type":"object"},"StyleEntry":{"allOf":[{"$ref":"#/components/schemas/LayerStyle"},{"properties":{"active":{"type":"boolean"},"version":{"description":"A digest of the style and its blocks as stored.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["active","version"],"type":"object"}]},"Survey":{"properties":{"canEdit":{"type":"boolean"},"description":{"type":["string","null"]},"draftVersion":{"type":["integer","null"]},"id":{"format":"uuid","type":"string"},"link":{"oneOf":[{"type":"null"},{"properties":{"enabled":{"type":"boolean"},"expiresAt":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"maxSubmissions":{"type":["integer","null"]},"open":{"description":"Accepts answers now: on, published, under any cap, and before any expiry.","type":"boolean"},"submissionCount":{"type":"integer"},"token":{"type":"string"},"version":{"type":"integer"}},"required":["id","token","enabled","open","version","submissionCount","maxSubmissions","expiresAt"],"type":"object"}]},"liveVersion":{"type":["integer","null"]},"mapBindings":{"items":{"properties":{"fieldKey":{"type":"string"},"geometryType":{"type":"string"},"layerId":{"format":"uuid","type":["string","null"]},"layerName":{"type":["string","null"]},"projectId":{"format":"uuid","type":"string"}},"required":["fieldKey","projectId","geometryType","layerId","layerName"],"type":"object"},"type":"array"},"name":{"type":"string"},"projects":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"publishedVersion":{"type":["integer","null"]},"submissionCount":{"minimum":0,"type":"integer"},"teamId":{"format":"uuid","type":["string","null"]},"versions":{"items":{"properties":{"createdAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"schema":{"$ref":"#/components/schemas/SurveySchema"},"submissions":{"minimum":0,"type":"integer"},"version":{"type":"integer"}},"required":["version","publishedAt","createdAt","submissions","schema"],"type":"object"},"type":"array"}},"required":["id","name","description","teamId","canEdit","versions","draftVersion","publishedVersion","liveVersion","link","mapBindings","projects","submissionCount"],"type":"object"},"SurveySchema":{"additionalProperties":true,"description":"A version as stored, in NEER's survey format. `fields` in order, each with `type`, `key`, `label` and its type's settings, and optional `header`, `footer` and `theme`.","properties":{"fields":{"items":{"additionalProperties":true,"properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["type","key","label"],"type":"object"},"type":"array"},"footer":{"additionalProperties":true,"type":"object"},"header":{"additionalProperties":true,"type":"object"},"theme":{"additionalProperties":true,"type":"object"},"version":{"type":"integer"}},"required":["fields"],"type":"object"},"Tag":{"description":"A short status label and its tone.","properties":{"code":{"description":"The code the app uses to translate the label. The text lowercased, with spaces as dashes and apostrophes dropped (\"Didn't start\" is didnt-start). The text is the fallback.","type":"string"},"text":{"type":"string"},"tone":{"enum":["accent","ok","warn","danger","pending","neer","outline"],"type":"string"}},"required":["text"],"type":"object"},"Target":{"description":"Where a home item links to. An object by kind and id, or a surface.","properties":{"id":{"type":"string"},"kind":{"enum":["project","dashboard","field-map","survey","machine","job","jobs","account","shared","home","invitation","dashboard-invitation","team-invitation"],"type":"string"}},"required":["kind"],"type":"object"},"Team":{"properties":{"banner":{"type":["string","null"]},"contactEmail":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"image":{"description":"A short-lived address for the team's logo.","type":["string","null"]},"invitations":{"description":"Pending invitations. Shown only to owners and admins, and empty for everyone else.","items":{"properties":{"email":{"type":"string"},"expired":{"type":"boolean"},"expiresAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"role":{"enum":["owner","admin","member","guest"],"type":"string"},"sentAt":{"format":"date-time","type":"string"}},"required":["id","email","role","sentAt","expiresAt","expired"],"type":"object"},"type":"array"},"name":{"type":"string"},"people":{"items":{"properties":{"email":{"description":"Shown only to the team's owners and admins.","type":"string"},"id":{"format":"uuid","type":"string"},"initials":{"type":"string"},"joinedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"role":{"enum":["owner","admin","member","guest"],"type":"string"}},"required":["id","name","initials","role","joinedAt"],"type":"object"},"type":"array"},"role":{"description":"Your role on the team.","enum":["owner","admin","member","guest"],"type":"string"},"seats":{"properties":{"admins":{"type":"integer"},"guests":{"type":"integer"},"members":{"type":"integer"},"owners":{"type":"integer"}},"required":["owners","admins","members","guests"],"type":["object","null"]},"slug":{"type":"string"},"websiteUrl":{"type":["string","null"]}},"required":["id","slug","name","description","image","banner","contactEmail","websiteUrl","role","people","seats","invitations"],"type":"object"},"Tiles":{"description":"The location of a vector layer's tiles.","properties":{"expiresAt":{"description":"When `url` expires. Absent for an address that doesn't expire.","format":"date-time","type":"string"},"format":{"enum":["pmtiles","mvt"],"type":"string"},"maxZoom":{"maximum":24,"minimum":0,"type":"integer"},"minZoom":{"maximum":24,"minimum":0,"type":"integer"},"sourceLayer":{"type":"string"},"url":{"description":"An absolute presigned storage address, or a path relative to the API's origin.","type":"string"}},"required":["format","url","sourceLayer"],"type":"object"},"TracePoint":{"properties":{"at":{"description":"Epoch milliseconds.","type":"integer"},"value":{"type":"number"}},"required":["at","value"],"type":"object"},"Trash":{"properties":{"layers":{"items":{"$ref":"#/components/schemas/Trashed"},"type":"array"},"models":{"description":"Models in the trash, with their networks. Their rows and files are stored until the trash is emptied, so each can be restored.","items":{"$ref":"#/components/schemas/Trashed"},"type":"array"},"rasters":{"items":{"$ref":"#/components/schemas/Trashed"},"type":"array"}},"required":["layers","rasters","models"],"type":"object"},"Trashed":{"properties":{"geometry":{"enum":["point","line","polygon"],"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"restorable":{"type":"boolean"},"trashedAt":{"format":"date-time","type":"string"}},"required":["id","name","trashedAt","restorable"],"type":"object"},"Upload":{"properties":{"expiresAt":{"description":"When the part addresses and the upload expire.","format":"date-time","type":"string"},"name":{"description":"The name the file is stored under.","type":"string"},"objectId":{"description":"The id the import's first layer or raster will get. For a replacement, the replaced object's id.","format":"uuid","type":"string"},"partSize":{"description":"Bytes in each part except the last, which contains the rest.","minimum":1,"type":"integer"},"parts":{"description":"Where to send each part. PUT exactly that part's bytes to its url, with no Content-Type and no Authorization header (the address is signed). Send each part's number and the ETag header its PUT returned to object.import, every part once.","items":{"properties":{"number":{"maximum":10000,"minimum":1,"type":"integer"},"url":{"format":"uri","type":"string"}},"required":["number","url"],"type":"object"},"minItems":1,"type":"array"},"upload":{"description":"The upload, signed. Send it as `upload` to object.import (or as `input` to simulation.run) once every part is sent. Opaque.","type":"string"}},"required":["upload","objectId","name","partSize","parts","expiresAt"],"type":"object"},"UploadRead":{"properties":{"continuity":{"items":{"properties":{"name":{"type":"string"},"table":{"enum":["runoff","groundwater","flow_routing"],"type":"string"},"values":{"items":{"properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["value","unit"],"type":"object"},"type":"array"}},"required":["table","name","values"],"type":"object"},"type":"array"},"errors":{"items":{"type":"string"},"type":"array"},"flowUnits":{"type":"string"},"kind":{"enum":["swmm_report","epanet_report","swmm_output","workbook","unread"],"type":"string"},"name":{"type":"string"},"note":{"description":"Why it was not read (kind unread), or what of a workbook was left out.","type":"string"},"output":{"properties":{"from":{"description":"The first period, on the model's clock.","type":"string"},"links":{"minimum":0,"type":"integer"},"nodes":{"minimum":0,"type":"integer"},"peaks":{"items":{"properties":{"class":{"enum":["nodes","links","subcatchments"],"type":"string"},"elements":{"description":"The largest values, worst first, at most 10.","items":{"properties":{"name":{"type":"string"},"value":{"type":"number"}},"required":["name","value"],"type":"object"},"type":"array"},"metric":{"type":"string"},"unit":{"type":"string"}},"required":["class","metric","elements"],"type":"object"},"type":"array"},"periods":{"minimum":0,"type":"integer"},"subcatchments":{"minimum":0,"type":"integer"},"to":{"description":"The last period, on the model's clock.","type":"string"}},"required":["subcatchments","nodes","links","periods","peaks"],"type":"object"},"sheets":{"description":"A workbook's sheets (the first 10), each with its first 20 rows.","items":{"properties":{"columnCount":{"minimum":0,"type":"integer"},"name":{"type":"string"},"rowCount":{"description":"Every row, the header's included.","minimum":0,"type":"integer"},"rows":{"items":{"items":{"type":"string"},"type":"array"},"type":"array"}},"required":["name","rowCount","columnCount","rows"],"type":"object"},"type":"array"},"summary":{"items":{"$ref":"#/components/schemas/QualitySignal"},"type":"array"},"warnings":{"description":"The first 50.","items":{"type":"string"},"type":"array"},"warningsCount":{"description":"Every warning the report wrote.","minimum":0,"type":"integer"}},"required":["name","kind"],"type":"object"},"Versioned":{"properties":{"active":{"type":"boolean"},"version":{"description":"A digest of the style and its blocks as stored.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["active","version"],"type":"object"},"WaitingItem":{"properties":{"meta":{"type":"string"},"said":{"$ref":"#/components/schemas/Said","description":"Codes are jobs-to-do (count), in-jobs, reports-held (count), submissions-to-review (count), share-link-expires and form-link-expires (days), invitation (name), invite, invite-from, invite-dashboard and invite-dashboard-from (role, from), team-invite-from (from, sent), team-invite-expired (from, when the sender is known), and waiting-on-you. A job's item uses the job's codes."},"tag":{"$ref":"#/components/schemas/Tag"},"target":{"$ref":"#/components/schemas/Target"},"title":{"type":"string"}},"required":["title","meta","target"],"type":"object"},"WaterCheck":{"properties":{"condition":{"type":"string"},"failing":{"type":"integer"},"items":{"items":{"properties":{"detail":{"type":"string"},"fid":{"type":["integer","null"]},"id":{"type":"string"},"limit":{"type":"number"},"value":{"type":"number"}},"required":["id","value","limit","fid"],"type":"object"},"type":"array"},"key":{"type":"string"},"label":{"type":"string"},"of":{"enum":["junction","pipe","tank","zone"],"type":"string"},"severity":{"enum":["deficiency","watch"],"type":"string"},"tested":{"type":"integer"}},"required":["key","label","of","tested","failing","items","severity","condition"],"type":"object"},"WaterChecks":{"properties":{"averageDay":{"properties":{"id":{"format":"uuid","type":"string"},"label":{"type":"string"}},"required":["id","label"],"type":["object","null"]},"checks":{"items":{"$ref":"#/components/schemas/WaterCheck"},"type":"array"},"criteria":{"$ref":"#/components/schemas/WaterCriteria"},"customersBy":{"enum":["junction types","demand"],"type":"string"},"fireflow":{"properties":{"createdAt":{"format":"date-time","type":"string"},"fail":{"type":"integer"},"id":{"format":"uuid","type":"string"},"multiplier":{"type":"number"},"name":{"type":"string"},"pass":{"type":"integer"},"tested":{"type":"integer"}},"required":["id","name","createdAt","tested","pass","fail","multiplier"],"type":["object","null"]},"layers":{"properties":{"junction":{"format":"uuid","type":["string","null"]},"pipe":{"format":"uuid","type":["string","null"]},"tank":{"format":"uuid","type":["string","null"]}},"required":["junction","pipe","tank"],"type":"object"},"modelVersion":{"type":["integer","null"]},"origins":{"$ref":"#/components/schemas/LevelOfServiceOrigins"},"simulation":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"label":{"type":"string"},"modelVersion":{"type":["integer","null"]}},"required":["id","label","createdAt","modelVersion"],"type":"object"},"sources":{"additionalProperties":{"type":"string"},"type":"object"},"storage":{"items":{"$ref":"#/components/schemas/ZoneStorage"},"type":"array"},"units":{"enum":["us","si"],"type":"string"}},"required":["simulation","storage","averageDay","modelVersion","units","criteria","sources","customersBy","checks","layers","fireflow"],"type":"object"},"WaterCriteria":{"properties":{"emergencyHours":{"type":"number"},"floorPressure":{"type":"number"},"headlossMinDiameter":{"type":"number"},"maxHeadloss":{"type":"number"},"maxPressure":{"type":"number"},"maxVelocity":{"type":"number"},"minPressure":{"type":"number"},"tankMinCyclePct":{"type":"number"},"tankMinLevelPct":{"type":"number"}},"required":["minPressure","floorPressure","maxPressure","maxVelocity","maxHeadloss","headlossMinDiameter","tankMinLevelPct","tankMinCyclePct","emergencyHours"],"type":"object"},"WaterLevelOfService":{"allOf":[{"$ref":"#/components/schemas/WaterCriteria"},{"properties":{"fireFlowByLandUse":{"additionalProperties":true,"type":["object","null"]},"maxDayFactor":{"type":["number","null"]},"peakHourFactor":{"type":["number","null"]}},"required":["maxDayFactor","peakHourFactor","fireFlowByLandUse"],"type":"object"}]},"WeatherCell":{"description":"The grid cell used.","properties":{"distanceM":{"description":"Distance from the requested point, in meters.","type":"number"},"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon","distanceM"],"type":"object"},"WeatherForecast":{"properties":{"cell":{"$ref":"#/components/schemas/WeatherCell"},"issuedAt":{"format":"date-time","type":"string"},"points":{"items":{"$ref":"#/components/schemas/WeatherPoint"},"type":"array"},"product":{"enum":["hourly","quarterHourly"],"type":"string"},"step":{"description":"Seconds per point.","type":"integer"},"unit":{"enum":["in"],"type":"string"}},"required":["product","unit","step","issuedAt","cell","points"],"type":"object"},"WeatherForecastGrid":{"properties":{"cells":{"items":{"properties":{"lat":{"description":"The cell's center.","type":"number"},"lon":{"type":"number"},"values":{"description":"The rain in each interval of `times`.","items":{"type":["number","null"]},"type":"array"}},"required":["lat","lon","values"],"type":"object"},"type":"array"},"issuedAt":{"format":"date-time","type":"string"},"product":{"enum":["hourly","quarterHourly"],"type":"string"},"step":{"description":"Seconds per value.","type":"integer"},"times":{"description":"When each interval ends, for every cell's values.","items":{"format":"date-time","type":"string"},"type":"array"},"unit":{"enum":["in"],"type":"string"}},"required":["product","unit","step","issuedAt","times","cells"],"type":"object"},"WeatherForecastPoints":{"properties":{"issuedAt":{"format":"date-time","type":"string"},"points":{"description":"In the order listed.","items":{"properties":{"cell":{"$ref":"#/components/schemas/WeatherCell"},"lat":{"description":"Where it was asked.","type":"number"},"lon":{"type":"number"},"values":{"description":"The rain in each interval of `times`.","items":{"type":["number","null"]},"type":"array"}},"required":["lat","lon","cell","values"],"type":"object"},"type":"array"},"product":{"enum":["hourly","quarterHourly"],"type":"string"},"step":{"description":"Seconds per value.","type":"integer"},"times":{"description":"When each interval ends, for every location's values.","items":{"format":"date-time","type":"string"},"type":"array"},"unit":{"enum":["in"],"type":"string"}},"required":["product","unit","step","issuedAt","times","points"],"type":"object"},"WeatherForecasts":{"properties":{"availableThrough":{"format":"date-time","type":["string","null"]},"cell":{"$ref":"#/components/schemas/WeatherCell"},"forecasts":{"items":{"properties":{"issuedAt":{"format":"date-time","type":"string"},"points":{"items":{"$ref":"#/components/schemas/WeatherPoint"},"type":"array"}},"required":["issuedAt","points"],"type":"object"},"type":"array"},"missing":{"description":"Forecasts in the window that were never published.","items":{"format":"date-time","type":"string"},"type":"array"},"product":{"enum":["hourly","quarterHourly"],"type":"string"},"step":{"description":"Seconds per point.","type":"integer"},"unit":{"enum":["in"],"type":"string"}},"required":["product","unit","step","cell","availableThrough","missing","forecasts"],"type":"object"},"WeatherListedPoints":{"description":"Up to 2,500 locations, WGS 84 degrees.","items":{"additionalProperties":false,"properties":{"lat":{"maximum":90,"minimum":-90,"type":"number"},"lon":{"maximum":180,"minimum":-180,"type":"number"}},"required":["lat","lon"],"type":"object"},"maxItems":2500,"minItems":1,"type":"array"},"WeatherPoint":{"properties":{"at":{"description":"When the interval ends.","format":"date-time","type":"string"},"value":{"description":"Rain in the interval, or the rate. Null means no data.","type":["number","null"]}},"required":["at","value"],"type":"object"},"WeatherRain":{"properties":{"availableThrough":{"description":"Data is available up to this time.","format":"date-time","type":["string","null"]},"cell":{"$ref":"#/components/schemas/WeatherCell"},"points":{"items":{"$ref":"#/components/schemas/WeatherPoint"},"maxItems":20000,"type":"array"},"product":{"enum":["hourly","rate"],"type":"string"},"step":{"description":"Seconds per point.","type":"integer"},"unit":{"enum":["in","in/h"],"type":"string"}},"required":["product","unit","step","cell","availableThrough","points"],"type":"object"},"WeatherRainGrid":{"properties":{"availableThrough":{"format":"date-time","type":["string","null"]},"cells":{"items":{"properties":{"lat":{"description":"The cell's center.","type":"number"},"lon":{"type":"number"},"values":{"description":"The rain in each interval of `times`.","items":{"type":["number","null"]},"type":"array"}},"required":["lat","lon","values"],"type":"object"},"type":"array"},"product":{"enum":["hourly","rate"],"type":"string"},"step":{"description":"Seconds per value.","type":"integer"},"times":{"description":"When each interval ends, for every cell's values.","items":{"format":"date-time","type":"string"},"type":"array"},"unit":{"enum":["in","in/h"],"type":"string"}},"required":["product","unit","step","availableThrough","times","cells"],"type":"object"},"WeatherRainPoints":{"properties":{"availableThrough":{"format":"date-time","type":["string","null"]},"points":{"description":"In the order listed.","items":{"properties":{"cell":{"$ref":"#/components/schemas/WeatherCell"},"lat":{"description":"Where it was asked.","type":"number"},"lon":{"type":"number"},"values":{"description":"The rain in each interval of `times`.","items":{"type":["number","null"]},"type":"array"}},"required":["lat","lon","cell","values"],"type":"object"},"type":"array"},"product":{"enum":["hourly","rate"],"type":"string"},"step":{"description":"Seconds per value.","type":"integer"},"times":{"description":"When each interval ends, for every location's values.","items":{"format":"date-time","type":"string"},"type":"array"},"unit":{"enum":["in","in/h"],"type":"string"}},"required":["product","unit","step","availableThrough","times","points"],"type":"object"},"WetWeatherEvent":{"properties":{"durationHours":{"type":"number"},"endAt":{"type":"number"},"found":{"type":"boolean"},"note":{"type":["string","null"]},"peak1hIn":{"description":"Peak one-hour depth of the storm, in inches.","type":["number","null"]},"peakFactor":{"type":"number"},"peakFlowMgd":{"type":"number"},"peakRdiiMgd":{"type":"number"},"peakReturnPeriodYears":{"description":"Return period of that hour alone, in years, from NOAA Atlas 14 at 60 minutes.","type":["number","null"]},"qa":{"description":"The event's quality check for calibration. Null when not checked yet.","oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WetWeatherEventQa"}]},"qc":{"items":{"type":"string"},"type":"array"},"rFraction":{"type":["number","null"]},"rPerInch":{"type":["number","null"]},"rainIn":{"type":"number"},"rankByDepth":{"type":"integer"},"rankByR":{"type":"integer"},"reason":{"type":["string","null"]},"returnPeriodYears":{"type":["number","null"]},"startAt":{"type":"number"},"status":{"enum":["keep","drop"],"type":"string"},"stormId":{"format":"uuid","type":"string"},"truncated":{"type":"boolean"},"volumeMg":{"type":"number"},"window":{"properties":{"by":{"const":"user","type":"string"},"original":{"properties":{"endAt":{"type":"number"},"startAt":{"type":"number"}},"required":["startAt","endAt"],"type":"object"}},"required":["by","original"],"type":"object"}},"required":["stormId","startAt","endAt","durationHours","rainIn","returnPeriodYears","volumeMg","peakRdiiMgd","peakFlowMgd","peakFactor","rPerInch","rFraction","qc","found","reason","status","note","rankByDepth","rankByR"],"type":"object"},"WetWeatherEventQa":{"properties":{"checkedAt":{"type":"string"},"checks":{"items":{"properties":{"key":{"type":"string"},"level":{"enum":["ok","warn","fail"],"type":"string"},"text":{"type":"string"}},"required":["key","level","text"],"type":"object"},"type":"array"},"dry":{"type":"object"},"grade":{"enum":["good","usable","reject"],"type":"string"},"rain":{"type":"object"},"response":{"type":"object"},"score":{"type":"number"},"weather":{"enum":["wet","dry"],"type":"string"}},"required":["grade","checks"],"type":"object"},"WetWeatherResult":{"properties":{"areaAcres":{"type":["number","null"]},"events":{"items":{"$ref":"#/components/schemas/WetWeatherEvent"},"type":"array"},"meterUnit":{"type":"string"},"problem":{"type":["string","null"]},"qaProblem":{"description":"Why the storms could not be checked, when they could not.","type":["string","null"]},"qaRadar":{"description":"The radar the storms were checked against. Either read at the meter and over its sewershed (`read`), or not read, with the reason. When read, `cells` is the number of radar cells and `requests` is the number of new reads charged to the workspace's weather allowance. The rest came from the project's cache. When not read, storms were checked against the radar stored at the meter. Absent on analyses run before radar was read.","properties":{"cells":{"minimum":0,"type":"integer"},"read":{"type":"boolean"},"requests":{"minimum":0,"type":"integer"},"why":{"type":["string","null"]}},"required":["read","why","cells","requests"],"type":["object","null"]},"rtk":{"properties":{"iterations":{"type":"integer"},"nse":{"type":"number"},"params":{"properties":{"k":{"items":{"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"r":{"items":{"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"t":{"items":{"type":"number"},"maxItems":3,"minItems":3,"type":"array"}},"required":["r","t","k"],"type":"object"},"peakError":{"type":"number"},"volumeError":{"type":"number"}},"required":["params","nse","volumeError","peakError","iterations"],"type":["object","null"]},"timeZone":{"type":"string"},"unit":{"const":"MGD","type":"string"}},"required":["unit","meterUnit","timeZone","areaAcres","events","rtk","problem"],"type":"object"},"Words":{"description":"A message code, for the app to show in the user's language, with values for its placeholders. The English text is the fallback, and is what an agent reads.","properties":{"code":{"type":"string"},"values":{"additionalProperties":{"type":["string","integer"]},"type":"object"}},"required":["code"],"type":"object"},"Workspace":{"properties":{"id":{"format":"uuid","type":"string"},"image":{"description":"The team's logo, or the user's picture for their personal workspace, as a short-lived presigned address. Returned only by /me. Left out when there is none.","type":"string"},"initials":{"maxLength":2,"type":"string"},"name":{"type":"string"}},"required":["id","name","initials"],"type":"object"},"WorkspaceDetail":{"properties":{"invited":{"description":"Emails invited and not yet accepted.","items":{"type":"string"},"type":"array"},"people":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"initials":{"maxLength":2,"type":"string"},"name":{"type":"string"},"role":{"enum":["owner","admin","member","guest"],"type":"string"}},"required":["id","name","initials","role"],"type":"object"},"type":"array"},"peopleTotal":{"type":"integer"},"plan":{"properties":{"name":{"type":["string","null"]},"renewsAt":{"format":"date","type":["string","null"]},"seats":{"type":["integer","null"]},"seatsUsed":{"type":"integer"}},"required":["name","renewsAt","seats","seatsUsed"],"type":"object"},"storage":{"$ref":"#/components/schemas/Storage"}},"required":["storage","plan","people","peopleTotal","invited"],"type":"object"},"ZoneStorage":{"properties":{"available":{"type":"number"},"emergency":{"type":"number"},"equalization":{"type":"number"},"equalizationFrom":{"type":"string"},"fire":{"properties":{"flow":{"type":"number"},"hours":{"type":"number"},"hydrant":{"type":"string"},"volume":{"type":"number"}},"required":["hydrant","flow","hours","volume"],"type":["object","null"]},"junctions":{"type":"integer"},"required":{"type":"number"},"sources":{"items":{"type":"string"},"type":"array"},"surplus":{"type":"number"},"tanks":{"items":{"properties":{"name":{"type":"string"},"volume":{"type":["number","null"]}},"required":["name","volume"],"type":"object"},"type":"array"},"verdict":{"enum":["enough","short","no storage","no fire demand"],"type":"string"},"zone":{"type":"integer"}},"required":["zone","junctions","tanks","sources","available","fire","equalization","equalizationFrom","emergency","required","surplus","verdict"],"type":"object"}},"securitySchemes":{"bearer":{"description":"An API key from Account › API keys. A tile token only opens Flood's tiles.","scheme":"bearer","type":"http"}}},"info":{"description":"Read and change anything in NEER from a script.\n\n**Authentication.** Create a Platform API key in Account › API keys and send it as `Authorization: Bearer <key>`. A key acts as you, but can't change your account, a team's members or billing. A tile token only opens Flood's tiles.\n\n**Workspace.** Send `X-NEER-Workspace: <id>` to choose one. `GET /me` lists yours. Without it, your first team is used.\n\n**Requests.** `GET` reads, `POST` creates or runs, `PATCH` changes, `PUT` replaces and `DELETE` deletes. Ids go in the path; everything else goes in a JSON body.\n\n**Preview a change.** Add `?preview=true` to see what a change would do, without doing it. To apply exactly that, send the same request with `?previewId=` and the `previewId` it returned.\n\n**Undo.** If a change returns `undo`, call `POST /undo/{token}` within about 8 seconds.\n\n**Retries.** Send an `Idempotency-Key` header so a retry doesn't run twice.\n\n**Errors** use RFC 9457. 401: missing or bad key. 403: not allowed. 404: not found. 409: changed since. 422: invalid. 429: too many requests; wait for `Retry-After`.","title":"NEER API","version":"1"},"openapi":"3.1.0","paths":{"/account":{"get":{"description":"Your profile and sign-in methods. A picture link is valid for 15 minutes.","operationId":"account.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"The account"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get account","tags":["Account"]}},"/account/billing":{"get":{"description":"Your plan, wallet, auto top-up, cards and payments.\n","operationId":"billing.mine","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}},"description":"The billing"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"description":"Stripe did not respond"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get account billing","tags":["Account"]}},"/account/billing/charges":{"get":{"description":"Your wallet charges, newest first, by what they paid for.\n","operationId":"billing.charges.mine","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charges"}}},"description":"Charges"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List account charges","tags":["Account"]}},"/account/billing/machines":{"get":{"description":"The cost of each of your personal machines: hourly rate times hours running.","operationId":"machine.usage.mine","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineUsage"}}},"description":"Machine usage"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get account machine costs","tags":["Compute"]}},"/account/storage":{"get":{"description":"Storage your projects use against your plan. Updated at most every 10 minutes.\n","operationId":"storage.mine","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUse"}}},"description":"The storage used"},"401":{"$ref":"#/components/responses/Unauthorized"},"503":{"description":"The storage used could not be read"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get account storage","tags":["Account"]}},"/capital-projects":{"get":{"description":"The project's capital projects, with cost estimates and linked record counts.\n","operationId":"plan.project.list","parameters":[{"description":"The project's id. `GET /projects` lists them.","in":"query","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Searches name, firm, and description. At most 200 UTF-8 bytes.","in":"query","name":"q","schema":{"type":"string"}},{"description":"The last page's `next`. Leave it out for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"How many to return.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RiskCapitalProject"},"maxItems":100,"type":"array"},"limit":{"maximum":100,"minimum":1,"type":"integer"},"next":{"description":"Send it as `cursor` for the next page. Null on the last page.","type":["string","null"]},"offset":{"maximum":1000000,"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["items","total","limit","offset"],"type":"object"}}},"description":"Paged capital projects"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List capital projects","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a capital project. To make one from risk results, use `POST /risk-runs/{riskRunId}/package`.","operationId":"risk.project.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"firm":"Example Engineering","name":"Elm St sewer rehab","projectId":"00000000-0000-0000-0000-000000000001","stage":"planned","year":2028},"schema":{"additionalProperties":false,"properties":{"boundary":{"description":"The project's area as drawn for delivery, a GeoJSON Polygon or MultiPolygon in WGS84. Used instead of the hull around the assets.","properties":{"coordinates":{"type":"array"},"type":{"enum":["Polygon","MultiPolygon"],"type":"string"}},"required":["type","coordinates"],"type":["object","null"]},"description":{"maxLength":2000,"type":["string","null"]},"firm":{"maxLength":200,"type":["string","null"]},"name":{"maxLength":200,"minLength":1,"title":"Name","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"stage":{"default":"planned","description":"Where the project is: planned, designed, construction (being built), constructed, or closed.","enum":["planned","designed","construction","constructed","closed"],"type":"string"},"year":{"maximum":2199,"minimum":1801,"type":["integer","null"]}},"required":["name","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New capital project","tags":["Risk"]}},"/collections/{kind}":{"get":{"description":"Projects, dashboards, field maps, surveys or machines in one list format. `tab` picks your\nown items, items shared with you, or the trash.\n","operationId":"collection.list","parameters":[{"description":"What to list: projects, dashboards, field-maps, surveys or machines.","in":"path","name":"kind","required":true,"schema":{"$ref":"#/components/schemas/CollectionKind"}},{"description":"mine (the default) lists the workspace's own; shared, those shared with you from elsewhere; trash, the workspace's trashed ones.","in":"query","name":"tab","schema":{"default":"mine","enum":["mine","shared","trash"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"The list, with each tab's count"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List collection","tags":["Account"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/contents":{"get":{"description":"The workspace's contents: rasters and services stored once and added to any of its projects, each with its latest version, size and the projects that have it, and its tags. `kind`, `q` (part of the name) and `tag` (any case) narrow it.","operationId":"content.list","parameters":[{"description":"Only contents of this kind.","in":"query","name":"kind","schema":{"$ref":"#/components/schemas/ContentKind"}},{"description":"Part of the name, any case.","in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},{"description":"Only contents with this tag, any case.","in":"query","name":"tag","schema":{"maxLength":40,"type":"string"}},{"description":"The last page's `next`. Leave it out for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"How many to return.","in":"query","name":"limit","required":false,"schema":{"maximum":500,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contents":{"items":{"$ref":"#/components/schemas/Content"},"type":"array"},"next":{"description":"Send it as `cursor` for the next page. Null on the last page.","type":["string","null"]},"total":{"description":"How many contents match, on every page.","minimum":0,"type":"integer"}},"required":["contents","total"],"type":"object"}}},"description":"The contents"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List contents","tags":["System"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a picture or a document to the workspace's contents, in no project: `key`, where `POST /contents/uploads` had the file sent, and `name`, what it's called (the file's name when left out). A note of any project can show it then, with `POST /projects/{projectId}/contents/place`.","operationId":"content.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"oneOf":[{"required":["key"]},{"required":["upload","parts"]}],"properties":{"key":{"description":"A picture or a document: where the file was sent, the key `POST /contents/uploads` gave.","type":"string"},"model":{"description":"With `upload`: the file is a model's (a zip of a SWMM, EPANET or PCSWMM model, or a HEC-RAS project), a model file content to build models from. An .inp or a .pcz is one by its name.","type":"boolean"},"name":{"description":"What the content is called; the file's name when left out.","maxLength":255,"minLength":1,"type":"string"},"parts":{"description":"With `upload`: each part's number and the ETag its PUT returned, every part once.","items":{"additionalProperties":false,"properties":{"etag":{"minLength":1,"type":"string"},"number":{"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"type":"array"},"upload":{"description":"A layer's or a raster's file: the `upload` that `POST /contents/map-uploads` gave, once every part is sent.","maxLength":4096,"minLength":1,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add to contents","tags":["System"]}},"/contents/map-uploads":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Starts adding a layer's or a raster's file to the workspace's contents, in no project: a GeoJSON, GeoPackage, FlatGeobuf, Parquet, KML or KMZ, a zip of a shapefile or a file geodatabase, or a GeoTIFF, up to 3 GiB. A model goes into a project, and a CSV is a document (`POST /contents/uploads`). The file must fit in the workspace's remaining storage. Returns an address per part. PUT each part, then finish with the content.add action, sending `upload` and each part's number and ETag. The file is imported into the first project it's added to. Members of the workspace and above can add contents.","operationId":"content.map.upload","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"description":"The file name, with its extension, which sets whether it's a layer or a raster.","maxLength":255,"minLength":1,"type":"string"},"size":{"description":"Size in bytes, up to 3 GiB.","maximum":3221225472,"minimum":1,"type":"integer"}},"required":["name","size"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}},"description":"Where to send each part"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Over 3 GiB, or not enough storage left. The detail says which."},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start layer or raster upload to contents","tags":["System"]}},"/contents/uploads":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Starts adding a picture or a document to the workspace's contents, in no project. Pictures can be JPEG, PNG, WebP or GIF. Documents can be PDF, text, CSV, Word, Excel or PowerPoint. Files are at most 25 MB and must fit in the workspace's remaining storage. Returns one URL to send the whole file to. Finish with the content.add action. Members of the workspace and above can add contents.","operationId":"content.upload","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUploadStart"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpload"}}},"description":"Where to send the file"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Over 25 MB, or not enough storage left. The detail says which."},"415":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not a picture or a document."},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start content upload","tags":["System"]}},"/contents/{contentId}":{"delete":{"description":"Deletes a content of the workspace: `contentId`. Refused while any project has it, its trash counted. Its files go with it.","operationId":"content.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The content to delete: one no project places.","in":"path","name":"contentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete from contents","tags":["System"]},"get":{"description":"One content of the workspace with its versions, newest first, and the projects that have it.","operationId":"content.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDetail"}}},"description":"The content"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get content","tags":["System"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"contentId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/contents/{contentId}/file":{"get":{"description":"A content's file, its latest version's or an earlier one's, to save: a raster's file as it was uploaded, a layer's as uploaded or last built, a note's picture or document. By a redirect to an address good for ten minutes. A service has none (404). With `view`, a picture or a document is served as what it is, for the browser to show.","operationId":"content.file","parameters":[{"description":"Serve a picture or a document as its own type, to show rather than save.","in":"query","name":"view","required":false,"schema":{"type":"boolean"}},{"description":"An earlier version's file; the latest's when left out.","in":"query","name":"version","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"The workspace the content is in, for a browser's own request (a picture shown, a link followed), which can't send X-NEER-Workspace. One of yours; the header's when left out.","in":"query","name":"workspace","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"302":{"description":"Redirect to the file","headers":{"Location":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download content","tags":["System"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"contentId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/contents/{contentId}/restore":{"post":{"description":"Makes an earlier version of a layer, a raster, a picture, a document, a link or a video its next version, which every project with it shows. A layer or a raster is imported again in the project that holds it.","operationId":"content.restore","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer, raster, picture, document, link or video to restore.","in":"path","name":"contentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"version":{"description":"The earlier version whose files become the content's next version, which every project with it shows.","minimum":1,"type":"integer"}},"required":["version"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Restore a version","tags":["System"]}},"/contents/{contentId}/tags":{"put":{"description":"Sets a content's tags: `contentId`, and `tags`, every tag it has from now on (`[]` removes them all). Each is kept once whatever its case; at most 20, of 40 characters. `GET /contents` filters by one with `tag`.","operationId":"content.tag","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The content to tag.","in":"path","name":"contentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"tags":{"description":"Every tag it has from now on, replacing those it had; [] removes them all. Each is kept once, whatever its case.","items":{"maxLength":40,"minLength":1,"type":"string"},"maxItems":20,"type":"array"}},"required":["tags"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Tag content","tags":["System"]}},"/crs":{"get":{"description":"Searches map projections by EPSG or ESRI code, or by name.\n","operationId":"crs.search","parameters":[{"description":"A code (2263, EPSG:2263, ESRI:102698) or words from a projection's name (Long Island ftUS).","in":"query","name":"q","required":false,"schema":{"maxLength":100,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Crs"},"type":"array"}}},"description":"At most 50"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Search projections","tags":["Account"]}},"/dashboards":{"post":{"description":"Creates an empty dashboard in the current workspace. You choose its `id`. Lay it out with `POST /dashboards/{dashboardId}/edit`.","operationId":"dashboard.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"description":"Live flows and gauge levels","id":"00000000-0000-0000-0000-000000000001","name":"Storm response","private":false},"schema":{"additionalProperties":false,"properties":{"description":{"maxLength":500,"title":"Description","type":["string","null"]},"id":{"description":"The new dashboard's id, a UUID you generate. Reusing an existing dashboard's id returns 409.","format":"uuid","type":"string"},"name":{"description":"Leading and trailing spaces are trimmed. Omitted or blank, the dashboard has no name and is shown as Untitled.","maxLength":120,"title":"Name","type":"string"},"private":{"description":"A team dashboard visible only to its creator and the team's owners and admins. Default false: every team member can see it. Ignored in a personal workspace, where a dashboard is always visible only to its owner.","title":"Only me","type":"boolean"}},"required":["id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New dashboard","tags":["Dashboards"]}},"/dashboards/{dashboardId}":{"delete":{"description":"Permanently deletes a dashboard in the trash. Move it to the trash first with `POST /dashboards/{dashboardId}/trash`. Can't be undone.","operationId":"dashboard.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete dashboard for good","tags":["Dashboards"]},"get":{"description":"Returns a dashboard and its tiles. `version` is what `POST /dashboards/{dashboardId}/edit` takes as `was`. Read a tile's values with `GET /dashboards/{dashboardId}/tiles/{tileId}/data`.","operationId":"dashboard.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}},"description":"The dashboard"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get dashboard","tags":["Dashboards"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}}],"patch":{"description":"Changes a dashboard's name, description or privacy. Send each current value in `was` (409 if it changed since).","operationId":"dashboard.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"set":{"name":"Storm response 2026"},"was":{"name":"Storm response"}},"schema":{"additionalProperties":false,"properties":{"set":{"additionalProperties":false,"description":"The details to change, at least one: `name`, `description` (null or blank clears it) or `private`. `private` applies only to a team dashboard, and only its creator or the team's owners and admins can change it.","minProperties":1,"properties":{"description":{"maxLength":500,"type":["string","null"]},"name":{"maxLength":120,"type":"string"},"private":{"type":"boolean"}},"type":"object"},"was":{"additionalProperties":true,"description":"Each field in `set`, with its value as you read it from dashboard.get, for example {\"name\": \"Old name\"}. Required for every key in `set`. If a value changed since, the request returns 409.","type":"object"}},"required":["set","was"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit dashboard details","tags":["Dashboards"]}},"/dashboards/{dashboardId}/edit":{"post":{"description":"Changes a dashboard's layout: add a tile, or move, resize, set or remove one, and manage its tabs. Send `version` from `GET /dashboards/{dashboardId}` as `was` (409 if the layout changed since).","operationId":"dashboard.edit","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"ops":[{"h":2,"id":"text-widget-intro","op":"put","w":4,"widget":{"name":"TextWidget","props":{"bgColor":"","description":"Updated hourly","isModal":false,"title":"About"}},"x":0,"y":1}],"was":"0000000000000000000000000000000000000000000000000000000000000000"},"schema":{"additionalProperties":false,"properties":{"ops":{"description":"Applied in order to the stored layout. Anything not named stays as it was. The grid is 12 columns by 12 rows (x 0-11, y 0-11). Tiles can't overlap. The header is at y 0 and the footer at y 11. A new tile needs a place, a widget, and an id made of the widget's prefix and your own suffix (kpi-widget-flow-total).","items":{"additionalProperties":false,"properties":{"h":{"description":"The tile's height in grid cells.","maximum":12,"minimum":1,"type":"integer"},"id":{"description":"The tile's id. For a new tile, the widget's prefix plus your own suffix, such as kpi-widget-flow-total. For tab, untab and tabs, the panel tile's id.","maxLength":120,"minLength":1,"type":"string"},"op":{"description":"put adds a tile or changes one: send x, y, w and h together to place it, `widget` to set its settings, or both. A new tile needs both. remove takes the tile out. tab creates or changes a panel's tab, untab removes one (`tabId`), tabs reorders them (`order`); for these three `id` is the panel tile's id.","enum":["put","remove","tab","untab","tabs"],"type":"string"},"order":{"description":"For tabs, the panel's tab ids in order.","items":{"type":"string"},"type":"array"},"tab":{"description":"For put and remove, the panel tab the tile is in, {panel, id}. For tab, the tab created or changed, {id, name?, bgColor?, selectedLayers?}.","type":"object"},"tabId":{"description":"For untab, the tab to remove.","type":"string"},"w":{"description":"The tile's width in grid cells.","maximum":12,"minimum":1,"type":"integer"},"widget":{"additionalProperties":false,"description":"What the tile shows. Its settings are written whole. Start from the widget's example, which has every setting with its default, and change what you need. A tile's id starts with its widget's prefix: HeaderWidget header-widget-…, TextWidget text-widget-…, FeatureInfoWidget feature-info-widget-…, ProjectMapWidget project-map-widget-…, EmbedWidget embed-widget-…, KPIWidget kpi-widget-…, ChartWidget chart-widget-…, TableWidget table-widget-…, IndicatorWidget indicator-widget-…, InteractivePanelWidget interactive-panel-widget-…, SelectDropdownWidget select-widget-…, FooterWidget footer-widget-…. A panel's tab holds only TextWidget, FeatureInfoWidget, EmbedWidget, KPIWidget, ChartWidget, TableWidget, IndicatorWidget, SelectDropdownWidget. A KPI, indicator, chart or table reads a property of its layer (a column, by name). A statistic with no property shows nothing, so name one (any column counts every feature). After saving a data tile, read its tile data to check it shows what you asked for.","examples":[{"name":"HeaderWidget","props":{"bgColor":"","createdAtWindowWidth":1440,"isModal":false,"logoUrl":"","secondLogoUrl":"","subtitle":"","title":""}},{"name":"TextWidget","props":{"bgColor":"","description":"","isModal":false,"title":""}},{"name":"FeatureInfoWidget","props":{"featureInfoFormValues":{"featureInfoLabel":"","layerId":"","projectId":"","tableColumnsVisibility":{}},"isModal":false,"title":"NeerAI"}},{"name":"ProjectMapWidget","props":{"heading":"","mapLayersAttributesVisibilityAndOrderData":[],"projectId":"","selectedLayers":{},"shouldExpandUnhiddenLayerStyles":false,"shouldHaveLayersAttributesVisibilities":false,"shouldShowMapAnnotations":false,"title":"NeerAI-project-map"}},{"name":"EmbedWidget","props":{"initialFileUrl":"","isModal":false}},{"name":"KPIWidget","props":{"isModal":false,"kpiFormValues":{"footer":"","header":"","layerId":"","noDataMessage":"","projectId":"","property":"","roundToDecimalPlaces":2,"statistics":""},"title":"NeerAI"}},{"name":"ChartWidget","props":{"chartFormValues":{"categoryProperty":"","chartLabel":"","chartMode":"lines","chartType":"pie","chartTypeLabel":"","chartTypeValue":"","dataSource":"","hoverInfoType":"x","inferenceChartMetadata":{"confidenceFlowChart":{"traceName":""},"forecastedFlowChart":{"traceName":""},"forecastedRainFlowChart":{"traceName":""},"historicalForecastedFlowChart":{"traceName":""},"historicalForecastedRainFlowChart":{"traceName":""},"observedFlowChart":{"traceName":""},"observedRainFlowChart":{"traceName":""},"title":"","xAxisLabel":"","yAxisLabel":""},"interactivePanelTabMetadata":{"areFeaturesMultiSelect":false,"groupByColumnToLayerMappedColumn":"","isBasedOnSelectedFeatures":false,"isBasedOnSelectedFeaturesChartFeatureColumn":"","isBasedOnSelectedFeaturesChartFeatureExpression":"","isBasedOnSelectedFeaturesChartFeatureModification":"","nodeSelectionDropdownLabelColumn":"","nodeSelectionDropdownSource":"map-layer","onSelectionAction":""},"isInferenceBasedChart":false,"layerId":"","noDataFallbackMessage":"","pieCenterText":"","pieHole":0,"projectId":"","property":"","rangeSlider":{"shouldHaveRangeSlider":false},"scaleToThreshold":{"label":"","shouldScaleToThreshold":false},"secondaryTrace":{"shouldHaveSecondaryTrace":false,"traces":[]},"simulationLayerMetadata":{"extraChart":{"filepath":"","groupByColumnToLayerMappedColumn":"","selectedNodeFileMappingColumn":"","traceName":"","traceside":"Historic","xAxisColumn":"","yAxisColumn":""},"forecastChart":{"filepath":"","groupByColumnToLayerMappedColumn":"","traceName":"","xAxisColumn":"","yAxisColumn":""},"forecastRainfallChart":{"filepath":"","groupByColumnToLayerMappedColumn":"","traceName":"","xAxisColumn":"","yAxisColumn":""},"historicalChart":{"filepath":"","groupByColumnToLayerMappedColumn":"","traceName":"","xAxisColumn":"","yAxisColumn":""},"historicalRainfallChart":{"filepath":"","groupByColumnToLayerMappedColumn":"","traceName":"","xAxisColumn":"","yAxisColumn":""},"simulationType":""},"staticThresholdLines":{"lines":[],"shouldHaveStaticThresholdLines":false},"statistics":"count-records","textInfoType":"label+value+percent","textPosition":"inside","thresholdLine":{"label":"","shouldHaveThresholdLine":false,"suffixPostValue":"","valueColumn":"","valueData":""},"timeSeriesFormData":{"groupByColumn":"","selectedGroupByColumnValues":[],"skipNRows":0,"xAxisColumn":"","yAxisColumns":[]},"trendline":{"shouldHaveTrendline":false,"trendlineType":""},"uploadedFileUrl":"","xAxis":{"label":""},"yAxis":{"label":""}},"id":"chart-widget-new","isModal":false}},{"name":"TableWidget","props":{"isModal":false,"tableFormValues":{"chartLabel":"","dataSource":"existing-project-layer","interactivePanelOnSelectionAction":"","interactivePanelOnSelectionAreFeaturesMultiSelect":false,"layerId":"","noDataMessage":"","projectId":"","tableColumnSortBy":"NEER_UNIQUE_FID","tableColumnsSortOrder":"ASC","tableColumnsVisibility":{},"tableRichTextSettings":{"cellOnSelectionStyles":{"backgroundColor":"","borderColor":"","borderSize":"","color":"","fontSize":"","fontWeight":""},"cellStyles":{"backgroundColor":"","borderColor":"","borderSize":"","color":"","fontSize":"","fontWeight":""},"headerStyles":{"backgroundColor":"","borderColor":"","borderSize":"","color":"","fontSize":"","fontWeight":""}}}}},{"name":"IndicatorWidget","props":{"indicatorFormValues":{"chartMode":"gauge+number","indicatorLabel":"","layerId":"","projectId":"","property":"","range":{"end":{"fixedMaxValue":1000.0,"property":"","statistics":"","type":"fixed"},"start":{"fixedMinValue":0.0,"property":"","statistics":"","type":"fixed"}},"statistics":""},"isModal":false,"title":"NeerAI"}},{"name":"InteractivePanelWidget","props":{"interactivePanelFormValues":{"areFeaturesMultiSelect":false,"mapLayersAttributesVisibilityAndOrderData":[],"panelSizes":[45,55],"projectId":"","shouldExpandUnhiddenLayerStyles":false,"shouldHaveLayersAttributesVisibilities":false,"shouldSaveBoundingBox":false,"shouldShowMapAnnotations":false,"tabs":[]},"isModal":false,"title":"NeerAI-interactive-panel"}},{"name":"SelectDropdownWidget","props":{"isModal":false,"selectDropdownFormValues":{"areFeaturesMultiSelect":false,"layerId":"","optionHideSecondaryWhenEmpty":true,"optionSecondaryContentMode":"column-value","optionSecondaryStaticText":"","optionShowSecondaryInBrackets":true,"projectId":"","selectDropdownLabel":"","selectDropdownLayerColumn":"","selectDropdownSecondaryLayerColumn":"","selectedDropdownLayerColumnValues":[],"selectedInferenceParentIds":[],"shouldShowProjectInferencesInDropdown":false},"title":"NeerAI"}},{"name":"FooterWidget","props":{"bgColor":"","isModal":false,"logoUrl":"","secondLogoUrl":"","subtitle":"","title":""}}],"properties":{"name":{"enum":["HeaderWidget","TextWidget","FeatureInfoWidget","ProjectMapWidget","EmbedWidget","KPIWidget","ChartWidget","TableWidget","IndicatorWidget","InteractivePanelWidget","SelectDropdownWidget","FooterWidget"],"type":"string"},"props":{"properties":{"chartFormValues":{"properties":{"statistics":{"enum":["count-records","count-empty-records","count-null-records","summ-records","min-records","max-records","avg-records","stdDev-records"],"type":"string"}},"type":"object"},"indicatorFormValues":{"properties":{"range":{"properties":{"end":{"properties":{"statistics":{"enum":["","count-records","count-empty-records","count-null-records","summ-records","min-records","max-records","avg-records","stdDev-records"],"type":"string"}},"type":"object"},"start":{"properties":{"statistics":{"enum":["","count-records","count-empty-records","count-null-records","summ-records","min-records","max-records","avg-records","stdDev-records"],"type":"string"}},"type":"object"}},"type":"object"},"statistics":{"enum":["","count-records","count-empty-records","count-null-records","summ-records","min-records","max-records","avg-records","stdDev-records"],"type":"string"}},"type":"object"},"kpiFormValues":{"properties":{"statistics":{"enum":["","count-records","count-empty-records","count-null-records","summ-records","min-records","max-records","avg-records","stdDev-records"],"type":"string"}},"type":"object"}},"type":"object"}},"required":["name","props"],"type":"object"},"x":{"description":"The tile's column, 0-11. Send x, y, w and h together, or none.","maximum":11,"minimum":0,"type":"integer"},"y":{"description":"The tile's row, 0-11.","maximum":11,"minimum":0,"type":"integer"}},"required":["op","id"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"},"was":{"description":"The dashboard's `version` as read. If the layout changed since, the edit is refused.","pattern":"^[0-9a-f]{64}$","type":"string"}},"required":["was","ops"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save dashboard layout","tags":["Dashboards"]}},"/dashboards/{dashboardId}/grants/{userId}":{"delete":{"description":"Stops sharing a dashboard with someone. `userId` is from `GET /dashboards/{dashboardId}/people` (`named`).","operationId":"dashboard.share.grant.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The user's id.","in":"path","name":"userId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop sharing a dashboard with someone","tags":["Dashboards"]},"patch":{"description":"Changes someone's role on a dashboard. `userId` is from `GET /dashboards/{dashboardId}/people` (`named`).","operationId":"dashboard.share.grant.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The user's id.","in":"path","name":"userId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"grant":"editor"},"schema":{"additionalProperties":false,"properties":{"grant":{"description":"viewer can open the dashboard. editor can also change its details and tiles.","enum":["viewer","editor"],"title":"Access","type":"string"}},"required":["grant"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change what someone may do on a dashboard","tags":["Dashboards"]}},"/dashboards/{dashboardId}/invitations":{"post":{"description":"Invites someone to a dashboard as a viewer or editor, by the email they use for NEER. The invitation lasts 14 days. Returns 422 if no NEER account uses the email.","operationId":"dashboard.share.invite","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"email":"pat@example.com","grant":"viewer"},"schema":{"additionalProperties":false,"properties":{"email":{"description":"The email of an existing NEER account, matched without regard to case.","maxLength":320,"minLength":3,"title":"Email","type":"string"},"grant":{"description":"viewer can open the dashboard. editor can also change its details and tiles.","enum":["viewer","editor"],"title":"Access","type":"string"}},"required":["email","grant"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Invite someone to a dashboard","tags":["Dashboards"]}},"/dashboards/{dashboardId}/invitations/accept":{"post":{"description":"Accepts your invitation to a dashboard. Invitations last 14 days.","operationId":"dashboard.invitation.accept","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{},"schema":{"additionalProperties":false,"properties":{"token":{"description":"The token from the invitation email's link. Omitted, your newest live invitation to this dashboard is accepted.","maxLength":128,"minLength":8,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Accept a dashboard invitation","tags":["Dashboards"]}},"/dashboards/{dashboardId}/invitations/cancel":{"post":{"description":"Cancels a dashboard invitation. Send the email as `GET /dashboards/{dashboardId}/people` lists it.","operationId":"dashboard.share.invite.cancel","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"email":"pat@example.com"},"schema":{"additionalProperties":false,"properties":{"email":{"description":"The invitation's email, exactly as dashboard.share.people lists it.","maxLength":320,"minLength":3,"type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Cancel a dashboard invitation","tags":["Dashboards"]}},"/dashboards/{dashboardId}/invitations/resend":{"post":{"description":"Emails a dashboard invitation again with a new link, valid for another 14 days.","operationId":"dashboard.share.invite.resend","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"email":"pat@example.com"},"schema":{"additionalProperties":false,"properties":{"email":{"description":"The invitation's email, exactly as dashboard.share.people lists it.","maxLength":320,"minLength":3,"type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Resend a dashboard invitation","tags":["Dashboards"]}},"/dashboards/{dashboardId}/leave":{"post":{"description":"Removes your own access to a dashboard shared with you. Returns 422 if your access comes from your team.","operationId":"dashboard.leave","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Leave a dashboard","tags":["Dashboards"]}},"/dashboards/{dashboardId}/links":{"get":{"description":"Returns the dashboard's links, at most one for each restriction (viewer, commenter, editor), with their tokens. Never cached and never sent as a referrer. Only the team's owners and admins, or a personal dashboard's owner, can read this.","operationId":"dashboard.share.link.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLinks"}}},"description":"The dashboard's links"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List dashboard share links","tags":["Dashboards"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Creates a share link to a dashboard that expires after `days` (default 30), or never with `neverExpires`. Viewer links open without an account; commenter and editor links need sign-in. One live link per role (422 while one is active). Read the link's address with `GET /dashboards/{dashboardId}/links`.","operationId":"dashboard.share.link.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"days":30,"restriction":"viewer"},"schema":{"additionalProperties":false,"properties":{"days":{"description":"Days until the link expires. Default 30. Leave out when the link never expires.","enum":[7,30,90],"title":"Expires in (days)","type":"integer"},"neverExpires":{"description":"Whether the link works until it is revoked. Off when not given; days is then used.","title":"Never expires","type":"boolean"},"restriction":{"description":"A viewer link opens without an account. A commenter or editor link asks its holder to sign in, and grants their account that access. Default viewer.","enum":["viewer","commenter","editor"],"title":"Who the link lets in","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make a dashboard viewer link","tags":["Dashboards"]}},"/dashboards/{dashboardId}/links/revoke":{"post":{"description":"Turns off a dashboard's viewer, commenter or editor link. Access already granted through the link stays.","operationId":"dashboard.share.link.revoke","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"restriction":"viewer"},"schema":{"additionalProperties":false,"properties":{"restriction":{"description":"Which link to revoke: viewer, commenter or editor.","enum":["viewer","commenter","editor"],"type":"string"}},"required":["restriction"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Revoke a dashboard link","tags":["Dashboards"]}},"/dashboards/{dashboardId}/people":{"get":{"description":"The dashboard's team, the people it's shared with and their roles, and its invitations. Owners and admins only.","operationId":"dashboard.share.people","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/People"}}},"description":"The dashboard's people"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List dashboard people","tags":["Dashboards"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/dashboards/{dashboardId}/restore":{"post":{"description":"Restores a dashboard from the trash.","operationId":"dashboard.restore","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Restore dashboard","tags":["Dashboards"]}},"/dashboards/{dashboardId}/sources":{"get":{"description":"Simulations and forecasts a dashboard's tiles can show instead of the latest data. Pass one's `id` as `source` in `GET /dashboards/{dashboardId}/tiles/{tileId}/data`.","operationId":"dashboard.sources","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DashboardSource"},"type":"array"}}},"description":"The sources, newest first"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List dashboard sources","tags":["Dashboards"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/dashboards/{dashboardId}/tiles/{tileId}/data":{"get":{"description":"The values one dashboard tile shows. `tileId` is from `GET /dashboards/{dashboardId}`. `kind` says the shape: KPI, indicator, table page or chart.","operationId":"dashboard.tile.data","parameters":[{"description":"A table's page, counting from 0. Default 0.","in":"query","name":"page","schema":{"minimum":0,"type":"integer"}},{"description":"Rows per page for a table. Default 10.","in":"query","name":"pageSize","schema":{"enum":[10,25,50,100],"type":"integer"}},{"description":"The data source for the dashboard's layers: latest (the default), own, simulation:<id>, forecast:<id> or sensor:<id>.","in":"query","name":"source","schema":{"maxLength":60,"pattern":"^(latest|own|(simulation|forecast|sensor):[0-9a-fA-F-]{36})$","type":"string"}},{"description":"A time series chart's group to draw instead of the one saved in the tile.","in":"query","name":"group","schema":{"maxLength":500,"type":"string"}},{"description":"A forecast chart's window, back from the forecast's start. Default 36h.","in":"query","name":"window","schema":{"enum":["36h","7d","14d","1M","6M","1Y","All"],"type":"string"}},{"description":"Whether a Storm Watch chart includes the gauge's rain. Default false.","in":"query","name":"rain","schema":{"type":"boolean"}},{"description":"The selected features, comma-separated. Charts in the tile's tab draw these.","in":"query","name":"fids","schema":{"maxLength":2000,"type":"string"}},{"description":"The forecast a forecast chart in the tab reads. Default is the location's latest.","in":"query","name":"run","schema":{"format":"uuid","type":"string"}},{"description":"A Monitoring chart's source header, the network its sensors are from (iot-ads, iot-fcs…). Default is every source's.","in":"query","name":"header","schema":{"maxLength":40,"pattern":"^iot-[a-z-]+$","type":"string"}},{"description":"The sensor picked in a Monitoring panel, where it is on the map: <layerId>:<fid>. Default is the sensor whose forecast ran last.","in":"query","name":"sensor","schema":{"maxLength":48,"pattern":"^[0-9a-fA-F-]{36}:[0-9]{1,10}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardTileData"}}},"description":"The tile's data"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get dashboard tile data","tags":["Dashboards"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"tileId","required":true,"schema":{"maxLength":200,"type":"string"}}]},"/dashboards/{dashboardId}/trash":{"post":{"description":"Moves a dashboard to the trash. Bring it back with `POST /dashboards/{dashboardId}/restore`.","operationId":"dashboard.trash","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The dashboard's id.","in":"path","name":"dashboardId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move dashboard to trash","tags":["Dashboards"]}},"/deliveries":{"get":{"description":"Deliveries brought in with `POST /deliveries`, newest first, up to 50.\n","operationId":"delivery.list","parameters":[{"description":"The project's id. `GET /projects` lists them.","in":"query","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectDelivery"},"type":"array"}}},"description":"The deliveries"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List deliveries","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Copies a Dropbox or OneDrive folder, or files picked from Google Drive, into the project, with zips opened. For contractors' inspection deliveries. Follow `created` with `GET /deliveries`. Connect the drive in the app first.","operationId":"drive.folder.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"folderId":"/deliveries/2026 cctv","name":"2026 CCTV delivery","path":"/Deliveries/2026 CCTV","projectId":"00000000-0000-0000-0000-000000000001","provider":"dropbox"},"schema":{"additionalProperties":false,"properties":{"driveId":{"description":"OneDrive only: the folder's `driveId` from drive.browse.","maxLength":500,"title":"OneDrive's drive","type":["string","null"]},"files":{"description":"Google Drive only, and required there: the files picked with Google Picker, each its `fileId`, `name` and `size` in bytes. Up to 2,000.","items":{"additionalProperties":false,"properties":{"fileId":{"maxLength":1000,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"size":{"minimum":0,"type":["integer","null"]}},"required":["fileId","name"],"type":"object"},"maxItems":2000,"title":"Files","type":"array"},"folderId":{"description":"Dropbox and OneDrive: the folder's `id` from drive.browse, brought in with all its subfolders. Left out, the drive's root.","maxLength":1000,"title":"Folder","type":["string","null"]},"name":{"description":"The folder's name, or what the files picked are called.","maxLength":255,"minLength":1,"title":"Name","type":"string"},"path":{"description":"Dropbox: the folder's `path` from drive.browse, read when folderId is left out, and what the files' paths are taken below. OneDrive: not needed.","maxLength":2000,"title":"Path","type":["string","null"]},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"provider":{"enum":["google_drive","dropbox","onedrive"],"title":"Drive","type":"string"}},"required":["provider","name","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Bring in a folder from a drive","tags":["Layers & data"]}},"/deliveries/file":{"post":{"description":"Imports one file from Google Drive, Dropbox or OneDrive. Connect the drive in the app first. Pick a Dropbox or OneDrive file from `POST /drives/browse`. Follow `created` in `GET /projects/{projectId}/contents` (`imports`).","operationId":"drive.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"fileId":"/deliveries/mains.gpkg","name":"mains.gpkg","projectId":"00000000-0000-0000-0000-000000000001","provider":"dropbox","size":5242880},"schema":{"additionalProperties":false,"properties":{"driveId":{"description":"OneDrive only: the file's `driveId` from drive.browse.","maxLength":500,"title":"OneDrive's drive","type":["string","null"]},"fileId":{"description":"The file's id at the drive: a file's `id` from drive.browse for Dropbox or OneDrive, or the id Google Picker returns.","maxLength":1000,"minLength":1,"title":"File","type":"string"},"name":{"description":"The file's name with its extension, which says what it becomes, as for upload.start. No slashes.","maxLength":255,"minLength":1,"title":"Name","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"provider":{"enum":["google_drive","dropbox","onedrive"],"title":"Drive","type":"string"},"size":{"description":"The file's size in bytes, as drive.browse lists it. Storage for it is held while it downloads; left out, 3 GiB is held.","minimum":0,"title":"Size","type":["integer","null"]}},"required":["provider","fileId","name","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import a file from a drive","tags":["Layers & data"]}},"/deliveries/upload":{"post":{"description":"Sends a layer's or a raster's file to your connected Google Drive, Dropbox or OneDrive: a layer's original, GeoJSON, PMTiles, Parquet or FlatGeobuf, a raster's original. Copied by the server in parts, to the folder named or the drive's root. Once there, it's the drive's.","operationId":"drive.upload","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"driveId":{"description":"OneDrive only: the folder's driveId from drive.browse.","maxLength":500,"title":"OneDrive's drive","type":["string","null"]},"folderId":{"description":"Google Drive and OneDrive: the folder's id (OneDrive's from drive.browse). Left out, the drive's root.","maxLength":1000,"title":"Folder","type":["string","null"]},"kind":{"default":"original","description":"A layer's file as layer_file_list names it: original, geojson, pmtiles, parquet or flatgeobuf. A raster's is its original.","enum":["original","geojson","pmtiles","parquet","flatgeobuf"],"title":"File","type":"string"},"layerId":{"description":"The layer whose file is sent. Give this or rasterId.","format":"uuid","title":"Layer","type":"string"},"path":{"description":"Dropbox: the folder's path, as /Reports. Left out, the root.","maxLength":2000,"title":"Path","type":["string","null"]},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"provider":{"enum":["google_drive","dropbox","onedrive"],"title":"Drive","type":"string"},"rasterId":{"description":"The raster whose original file is sent.","format":"uuid","title":"Raster","type":"string"}},"required":["provider","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Send to a drive","tags":["Layers & data"]}},"/drives":{"get":{"description":"Whether Google Drive, Dropbox and OneDrive are available and connected.","operationId":"drive.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveConnections"}}},"description":"The drives"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List drives","tags":["Layers & data"]}},"/drives/browse":{"post":{"description":"One Dropbox or OneDrive folder's subfolders and importable files. Send `provider`, and a folder `id` (and `driveId` for OneDrive), or neither for the root. Up to 2,000 entries.","operationId":"drive.browse","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"driveId":{"description":"OneDrive: the folder's `driveId` from an earlier listing. Left out, your own drive.","type":["string","null"]},"id":{"description":"A folder's `id` from an earlier listing. Left out, the drive's root.","type":["string","null"]},"kinds":{"description":"The extensions of the files to list, without the dot. Left out, the files the layer importer takes.","items":{"maxLength":12,"type":"string"},"maxItems":30,"type":"array"},"path":{"description":"Dropbox: the folder's path, read when `id` is left out. OneDrive: the folder's `path` from an earlier listing, used only to build the listed entries' paths.","type":["string","null"]},"provider":{"description":"The drive to list.","enum":["dropbox","onedrive"],"type":"string"}},"required":["provider"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveListing"}}},"description":"The folder"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"502":{"$ref":"#/components/responses/Failed"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List drive files","tags":["Layers & data"]}},"/engines":{"get":{"description":"Each engine and the versions you can run, oldest first, with the default. Preview versions\nrun only when named in `engineVersion`.\n","operationId":"engine.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Engine"},"type":"array"}}},"description":"Each engine with a version to run"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List engines","tags":["Model runs"]}},"/field-maps":{"post":{"description":"Creates a field map in the project. You choose its `id`. It starts off: add editable layers and fields, then turn it on with `POST /field-maps/{fieldMapId}/switch`.","operationId":"fieldmap.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"id":"00000000-0000-0000-0000-000000000001","name":"Hydrant inspections","projectId":"00000000-0000-0000-0000-0000000000a1","referenceMode":"all_other_layers"},"schema":{"additionalProperties":false,"properties":{"description":{"maxLength":1000,"title":"Description","type":["string","null"]},"id":{"description":"The new field map's id, a UUID you generate. Reusing one returns 409.","format":"uuid","type":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"referenceMode":{"description":"Which other layers technicians see for context. all_other_layers (the default): every live layer of the project that isn't editable. specific_layers: only those added with fieldmap.reference.add. none: no reference layers.","enum":["all_other_layers","specific_layers","none"],"title":"Reference layers","type":"string"}},"required":["id","name","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New field map","tags":["Field maps"]}},"/field-maps/{fieldMapId}":{"get":{"description":"Returns a field map, its editable layers and forms, and reference layers. Its ids are the ones field map actions take.","operationId":"fieldmap.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldMap"}}},"description":"The field map"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get field map","tags":["Field maps"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}}],"patch":{"description":"Changes a field map's name, description or reference mode. Send each current value in `was` (409 if it changed since).","operationId":"fieldmap.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"set":{"referenceMode":"specific_layers"},"was":{"referenceMode":"all_other_layers"}},"schema":{"additionalProperties":false,"properties":{"set":{"additionalProperties":false,"description":"The details to change, at least one: `name`, `description` (null or blank clears it) or `referenceMode` (see `POST /field-maps`).","minProperties":1,"properties":{"description":{"maxLength":1000,"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"referenceMode":{"enum":["all_other_layers","specific_layers","none"],"type":"string"}},"type":"object"},"was":{"additionalProperties":true,"description":"Each key in `set` with its value as you read it from fieldmap.get, for example {\"name\": \"Hydrant survey\"}. Required for every key in `set`. A value that changed since returns 409.","type":"object"}},"required":["set","was"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit field map","tags":["Field maps"]}},"/field-maps/{fieldMapId}/archive":{"post":{"description":"Archives a field map. It leaves technicians' devices; its submissions stay.","operationId":"fieldmap.archive","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Archive field map","tags":["Field maps"]}},"/field-maps/{fieldMapId}/attributes":{"post":{"description":"Adds a field to the end of an editable layer's form. You choose its `id`. `attributeKey` must be unused on that layer. Up to 200 fields per form.","operationId":"fieldmap.attribute.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"attribute":{"attributeKey":"condition","dataType":"choice","helpText":"As found on site","label":"Condition","options":["Good","Fair","Poor"],"required":true},"editableLayerId":"00000000-0000-0000-0000-000000000003","id":"00000000-0000-0000-0000-000000000007"},"schema":{"additionalProperties":false,"properties":{"attribute":{"additionalProperties":false,"description":"The form field. `attributeKey` is the feature attribute the answer is stored under. `label` is what technicians see, `helpText` an optional hint. `required` defaults to false. `options` lists the choices for a choice or multiselect field (at least one) and is ignored for other types. Text is trimmed.","properties":{"attributeKey":{"maxLength":100,"minLength":1,"type":"string"},"dataType":{"enum":["text","textarea","number","integer","boolean","choice","multiselect","date","datetime","media"],"type":"string"},"helpText":{"maxLength":300,"type":["string","null"]},"label":{"maxLength":200,"minLength":1,"type":"string"},"options":{"items":{"maxLength":200,"type":"string"},"maxItems":100,"type":["array","null"]},"required":{"type":"boolean"}},"required":["attributeKey","label","dataType"],"type":"object"},"editableLayerId":{"description":"The editable layer's id, from fieldmap.get.","format":"uuid","type":"string"},"id":{"description":"The new field's id, a UUID you generate.","format":"uuid","type":"string"}},"required":["editableLayerId","id","attribute"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add form field","tags":["Field maps"]}},"/field-maps/{fieldMapId}/attributes/reorder":{"post":{"description":"Reorders an editable layer's form fields. `order` must list every field id exactly once.","operationId":"fieldmap.attributes.reorder","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"editableLayerId":"00000000-0000-0000-0000-000000000003","order":["00000000-0000-0000-0000-000000000008","00000000-0000-0000-0000-000000000007"]},"schema":{"additionalProperties":false,"properties":{"editableLayerId":{"format":"uuid","type":"string"},"order":{"description":"Every field id of the layer's form, from fieldmap.get, in the new order.","items":{"format":"uuid","type":"string"},"maxItems":200,"type":"array","uniqueItems":true}},"required":["editableLayerId","order"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Reorder form","tags":["Field maps"]}},"/field-maps/{fieldMapId}/attributes/{attributeId}":{"delete":{"description":"Removes a field from its form. Answers already sent keep it.","operationId":"fieldmap.attribute.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The attribute's id.","in":"path","name":"attributeId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete form field","tags":["Field maps"]},"patch":{"description":"Replaces a form field. Send the field as `GET /field-maps/{fieldMapId}` returned it as `was` (409 if it changed since). Its `dataType` stays as it is (422 otherwise): add a new field for another type.","operationId":"fieldmap.attribute.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The attribute's id.","in":"path","name":"attributeId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"attribute":{"attributeKey":"condition","dataType":"choice","helpText":"As found on site","label":"Condition","options":["Good","Fair","Poor","Failed"],"required":true},"was":{"attributeKey":"condition","dataType":"choice","helpText":"As found on site","label":"Condition","options":["Good","Fair","Poor"],"required":true}},"schema":{"additionalProperties":false,"properties":{"attribute":{"additionalProperties":false,"description":"The form field. `attributeKey` is the feature attribute the answer is stored under. `label` is what technicians see, `helpText` an optional hint. `required` defaults to false. `options` lists the choices for a choice or multiselect field (at least one) and is ignored for other types. Text is trimmed.","properties":{"attributeKey":{"maxLength":100,"minLength":1,"type":"string"},"dataType":{"enum":["text","textarea","number","integer","boolean","choice","multiselect","date","datetime","media"],"type":"string"},"helpText":{"maxLength":300,"type":["string","null"]},"label":{"maxLength":200,"minLength":1,"type":"string"},"options":{"items":{"maxLength":200,"type":"string"},"maxItems":100,"type":["array","null"]},"required":{"type":"boolean"}},"required":["attributeKey","label","dataType"],"type":"object"},"was":{"additionalProperties":false,"description":"The field as you read it: attributeKey, label, helpText, dataType, required and options, as fieldmap.get returns them.","properties":{"attributeKey":{"maxLength":100,"minLength":1,"type":"string"},"dataType":{"enum":["text","textarea","number","integer","boolean","choice","multiselect","date","datetime","media"],"type":"string"},"helpText":{"maxLength":300,"type":["string","null"]},"label":{"maxLength":200,"minLength":1,"type":"string"},"options":{"items":{"maxLength":200,"type":"string"},"maxItems":100,"type":["array","null"]},"required":{"type":"boolean"}},"required":["attributeKey","label","dataType"],"type":"object"}},"required":["attribute","was"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit form field","tags":["Field maps"]}},"/field-maps/{fieldMapId}/duplicate":{"post":{"description":"Copies a field map with its layers and forms. You choose the copy's `id`. The copy is on at once.","operationId":"fieldmap.duplicate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"id":"00000000-0000-0000-0000-000000000002"},"schema":{"additionalProperties":false,"properties":{"id":{"description":"The copy's id, a UUID you generate.","format":"uuid","type":"string"}},"required":["id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Duplicate field map","tags":["Field maps"]}},"/field-maps/{fieldMapId}/layers":{"post":{"description":"Makes a project layer editable on a field map, with an empty form. You choose its `id`, used as `editableLayerId` by other field map actions.","operationId":"fieldmap.layer.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"id":"00000000-0000-0000-0000-000000000003","layerId":"00000000-0000-0000-0000-000000000004"},"schema":{"additionalProperties":false,"properties":{"id":{"description":"The new editable layer's id, a UUID you generate.","format":"uuid","type":"string"},"layerId":{"description":"The project layer to make editable. It must be a live layer of the field map's project.","format":"uuid","type":"string"}},"required":["id","layerId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add editable layer","tags":["Field maps"]}},"/field-maps/{fieldMapId}/layers/{editableLayerId}":{"delete":{"description":"Removes an editable layer and its form from a field map. `editableLayerId` is from `GET /field-maps/{fieldMapId}`, not the project layer's id.","operationId":"fieldmap.layer.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The editable layer's id.","in":"path","name":"editableLayerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove editable layer","tags":["Field maps"]},"patch":{"description":"Sets whether technicians can move or redraw an editable layer's features. `editableLayerId` is from `GET /field-maps/{fieldMapId}`.","operationId":"fieldmap.layer.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The editable layer's id.","in":"path","name":"editableLayerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"allowGeometryEdit":true},"schema":{"additionalProperties":false,"properties":{"allowGeometryEdit":{"description":"true lets technicians move and redraw features; false limits them to the form. New editable layers start false.","type":"boolean"}},"required":["allowGeometryEdit"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set geometry editing","tags":["Field maps"]}},"/field-maps/{fieldMapId}/reference-layers":{"post":{"description":"Shows a project layer on a field map for reference only. The field map's `referenceMode` must be `specific_layers`. You choose its `id`.","operationId":"fieldmap.reference.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"id":"00000000-0000-0000-0000-000000000005","layerId":"00000000-0000-0000-0000-000000000006"},"schema":{"additionalProperties":false,"properties":{"id":{"description":"The new reference layer's id, a UUID you generate.","format":"uuid","type":"string"},"layerId":{"description":"A live layer of the field map's project.","format":"uuid","type":"string"}},"required":["id","layerId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add reference layer","tags":["Field maps"]}},"/field-maps/{fieldMapId}/reference-layers/{referenceLayerId}":{"delete":{"description":"Removes a reference layer from a field map. `referenceLayerId` is from `GET /field-maps/{fieldMapId}`, not the project layer's id.","operationId":"fieldmap.reference.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The reference layer's id.","in":"path","name":"referenceLayerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove reference layer","tags":["Field maps"]}},"/field-maps/{fieldMapId}/submissions":{"get":{"description":"Submissions to a field map, newest first, 20 per page, with their values and review status.","operationId":"fieldmap.submission.list","parameters":[{"description":"The last page's `next`. Leave it out for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next":{"description":"Send it as `cursor` for the next page. Null on the last page.","type":["string","null"]},"page":{"minimum":0,"type":"integer"},"pageSize":{"minimum":1,"type":"integer"},"rows":{"items":{"properties":{"attributeChanges":{"additionalProperties":true,"description":"What the technician sent, stored as sent.","type":"object"},"by":{"properties":{"email":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]}},"required":["id","name","email"],"type":"object"},"clientSavedAt":{"type":"string"},"clientSubmittedAt":{"type":"string"},"corrected":{"additionalProperties":{"properties":{"at":{"format":"date-time","type":"string"},"by":{"type":["string","null"]}},"required":["by","at"],"type":"object"},"description":"Each key changed by an edit since it was sent, and not undone, with who changed it and when.","type":"object"},"createdAt":{"type":"string"},"deviceId":{"type":"string"},"featureFid":{"type":"integer"},"id":{"format":"uuid","type":"string"},"label":{"description":"The feature's name-like attribute, else its fid.","type":"string"},"layerId":{"format":"uuid","type":"string"},"newGeometry":{"type":["string","null"]},"now":{"additionalProperties":true,"description":"The current values of the same keys on the feature, including a supervisor's correction or any later edit.","type":"object"},"review":{"description":"Who last reviewed it, when, and the note sent back. Null until reviewed.","oneOf":[{"properties":{"at":{"type":"string"},"by":{"properties":{"id":{"format":"uuid","type":["string","null"]},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"},"note":{"type":["string","null"]}},"required":["by","at","note"],"type":"object"},{"type":"null"}]},"status":{"type":"string"},"submissionNumber":{"type":["string","null"]}},"required":["id","submissionNumber","status","layerId","featureFid","label","by","deviceId","attributeChanges","now","corrected","newGeometry","clientSavedAt","clientSubmittedAt","createdAt","review"],"type":"object"},"type":"array"},"statusCounts":{"properties":{"approved":{"minimum":0,"type":"integer"},"rejected":{"minimum":0,"type":"integer"},"submitted":{"minimum":0,"type":"integer"},"under_review":{"minimum":0,"type":"integer"}},"required":["submitted","under_review","approved","rejected"],"type":"object"},"total":{"description":"How many match `status`, or all when no status is given.","minimum":0,"type":"integer"}},"required":["rows","total","page","pageSize","statusCounts"],"type":"object"}}},"description":"A page of submissions"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"List field map submissions","tags":["Field maps"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only submissions with this status. Omitted, every status.","in":"query","name":"status","schema":{"$ref":"#/components/schemas/FieldMapSubmissionStatus"}}]},"/field-maps/{fieldMapId}/submissions/export":{"get":{"description":"Downloads a field map's submissions as CSV or a zipped shapefile. Up to 50,000 submissions.\n","operationId":"fieldmap.submission.export","parameters":[],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Export field map submissions","tags":["Field maps"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"csv for a CSV file, shapefile for a zipped shapefile.","in":"query","name":"format","required":true,"schema":{"enum":["csv","shapefile"],"type":"string"}}]},"/field-maps/{fieldMapId}/submissions/status":{"post":{"description":"Sets the review status of field map submissions: `approved`, `rejected`, `under_review`, or `submitted` to reopen. Ids are from `GET /field-maps/{fieldMapId}/submissions`.","operationId":"fieldmap.submissions.status","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"ids":["00000000-0000-0000-0000-000000000009"],"note":"Photo missing; please retake.","status":"rejected"},"schema":{"additionalProperties":false,"properties":{"ids":{"description":"Submission ids from fieldmap.submission.list, 1 to 100.","items":{"format":"uuid","type":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"note":{"description":"A note sent back with the review. Ignored when status is submitted.","maxLength":1000,"type":["string","null"]},"status":{"enum":["submitted","under_review","approved","rejected"],"type":"string"}},"required":["ids","status"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Review submissions","tags":["Field maps"]}},"/field-maps/{fieldMapId}/switch":{"post":{"description":"Turns a field map on or off for NEER Field. A new field map starts off.","operationId":"fieldmap.switch","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The field map's id.","in":"path","name":"fieldMapId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"on":true},"schema":{"additionalProperties":false,"properties":{"on":{"description":"true turns it on, false turns it off.","type":"boolean"}},"required":["on"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Turn field map on or off","tags":["Field maps"]}},"/flood/checkout":{"post":{"description":"A Stripe Checkout for one property's flood report, bought without an account or a key:\nthe marketing site's report page sends the buyer to `url`. Send a `location`, or an\n`address`, which is placed by geocoding. Only a location with modelled depth is sold.\n\nOnce paid, the report is made and mailed to the buyer, and Checkout returns them to the\nreport page with the session, which fetches it with `GET /flood/checkout/{sessionId}`.\n","operationId":"flood.checkout.start","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"An address in India, when there's no location.","maxLength":300,"type":"string"},"buyerReference":{"description":"The buyer's own reference, printed on the report.","maxLength":120,"type":"string"},"email":{"description":"Filled in on Checkout's page for the buyer.","maxLength":254,"type":"string"},"location":{"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"sessionId":{"type":"string"},"url":{"description":"Stripe Checkout's page.","format":"uri","type":"string"}},"required":["url","sessionId"],"type":"object"}}},"description":"The checkout"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"security":[],"summary":"Start a flood report checkout","tags":["Flood"]}},"/flood/checkout/preview":{"get":{"description":"Whether a location has a flood report to buy and, if so, its flood category and whether the 100-year flood reaches it. No key: the score and depth are what the report sells.","operationId":"flood.checkout.preview","parameters":[{"in":"query","name":"lat","required":true,"schema":{"type":"number"}},{"in":"query","name":"lon","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"atRisk":{"description":"Whether the 100-year flood reaches it.","type":"boolean"},"category":{"enum":["None","Minimal","Minor","Moderate","Major","Severe"],"type":"string"},"covered":{"type":"boolean"},"reason":{"description":"Why there's no report, when not covered.","enum":["outsideCoverage","noData"],"type":"string"}},"required":["covered"],"type":"object"}}},"description":"The preview"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"security":[],"summary":"Preview a location's flood report","tags":["Flood"]}},"/flood/checkout/{sessionId}":{"get":{"description":"A paid checkout's report: what it found, and the address of its PDF, good for an hour. Until the report is made, a few seconds after payment, `status` is `processing`; ask again.","operationId":"flood.checkout.get","parameters":[{"in":"path","name":"sessionId","required":true,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address":{"type":["string","null"]},"buyerReference":{"type":["string","null"]},"disclaimer":{"type":"string"},"generatedAt":{"type":"string"},"id":{"type":"string"},"location":{"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"type":"object"},"pdfUrl":{"format":"uri","type":"string"},"risk":{"$ref":"#/components/schemas/FloodPoint"},"status":{"enum":["processing","ready"],"type":"string"}},"required":["status"],"type":"object"}}},"description":"The report, or that it's still being made"},"402":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The checkout hasn't been paid"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"security":[],"summary":"Get a checkout's flood report","tags":["Flood"]}},"/flood/exposure":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"The buildings in an area of your own, a box or a GeoJSON polygon, by their 100-year flood\ndepth: India's building footprints from Overture Maps, sampled live against the atlas. Up\nto 1,500,000 buildings and five degrees by five; for more, ask for a state, district or\npincode. Roads and railways are in those reads.\n\nYour Flood plan needs exposure. Each request counts against your workspace's Flood\nallowance.\n","operationId":"flood.exposure.area","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bbox":{"description":"West, south, east and north, in degrees.","items":{"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"event":{"default":"100yr","enum":["2yr","5yr","10yr","25yr","50yr","100yr","500yr","1000yr"],"type":"string"},"geometry":{"description":"A GeoJSON Polygon or MultiPolygon, or a Feature of one. It wins over `bbox`.","type":"object"},"scenario":{"default":"current","enum":["current","2100-ssp245","2100-ssp585"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloodExposure"}}},"description":"The area's exposure"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/FloodAllowanceSpent"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a custom area's flood exposure","tags":["Flood"]}},"/flood/exposure/districts/{district}":{"get":{"description":"A district's buildings by 100-year flood depth, and its road and railway kilometres at risk.\n\nPrecomputed for the current 100-year layer; your Flood plan needs exposure by area. Each request counts against your\nworkspace's Flood allowance.\n","operationId":"flood.exposure.district.get","parameters":[{"description":"`state:district`, such as `bihar:supaul`, or the district alone where no other state has one by that name.","in":"path","name":"district","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/floodEvent"},{"$ref":"#/components/parameters/floodScenario"},{"description":"An asset value, for the 100-year modelled loss over the place's buildings.","in":"query","name":"value","schema":{"minimum":0,"type":"number"}},{"description":"The depth-damage curve for the damage ratio and loss.","in":"query","name":"curveId","schema":{"default":"asia_residential","enum":["asia_residential","asia_commercial","asia_industrial"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloodExposure"}}},"description":"The exposure"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/FloodAllowanceSpent"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a district's flood exposure","tags":["Flood"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/flood/exposure/pincodes/{pincode}":{"get":{"description":"A pincode's buildings by 100-year flood depth.\n\nPrecomputed for the current 100-year layer; your Flood plan needs exposure. Each request counts against your\nworkspace's Flood allowance.\n","operationId":"flood.exposure.pincode.get","parameters":[{"description":"The six-digit pincode.","in":"path","name":"pincode","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/floodEvent"},{"$ref":"#/components/parameters/floodScenario"},{"description":"An asset value, for the 100-year modelled loss over the place's buildings.","in":"query","name":"value","schema":{"minimum":0,"type":"number"}},{"description":"The depth-damage curve for the damage ratio and loss.","in":"query","name":"curveId","schema":{"default":"asia_residential","enum":["asia_residential","asia_commercial","asia_industrial"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloodExposure"}}},"description":"The exposure"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/FloodAllowanceSpent"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a pincode's flood exposure","tags":["Flood"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/flood/exposure/states":{"get":{"description":"The states and union territories the exposure reads have, their codes and names. Not counted.","operationId":"flood.exposure.state.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"states":{"items":{"properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"type":"object"},"type":"array"}},"required":["states"],"type":"object"}}},"description":"The states"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List the states with flood exposure","tags":["Flood"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/flood/exposure/states/{state}":{"get":{"description":"A state's buildings by 100-year flood depth, and its road and railway kilometres at risk.\n\nPrecomputed for the current 100-year layer; your Flood plan needs exposure by area. Each request counts against your\nworkspace's Flood allowance.\n","operationId":"flood.exposure.state.get","parameters":[{"description":"The state's code, such as `bihar`, from `GET /flood/exposure/states`.","in":"path","name":"state","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/floodEvent"},{"$ref":"#/components/parameters/floodScenario"},{"description":"An asset value, for the 100-year modelled loss over the place's buildings.","in":"query","name":"value","schema":{"minimum":0,"type":"number"}},{"description":"The depth-damage curve for the damage ratio and loss.","in":"query","name":"curveId","schema":{"default":"asia_residential","enum":["asia_residential","asia_commercial","asia_industrial"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloodExposure"}}},"description":"The exposure"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/FloodAllowanceSpent"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a state's flood exposure","tags":["Flood"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/flood/point":{"get":{"description":"The India Flood Atlas's modelled flood depth at a location in India, in metres, and the\nNEER Flood Score it gives, 0 to 100 (methodology at flood.neer.io/flood-score). A depth of\n0 is dry; a location the atlas doesn't cover is a 404.\n\nEach request counts against your workspace's Flood allowance, which renews on the 1st of\neach month (UTC). Your Flood plan decides the return periods and climate scenarios you can\nask for; only the current 100-year layer is published today.\n","operationId":"flood.point.get","parameters":[{"in":"query","name":"lat","required":true,"schema":{"maximum":38,"minimum":6,"type":"number"}},{"in":"query","name":"lon","required":true,"schema":{"maximum":98,"minimum":67,"type":"number"}},{"$ref":"#/components/parameters/floodEvent"},{"$ref":"#/components/parameters/floodScenario"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloodPoint"}}},"description":"The depth and score"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/FloodAllowanceSpent"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get flood depth and score at a location","tags":["Flood"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/flood/portfolio":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"The flood depth and NEER Flood Score of up to 5,000 assets in India, from the current\n100-year layer. Give an asset a `value` (sum insured or total insured value) for its\n100-year modelled loss through a depth-damage curve: the EU JRC's curves for Asia\n(`asia_residential` by default, `asia_commercial`, `asia_industrial`), or your own points.\n\nAssets close together are read at full resolution; a book spread across India is read from\na coarser layer of the atlas. An asset the atlas doesn't cover has `coverage: false`. The\nwhole request counts once against your workspace's Flood allowance.\n","operationId":"flood.portfolio","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloodPortfolioAsk"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FloodPortfolio"}}},"description":"Each asset's score, and a summary"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/FloodAllowanceSpent"},"403":{"$ref":"#/components/responses/Refused"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Score a portfolio of assets","tags":["Flood"]}},"/flood/reports":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"A two-page NEER Flood Report for a property in India, a PDF: its NEER Flood Score, 100-year\ndepth and 30-year chance, the flood over satellite imagery, and what it means. Send a\n`location`, or an `address`, which is placed by geocoding. The report is kept: its id is in\n`X-NEER-Report-Id`, and `GET /flood/reports/{reportId}` fetches it again.\n\nYour Flood plan needs reports. Each request counts against your workspace's Flood\nallowance.\n","operationId":"flood.report","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"An address in India, when there's no location.","maxLength":300,"type":"string"},"buyerReference":{"description":"Your own reference, such as a loan number, printed on the report.","maxLength":120,"type":"string"},"location":{"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"],"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"The report","headers":{"X-NEER-Flood-Score":{"description":"The NEER Flood Score.","schema":{"type":"integer"}},"X-NEER-Report-Id":{"description":"The report's id.","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/FloodAllowanceSpent"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make a property flood report","tags":["Flood"]}},"/flood/reports/{reportId}":{"get":{"description":"A report your workspace made: what it found, and the address of its PDF, good for an hour. Not counted.","operationId":"flood.report.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address":{"type":["string","null"]},"buyerReference":{"type":["string","null"]},"disclaimer":{"type":"string"},"generatedAt":{"type":"string"},"id":{"type":"string"},"location":{"properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"type":"object"},"pdfUrl":{"format":"uri","type":"string"},"risk":{"$ref":"#/components/schemas/FloodPoint"},"status":{"const":"ready","type":"string"}},"required":["id","generatedAt","location","risk","pdfUrl","status"],"type":"object"}}},"description":"The report"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a kept flood report","tags":["Flood"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"reportId","required":true,"schema":{"pattern":"^rep_[0-9a-f]{16}$","type":"string"}}]},"/flood/tiles/{event}/legend.json":{"get":{"description":"The depth bands, or the ramp's span, the tiles are drawn with.","operationId":"flood.tile.legend","parameters":[{"$ref":"#/components/parameters/floodTileEvent"},{"$ref":"#/components/parameters/floodScenario"},{"$ref":"#/components/parameters/floodColormap"},{"$ref":"#/components/parameters/floodTileToken"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The legend"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get the flood tiles' legend","tags":["Flood"]}},"/flood/tiles/{event}/legend.png":{"get":{"description":"The depth bands as a PNG, for a viewer that can't build a legend from the tiles: a QGIS print layout, an image beside a map.","operationId":"flood.tile.legend.image","parameters":[{"$ref":"#/components/parameters/floodTileEvent"},{"$ref":"#/components/parameters/floodScenario"},{"in":"query","name":"orientation","schema":{"default":"vertical","enum":["vertical","horizontal"],"type":"string"}},{"description":"A clear background instead of white.","in":"query","name":"transparent","schema":{"default":false,"type":"boolean"}},{"$ref":"#/components/parameters/floodTileToken"}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"The legend"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get the flood tiles' legend as an image","tags":["Flood"]}},"/flood/tiles/{event}/tilejson.json":{"get":{"description":"TileJSON 3.0 for a map library such as MapLibre or Leaflet: the tiles' address, carrying\nthe tile token it was asked with, their zooms and extent, and for the classed palette, the\nlegend.\n","operationId":"flood.tile.json","parameters":[{"$ref":"#/components/parameters/floodTileEvent"},{"$ref":"#/components/parameters/floodScenario"},{"$ref":"#/components/parameters/floodColormap"},{"$ref":"#/components/parameters/floodTileToken"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The TileJSON"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get the flood tiles' TileJSON","tags":["Flood"]}},"/flood/tiles/{event}/{z}/{x}/{y}":{"get":{"description":"One 256-pixel XYZ map tile of the 100-year flood depth, a PNG, classed into depth bands\nby default. Off the atlas, a 204. Use the address `GET /flood/tiles/{event}/tilejson.json`\ngives a map library rather than building it.\n\nSend an API key as usual, or, from a web page, a tile token as `?token=`: a tile token\nopens tiles alone and only from its sites, so it's safe in a page's code. Tiles don't count\nagainst your Flood allowance.\n","operationId":"flood.tile","parameters":[{"$ref":"#/components/parameters/floodTileEvent"},{"in":"path","name":"z","required":true,"schema":{"maximum":24,"minimum":0,"type":"integer"}},{"in":"path","name":"x","required":true,"schema":{"minimum":0,"type":"integer"}},{"in":"path","name":"y","required":true,"schema":{"minimum":0,"type":"integer"}},{"$ref":"#/components/parameters/floodScenario"},{"$ref":"#/components/parameters/floodColormap"},{"$ref":"#/components/parameters/floodTileToken"}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"The tile"},"204":{"description":"Off the atlas"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a flood depth map tile","tags":["Flood"]}},"/forecasts":{"get":{"description":"A model's scheduled forecasts, each with its 12 newest runs.\n","operationId":"model.forecast.list","parameters":[{"description":"The model's id. `GET /projects` lists them.","in":"query","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"forecasts":{"items":{"$ref":"#/components/schemas/ScheduledForecast"},"type":"array"},"mlFunctions":{"description":"The functions an ML forecast may call in this deployment, by name. Empty where none is set up.","items":{"type":"string"},"type":"array"},"postScripts":{"description":"The post-process scripts a forecast may run on each cycle's finished run, each with the inputs it asks for.","items":{"$ref":"#/components/schemas/PostScript"},"type":"array"},"preSteps":{"description":"The pre-process steps a forecast may apply to each cycle's run before it runs, each with the inputs it asks for.","items":{"$ref":"#/components/schemas/PreStep"},"type":"array"}},"required":["forecasts","postScripts","preSteps","mlFunctions"],"type":"object"}}},"description":"The forecasts"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List scheduled forecasts","tags":["Forecasts"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates a scheduled forecast for a model. Every parameter is optional; by default it runs every 6 hours. For EPANET and HEC-RAS models, only `source: ml` forecasts run. Each run is billed.","operationId":"model.forecast.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"enabled":true,"everyHours":6,"hindcastHours":24,"horizonHours":18,"name":"Six-hourly forecast"},"schema":{"additionalProperties":false,"properties":{"enabled":{"description":"Whether cycles run on schedule. Defaults to true when creating. When off, none starts on schedule; `POST /forecasts/{forecastId}/start` still starts one.","type":"boolean"},"engineVersion":{"description":"The engine version every cycle's run uses, from GET /engines. Only for a SWMM or EPANET model's own forecast. None uses the newest stable version offered. A preview is never the default.","maxLength":40,"type":["string","null"]},"everyHours":{"description":"How often a cycle starts, in hours. Defaults to 6 when creating.","enum":[1,3,6,12,24]},"hindcastHours":{"description":"Hours of radar rain before each cycle. Defaults to 24 when creating.","maximum":72,"minimum":0,"type":"integer"},"horizonHours":{"description":"Hours of forecast rain after each cycle. Defaults to 18 when creating.","maximum":48,"minimum":1,"type":"integer"},"ml":{"additionalProperties":false,"properties":{"functionName":{"description":"The linked ML model's function name. Required with `source: ml`. Only functions set up for this deployment are accepted; the refusal names them.","maxLength":140,"minLength":1,"type":"string"},"studio":{"additionalProperties":false,"description":"The model each cycle runs, from the project's team's AI Studio (`GET /projects/{projectId}/studio-models`); null or absent runs the weights the function already has. With latest or an alias, each cycle runs the version it names then.","properties":{"model":{"description":"A registered model's name.","maxLength":256,"minLength":1,"type":"string"},"version":{"description":"A version number such as 4, latest for the highest ready version, or an alias such as @champion.","pattern":"^([1-9][0-9]{0,8}|latest|@[A-Za-z0-9_-]{1,255})$","type":"string"}},"required":["model","version"],"type":["object","null"]}},"required":["functionName"],"type":["object","null"]},"modelId":{"description":"The model's id. `GET /models` lists them.","format":"uuid","type":"string"},"name":{"description":"When creating, defaults to Forecast, or ML forecast with source ml.","maxLength":120,"type":"string"},"planId":{"description":"The HEC-RAS plan the forecast is for, such as p01. Required for a HEC-RAS model's own forecast.","pattern":"^[pP][0-9]{2,3}$","type":["string","null"]},"post":{"additionalProperties":false,"description":"One of the `postScripts` from \\\n            `GET /forecasts` and its inputs, run on each cycle's finished run; null for none. The \\\n            script must run on the model's engine, and any layer it names must be the project's.","properties":{"inputs":{"type":"object"},"script":{"maxLength":80,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["script","inputs"],"type":["object","null"]},"pre":{"description":"Steps from the `preSteps` of \\\n            `GET /forecasts`, applied in order to each cycle's run before it runs; null for none. \\\n            Each step must run on the model's engine.","items":{"additionalProperties":false,"properties":{"inputs":{"type":"object"},"step":{"maxLength":80,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["step"],"type":"object"},"maxItems":8,"type":["array","null"]},"scenarioId":{"description":"The model scenario each cycle runs; it must be one of this model's. Base when none.","format":"uuid","type":["string","null"]},"source":{"description":"What each cycle runs: model (the default when creating), the model itself on the forecast rain; or ml, a linked ML model named in `ml`.","enum":["model","ml"]},"startAt":{"description":"When the schedule starts, such as 2026-11-16T06:00:00-06:00: its first cycle, then one every `everyHours` on the project's clock, so 6 AM stays 6 AM across daylight saving. A time already past starts at the next of those after now. Absent, cycles fall at 45 minutes past the UTC hours that are a multiple of `everyHours`, or keep the times they had.","format":"date-time","type":["string","null"]}},"required":["modelId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New forecast","tags":["Forecasts"]}},"/forecasts/{forecastId}":{"delete":{"description":"Deletes a model's scheduled forecast. Its runs stay.","operationId":"model.forecast.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The forecast, from `GET /forecasts`.","in":"path","name":"forecastId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete forecast","tags":["Forecasts"]},"patch":{"description":"Changes a model's scheduled forecast, or turns it on or off with `enabled`. Send only the fields to change.","operationId":"model.forecast.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The forecast, from `GET /forecasts`.","in":"path","name":"forecastId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"enabled":false},"schema":{"additionalProperties":false,"properties":{"enabled":{"description":"Whether cycles run on schedule. Defaults to true when creating. When off, none starts on schedule; `POST /forecasts/{forecastId}/start` still starts one.","type":"boolean"},"engineVersion":{"description":"The engine version every cycle's run uses, from GET /engines. Only for a SWMM or EPANET model's own forecast. None uses the newest stable version offered. A preview is never the default.","maxLength":40,"type":["string","null"]},"everyHours":{"description":"How often a cycle starts, in hours. Defaults to 6 when creating.","enum":[1,3,6,12,24]},"hindcastHours":{"description":"Hours of radar rain before each cycle. Defaults to 24 when creating.","maximum":72,"minimum":0,"type":"integer"},"horizonHours":{"description":"Hours of forecast rain after each cycle. Defaults to 18 when creating.","maximum":48,"minimum":1,"type":"integer"},"ml":{"additionalProperties":false,"properties":{"functionName":{"description":"The linked ML model's function name. Required with `source: ml`. Only functions set up for this deployment are accepted; the refusal names them.","maxLength":140,"minLength":1,"type":"string"},"studio":{"additionalProperties":false,"description":"The model each cycle runs, from the project's team's AI Studio (`GET /projects/{projectId}/studio-models`); null or absent runs the weights the function already has. With latest or an alias, each cycle runs the version it names then.","properties":{"model":{"description":"A registered model's name.","maxLength":256,"minLength":1,"type":"string"},"version":{"description":"A version number such as 4, latest for the highest ready version, or an alias such as @champion.","pattern":"^([1-9][0-9]{0,8}|latest|@[A-Za-z0-9_-]{1,255})$","type":"string"}},"required":["model","version"],"type":["object","null"]}},"required":["functionName"],"type":["object","null"]},"name":{"description":"When creating, defaults to Forecast, or ML forecast with source ml.","maxLength":120,"type":"string"},"planId":{"description":"The HEC-RAS plan the forecast is for, such as p01. Required for a HEC-RAS model's own forecast.","pattern":"^[pP][0-9]{2,3}$","type":["string","null"]},"post":{"additionalProperties":false,"description":"One of the `postScripts` from \\\n            `GET /forecasts` and its inputs, run on each cycle's finished run; null for none. The \\\n            script must run on the model's engine, and any layer it names must be the project's.","properties":{"inputs":{"type":"object"},"script":{"maxLength":80,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["script","inputs"],"type":["object","null"]},"pre":{"description":"Steps from the `preSteps` of \\\n            `GET /forecasts`, applied in order to each cycle's run before it runs; null for none. \\\n            Each step must run on the model's engine.","items":{"additionalProperties":false,"properties":{"inputs":{"type":"object"},"step":{"maxLength":80,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["step"],"type":"object"},"maxItems":8,"type":["array","null"]},"scenarioId":{"description":"The model scenario each cycle runs; it must be one of this model's. Base when none.","format":"uuid","type":["string","null"]},"source":{"description":"What each cycle runs: model (the default when creating), the model itself on the forecast rain; or ml, a linked ML model named in `ml`.","enum":["model","ml"]},"startAt":{"description":"When the schedule starts, such as 2026-11-16T06:00:00-06:00: its first cycle, then one every `everyHours` on the project's clock, so 6 AM stays 6 AM across daylight saving. A time already past starts at the next of those after now. Absent, cycles fall at 45 minutes past the UTC hours that are a multiple of `everyHours`, or keep the times they had.","format":"date-time","type":["string","null"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change forecast","tags":["Forecasts"]}},"/forecasts/{forecastId}/impact":{"patch":{"description":"Sets the buildings, streets, railroads and terrain that flood impact uses, for the project or for one forecast (`forecastId`). Null clears a value. Read them with `GET /projects/{projectId}/level-of-service`.","operationId":"project.flood.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"A HEC-RAS forecast, from model.forecast.list, to set its own layers. Without it, sets the project's.","in":"path","name":"forecastId","required":true,"schema":{"format":"uuid","title":"Forecast","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"minProperties":1,"properties":{"buildings":{"description":"A polygon layer of the project. Null clears it.","format":"uuid","title":"Buildings","type":["string","null"]},"flood":{"additionalProperties":false,"description":"The forecast's depths, in the project's units: the wet depth, the Minor, Moderate and Major bounds and the Record depth on a feature's maximum depth, and the smallest wet area kept. Null puts a default back. Only with forecastId.","properties":{"minIslandAcres":{"description":"Null puts the default back. In ac for a US project, ha for a metric one.","type":["number","null"]},"minorMaxFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"moderateMaxFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"recordMinFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"wetDepthFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]}},"title":"Depths","type":"object"},"rails":{"description":"A line layer of the project. Null clears it.","format":"uuid","title":"Rail lines","type":["string","null"]},"streets":{"description":"A line layer of the project. Null clears it.","format":"uuid","title":"Streets","type":["string","null"]},"terrain":{"description":"An elevation raster of the project, in a projected coordinate system, to use instead of the model's terrain. Null uses the model's terrain.","format":"uuid","title":"Terrain for impact","type":["string","null"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Flood impact layers","tags":["Forecasts"]}},"/forecasts/{forecastId}/start":{"post":{"description":"Runs a model's scheduled forecast now. Follow `run_id` in the change with `model.run.get`. A failed start still returns 200; check `status`. Billed like any run.","operationId":"model.forecast.start","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The forecast, from `GET /forecasts`.","in":"path","name":"forecastId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run forecast now","tags":["Forecasts"]}},"/generations":{"get":{"description":"Your workspace's models made outside any project with model.generate, newest first.\n","operationId":"generation.list","parameters":[{"description":"The last page's `next`. Leave it out for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"How many to return.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Generation"},"type":"array"},"next":{"description":"Send it as `cursor` for the next page. Null on the last page.","type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"The models"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List models made","tags":["System"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Makes a HEC-RAS, SWMM or EPANET model of an area with the model generator, outside any project, as WRM's POST /models/generate did. SWMM and EPANET lay a network to the buildings or parcels sent with POST /uploads. Paid from the workspace's wallet; track it with generation.get, which links the model's zip once made. Credit is spent once it starts.","operationId":"model.generate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"description":"A 2D HEC-RAS model of the area, from its terrain.","properties":{"area":{"additionalProperties":true,"description":"A GeoJSON Polygon or MultiPolygon geometry (not a Feature) in WGS84 (longitude, latitude). SWMM and EPANET build over its bounding box, at most half a degree (about 30 miles) on a side.","title":"Study area","type":"object"},"cellSizeFt":{"default":100,"description":"The 2D mesh's cell size, always in feet.","maximum":1000,"minimum":5,"title":"Cell size (ft)","type":"number"},"demResolutionM":{"default":10,"description":"HEC-RAS: the USGS 3DEP terrain fetched, in meters: 10 (default) or 1 where 3DEP has it. With cells of 100 ft or more, 1 m is written as 2 m terrain.","enum":[10,1],"title":"Terrain (m)","type":"integer"},"designStorms":{"default":["100yr"],"description":"NOAA Atlas 14 design storms, one plan each.","items":{"enum":["2yr","5yr","10yr","25yr","50yr","100yr","200yr","500yr","1000yr"],"type":"string"},"minItems":1,"title":"Design storms","type":"array","uniqueItems":true},"engine":{"const":"hecras","title":"Engine","type":"string"},"name":{"description":"What the model is called. Default Model.","maxLength":120,"title":"Name","type":"string"},"stormHours":{"default":24,"description":"Each design storm's length in hours. Default 24.","enum":[6,12,24],"title":"Storm length (h)","type":"integer"},"units":{"default":"US","description":"US (feet) or SI (meters). Default US.","enum":["US","SI"],"title":"Units","type":"string"}},"required":["engine","area"],"title":"HEC-RAS","type":"object"},{"additionalProperties":false,"description":"A SWMM network laid along the area's roads to its buildings or parcels.","properties":{"area":{"additionalProperties":true,"description":"A GeoJSON Polygon or MultiPolygon geometry (not a Feature) in WGS84 (longitude, latitude). SWMM and EPANET build over its bounding box, at most half a degree (about 30 miles) on a side.","title":"Study area","type":"object"},"buildings":{"additionalProperties":false,"description":"A file of building footprints the network reaches; SWMM and EPANET need this or parcels, sent with POST /uploads: GeoJSON, a GeoPackage or a zipped shapefile. Send the upload and the ETag of each part.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"Buildings","type":"object"},"distribution":{"default":"atlas14","description":"atlas14: the site's NOAA Atlas 14 temporal distribution. nrcs: the NRCS (SCS) type for the site.","enum":["atlas14","nrcs"],"title":"Rain distribution","type":"string"},"engine":{"const":"swmm","title":"Engine","type":"string"},"name":{"description":"What the model is called. Default Model.","maxLength":120,"title":"Name","type":"string"},"parcels":{"additionalProperties":false,"description":"A file of parcels, in place of or beside the buildings, sent with POST /uploads: GeoJSON, a GeoPackage or a zipped shapefile. Send the upload and the ETag of each part.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"Parcels","type":"object"},"returnYears":{"default":[10,25,100],"description":"NOAA Atlas 14 design storms by return period.","items":{"enum":[1,2,5,10,25,50,100,500],"type":"integer"},"maxItems":4,"minItems":1,"title":"Design storms (years)","type":"array","uniqueItems":true},"stormHours":{"default":24,"description":"Each design storm's length in hours: 6, 12 or 24 for HEC-RAS; 1, 2, 6, 12 or 24 for SWMM. Default 24.","enum":[1,2,6,12,24],"title":"Storm length (h)","type":"integer"},"system":{"default":"stormwater","description":"stormwater: runoff to storm sewers. sanitary: dry weather flow and rainfall-dependent inflow and infiltration. combined: both.","enum":["stormwater","sanitary","combined"],"title":"System","type":"string"},"units":{"default":"US","description":"US (feet) or SI (meters). Default US.","enum":["US","SI"],"title":"Units","type":"string"}},"required":["engine","area"],"title":"SWMM","type":"object"},{"additionalProperties":false,"description":"An EPANET network laid along the area's roads to its buildings or parcels.","properties":{"area":{"additionalProperties":true,"description":"A GeoJSON Polygon or MultiPolygon geometry (not a Feature) in WGS84 (longitude, latitude). SWMM and EPANET build over its bounding box, at most half a degree (about 30 miles) on a side.","title":"Study area","type":"object"},"buildings":{"additionalProperties":false,"description":"A file of building footprints the network reaches; SWMM and EPANET need this or parcels, sent with POST /uploads: GeoJSON, a GeoPackage or a zipped shapefile. Send the upload and the ETag of each part.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"Buildings","type":"object"},"engine":{"const":"epanet","title":"Engine","type":"string"},"fireFlowGpm":{"description":"The fire flow the network is sized to carry. Left out, the generator's own value.","maximum":10000,"minimum":0,"title":"Fire flow (gpm)","type":"number"},"headloss":{"default":"H-W","description":"H-W (Hazen-Williams), D-W (Darcy-Weisbach) or C-M (Chezy-Manning).","enum":["H-W","D-W","C-M"],"title":"Headloss formula","type":"string"},"hours":{"default":24,"maximum":168,"minimum":1,"title":"Simulation length (h)","type":"integer"},"name":{"description":"What the model is called. Default Model.","maxLength":120,"title":"Name","type":"string"},"parcels":{"additionalProperties":false,"description":"A file of parcels, in place of or beside the buildings, sent with POST /uploads: GeoJSON, a GeoPackage or a zipped shapefile. Send the upload and the ETag of each part.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"Parcels","type":"object"},"units":{"default":"US","description":"US (feet) or SI (meters). Default US.","enum":["US","SI"],"title":"Units","type":"string"}},"required":["engine","area"],"title":"EPANET","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make a model","tags":["Models"]}},"/generations/{generationId}":{"get":{"description":"Returns a model made with model.generate and its state: `queued`, `running`, `done`,\n`failed` or `stopped`. Once done, `download` links the model's zip for an hour.\n","operationId":"generation.get","parameters":[{"in":"path","name":"generationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}},"description":"The model"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get model made","tags":["System"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/generations/{generationId}/cancel":{"post":{"description":"Stops a model generation from `POST /generations` that is still queued or working. It ends `stopped`, and the time it ran is billed. One that has ended answers 409.","operationId":"generation.cancel","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The generation to stop: the `id` in `created` from `POST /generations`, or one from `GET /generations`.","in":"path","name":"generationId","required":true,"schema":{"format":"uuid","title":"Generation","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop a model generation","tags":["System"]}},"/groups":{"post":{"description":"Creates a group of layers, rasters and services (`objects`) or of notes (`notes`), not both. The new group's id is in `changes[0].target.id`.","operationId":"group.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Sewer","objects":[{"id":"00000000-0000-0000-0000-000000000002","type":"layer"}],"projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"notes":{"description":"A group of notes, the first on top. A group contains notes or objects, not both.","items":{"format":"uuid","type":"string"},"maxItems":200,"title":"Notes","type":"array"},"objects":{"description":"Layers, rasters and services to put in the group, the first on top. A group contains objects or notes, not both.","items":{"additionalProperties":false,"properties":{"id":{"format":"uuid","type":"string"},"type":{"enum":["layer","raster","service"],"type":"string"}},"required":["type","id"],"type":"object"},"maxItems":200,"title":"Put in it","type":"array"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"}},"required":["name","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New group","tags":["Projects"]}},"/groups/{groupId}":{"delete":{"description":"Deletes a group. `contents` sets what happens to what's in it: `keep`, `trash` (layers and rasters) or `notes` (deletes its notes).","operationId":"group.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The group's id.","in":"path","name":"groupId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"keep leaves every item, ungrouped. trash moves its layers and rasters to the trash; services and notes stay, ungrouped. notes deletes its notes and leaves the rest, ungrouped.","in":"query","name":"contents","required":true,"schema":{"enum":["keep","trash","notes"],"title":"Contents","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete group","tags":["Projects"]}},"/groups/{groupId}/move":{"post":{"description":"Moves a group up, down, to the top or to the bottom.","operationId":"group.move","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The group's id.","in":"path","name":"groupId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"step":"forward"},"schema":{"additionalProperties":false,"properties":{"among":{"description":"The groups to move past: groups of layers (the default) or groups of notes.","enum":["layers","notes"],"title":"Among","type":"string"},"step":{"description":"front: to the top. forward: up one. backward: down one. back: to the bottom.","enum":["front","forward","backward","back"],"title":"Where","type":"string"}},"required":["step"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move group","tags":["Projects"]}},"/groups/{groupId}/place":{"post":{"description":"Moves a group directly below the group in `below`, or to the top when `below` is left out.","operationId":"group.place","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The group's id.","in":"path","name":"groupId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"below":"00000000-0000-0000-0000-000000000010"},"schema":{"additionalProperties":false,"properties":{"below":{"description":"The group to put it under. Leave out to put it on top.","format":"uuid","title":"Below","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Put group","tags":["Projects"]}},"/groups/{groupId}/rename":{"post":{"description":"Renames a group.","operationId":"group.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The group's id.","in":"path","name":"groupId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Storm"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"New name","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename group","tags":["Projects"]}},"/health":{"get":{"operationId":"health","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}},"description":"The process is up. ok shows whether both databases responded"},"default":{"$ref":"#/components/responses/Failed"}},"security":[],"summary":"Check health","tags":["System"]}},"/highest-risk-assets":{"get":{"description":"The assets with the highest business risk exposure (BRE) across the workspace, highest\nfirst.\n","operationId":"risk.highest","parameters":[{"in":"query","name":"assetClass","schema":{"enum":["pipe","structure"],"type":"string"}},{"description":"How many assets to return. There is no next page.","in":"query","name":"limit","schema":{"default":10,"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskHighest"}}},"description":"The assets, highest first, and the number of risk models read"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List highest-risk assets","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/home":{"get":{"description":"Your start page: recent changes, items to resume, invitations and jobs waiting on you, and storage.","operationId":"home.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Home"}}},"description":"Home"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get home","tags":["Account"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/imports":{"post":{"description":"Imports a file uploaded with `POST /uploads` and the project's `projectId`: send `upload` and each part's `number` and `etag`. Files become layers, rasters or models (.inp, .pcz, or a zipped HEC-RAS project). Follow `created` in `GET /projects/{projectId}/contents` (`imports`). New models appear in `GET /models`.","operationId":"object.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"parts":[{"etag":"\"3858f62230ac3c915f300c664312c11f\"","number":1}],"projectId":"00000000-0000-0000-0000-000000000001","upload":"<upload from upload.start>"},"schema":{"additionalProperties":false,"properties":{"model":{"description":"Set true for a zip holding a SWMM or EPANET .inp, so its coordinates are read in the project's coordinate system, as an .inp's are. An .inp or .pcz needs no flag, nor does a zip sent with modelType or a HEC-RAS project's zip.","type":"boolean"},"modelType":{"description":"The model the file is, as New model declares it: an .inp, a zip holding one, or a PCSWMM .pcz (EPA SWMM 5 or EPANET only). The importer makes it that type instead of reading the type from the file, and refuses a file that is plainly the other engine, or has OpenSWMM's [2D_*] sections declared EPA SWMM 5. swmm6 marks the model OpenSWMM 6's, so its runs start on OpenSWMM 6. Without it, the type is read from the file. Leave it out for a HEC-RAS project's zip, which is found from its .prj.","enum":["swmm","epanet","swmm6"],"title":"Model type","type":"string","x-titles":["EPA SWMM 5","EPANET","SWMM 6 (OpenSWMM)"]},"parts":{"description":"Every part sent, once each: its `number` and the `ETag` header its PUT returned, as returned (quotes and all). A part missing or named twice returns 422.","items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"upload":{"description":"The `upload` that upload.start returned.","maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import a file","tags":["Layers & data"]}},"/imports/from-url":{"post":{"description":"Imports a file from a link: a direct download, Google Drive, Dropbox, source.coop or `s3://`. Check it first with `POST /projects/{projectId}/link-probe`. Add ArcGIS or PMTiles links with `POST /services`. Follow `created` in `GET /projects/{projectId}/contents` (`imports`).","operationId":"link.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"projectId":"00000000-0000-0000-0000-000000000001","url":"https://example.com/data/parcels.geojson"},"schema":{"additionalProperties":false,"properties":{"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"url":{"description":"The file's address: http(s), a Drive or Dropbox share link, a source.coop page, or s3://.","maxLength":2048,"minLength":1,"title":"Link","type":"string"}},"required":["url","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import a file by its link","tags":["Layers & data"]}},"/imports/{importId}/stop":{"post":{"description":"Stops an import that's still downloading. Send its `id` from `GET /projects/{projectId}/contents` (`imports`). Once downloaded, it can't be stopped.","operationId":"import.stop","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The import's `id` in project.contents `imports` (not its `objectId`, and not the id `created` returned).","in":"path","name":"importId","required":true,"schema":{"format":"uuid","title":"Import","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"properties":{"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"}},"required":["projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop an import","tags":["Layers & data"]}},"/inspection-media/{mediaId}":{"get":{"description":"A short-lived download link for an inspection file. `url` is null until it's uploaded.","operationId":"risk.inspection.media.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskMediaUrl"}}},"description":"A short-lived address, or null when the recorded file is unavailable"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download inspection file","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"mediaId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/inspection-media/{mediaId}/attach":{"post":{"description":"Finishes an inspection file upload started with `POST /inspection-media/{mediaId}/upload`. Send the `uploadToken` and every part's number and ETag, in order.","operationId":"risk.inspection.media.attach","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The media's id.","in":"path","name":"mediaId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"parts":[{"etag":"\"9b2cf535f27731c974343645a3985328\"","number":1}],"uploadToken":"<uploadToken from risk.inspection.media.upload>"},"schema":{"additionalProperties":false,"properties":{"parts":{"description":"Every uploaded part, numbered from 1 in order, with the `ETag` header its upload returned.","items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":192,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":192,"minItems":1,"type":"array"},"uploadToken":{"maxLength":8192,"minLength":1,"type":"string"}},"required":["uploadToken","parts"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Attach inspection file","tags":["Risk"]}},"/inspection-media/{mediaId}/cancel":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"mediaId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Cancels an inspection file upload by its `uploadToken`.","operationId":"risk.inspection.media.cancel","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionMediaCancelInput"}}},"required":true},"responses":{"204":{"description":"Upload aborted or already attached"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Cancel inspection file upload","tags":["Risk"]}},"/inspection-media/{mediaId}/upload":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"mediaId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Starts an inspection file upload in parts of up to 16 MiB, up to 3 GiB. PUT each part to its\n`url`, then send the ETags and `uploadToken` to `POST /inspection-media/{mediaId}/attach`. Links expire\nin 6 hours.\n","operationId":"risk.inspection.media.upload","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionMediaUploadInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionMediaUpload"}}},"description":"Multipart upload attempt"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start inspection file upload","tags":["Risk"]}},"/jobs":{"get":{"description":"Your background jobs in this workspace: to do, running and done. Follow a job an action started by its id.","operationId":"job.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jobs"}}},"description":"To do, Running and Done lists"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List jobs","tags":["Account"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/jobs/{jobId}/risk-inspection-import/report":{"get":{"description":"Inspection rows an import couldn't match, up to 100 per page. Only the user who started the\nimport can read it.\n","operationId":"risk.inspection.import_report","parameters":[{"description":"The job's id.","in":"path","name":"jobId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"How many to skip, for the next page.","in":"query","name":"offset","schema":{"default":0,"maximum":2000,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionImportReportPage"}}},"description":"One report page"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get inspection import report","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/jobs/{jobId}/risk-maintenance-import/report":{"get":{"description":"Work order rows an import couldn't match, up to 100 per page. Only the user who started the\nimport can read it.\n","operationId":"risk.maintenance.import_report","parameters":[{"description":"The job's id.","in":"path","name":"jobId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"How many to skip, for the next page.","in":"query","name":"offset","schema":{"default":0,"maximum":2000,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskMaintenanceImportReportPage"}}},"description":"One report page"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get work order import report","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/asset-match":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Matches asset references to features in a layer, by asset id or by a pipe's two manholes,\nand returns the attributes you ask for. A reference that matches two features matches none.\n","operationId":"risk.asset_match","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"keys":{"items":{"maxLength":255,"minLength":1,"type":"string"},"maxItems":20,"type":"array"},"refs":{"description":"The references to match, in order: each an `assetRef`, with the line's `upstreamRef` and `downstreamRef` manholes when known.","items":{"additionalProperties":false,"properties":{"assetRef":{"maxLength":240,"type":"string"},"downstreamRef":{"maxLength":240,"type":["string","null"]},"upstreamRef":{"maxLength":240,"type":["string","null"]}},"required":["assetRef"],"type":"object"},"maxItems":10000,"type":"array"}},"required":["refs"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAssetMatches"}}},"description":"One match per reference, in order"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Match asset references","tags":["Risk"]}},"/layers/{layerId}/columns":{"post":{"description":"Adds an empty column to a layer. Not for model network layers or survey layers.","operationId":"layer.column.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"INSPECTED"},"schema":{"additionalProperties":false,"properties":{"name":{"description":"Letters, digits and underscores, up to 63. Not fid, id, neer_unique_fid, attachments, survey_status, survey_submission_id, or a name starting user_ (in any case). A name the layer has returns 422.","maxLength":63,"minLength":1,"pattern":"^[A-Za-z0-9_]+$","title":"Name","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add column","tags":["Layers & data"]}},"/layers/{layerId}/columns/drop":{"post":{"description":"Removes a column from a layer. Refused while its style or label uses the column. When the column is too large to undo, send `withoutUndo: true`.","operationId":"layer.column.drop","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"OLD_ID"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":255,"minLength":1,"title":"Column","type":"string"},"withoutUndo":{"description":"True drops the column even when its values are too many to keep for undo (over 96 MB); the drop then can't be undone. Default false.","type":"boolean"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Drop column","tags":["Layers & data"]}},"/layers/{layerId}/derive":{"post":{"description":"Makes a new layer from this one with a GIS tool: `buffer`, `simplify`, `dissolve`, `clip`, `join`, `overlay`, `merge` or `zonal`. Ready in minutes. Billed to the project owner's credit.","operationId":"layer.derive","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"distance":100,"distanceUnits":"feet","tool":"buffer"},"schema":{"additionalProperties":false,"properties":{"byColumn":{"description":"dissolve only: one feature per value.","maxLength":200,"title":"By column","type":"string"},"distance":{"description":"Required for buffer (its distance) and simplify (the most a vertex may move), in distanceUnits. Above 0.","exclusiveMinimum":0,"title":"Distance","type":"number"},"distanceUnits":{"default":"feet","description":"The unit of distance. Default feet.","enum":["feet","meters","miles"],"title":"Distance in","type":"string"},"how":{"description":"join: inner (default), left or right. overlay: intersection (default), union, difference or symmetric_difference.","title":"How","type":"string"},"otherLayerId":{"description":"Required for clip, join and overlay: another layer of the project.","format":"uuid","title":"Other layer","type":"string"},"otherLayerIds":{"description":"Required for merge: 1 to 9 other layers of the project.","items":{"format":"uuid","type":"string"},"maxItems":9,"minItems":1,"title":"Other layers","type":"array"},"predicate":{"default":"intersects","description":"join only.","enum":["intersects","contains","within"],"title":"Where","type":"string"},"rasterId":{"description":"Required for zonal: the raster summarized within each of the layer's polygons.","format":"uuid","title":"Raster","type":"string"},"stats":{"default":["mean","min","max"],"description":"zonal only. Defaults to mean, min and max.","items":{"enum":["mean","min","max","sum","count","std","median"],"type":"string"},"minItems":1,"title":"Statistics","type":"array","uniqueItems":true},"tool":{"description":"buffer: an area around each feature. dissolve: features joined into one, or one per value of byColumn. simplify: each line and polygon with fewer vertices, none moved more than distance. clip: the features within otherLayerId's polygons. join: each feature with the attributes of otherLayerId's features where they lie. overlay: the layer's polygons cut by otherLayerId's. merge: the layer and otherLayerIds' features in one layer. zonal: each of the layer's polygons with the statistics of rasterId's values within it.","enum":["buffer","dissolve","simplify","clip","join","overlay","merge","zonal"],"title":"Make","type":"string"}},"required":["tool"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make a layer from this one","tags":["Layers & data"]}},"/layers/{layerId}/edits":{"post":{"description":"Saves feature edits to a layer: values, shapes (GeoJSON in longitude and latitude), deletes and adds. Send current values in `was` (409 if they changed). Up to 10,000 changes and 10,000 adds. Added features' fids are matched by `tempFid`.","operationId":"layer.edits.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"changes":[{"fid":12,"set":{"MATERIAL":"PVC"},"was":{"MATERIAL":"CMP"}}]},"schema":{"additionalProperties":false,"properties":{"added":{"items":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"geometry":{"properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"id":{"description":"Created by the client and stored as the feature's id, so a retried save finds what it added.","format":"uuid","type":"string"},"tempFid":{"description":"A temporary number from the client until the feature is saved. The response returns its assigned fid.","maximum":-1,"type":"integer"}},"required":["id","tempFid","geometry"],"type":"object"},"maxItems":10000,"title":"Features added","type":"array"},"changes":{"items":{"additionalProperties":false,"properties":{"deleted":{"description":"True deletes the feature. Not sent with set or geometry.","type":"boolean"},"fid":{"minimum":0,"type":"integer"},"geometry":{"description":"The feature's new shape, as GeoJSON in longitude and latitude, of the layer's kind (point, line or polygon). Sent with wasShape.","properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"set":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"description":"Values to set, by attribute name: text, numbers, booleans or null. Not fid or the layer's own columns.","maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"was":{"additionalProperties":true,"description":"The values as you read them, for the keys being set, or the whole row for a delete. If they changed since, the save is refused.","type":"object"},"wasShape":{"description":"Required with `geometry`: the shape's version as you read it (a feature's `shapeVersion`). If the shape moved since, the save is refused.","pattern":"^[0-9a-f]{32}$","type":"string"},"wasVersion":{"description":"For a delete, the row's version as you read it (a row's `version`). If the row changed since, the save is refused.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["fid"],"type":"object"},"maxItems":10000,"title":"Changes","type":"array"},"flagId":{"description":"A project flag to mark every value this save sets with, recording where the value came from.","format":"uuid","title":"Flag my edits as","type":["string","null"]},"linked":{"description":"Other layers of the same model saved with this one in the same transaction. These are the links a moved node stretched, the nodes a moved link carried, and pending changes in the model's other layers. Either all of it is saved or none, as one model version. Not for HEC-RAS models.","items":{"additionalProperties":false,"properties":{"added":{"items":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"geometry":{"properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"id":{"description":"Created by the client and stored as the feature's id, so a retried save finds what it added.","format":"uuid","type":"string"},"tempFid":{"description":"A temporary number from the client until the feature is saved. The response returns its assigned fid.","maximum":-1,"type":"integer"}},"required":["id","tempFid","geometry"],"type":"object"},"maxItems":10000,"title":"Features added","type":"array"},"changes":{"items":{"additionalProperties":false,"properties":{"deleted":{"description":"True deletes the feature. Not sent with set or geometry.","type":"boolean"},"fid":{"minimum":0,"type":"integer"},"geometry":{"description":"The feature's new shape, as GeoJSON in longitude and latitude, of the layer's kind (point, line or polygon). Sent with wasShape.","properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"set":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"description":"Values to set, by attribute name: text, numbers, booleans or null. Not fid or the layer's own columns.","maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"was":{"additionalProperties":true,"description":"The values as you read them, for the keys being set, or the whole row for a delete. If they changed since, the save is refused.","type":"object"},"wasShape":{"description":"Required with `geometry`: the shape's version as you read it (a feature's `shapeVersion`). If the shape moved since, the save is refused.","pattern":"^[0-9a-f]{32}$","type":"string"},"wasVersion":{"description":"For a delete, the row's version as you read it (a row's `version`). If the row changed since, the save is refused.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["fid"],"type":"object"},"maxItems":10000,"title":"Changes","type":"array"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","changes"],"type":"object"},"maxItems":32,"title":"Other layers","type":"array"},"snaps":{"description":"What the vertices of the saved shapes were snapped to. Each is a place on a project feature, either a vertex or a point along an edge. If a feature has moved or been deleted since, the save is refused.","items":{"additionalProperties":false,"properties":{"at":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid","at"],"type":"object"},"maxItems":10000,"title":"Snaps","type":"array"}},"required":["changes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save changes","tags":["Layers & data"]}},"/layers/{layerId}/export":{"patch":{"description":"Sets who can read a layer through the project's WFS export: `none`, `private` (token holders) or `public`. Overrides the project's setting.","operationId":"layer.export.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"access":"private"},"schema":{"additionalProperties":false,"properties":{"access":{"description":"Nobody, holders of the token, or anyone with the address, regardless of the project setting.","enum":["none","private","public"],"title":"WFS access","type":"string","x-titles":["Off","Token","Public"]}},"required":["access"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set layer export access","tags":["Layers & data"]}},"/layers/{layerId}/features":{"get":{"description":"A page of a layer's features, attributes only. Filter with `q` and `filter`, sort with `sort` and `dir`. `page` starts at 0. For geometry use `GET /layers/{layerId}/features/{fid}`.","operationId":"layer.feature.list","parameters":[{"$ref":"#/components/parameters/layerId"},{"$ref":"#/components/parameters/featureSearch"},{"$ref":"#/components/parameters/featureFilter"},{"$ref":"#/components/parameters/featureScenario"},{"$ref":"#/components/parameters/featureSource"},{"description":"Only these features, as comma-separated runs of fids. Each run is a fid or first-last (\"1-40,52,60-61\"). Features a scenario adds are below zero (\"-3--1\"). A URL must stay under the shortest limit in front of the API, so send a longer list in the body of POST …/features/query.","in":"query","name":"fids","schema":{"maxLength":6000,"pattern":"^-?[0-9]+(--?[0-9]+)?(,-?[0-9]+(--?[0-9]+)?)*$","type":"string"}},{"description":"An attribute key, or `fid`.","in":"query","name":"sort","schema":{"maxLength":100,"type":"string"}},{"in":"query","name":"dir","schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"description":"The last page's `next`. Leave it out for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"How many to return.","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":500,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/Column"},"type":"array"},"matched":{"type":"integer"},"next":{"description":"Send it as `cursor` for the next page. Null on the last page.","type":["string","null"]},"rows":{"items":{"$ref":"#/components/schemas/FeatureRow"},"type":"array"},"total":{"type":"integer"}},"required":["columns","rows","total","matched"],"type":"object"}}},"description":"The page"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List features","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/features/classes":{"get":{"description":"Splits a numeric column into classes by equal interval, quantile, natural breaks or manual\nbreaks.\n","operationId":"layer.column.classes","parameters":[{"$ref":"#/components/parameters/layerId"},{"in":"query","name":"key","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}},{"in":"query","name":"method","required":true,"schema":{"enum":["equal","quantile","jenks","manual"],"type":"string"}},{"description":"The number of classes, 2 to 12. Required for equal, quantile and jenks; ignored for manual.","in":"query","name":"count","required":false,"schema":{"maximum":12,"minimum":2,"type":"integer"}},{"description":"Required for manual, and only used there. Ascending numbers, comma-separated.","in":"query","name":"breaks","required":false,"schema":{"maxLength":400,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureClasses"}}},"description":"The breaks, each class's rows and the histogram"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get class breaks","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/features/copy":{"post":{"description":"Copies up to 100,000 features into this layer from any layer you can read, by `fids`, `all` or `filter`. `mapping` matches columns. Preview it first to see how many fit. Runs as a job.","operationId":"layer.features.copy","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"columns":[{"key":"MATERIAL","type":"string"}],"from":{"all":true,"layerId":"00000000-0000-0000-0000-000000000006"},"mapping":{"MATERIAL":"MAT"}},"schema":{"additionalProperties":false,"properties":{"columns":{"description":"This layer's columns that the copy fills, each with its `type` as layer.feature.list's `columns` gives it, and for a keyword column (a SWMM shape) its allowed values in `choices`.","items":{"additionalProperties":false,"properties":{"choices":{"items":{"maxLength":100,"type":"string"},"maxItems":100,"type":"array"},"key":{"maxLength":255,"minLength":1,"type":"string"},"type":{"enum":["string","number","boolean","unknown"],"type":"string"}},"required":["key","type"],"type":"object"},"maxItems":200,"title":"Columns","type":"array"},"from":{"additionalProperties":false,"description":"The layer the features are copied from, and which: `fids`, `all`, or a `filter` and `GET /search`. Send exactly one of the three.","properties":{"all":{"description":"True copies every feature of the layer.","type":"boolean"},"fids":{"description":"The features to copy, by fid. Up to 100,000.","items":{"type":"integer"},"maxItems":100000,"minItems":1,"type":"array"},"filter":{"description":"Predicates every feature copied meets, as a layer's table filters its rows (FeatureFilter).","items":{"type":"object"},"maxItems":20,"type":"array"},"layerId":{"format":"uuid","type":"string"},"projectId":{"description":"The project the layer is in, when it isn't the one copied into. You need to be able to read it.","format":"uuid","type":"string"},"scenarioId":{"description":"A network layer's scenario the features are read through. Base when left out.","format":"uuid","type":"string"},"search":{"description":"Free text, matched against every attribute's value, case ignored, as layer.feature.list's q.","maxLength":200,"type":"string"}},"required":["layerId"],"title":"Copied from","type":"object"},"mapping":{"additionalProperties":{"maxLength":255,"type":["string","null"]},"description":"Keys are this layer's columns; each value is the copied layer's column to fill it from, or null to leave it blank. For a model's layer, map `name` and a link's two end columns too: names left unmapped are made, and ends left unmapped are found by location.","maxProperties":200,"title":"Mapping","type":"object"},"requestId":{"description":"Created by the client, so a copy asked for again finds the one it queued.","format":"uuid","type":"string"},"scenarioId":{"description":"The scenario the layer copied into is seen in. A copy goes into Base: any other is refused.","format":"uuid","type":"string"},"snapToleranceM":{"default":1.0,"description":"For a model's links: how near a node, in meters, an end its copied names don't find is put on it.","maximum":50.0,"minimum":0,"title":"Snap ends within","type":"number"}},"required":["from","columns","mapping"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Copy features","tags":["Layers & data"]}},"/layers/{layerId}/features/count":{"get":{"description":"The total and matching feature counts.\n","operationId":"layer.feature.count.get","parameters":[{"$ref":"#/components/parameters/layerId"},{"$ref":"#/components/parameters/featureSearch"},{"$ref":"#/components/parameters/featureFilter"},{"$ref":"#/components/parameters/featureScenario"},{"$ref":"#/components/parameters/featureSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCount"}}},"description":"The counts"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Count features","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"The total and matching feature counts, with the filter in the body.","operationId":"layer.feature.count","parameters":[{"$ref":"#/components/parameters/layerId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureNarrowing"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCount"}}},"description":"The counts"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Count features with body","tags":["Layers & data"]}},"/layers/{layerId}/features/fids":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Every matching fid, with the filter in the body.","operationId":"layer.feature.fids","parameters":[{"$ref":"#/components/parameters/layerId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureNarrowing"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureIds"}}},"description":"The fids"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List feature IDs with body","tags":["Layers & data"]}},"/layers/{layerId}/features/query":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"The same page as `GET /layers/{layerId}/features`, with the parameters in the body (up to 4 MB).","operationId":"layer.feature.query","parameters":[{"$ref":"#/components/parameters/layerId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturePage"}}},"description":"The page"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List features with body","tags":["Layers & data"]}},"/layers/{layerId}/features/stats":{"get":{"description":"A column's types, empty count, most common values and number range.\n","operationId":"layer.column.stats","parameters":[{"$ref":"#/components/parameters/layerId"},{"in":"query","name":"key","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/featureScenario"},{"$ref":"#/components/parameters/featureSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnStats"}}},"description":"The column's statistics"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get column stats","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/features/summary":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Counts matching features and sums a column, overall or per value of a column. Lengths in\nmeters and areas in square meters. Up to 200 groups.\n","operationId":"layer.feature.summary","parameters":[{"$ref":"#/components/parameters/layerId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureSummaryAsk"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureSummary"}}},"description":"The summary"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Summarize features","tags":["Layers & data"]}},"/layers/{layerId}/features/{fid}":{"get":{"description":"One feature with its attributes and GeoJSON geometry. `version` and `shapeVersion` are what `POST /layers/{layerId}/edits` takes as `wasVersion` and `wasShape`.","operationId":"layer.feature.get","parameters":[{"$ref":"#/components/parameters/layerId"},{"description":"Negative for an element a scenario adds. Read in that scenario.","in":"path","name":"fid","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/featureScenario"},{"$ref":"#/components/parameters/featureSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}},"description":"The feature"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get feature","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/files":{"get":{"description":"A layer's files to download: the original and formats made on import.\n","operationId":"layer.file.list","parameters":[{"$ref":"#/components/parameters/layerId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ObjectFile"},"type":"array"}}},"description":"The layer's files"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List layer files","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/files/{kind}":{"get":{"description":"Redirects to the file for 5 minutes, as a download. The original keeps the name it was uploaded with. A generated file is named for the layer.","operationId":"layer.file","parameters":[{"$ref":"#/components/parameters/layerId"},{"in":"path","name":"kind","required":true,"schema":{"$ref":"#/components/schemas/FileKind"}}],"responses":{"302":{"description":"Redirect to the file","headers":{"Location":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download layer file","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/flags":{"get":{"description":"Every flagged cell in a layer, with its flag.\n","operationId":"layer.flag.list","parameters":[{"$ref":"#/components/parameters/layerId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CellFlag"},"type":"array"}}},"description":"The flags"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List cell flags","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/layers/{layerId}/flags/{flagId}":{"patch":{"description":"Marks a layer's table cells (`fid` and column) with a project flag, or clears them with `flagId` null.","operationId":"layer.flags.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The flag to mark the cells with, from project.flag.list. Null clears them.","in":"path","name":"flagId","required":true,"schema":{"format":"uuid","title":"Flag","type":["string","null"]}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"cells":[{"fid":12,"key":"MATERIAL"}]},"schema":{"additionalProperties":false,"properties":{"cells":{"description":"The cells, each a feature's `fid` and a column's `key`.","items":{"additionalProperties":false,"properties":{"fid":{"minimum":0,"type":"integer"},"key":{"maxLength":255,"minLength":1,"type":"string"}},"required":["fid","key"],"type":"object"},"maxItems":500,"minItems":1,"title":"Cells","type":"array"}},"required":["cells"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Flag cells","tags":["Layers & data"]}},"/layers/{layerId}/inspections/from-delivery":{"post":{"description":"Imports the inspections from a delivery's PACP, MACP or LACP databases, brought in with `POST /deliveries`. Runs as a job, returned in `created`.","operationId":"risk.inspections.delivery.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The pipes (or, for MACP, manholes) the inspections are matched to.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","title":"Layer","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"deliveryId":"00000000-0000-0000-0000-000000000007"},"schema":{"additionalProperties":false,"properties":{"deliveryId":{"description":"A delivery brought in from a drive whose databases were read.","format":"uuid","title":"Delivery","type":"string"}},"required":["deliveryId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import a delivery's inspections","tags":["Risk"]}},"/layers/{layerId}/inspections/import":{"post":{"description":"Imports inspections staged with `POST /layers/{layerId}/inspections/upload`. Send its `inputToken` within an hour. Runs as a job; read unmatched rows with `GET /jobs/{jobId}/risk-inspection-import/report`.","operationId":"risk.inspections.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"inputToken":"<inputToken from risk.inspection.stage>"},"schema":{"additionalProperties":false,"properties":{"inputToken":{"description":"The `inputToken` from `POST /layers/{layerId}/inspections/upload` for this layer. Valid for one hour.","maxLength":8192,"minLength":1,"type":"string"}},"required":["inputToken"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import inspections","tags":["Risk"]}},"/layers/{layerId}/inspections/upload":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Checks and stages inspections for a layer. Up to 8 MiB, 2,000 inspections and 20,000\nobservations. Send the returned `inputToken` to `POST /layers/{layerId}/inspections/import` within an hour.\n","operationId":"risk.inspection.stage","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionImportInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionImportStage"}}},"description":"Staged input and counts"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Input exceeds 8 MiB, or the owner's storage is full"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start inspection import","tags":["Risk"]}},"/layers/{layerId}/labels/{labelId}":{"delete":{"description":"Deletes a layer label.","operationId":"layer.label.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The label's id.","in":"path","name":"labelId","required":true,"schema":{"format":"uuid","title":"Label","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete label","tags":["Layers & data"]},"patch":{"description":"Creates or changes a layer label. For a new label send a new `labelId`; to change one send its `baseVersion` from `GET /layers/{layerId}/styles`.","operationId":"layer.label.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The label's id from layer.style.list, or a new UUID of your own to create one.","in":"path","name":"labelId","required":true,"schema":{"format":"uuid","title":"Label","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"label":{"active":true,"layout":{"text-size":12},"paint":{"text-color":"#222222"},"property":"NAME"}},"schema":{"additionalProperties":false,"properties":{"baseVersion":{"description":"The `version` you read from the styles list (layer.style.list, raster.style.list or service.style.list). If it changed since, the save is refused. For a label: required to change an existing one, left out to create a new one.","pattern":"^[0-9a-f]{32}$","type":"string"},"label":{"additionalProperties":false,"properties":{"active":{"description":"True shows the label on the map.","type":"boolean"},"layout":{"description":"MapLibre symbol layout properties, such as text-size and symbol-placement.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"paint":{"description":"MapLibre text and icon paint properties, such as text-color and text-halo-width.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"property":{"description":"The column the label shows. Null for none; an active label needs one.","maxLength":255,"minLength":1,"type":["string","null"]},"type":{"enum":["Symbol","Icon","Text"]}},"required":["property","active","paint","layout"],"title":"Label","type":"object"}},"required":["label"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save labels","tags":["Layers & data"]}},"/layers/{layerId}/maintenance-records/import":{"post":{"description":"Imports work orders staged with `POST /layers/{layerId}/maintenance-records/upload`. Send its `inputToken` within an hour. Runs as a job; read unmatched rows with `GET /jobs/{jobId}/risk-maintenance-import/report`.","operationId":"risk.maintenance.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"inputToken":"<inputToken from risk.maintenance.stage>"},"schema":{"additionalProperties":false,"properties":{"inputToken":{"description":"The `inputToken` from `POST /layers/{layerId}/maintenance-records/upload` for this layer. Valid for one hour.","maxLength":8192,"minLength":1,"type":"string"}},"required":["inputToken"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import work orders","tags":["Risk"]}},"/layers/{layerId}/maintenance-records/upload":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Checks and stages work orders for a point or line layer, up to 8 MiB and 2,000 records. Send\nthe returned `inputToken` to `POST /layers/{layerId}/maintenance-records/import` within an hour.\n","operationId":"risk.maintenance.stage","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskMaintenanceImportInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskMaintenanceImportStage"}}},"description":"Staged input and count"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Input exceeds 8 MiB, or the owner's storage is full"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start work order import","tags":["Risk"]}},"/layers/{layerId}/move":{"post":{"description":"Moves a layer within its group: `front`, `forward`, `backward` or `back`.","operationId":"layer.move","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"step":"forward"},"schema":{"additionalProperties":false,"properties":{"step":{"enum":["front","forward","backward","back"],"title":"Where","type":"string"}},"required":["step"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move layer","tags":["Layers & data"]}},"/layers/{layerId}/own":{"post":{"description":"Makes a layer added from another project this project's own copy: its features and files are copied here, and edits to it change this project alone.","operationId":"layer.own","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make a project copy","tags":["Layers & data"]}},"/layers/{layerId}/place":{"post":{"description":"Moves a layer into a group (`groupId`, or null for none), below the item in `below` or at the top.","operationId":"layer.place","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"below":"00000000-0000-0000-0000-000000000003","groupId":"00000000-0000-0000-0000-000000000009"},"schema":{"additionalProperties":false,"properties":{"below":{"description":"An item of that group (a layer, raster or service) to go directly below. Left out, the top of the group.","format":"uuid","title":"Below","type":"string"},"groupId":{"description":"The group to put it in, from project.contents. Null for no group.","oneOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Group"}},"required":["groupId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Put layer in a group","tags":["Layers & data"]}},"/layers/{layerId}/rename":{"post":{"description":"Renames a layer.","operationId":"layer.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Gravity mains"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"New name","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename layer","tags":["Layers & data"]}},"/layers/{layerId}/restore":{"post":{"description":"Restores a layer from the trash.","operationId":"layer.restore","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Restore layer","tags":["Layers & data"]}},"/layers/{layerId}/sensor-credentials":{"post":{"description":"Replaces a sensor layer's network login (`purpose: identity`) or ADS rainfall key (`purpose: ads-rainfall`). `login` is a `loginToken` from `POST /sensors/connect`.","operationId":"layer.sensors.credentials","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"login":"<loginToken from sensors.connect>","purpose":"identity"},"schema":{"additionalProperties":false,"properties":{"login":{"description":"purpose: identity for the layer's own network login, ads-rainfall for the ADS key its rainfall uses. login: the loginToken sensors.connect returned.","maxLength":8192,"minLength":1,"type":"string"},"purpose":{"enum":["identity","ads-rainfall"],"type":"string"}},"required":["purpose","login"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Replace sensor login","tags":["Layers & data"]}},"/layers/{layerId}/sensor-settings":{"get":{"description":"A sensor layer's rainfall source, label, network and whether logins are stored.","operationId":"layer.sensor_settings","parameters":[{"$ref":"#/components/parameters/layerId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorLayerSettings"}}},"description":"Settings and credential status"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get sensor layer settings","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Sets a sensor layer's rainfall source and site label. Null removes one.","operationId":"layer.sensors.settings","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"label":[{"text":"Site ","type":"text"},{"attributeKey":"name","type":"attribute"}]},"schema":{"additionalProperties":false,"minProperties":1,"properties":{"label":{"description":"The label's parts in order: text (`type` text) or a column's value (`type` attribute with its `attributeKey`).","oneOf":[{"items":{"oneOf":[{"additionalProperties":false,"properties":{"text":{"maxLength":2000,"type":"string"},"type":{"const":"text"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"attributeKey":{"maxLength":255,"type":"string"},"type":{"const":"attribute"}},"required":["type","attributeKey"],"type":"object"}]},"maxItems":100,"type":"array"},{"type":"null"}]},"rainfall":{"oneOf":[{"additionalProperties":false,"properties":{"chartKinds":{"description":"The charts the rain shows under, by name, such as Depth or Flow for ADS, Level, Flow Rate or Velocity for Cipher, Stage for USGS. An empty list shows it under none.","items":{"maxLength":120,"type":"string"},"maxItems":100,"type":"array"},"latitudeDataKey":{"maxLength":255,"type":"string"},"longitudeDataKey":{"maxLength":255,"type":"string"},"source":{"description":"Where the rain comes from: `ads` (by the location id in `targetDataKey`, needs `rainLogin`), `stormwatch` (by the station in `targetDataKey`), `neer-weather-api` (radar at the coordinates in `latitudeDataKey` and `longitudeDataKey`, spending weather allowance) or `neer-geospatial-fetch` (not offered yet). Not the network's own: ADS and Storm Watch layers can't take themselves.","enum":["ads","stormwatch","neer-weather-api","neer-geospatial-fetch"],"type":"string"},"targetDataKey":{"maxLength":255,"type":"string"}},"required":["source","chartKinds"],"type":"object"},{"type":"null"}]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Sensor layer settings","tags":["Layers & data"]}},"/layers/{layerId}/styles":{"get":{"description":"A layer's styles and labels, with the active one marked. Each has the `version` a save needs.","operationId":"layer.style.list","parameters":[{"$ref":"#/components/parameters/layerId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerStyles"}}},"description":"The layer's styles and labels"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List layer styles","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a style to a layer and uses it. You choose its `styleId`. The block named by `category` is required.","operationId":"layer.style.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"style":{"category":"SingleSymbol","singleSymbol":{"paint":{"line-color":"#1f78b4","line-width":2}},"type":"Line"},"styleId":"00000000-0000-0000-0000-000000000007"},"schema":{"additionalProperties":false,"properties":{"style":{"additionalProperties":false,"properties":{"categorical":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"},"value":{"maxLength":500,"type":"string"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","classes"],"type":"object"},"category":{"description":"type: how the layer draws: Circle or Symbol for points, Line for lines, Fill or Line for polygons. category: which block draws it, singleSymbol, categorical or graduated (rasters: simple, categorical, graduated, hillshade; services: featureSingleSymbol and so on); that block is required, and blocks left out are kept.","enum":["SingleSymbol","Categorical","Graduated"]},"graduated":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","equalInterval","classes"],"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"singleSymbol":{"additionalProperties":false,"properties":{"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["paint"],"type":"object"},"type":{"enum":["Background","Circle","Fill","FillExtrusion","Heatmap","Hillshade","Line","Raster","Symbol"]}},"required":["type","category"],"title":"Style","type":"object"},"styleId":{"format":"uuid","title":"New style's id","type":"string"}},"required":["styleId","style"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save as new style","tags":["Layers & data"]}},"/layers/{layerId}/styles/{styleId}":{"delete":{"description":"Deletes a layer style. A layer's last style can't be deleted.","operationId":"layer.style.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The style's id.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete style","tags":["Layers & data"]},"patch":{"description":"Changes a layer style. Send its `version` from `GET /layers/{layerId}/styles` as `baseVersion` (409 if it changed since). Blocks left out are kept.","operationId":"layer.style.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Left out: the style in use, as a request to change how it looks means.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"baseVersion":"0123456789abcdef0123456789abcdef","style":{"category":"SingleSymbol","singleSymbol":{"paint":{"line-color":"#1f78b4","line-width":2}},"type":"Line"}},"schema":{"additionalProperties":false,"properties":{"baseVersion":{"description":"The `version` you read from the styles list; if it changed since, the save is refused. Left out with styleId: the style in use as it is now.","pattern":"^[0-9a-f]{32}$","type":"string"},"label":{"additionalProperties":false,"properties":{"baseVersion":{"description":"The `version` you read from the styles list (layer.style.list, raster.style.list or service.style.list). If it changed since, the save is refused. For a label: required to change an existing one, left out to create a new one.","pattern":"^[0-9a-f]{32}$","type":"string"},"label":{"additionalProperties":false,"properties":{"active":{"description":"True shows the label on the map.","type":"boolean"},"layout":{"description":"MapLibre symbol layout properties, such as text-size and symbol-placement.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"paint":{"description":"MapLibre text and icon paint properties, such as text-color and text-halo-width.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"property":{"description":"The column the label shows. Null for none; an active label needs one.","maxLength":255,"minLength":1,"type":["string","null"]},"type":{"enum":["Symbol","Icon","Text"]}},"required":["property","active","paint","layout"],"title":"Label","type":"object"},"labelId":{"description":"The label's id from layer.style.list, or a new UUID of your own to create one.","format":"uuid","title":"Label","type":"string"}},"required":["labelId","label"],"type":"object"},"style":{"additionalProperties":false,"properties":{"categorical":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"},"value":{"maxLength":500,"type":"string"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","classes"],"type":"object"},"category":{"description":"type: how the layer draws: Circle or Symbol for points, Line for lines, Fill or Line for polygons. category: which block draws it, singleSymbol, categorical or graduated (rasters: simple, categorical, graduated, hillshade; services: featureSingleSymbol and so on); that block is required, and blocks left out are kept.","enum":["SingleSymbol","Categorical","Graduated"]},"graduated":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","equalInterval","classes"],"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"singleSymbol":{"additionalProperties":false,"properties":{"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["paint"],"type":"object"},"type":{"enum":["Background","Circle","Fill","FillExtrusion","Heatmap","Hillshade","Line","Raster","Symbol"]}},"required":[],"title":"Style","type":"object"}},"required":["style"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save style","tags":["Layers & data"]}},"/layers/{layerId}/styles/{styleId}/activate":{"post":{"description":"Makes a saved style the one a layer is drawn with.","operationId":"layer.style.activate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The style's id.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Use style","tags":["Layers & data"]}},"/layers/{layerId}/symbols":{"patch":{"description":"Draws a model's network layer with network symbols (`on: true`) or plain dots and lines (`on: false`).","operationId":"layer.symbols.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"on":true},"schema":{"additionalProperties":false,"properties":{"on":{"description":"Draw each kind as its own symbol, in its class color. When off, plain dots and lines.","title":"Network symbols","type":"boolean"}},"required":["on"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Draw in network symbols","tags":["Layers & data"]}},"/layers/{layerId}/trash":{"post":{"description":"Moves a layer to the trash. A model's network layer goes with its model instead.","operationId":"layer.trash","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The layer's id.","in":"path","name":"layerId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move layer to trash","tags":["Layers & data"]}},"/machines":{"get":{"description":"Live machines in the workspace, newest first, with their current status. Returns 503 where machines aren't available.","operationId":"machine.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"machines":{"items":{"$ref":"#/components/schemas/Machine"},"type":"array"}},"required":["machines"],"type":"object"}}},"description":"The machines"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List machines","tags":["Compute"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/machines/catalog":{"get":{"description":"Machine types you can create, one offer per region, cheapest first. Prices in dollars per hour.","operationId":"machine.catalogue","parameters":[{"description":"0 for CPU only. Otherwise, at least this many GPUs.","in":"query","name":"gpus","schema":{"maximum":16,"minimum":0,"type":"integer"}},{"description":"At least this many: Memory in GB.","in":"query","name":"minRamGb","schema":{"minimum":0,"type":"number"}},{"description":"At least this many: vCPUs.","in":"query","name":"minCpus","schema":{"minimum":0,"type":"number"}},{"description":"At least this many: Disk in GB.","in":"query","name":"minStorageGb","schema":{"minimum":0,"type":"number"}},{"description":"Total across all GPUs.","in":"query","name":"minVramGb","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"offers":{"items":{"$ref":"#/components/schemas/MachineOffer"},"type":"array"}},"required":["offers"],"type":"object"}}},"description":"The offers"},"401":{"$ref":"#/components/responses/Unauthorized"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Failed"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List machine types","tags":["Compute"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/machines/ended":{"get":{"description":"Machines in the workspace that ended in the last `days` (default 90), with run time, end\nreason and cost.\n","operationId":"machine.ended","parameters":[{"description":"How far back, in days. Default 90.","in":"query","name":"days","schema":{"maximum":366,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"machines":{"items":{"$ref":"#/components/schemas/EndedMachine"},"type":"array"}},"required":["machines"],"type":"object"}}},"description":"The ended machines"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List ended machines","tags":["Compute"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/machines/{machineId}/heartbeat":{"get":{"description":"A machine's memory, storage, GPU and network use, and whether Jupyter is running.","operationId":"machine.heartbeat","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineHeartbeat"}}},"description":"Machine usage"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get machine usage","tags":["Compute"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"machineId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/maintenance-records/{recordId}/attach":{"post":{"description":"Moves a work order onto an asset, by `fid` or `assetName`, or detaches it with `detach: true`.","operationId":"risk.maintenance.attach","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The record's id.","in":"path","name":"recordId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"assetName":"MH-1042-MH-1043","layerId":"00000000-0000-0000-0000-000000000005"},"schema":{"additionalProperties":false,"properties":{"assetName":{"description":"The asset's id as the layer names it, ignoring case and punctuation. Must match exactly one feature. Ignored when `fid` is sent.","maxLength":240,"minLength":1,"type":"string"},"detach":{"description":"Leave the record unmatched.","type":"boolean"},"fid":{"description":"The feature's id on the layer. Send this or `assetName`.","minimum":0,"type":"integer"},"layerId":{"description":"The layer to attach to. Default is the record's import layer.","format":"uuid","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Attach work order to asset","tags":["Risk"]}},"/maintenance-records/{recordId}/document":{"get":{"description":"A short-lived download link for a work order document. `url` is null if there isn't one.","operationId":"risk.maintenance.document.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskMediaUrl"}}},"description":"A short-lived address, or null when the recorded file is unavailable"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download work order document","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"recordId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/maintenance-records/{recordId}/document-upload":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"recordId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Starts a work order document upload. Post `form.fields`, then the file, as multipart form\ndata to `form.url` within 15 minutes. Then call `POST /maintenance-records/{recordId}/documents`.\n","operationId":"risk.maintenance.document.upload","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskMaintenanceDocumentUpload"}}},"description":"A scoped upload form and attach token"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Insufficient storage quota"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start work order document upload","tags":["Risk"]}},"/maintenance-records/{recordId}/documents":{"post":{"description":"Finishes a work order document upload started with `POST /maintenance-records/{recordId}/document-upload`.","operationId":"risk.maintenance.document.attach","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The record's id.","in":"path","name":"recordId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"uploadToken":"<uploadToken from risk.maintenance.document.upload>"},"schema":{"additionalProperties":false,"properties":{"uploadToken":{"description":"The `uploadToken` from `POST /maintenance-records/{recordId}/document-upload` for this record.","maxLength":8192,"minLength":1,"type":"string"}},"required":["uploadToken"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Attach work order document","tags":["Risk"]}},"/me":{"get":{"description":"Returns you, the workspace this request runs in, every workspace you can use, and which modules are on.","operationId":"me","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"The current user"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get current user","tags":["Account"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Changes your display name (1 to 120 characters).","operationId":"account.name.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Dana Ortiz"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change my name","tags":["Account"]}},"/models":{"get":{"description":"The project's models, each with its engine, state, version and network layers.\n","operationId":"model.list","parameters":[{"description":"The project's id. `GET /projects` lists them.","in":"query","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Model"},"type":"array"}}},"description":"The models"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List models","tags":["Models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates an empty SWMM or EPANET model with an empty layer for each network part.","operationId":"model.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"engine":"epanet","name":"Water system","projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"properties":{"engine":{"description":"swmm6 is a SWMM model marked OpenSWMM 6's: its runs start on OpenSWMM 6.","enum":["swmm","epanet","swmm6"],"title":"Engine","type":"string","x-titles":["EPA SWMM 5","EPANET","SWMM 6 (OpenSWMM)"]},"name":{"description":"Default Untitled SWMM 1, Untitled EPANET 1 or Untitled OpenSWMM 1 by engine, with the next free number.","maxLength":120,"type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"}},"required":["engine","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New model","tags":["Project models"]}},"/models/build":{"post":{"description":"Builds a SWMM or EPANET model from GIS layers, each given a role (junctions, conduits, outfalls…). Preview it first to see the report and preview. Runs as a job, in `changes[0].to.jobId`. With `params.modelId`, builds into that model.","operationId":"model.build","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"engine":"swmm","name":"Storm network","options":{"toleranceM":1.0},"projectId":"00000000-0000-0000-0000-000000000001","sources":[{"layerId":"00000000-0000-0000-0000-000000000003","role":"junction"},{"layerId":"00000000-0000-0000-0000-000000000004","role":"conduit"}]},"schema":{"additionalProperties":false,"properties":{"dem":{"additionalProperties":false,"description":"A project raster the ground under the nodes is sampled from, for the rims and elevations the layers leave blank.","properties":{"rasterId":{"format":"uuid","type":"string"},"unit":{"description":"Its values' unit. Left out, the unit it records; refused when it records none (raster-unit-unknown).","enum":["meters","feet","usFeet"],"type":"string"}},"required":["rasterId"],"type":"object"},"engine":{"enum":["swmm","epanet"],"title":"Engine","type":"string","x-titles":["EPA SWMM 5","EPANET"]},"flowUnits":{"description":"The model's flow units, which also say whether its values are US or metric. SWMM takes CFS, GPM, MGD, CMS, LPS or MLD; EPANET any listed but CMS. Default CFS for SWMM, GPM for EPANET. Ignored with modelId: the model's own are used.","enum":["CFS","GPM","MGD","CMS","LPS","MLD","IMGD","AFD","LPM","CMH","CMD"],"type":"string"},"linkOffsets":{"default":"depth","description":"How a SWMM conduit's offsets read: a depth above its node's invert (the default), or an elevation. Ignored with modelId: the model's own setting is used.","enum":["depth","elevation"],"type":"string"},"modelId":{"description":"An existing SWMM or EPANET model of the project's to build into, rather than a new one: its nodes are fixed anchors new link ends snap to, a point on one of its nodes of the same role is matched to it, new names are kept clear of its own, its flow units and link offsets are used, and nothing of it changes but the links split where splitExisting asks. Left out, a new model is made.","format":"uuid","type":"string"},"name":{"description":"The new model's name. Default Untitled SWMM 1 or Untitled EPANET 1, with the next free number. Ignored with modelId.","maxLength":120,"type":"string"},"options":{"additionalProperties":false,"properties":{"acceptedOutfalls":{"description":"The proposed outfalls kept, by node name. Left out, every one is kept.","items":{"maxLength":255,"type":"string"},"maxItems":10000,"type":"array"},"applyDefaults":{"default":true,"description":"What's still blank takes the build's default values (and those in defaults). Default true.","type":"boolean"},"createMissingNodes":{"default":true,"description":"A link's bare end gets a junction made for it. Off, a link with a bare end is dropped. Default true.","type":"boolean"},"defaults":{"description":"Values in place of the build's defaults for what's blank, or beside them, by role and key.","items":{"additionalProperties":false,"properties":{"key":{"maxLength":255,"minLength":1,"type":"string"},"role":{"enum":["junction","outfall","storage","divider","conduit","pump","orifice","weir","outlet","subcatchment","reservoir","tank","pipe","valve"],"type":"string"},"value":{"type":["string","number","boolean"]}},"required":["role","key","value"],"type":"object"},"maxItems":200,"type":"array"},"fillFromNeighbors":{"default":true,"description":"Nodes with no elevation are given one from their neighbors along the links. Default true.","type":"boolean"},"joinReachM":{"default":60.0,"description":"A tank or reservoir (EPANET), or an outfall (SWMM), that no link reaches is joined to the nearest pipe or conduit within this many meters by one made for it, and listed. 0 joins none.","maximum":200,"minimum":0,"type":"number"},"orientByGround":{"default":false,"description":"SWMM conduits whose inverts aren't known are turned by the ground under their nodes (needs dem). Default false.","type":"boolean"},"orientByInverts":{"default":true,"description":"SWMM conduits that run uphill by their inverts are turned round. Default true.","type":"boolean"},"outletInsideFirst":{"default":true,"description":"A subcatchment with no outlet mapped drains to the node nearest its centroid inside it, before the nearest outside. Default true.","type":"boolean"},"proposeOutfalls":{"default":true,"description":"Each SWMM part with no outfall has its lowest dead end proposed as one. Default true. Off for a sanitary sewer: its outfall is the treatment plant, and a part that doesn't reach it is listed, not given a dead end as one.","type":"boolean"},"splitAtCrossings":{"default":false,"description":"Conduits or pipes that cross with no node get a junction there and are split. Default false, since lines that cross mostly pass over one another.","type":"boolean"},"splitAtNodes":{"default":true,"description":"A node lying along a conduit or pipe, away from its ends, splits it there. Default true.","type":"boolean"},"splitExisting":{"default":false,"description":"Built into an existing model, its conduits and pipes a new node lies along are split there, as the editor splits them. Off, its links are left as they are.","type":"boolean"},"toleranceM":{"default":1.0,"description":"How near a node a link's end is put on it, how near bare ends are to share a node made for them, and how near a link a node is to split it, in meters.","maximum":50.0,"minimum":0.01,"type":"number"}},"title":"Options","type":"object"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"requestId":{"description":"Optional: a new UUID you make for each build. Applying again with the same requestId returns the build already queued instead of queuing a second.","format":"uuid","type":"string"},"scenarioId":{"description":"Only with modelId: the scenario you're viewing the model in. A build goes into its Base, so any other scenario is refused (builds-go-into-base).","format":"uuid","type":"string"},"sources":{"description":"The project's layers the network is built from, each as one of the engine's roles. A layer may be given several roles, each for the features whose value of a column is one of a list; each feature goes to the first of its layer's sources it matches.","items":{"additionalProperties":false,"properties":{"columns":{"description":"The role's columns as the build fills them, each with its type, and a keyword column's values.","items":{"additionalProperties":false,"properties":{"choices":{"items":{"maxLength":100,"type":"string"},"maxItems":100,"type":"array"},"key":{"maxLength":255,"minLength":1,"type":"string"},"type":{"enum":["string","number","boolean","unknown"],"type":"string"},"unit":{"description":"The unit a length's source column is in, where it isn't the model's: a pipe size in inches (GEOM1_IN) for a SWMM model in feet. Read into the model's units: feet or meters, and an EPANET diameter in inches or millimeters.","enum":["in","ft","mm","cm","m"],"type":"string"}},"required":["key","type"],"type":"object"},"maxItems":200,"type":"array"},"layerId":{"description":"A point, line or polygon layer of the project.","format":"uuid","type":"string"},"mapping":{"additionalProperties":{"maxLength":255,"type":["string","null"]},"description":"Each column's source column, or null to leave it blank. A key is one of the role's columns (a SWMM junction's elevation, max_depth, rim_elev; a conduit's xsection_geom1, roughness; an EPANET pipe's diameter): any other is refused. A key mapped but not in columns is read as its values are. name, and a link's from and to (from_node and to_node, or node1 and node2), are mapped as any column is: unmapped, names are made and ends found by place.","maxProperties":200,"type":"object"},"role":{"description":"The part of the network the layer's features become. Must be one of the engine's roles: SWMM takes junction, outfall, storage, divider, conduit, pump, orifice, weir, outlet and subcatchment; EPANET takes junction, reservoir, tank, pipe, pump and valve.","enum":["junction","outfall","storage","divider","conduit","pump","orifice","weir","outlet","subcatchment","reservoir","tank","pipe","valve"],"type":"string"},"where":{"additionalProperties":false,"description":"Only the features whose value of the column is one of these, compared as text without case.","properties":{"column":{"maxLength":255,"minLength":1,"type":"string"},"values":{"items":{"maxLength":255,"type":"string"},"maxItems":100,"minItems":1,"type":"array"}},"required":["column","values"],"type":"object"}},"required":["layerId","role"],"type":"object"},"maxItems":50,"minItems":1,"title":"Layers","type":"array"}},"required":["engine","sources","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Build model from GIS","tags":["Project models"]}},"/models/generate/epanet":{"post":{"description":"Makes an EPANET model with the model generator. For a new network, send `area`, and a buildings or parcels layer if the project has one (without, it serves Overture Maps' buildings, saved as a layer); to build from your own, send `network`. Ready in minutes in `GET /models`. Billed to the project owner's credit.","operationId":"model.epanet.generate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"area":{"coordinates":[[[-97.75,30.26],[-97.73,30.26],[-97.73,30.28],[-97.75,30.28],[-97.75,30.26]]],"type":"Polygon"},"buildingsLayerId":"00000000-0000-0000-0000-000000000003","fireFlowGpm":1500,"projectId":"00000000-0000-0000-0000-000000000001","units":"US"},"schema":{"additionalProperties":false,"properties":{"area":{"additionalProperties":true,"description":"A GeoJSON Polygon or MultiPolygon in WGS84 (longitude, latitude). The generator builds over its bounding box, at most half a degree (about 30 miles) on a side. Required unless `network` or areaLayerId is given; without them, the network's extent is used.","title":"Study area","type":"object"},"areaLayerId":{"description":"A layer of the project whose polygons, merged, are the study area: a boundary someone drew or brought. In place of area.","format":"uuid","title":"Study area layer","type":"string"},"buildingsLayerId":{"description":"A layer of the project's building footprints: the network reaches each, and its demand comes from their area. Optional: with neither this nor `parcelsLayerId`, a new network serves Overture Maps' buildings in the area, which are saved to the project as a layer. Not used with `network`.","format":"uuid","title":"Buildings","type":"string"},"fireFlowGpm":{"description":"The fire flow, in gpm, the network is sized to carry at the residual pressure. Optional; left out, the generator's own value is used.","maximum":10000,"minimum":0,"title":"Fire flow (gpm)","type":"number"},"headloss":{"default":"H-W","enum":["H-W","D-W","C-M"],"title":"Headloss formula","type":"string","x-titles":["Hazen-Williams","Darcy-Weisbach","Chezy-Manning"]},"hours":{"default":24,"maximum":168,"minimum":1,"title":"Simulation length (h)","type":"integer"},"huc":{"description":"A USGS hydrologic unit code, HUC-2 to HUC-16 (such as 103001010202): its boundary, from the NEER library's Watershed Boundary Dataset, is the study area. In place of area.","pattern":"^[0-9]{2,16}$","title":"HUC","type":"string"},"name":{"description":"Default Untitled EPANET 1, or the next free number.","maxLength":120,"type":"string"},"network":{"additionalProperties":false,"description":"A brownfield build from layers of the project, in place of a greenfield one: a layer for each part. Elevations, depths and lengths are in the model's units (feet for US), pipe sizes in inches.","properties":{"junctions":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"demand":{"maxLength":200,"type":"string"},"elevation":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"pipes":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"diameter":{"maxLength":200,"type":"string"},"from":{"maxLength":200,"type":"string"},"length":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"roughness":{"maxLength":200,"type":"string"},"status":{"maxLength":200,"type":"string"},"to":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"pumps":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"from":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"to":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"reservoirs":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"head":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"tanks":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"diameter":{"maxLength":200,"type":"string"},"elevation":{"maxLength":200,"type":"string"},"initLevel":{"maxLength":200,"type":"string"},"maxLevel":{"maxLength":200,"type":"string"},"minLevel":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"valves":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"diameter":{"maxLength":200,"type":"string"},"from":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"setting":{"maxLength":200,"type":"string"},"to":{"maxLength":200,"type":"string"},"type":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"}},"required":["junctions","pipes"],"title":"The project's network","type":"object"},"parcelsLayerId":{"description":"A layer of the project's parcels, in place of or beside the buildings.","format":"uuid","title":"Parcels","type":"string"},"plantLayerId":{"description":"A point layer of the project whose first point is the water treatment plant, the network's source. Optional for a new network: left out, it goes at the highest ground the network reaches, by the terrain (USGS 3DEP in the US).","format":"uuid","title":"Treatment plant","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"units":{"description":"US (gpm, psi and feet) or SI (L/s and meters). Left out: US in the United States, SI elsewhere.","enum":["US","SI"],"title":"Units","type":"string","x-titles":["US (gpm, psi)","SI (L/s, m)"]}},"required":["projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make EPANET model","tags":["Project models"]}},"/models/generate/hecras":{"post":{"description":"Makes a 2D HEC-RAS model of `area`, with a plan for each design storm in `designStorms`. `created` is the new model; it's ready in minutes. Billed to the project owner's credit.","operationId":"model.hecras.generate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"area":{"coordinates":[[[-94.5,39.0],[-94.49,39.0],[-94.49,39.01],[-94.5,39.01],[-94.5,39.0]]],"type":"Polygon"},"cellSizeFt":100,"designStorms":["10yr","100yr"],"name":"Mill Creek 2D","projectId":"00000000-0000-0000-0000-000000000001","stormHours":24,"units":"US"},"schema":{"additionalProperties":false,"properties":{"area":{"additionalProperties":true,"description":"The study area: a GeoJSON Polygon or MultiPolygon geometry (not a Feature), in longitude and latitude (WGS84), with some area. Give this or areaLayerId.","title":"Study area","type":"object"},"areaLayerId":{"description":"A layer of the project whose polygons, merged, are the study area: a boundary someone drew or brought. Give this, area or huc.","format":"uuid","title":"Study area layer","type":"string"},"cellSizeFt":{"default":100.0,"description":"The 2D mesh cell size, always in feet.","maximum":1000.0,"minimum":5.0,"title":"Cell size (ft)","type":"number"},"demResolutionM":{"default":10,"description":"The USGS 3DEP terrain fetched, in meters: 10 (default) or 1 where 3DEP has it, read from the NEER library where it holds the area. With cells of 100 ft or more, 1 m is written as 2 m terrain.","enum":[10,1],"title":"Terrain (m)","type":"integer"},"designStorms":{"default":["100yr"],"description":"NOAA Atlas 14 design storms, one plan for each.","items":{"enum":["2yr","5yr","10yr","25yr","50yr","100yr","200yr","500yr","1000yr"],"type":"string"},"minItems":1,"title":"Design storms","type":"array","uniqueItems":true},"huc":{"description":"A USGS hydrologic unit code, HUC-2 to HUC-16 (such as 103001010202): its boundary, from the NEER library's Watershed Boundary Dataset, is the study area. Give this, area or areaLayerId.","pattern":"^[0-9]{2,16}$","title":"HUC","type":"string"},"name":{"description":"Default Untitled HEC-RAS 1, or the next free number.","maxLength":120,"type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"stormHours":{"default":24,"description":"Each design storm's length in hours: 6, 12 or 24. Default 24.","enum":[6,12,24],"title":"Storm length (h)","type":"integer"},"units":{"default":"US","description":"US (feet) or SI (meters), the model's units. Default US.","enum":["US","SI"],"title":"Units","type":"string","x-titles":["US (ft)","SI (m)"]}},"required":["projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make HEC-RAS model","tags":["HEC-RAS editing"]}},"/models/generate/swmm":{"post":{"description":"Makes a SWMM model with the model generator. For a new network, send `area`, and a buildings or parcels layer if the project has one (without, it serves Overture Maps' buildings, saved as a layer); to build from your own, send `network`. Ready in minutes in `GET /models`. Billed to the project owner's credit.","operationId":"model.swmm.generate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"area":{"coordinates":[[[-97.75,30.26],[-97.73,30.26],[-97.73,30.28],[-97.75,30.28],[-97.75,30.26]]],"type":"Polygon"},"buildingsLayerId":"00000000-0000-0000-0000-000000000005","name":"Elm Street storm","projectId":"00000000-0000-0000-0000-000000000001","returnYears":[10,100],"stormHours":24,"system":"stormwater"},"schema":{"additionalProperties":false,"properties":{"area":{"additionalProperties":true,"description":"A GeoJSON Polygon or MultiPolygon in WGS84 (longitude, latitude). The generator builds over its bounding box, at most half a degree (about 30 miles) on a side. Required unless `network` or areaLayerId is given; without them, the network's extent is used.","title":"Study area","type":"object"},"areaLayerId":{"description":"A layer of the project whose polygons, merged, are the study area: a boundary someone drew or brought. In place of area.","format":"uuid","title":"Study area layer","type":"string"},"buildingsLayerId":{"description":"A layer of the project's building footprints: the network reaches each, and its demand comes from their area. Optional: with neither this nor `parcelsLayerId`, a new network serves Overture Maps' buildings in the area, which are saved to the project as a layer. Not used with `network`.","format":"uuid","title":"Buildings","type":"string"},"distribution":{"default":"atlas14","description":"atlas14: the site's NOAA Atlas 14 temporal distribution. nrcs: the NRCS (SCS) type for the site.","enum":["atlas14","nrcs"],"title":"Rain distribution","type":"string"},"huc":{"description":"A USGS hydrologic unit code, HUC-2 to HUC-16 (such as 103001010202): its boundary, from the NEER library's Watershed Boundary Dataset, is the study area. In place of area.","pattern":"^[0-9]{2,16}$","title":"HUC","type":"string"},"name":{"description":"The model's name, without / or \\. Default: Untitled SWMM 1, or the next free number.","maxLength":120,"type":"string"},"network":{"additionalProperties":false,"description":"A brownfield build from layers of the project, in place of a greenfield one: a layer for each part. Elevations, depths and lengths are in the model's units (feet for US), pipe sizes in inches.","properties":{"conduits":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"diameter":{"maxLength":200,"type":"string"},"from":{"maxLength":200,"type":"string"},"inOffset":{"maxLength":200,"type":"string"},"length":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"outOffset":{"maxLength":200,"type":"string"},"roughness":{"maxLength":200,"type":"string"},"shape":{"maxLength":200,"type":"string"},"to":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"junctions":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"depth":{"maxLength":200,"type":"string"},"invert":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"rim":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"orifices":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"from":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"to":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"outfalls":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"invert":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"type":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"pumps":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"diameter":{"maxLength":200,"type":"string"},"from":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"to":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"storage":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"depth":{"maxLength":200,"type":"string"},"invert":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"rim":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"weirs":{"additionalProperties":false,"properties":{"columns":{"additionalProperties":false,"description":"The layer's column for each value, where its name isn't one the generator knows.","properties":{"from":{"maxLength":200,"type":"string"},"name":{"maxLength":200,"type":"string"},"to":{"maxLength":200,"type":"string"}},"type":"object"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId"],"type":"object"}},"required":["junctions","conduits"],"title":"The project's network","type":"object"},"outletsLayerId":{"description":"For a community whose wastewater a neighbor treats, in place of plantLayerId: a point layer of the project, each point where the new sewer joins the neighbor's (an interceptor or a connection). Each sewer drains to whichever is cheapest to reach. At most 50.","format":"uuid","title":"Outlets","type":"string"},"parcelsLayerId":{"description":"A layer of the project's parcels, in place of or beside the buildings.","format":"uuid","title":"Parcels","type":"string"},"plantLayerId":{"description":"A point layer of the project whose first point is the wastewater treatment plant, where the sewers drain (a sanitary system's outfall). Optional for a new network: left out, it goes at the lowest ground the network reaches, by the terrain (USGS 3DEP in the US).","format":"uuid","title":"Treatment plant","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"returnYears":{"default":[10,25,100],"description":"NOAA Atlas 14 design storms by return period.","items":{"enum":[1,2,5,10,25,50,100,500],"type":"integer"},"maxItems":4,"minItems":1,"title":"Design storms (years)","type":"array","uniqueItems":true},"stormHours":{"default":24,"description":"How long each design storm lasts, in hours. Default 24.","enum":[1,2,6,12,24],"title":"Storm length (h)","type":"integer"},"system":{"default":"stormwater","description":"stormwater: subcatchment runoff to storm sewers. sanitary: dry weather flow and RTK rainfall-dependent inflow and infiltration. combined: both.","enum":["stormwater","sanitary","combined"],"title":"System","type":"string"},"units":{"description":"US (feet, cfs) or SI (meters, L/s). Left out: US in the United States, SI elsewhere.","enum":["US","SI"],"title":"Units","type":"string","x-titles":["US (ft)","SI (m)"]}},"required":["projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make SWMM model","tags":["Project models"]}},"/models/{modelId}":{"get":{"description":"Returns a model with its `etag`, sections, series, newest 50 versions and scenarios.\n","operationId":"model.get","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetail"}}},"description":"The model"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get model","tags":["Models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/calibration-attachments":{"get":{"description":"The files kept with a model's calibration, newest first: dry weather, wet weather and QA/QC reports, and others, each with who added it. Add one with calibration.attachment.create, send its bytes (startCalibrationAttachmentUpload), then calibration.attachment.complete. Anyone who can read the project can read them.","operationId":"model.calibration.attachment.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationAttachments"}}},"description":"The attachments"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List calibration attachments","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a file to a model's calibration: a dry weather, wet weather or QA/QC report, or another file. Upload its bytes next, then complete it.","operationId":"calibration.attachment.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contentType":{"description":"The file's type: an HTML page (text/html), a PDF, a JPEG, PNG, WebP or GIF image, plain text, CSV, or a Word, Excel or PowerPoint file. The upload must match it.","maxLength":150,"type":"string"},"fileName":{"description":"The file's name, as it downloads.","maxLength":200,"minLength":1,"type":"string"},"name":{"description":"What the list calls it, trimmed. Left out or blank, the file's name.","maxLength":200,"type":"string"},"note":{"description":"A note on the file. Blank or null is none.","maxLength":2000,"type":["string","null"]},"purpose":{"description":"What the file is for: dry (the dry weather calibration), wet (the wet weather calibration), qa (QA/QC) or other.","enum":["dry","wet","qa","other"]},"sizeBytes":{"description":"The file's exact size in bytes, up to 25 MiB.","maximum":26214400,"minimum":1,"type":"integer"}},"required":["purpose","fileName","contentType","sizeBytes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Attach calibration file","tags":["Project models"]}},"/models/{modelId}/calibration-attachments/{attachmentId}":{"delete":{"description":"Deletes a file from a model's calibration.","operationId":"calibration.attachment.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The attachment, from calibration.attachment.create or the model's calibration attachments.","in":"path","name":"attachmentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete calibration file","tags":["Project models"]},"patch":{"description":"Renames a calibration file, or changes its note or what it's for.","operationId":"calibration.attachment.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The attachment, from the model's calibration attachments.","in":"path","name":"attachmentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"description":"Its new name, trimmed. Blank is refused.","maxLength":200,"minLength":1,"type":"string"},"note":{"description":"Its note. Blank or null is none.","maxLength":2000,"type":["string","null"]},"purpose":{"description":"What the file is for: dry (the dry weather calibration), wet (the wet weather calibration), qa (QA/QC) or other.","enum":["dry","wet","qa","other"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change calibration file","tags":["Project models"]}},"/models/{modelId}/calibration-attachments/{attachmentId}/complete":{"post":{"description":"Finishes an uploaded calibration file once its size, type and contents match.","operationId":"calibration.attachment.complete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The attachment, from calibration.attachment.create or the model's calibration attachments.","in":"path","name":"attachmentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Complete calibration file","tags":["Project models"]}},"/models/{modelId}/calibration-attachments/{attachmentId}/file":{"get":{"description":"An attachment's lasting link, for anyone who can read the project: a redirect to where it is read now. A PDF or a picture is shown from storage, for ten minutes. An HTML report goes to its own page (getCalibrationAttachmentPage), served from the API's host and never the app's, sandboxed with no origin of its own. Anything else, or anything asked with `download`, is saved under its file name.","operationId":"model.calibration.attachment.file","parameters":[{"$ref":"#/components/parameters/modelId"},{"in":"path","name":"attachmentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Save the file rather than open it.","in":"query","name":"download","required":false,"schema":{"type":"boolean"}}],"responses":{"302":{"description":"Redirect to the file or its page","headers":{"Location":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Open calibration attachment","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/calibration-attachments/{attachmentId}/upload":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Where to send an attachment's bytes: one form, held to the size and type it was declared with (25 MB at most, and within the project owner's storage). Finish with the calibration.attachment.complete action. Users who can edit the project's contents may.","operationId":"model.calibration.attachment.upload","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The attachment, from calibration.attachment.create.","in":"path","name":"attachmentId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpload"}}},"description":"Where to send the file"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not enough storage left."},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start calibration attachment upload","tags":["Project models"]}},"/models/{modelId}/calibration-depth-check":{"get":{"description":"Why a meter's depth reads off the model's, from the meter's flow, depth and velocity and\nthe model's pipe, with no run. For each meter with a registered event, on a circular pipe\nit is bound to, each reading's flow area (Q/V) is held to the circle's area at the observed\ndepth, and the observed depth to the clean pipe's normal depth at that flow with the\nmodel's n and slope. `verdict` names the likely cause (`noLowBias`, `silt`, `backwater`,\n`roughness`, `siltBackwater`, `unclear`) and `reason` says why. Figures are in feet and\ncfs. A meter that can't be checked has `skipped` and `why`, and no `checked`.\n","operationId":"model.calibration.depth_check","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The event set whose dry events are read; every dry event of the model when none.","in":"query","name":"drySetId","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"An event set whose wet events are read too, for the rating curve's storm points and the top 10 % of wet flows.","in":"query","name":"wetSetId","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationDepthCheck"}}},"description":"The depth check"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get calibration depth check","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/calibration-event-sets":{"get":{"description":"A model's calibration event sets, newest first, with counts. List the events with\n`GET /models/{modelId}/calibration-events`.\n","operationId":"model.calibration.event_set.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"sets":{"items":{"$ref":"#/components/schemas/CalibrationEventSet"},"type":"array"}},"required":["sets"],"type":"object"}}},"description":"The sets"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List calibration event sets","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates an empty calibration event set. Add events with `POST /models/{modelId}/calibration-events` (`setId`).","operationId":"calibration.set.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Fall 2025 storms"},"schema":{"additionalProperties":false,"properties":{"name":{"description":"The set's name, trimmed. Blank is refused.","maxLength":120,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New event set","tags":["Project models"]}},"/models/{modelId}/calibration-event-sets/{setId}":{"delete":{"description":"Deletes a calibration event set and its events.","operationId":"calibration.set.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The event set, from model.calibration.event_set.list: one of this model's, or one shared by every model.","in":"path","name":"setId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete event set","tags":["Project models"]}},"/models/{modelId}/calibration-event-sets/{setId}/duplicate":{"post":{"description":"Copies a calibration event set with its events.","operationId":"calibration.set.duplicate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The event set, from model.calibration.event_set.list: one of this model's, or one shared by every model.","in":"path","name":"setId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Duplicate event set","tags":["Project models"]}},"/models/{modelId}/calibration-event-sets/{setId}/rename":{"post":{"description":"Renames a calibration event set.","operationId":"calibration.set.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The event set, from model.calibration.event_set.list: one of this model's, or one shared by every model.","in":"path","name":"setId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Fall 2025 storms (checked)"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename event set","tags":["Project models"]}},"/models/{modelId}/calibration-events":{"get":{"description":"A model's calibration events, each a storm or dry period at a meter. QA verdicts are in\n`qa`.\n","operationId":"model.calibration.event.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"events":{"items":{"$ref":"#/components/schemas/CalibrationEvent"},"type":"array"}},"required":["events"],"type":"object"}}},"description":"The events"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List calibration events","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a storm or dry period at a meter to a model's calibration register. Without `setId` it goes into the \"Entered here\" set.","operationId":"calibration.event.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"endAt":"2025-06-03T00:00:00Z","ordinal":3,"reported":{"observedPeak":4.2,"rainfallIn":1.6},"role":"calibration","siteId":"00000000-0000-0000-0000-000000000010","startAt":"2025-06-01T00:00:00Z","weather":"wet"},"schema":{"additionalProperties":false,"properties":{"endAt":{"description":"When the window ends, RFC 3339. Must be after startAt.","format":"date-time","type":"string"},"gage":{"description":"The rain gauge the survey paired with the event, by name, such as RG_01. Stored as sent; blank or null is none.","maxLength":120,"type":["string","null"]},"note":{"description":"A note on the event. Blank or null is none.","maxLength":2000,"type":["string","null"]},"ordinal":{"description":"The event's number in the survey, a whole number from 0. The event is labeled by it (\"Storm 3\", \"Dry 3\"); without one, by its start date.","minimum":0,"type":["integer","null"]},"reported":{"additionalProperties":false,"description":"The survey's own figures for the event: observed and simulated peak, volume and depth, and rainfallIn, the storm's rain in inches. Any of them may be left out; a value that isn't a finite number is dropped. In calibration.event.update, a reported sent replaces the stored figures whole.","properties":{"observedDepth":{"type":["number","null"]},"observedPeak":{"type":["number","null"]},"observedVolume":{"type":["number","null"]},"rainfallIn":{"type":["number","null"]},"simulatedDepth":{"type":["number","null"]},"simulatedPeak":{"type":["number","null"]},"simulatedVolume":{"type":["number","null"]}},"type":"object"},"role":{"description":"Whether the event is used for fitting or held back for validation.","enum":["calibration","validation"]},"setId":{"description":"The set to add to: one of this model's sets, or one shared by every model. Without it, the model's \"Entered here\" set, made the first time.","format":"uuid","type":"string"},"siteId":{"description":"The meter. One of the project's sensor sites.","format":"uuid","type":"string"},"startAt":{"description":"When the event's window starts, RFC 3339 with an offset, such as 2025-06-01T00:00:00Z.","format":"date-time","type":"string"},"weather":{"description":"wet for a storm, dry for a dry weather period.","enum":["wet","dry"]}},"required":["siteId","weather","role","startAt","endAt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Register event","tags":["Project models"]}},"/models/{modelId}/calibration-events/check":{"post":{"description":"Checks a flow analysis's storms and dry periods against radar rain. Runs as a job; pass its id as `checkId` to `POST /models/{modelId}/calibration-events/send` within 24 hours. Uses the weather allowance.","operationId":"calibration.events.check","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"flowAnalysisId":"00000000-0000-0000-0000-000000000013"},"schema":{"additionalProperties":false,"properties":{"dry":{"description":"Check the windows made by the analysis's dry days. On unless false.","type":"boolean"},"flowAnalysisId":{"description":"The project's flow analysis whose storms and dry windows will be sent, from sensor.flow_analysis.list. Its wet and dry weather analyses must have run.","format":"uuid","type":"string"},"storms":{"description":"Check the storms the wet weather analysis kept that haven't been checked. On unless false.","type":"boolean"}},"required":["flowAnalysisId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Check rain for calibration","tags":["Project models"]}},"/models/{modelId}/calibration-events/import":{"post":{"description":"Imports up to 2,000 calibration events into a new set (`setName`) or an existing one (`setId`). `replace` deletes existing events first. `created.id` is the model's id, not the set's.","operationId":"calibration.events.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"events":[{"endAt":"2025-04-12T06:00:00Z","ordinal":1,"role":"calibration","siteId":"00000000-0000-0000-0000-000000000010","startAt":"2025-04-10T06:00:00Z","weather":"wet"},{"endAt":"2025-04-27T00:00:00Z","role":"calibration","siteId":"00000000-0000-0000-0000-000000000010","startAt":"2025-04-20T00:00:00Z","weather":"dry"}],"setName":"Spring 2025 survey"},"schema":{"additionalProperties":false,"properties":{"events":{"items":{"additionalProperties":false,"properties":{"endAt":{"description":"When the window ends, RFC 3339. Must be after startAt.","format":"date-time","type":"string"},"gage":{"description":"The rain gauge the survey paired with the event, by name, such as RG_01. Stored as sent; blank or null is none.","maxLength":120,"type":["string","null"]},"note":{"description":"A note on the event. Blank or null is none.","maxLength":2000,"type":["string","null"]},"ordinal":{"description":"The event's number in the survey, a whole number from 0. The event is labeled by it (\"Storm 3\", \"Dry 3\"); without one, by its start date.","minimum":0,"type":["integer","null"]},"reported":{"additionalProperties":false,"description":"The survey's own figures for the event: observed and simulated peak, volume and depth, and rainfallIn, the storm's rain in inches. Any of them may be left out; a value that isn't a finite number is dropped. In calibration.event.update, a reported sent replaces the stored figures whole.","properties":{"observedDepth":{"type":["number","null"]},"observedPeak":{"type":["number","null"]},"observedVolume":{"type":["number","null"]},"rainfallIn":{"type":["number","null"]},"simulatedDepth":{"type":["number","null"]},"simulatedPeak":{"type":["number","null"]},"simulatedVolume":{"type":["number","null"]}},"type":"object"},"role":{"description":"Whether the event is used for fitting or held back for validation.","enum":["calibration","validation"]},"siteId":{"description":"The meter. One of the project's sensor sites.","format":"uuid","type":"string"},"startAt":{"description":"When the event's window starts, RFC 3339 with an offset, such as 2025-06-01T00:00:00Z.","format":"date-time","type":"string"},"weather":{"description":"wet for a storm, dry for a dry weather period.","enum":["wet","dry"]}},"required":["siteId","weather","role","startAt","endAt"],"type":"object"},"maxItems":2000,"minItems":1,"type":"array"},"file":{"description":"The source file's name, kept on the new set. Ignored with setId.","maxLength":300,"type":["string","null"]},"replace":{"description":"Default false. With setId, that set's events are deleted first. Without setId, every event of this model, in all its sets, is deleted first; events shared by every model stay.","type":"boolean"},"setId":{"description":"The set to add the events to: one of this model's sets, or one shared by every model. Without it, a new set is made.","format":"uuid","type":"string"},"setName":{"description":"Without setId, the new set's name, trimmed and cut to 120 characters. Default \"Imported \" and today's date (UTC), such as \"Imported 2026-11-02\". Ignored with setId.","maxLength":120,"type":"string"}},"required":["events"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import events","tags":["Project models"]}},"/models/{modelId}/calibration-events/qa":{"post":{"description":"Checks a model's calibration events against gauge and radar rain and the meter's response, and saves a verdict on each as `qa`. Runs as a job; follow it with `GET /models/{modelId}/calibration-qa`. Uses the weather allowance.","operationId":"calibration.events.qa","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"rainSource":"best","setId":"00000000-0000-0000-0000-000000000012"},"schema":{"additionalProperties":false,"properties":{"rainSource":{"description":"The source for each storm's depth, intensity and R: best (chosen per storm by the check), gage (the rain gauge), radar_point (radar at the meter) or radar_sewershed (radar over the meter's sewershed). Every source is read and compared either way. Default best.","enum":["best","gage","radar_point","radar_sewershed"],"type":"string"},"setId":{"description":"Check only this set's events: one of this model's sets, or one shared by every model.","format":"uuid","type":"string"},"siteIds":{"description":"Check only these meters' events: 1 to 500 of the project's sensor site ids. An empty list is refused.","items":{"format":"uuid","type":"string"},"maxItems":500,"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Check calibration events","tags":["Project models"]}},"/models/{modelId}/calibration-events/send":{"post":{"description":"Sends a flow analysis's kept storms and dry periods to a model as an event set named `name`. Sending the same name again replaces it. Up to 2,000 events. `created.id` is the model's id.","operationId":"calibration.events.send","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"checkId":"00000000-0000-0000-0000-000000000014","flowAnalysisId":"00000000-0000-0000-0000-000000000013","minRainIn":0.5,"name":"From flow analysis 2025"},"schema":{"additionalProperties":false,"properties":{"checkId":{"description":"The job id (`created.id`) of a calibration.events.check of this analysis and model that succeeded within the last 24 hours. Its verdicts, made with radar over each sewershed, replace the analysis's own. Refused with 409 while that check is still running, or if the analysis ran again after it.","format":"uuid","type":"string"},"dry":{"description":"Send the windows made by the analysis's dry days. On unless false.","type":"boolean"},"flowAnalysisId":{"description":"The project's flow analysis whose storms and dry days are sent, from sensor.flow_analysis.list. It must have run.","format":"uuid","type":"string"},"includeRejected":{"description":"Also send events the checks rejected. Default false.","type":"boolean"},"minRainIn":{"description":"The smallest storm to send, in inches. Default 0.5.","maximum":20,"minimum":0,"type":"number"},"name":{"description":"The set's name, trimmed and cut to 120 characters. If this model already has a set sent from a flow analysis under that name, its events are replaced.","maxLength":120,"minLength":1,"type":"string"},"storms":{"description":"Send the storms the wet weather analysis kept. On unless false.","type":"boolean"}},"required":["flowAnalysisId","name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Send to calibration","tags":["Project models"]}},"/models/{modelId}/calibration-events/{eventId}":{"delete":{"description":"Removes an event from a model's calibration register. Studies that use it can't run again until it's removed from them.","operationId":"calibration.event.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The event, from model.calibration.event.list. This model's, or one shared by every model.","in":"path","name":"eventId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove event","tags":["Project models"]},"patch":{"description":"Changes a calibration event. Send `eventId` and only the fields to change.","operationId":"calibration.event.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The event's id.","in":"path","name":"eventId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"role":"validation"},"schema":{"additionalProperties":false,"properties":{"endAt":{"description":"When the window ends, RFC 3339. Must be after startAt.","format":"date-time","type":"string"},"gage":{"description":"The rain gauge the survey paired with the event, by name, such as RG_01. Stored as sent; blank or null is none.","maxLength":120,"type":["string","null"]},"note":{"description":"A note on the event. Blank or null is none.","maxLength":2000,"type":["string","null"]},"ordinal":{"description":"The event's number in the survey, a whole number from 0. The event is labeled by it (\"Storm 3\", \"Dry 3\"); without one, by its start date.","minimum":0,"type":["integer","null"]},"reported":{"additionalProperties":false,"description":"The survey's own figures for the event: observed and simulated peak, volume and depth, and rainfallIn, the storm's rain in inches. Any of them may be left out; a value that isn't a finite number is dropped. In calibration.event.update, a reported sent replaces the stored figures whole.","properties":{"observedDepth":{"type":["number","null"]},"observedPeak":{"type":["number","null"]},"observedVolume":{"type":["number","null"]},"rainfallIn":{"type":["number","null"]},"simulatedDepth":{"type":["number","null"]},"simulatedPeak":{"type":["number","null"]},"simulatedVolume":{"type":["number","null"]}},"type":"object"},"role":{"description":"Whether the event is used for fitting or held back for validation.","enum":["calibration","validation"]},"setId":{"description":"Moves the event into this set: one of this model's sets, or one shared by every model.","format":"uuid","type":"string"},"siteId":{"description":"The meter. One of the project's sensor sites.","format":"uuid","type":"string"},"startAt":{"description":"When the event's window starts, RFC 3339 with an offset, such as 2025-06-01T00:00:00Z.","format":"date-time","type":"string"},"weather":{"description":"wet for a storm, dry for a dry weather period.","enum":["wet","dry"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change event","tags":["Project models"]}},"/models/{modelId}/calibration-events/{eventId}/rain":{"get":{"description":"The rain a calibration study uses for a storm, from the gauge or radar, up to 60 days.\nPoints are [epoch milliseconds, inches]. Asked with `report`, as Verify's event report\nreads it: where the QA/QC chose no rain, the gage bound to the meter (source\n`meter_gage`), with the storm's figures and the site the rain was read from.\n","operationId":"model.calibration.event.rain","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"A calibration event's id, from `GET /models/{modelId}/calibration-events`.","in":"path","name":"eventId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window, an RFC 3339 instant such as 2024-11-03T05:00:00Z.","in":"query","name":"start","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window, an RFC 3339 instant after `start` and at most 60 days later.","in":"query","name":"end","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Read the storm as a report does: the meter's own gage where the QA/QC chose no rain, and the storm's figures (total, peak and average intensity, duration, dry days before it, and its Atlas 14 return period at the rain site). Leave out for the rain a calibration study takes.","in":"query","name":"report","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationEventRain"}}},"description":"The rain"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get calibration event rain","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/calibration-qa":{"get":{"description":"The latest calibration QA check's progress or findings. Read again until `status` is\n`completed` or `failed`.\n","operationId":"model.calibration.qa","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"run":{"oneOf":[{"$ref":"#/components/schemas/CalibrationQaRun"},{"type":"null"}]}},"required":["run"],"type":"object"}}},"description":"The latest check"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get calibration QA","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/calibration-records":{"get":{"description":"Each meter's calibration from each study, newest first, with its state.\n","operationId":"model.calibration.record.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"records":{"items":{"$ref":"#/components/schemas/CalibrationRecord"},"type":"array"}},"required":["records"],"type":"object"}}},"description":"The records"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List calibration records","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/calibration-studies":{"get":{"description":"A model's calibration studies, newest first, up to 100.\n","operationId":"model.calibration.study.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"studies":{"items":{"$ref":"#/components/schemas/CalibrationStudy"},"type":"array"}},"required":["studies"],"type":"object"}}},"description":"The studies"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List calibrations","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates a draft calibration study. `weather` is `wet` (fits unit hydrographs to storms) or `dry` (fits dry weather patterns). Start it with `POST /models/{modelId}/calibration-studies/{studyId}/run`.","operationId":"calibration.study.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"config":{"afterHours":72,"beforeHours":24,"budget":600,"method":"sampled"},"eventIds":["00000000-0000-0000-0000-000000000011","00000000-0000-0000-0000-000000000015"],"name":"RTK fit 2025","variables":{"rScale":{"hi":2,"lo":0.5,"step":0.05}},"weather":"wet"},"schema":{"additionalProperties":false,"properties":{"config":{"additionalProperties":false,"description":"How the search runs and what it's judged by. A field left out takes its default. In calibration.study.update, a config sent replaces the stored one whole, so send every field to keep.","properties":{"afterHours":{"description":"Storms only. Hours after the last rain that each storm is scored through, stopping at the meter's next registered storm. Default 72.","maximum":336,"minimum":0,"type":"number"},"beforeHours":{"description":"Storms only. Hours before each window read for its dry weather baseline, never scored. Default 24.","maximum":240,"minimum":1,"type":"number"},"buckets":{"description":"Subcatchments only. How many buckets each meter's subcatchments are split into, by soil group or % impervious: Green-Ampt's conductivity is fitted per bucket. Default 2.","maximum":3,"minimum":1,"type":"integer"},"budget":{"description":"With sampled, the most combinations tried per meter per event. Default 600. A subcatchment study reads it as the most runs in all, at most 40.","maximum":5000,"minimum":1,"type":"integer"},"calibrationShare":{"description":"How the objective is split between events marked calibration and the rest, 0 to 1. Default 0.6.","maximum":1,"minimum":0,"type":"number"},"checkInSwmm":{"description":"Storms only. Also check each meter's fit in SWMM on its own sub-network, scaling R until its calibration storms meet the criteria. Off or left out keeps the analytical fit alone.","type":"boolean"},"concurrency":{"description":"How many trial simulations run at once. Default 12.","maximum":40,"minimum":1,"type":"integer"},"criteriaSetId":{"description":"The criteria set to judge by, from sensor.criteria.list. Null or left out uses the one the project enforces; starting is refused if that set is gone.","type":["string","null"]},"engineVersion":{"description":"The SWMM version every trial runs on, from GET /engines. Null uses the newest stable version offered.","maxLength":20,"type":["string","null"]},"eventSetId":{"description":"The event set the study's events were chosen from: one of this model's sets, or one shared by every model. The events fitted are still those in eventIds.","format":"uuid","type":["string","null"]},"fits":{"description":"Storms only. hydrograph (default) fits the RDII unit hydrographs; subcatchments fits the runoff and infiltration of the subcatchments draining to each meter in stages: connected impervious area from the small storms with no run, then width and roughness, then infiltration on the large storms, then one check run. Each run carries every meter; budget is then the most runs in all, at most 40 (default plan 37). Starting a subcatchment study is refused where a subcatchment drains to a node that also has RDII.","enum":["hydrograph","subcatchments"]},"groundwater":{"description":"Subcatchments only. Also search the groundwater flow coefficient and exponent (A1, B1) of the [GROUNDWATER] rows. Off or left out leaves them.","type":"boolean"},"infiltration":{"description":"Subcatchments only, and needed there. The infiltration method the study fits with. Subcatchments on another method are switched to it, which only GREEN_AMPT and MODIFIED_GREEN_AMPT allow.","enum":["HORTON","MODIFIED_HORTON","GREEN_AMPT","MODIFIED_GREEN_AMPT","CURVE_NUMBER"]},"meterBuckets":{"additionalProperties":{"maximum":3,"minimum":1,"type":"integer"},"description":"Subcatchments only. A meter's own bucket count, by sensor site id, over buckets.","maxProperties":200,"type":"object"},"method":{"description":"sampled (default) tries at most `budget` combinations of the stepped variables per meter and event; grid tries every combination.","enum":["grid","sampled"]},"nseFloor":{"description":"The lowest Nash–Sutcliffe efficiency counted as a match, whatever volume and peak say. Default 0.7.","maximum":1,"minimum":-1,"type":"number"},"period":{"additionalProperties":false,"description":"The calibration period: calendar years fromYear through toYear in the project's time zone, with a label naming it. Null or left out uses all the data.","properties":{"fromYear":{"maximum":2200,"minimum":1900,"type":"integer"},"label":{"description":"The period's name, as it reads on the study and its scenario. Must not be blank.","maxLength":80,"type":"string"},"toYear":{"maximum":2200,"minimum":1900,"type":"integer"}},"required":["label","fromYear","toYear"],"type":["object","null"]},"rainSource":{"description":"Storms only. The model's own gauges, or the source each storm's QA/QC chose.","enum":["model","qa"]},"shapeWeight":{"description":"Weight on recovering the split between the short, medium and long responses. 0 (default) matches volume and peak only; above 0 recovers the split at a small cost on the peak.","minimum":0,"type":"number"},"splits":{"additionalProperties":{"additionalProperties":{"maximum":1,"minimum":0,"type":"number"},"maxProperties":20,"type":"object"},"description":"Flow splits observed in the field, by manhole name: each outlet's fraction of the flow, 0 to 1, adding up to 1 (within 0.01). Up to 200 manholes and 20 outlets each. Example: {\"MH12\": {\"C40\": 0.7, \"C41\": 0.3}}.","maxProperties":200,"type":["object","null"]},"swmmTrials":{"description":"The maximum number of SWMM trials per meter.","maximum":20,"minimum":1,"type":"integer"}},"type":"object"},"eventIds":{"description":"Registered events to fit on and validate against, from model.calibration.event.list: this model's or shared by every model, all of the study's weather. Each event's role says whether it's fitted or held back.","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array"},"name":{"description":"The study's name, trimmed. Blank is refused.","maxLength":200,"minLength":1,"type":"string"},"perMeter":{"additionalProperties":{"additionalProperties":{"additionalProperties":false,"properties":{"held":{"type":["number","null"]},"hi":{"type":"number"},"lo":{"type":"number"},"step":{"type":"number"}},"type":"object"},"propertyNames":{"enum":["r1","t1","k1","r2","t2","k2","r3","t3","k3","velocity","rScale","tShift","alpha","gamma","shift","connected","imperv","sImperv","width","nImperv","nPerv","pctZero","sPerv","maxRate","minRate","decay","suction","ksat","imd","cn","gwFlow","gwExponent"]},"type":"object"},"description":"Variable settings for single meters, by sensor site id, in the same shape as variables, laid over the study's. Each site must be a meter one of the study's events is at.","type":"object"},"runInputs":{"additionalProperties":false,"description":"What the storm trials run the model over: the project's rain inputs, storms in the model's own series, and optionally a period, an inflow set and a boundary set, all from run.input.list. With none named, the fit is made but no trial runs. In calibration.study.update, a runInputs sent replaces the stored one whole.","properties":{"boundarySetId":{"format":"uuid","type":["string","null"]},"inflowSetId":{"format":"uuid","type":["string","null"]},"modelStorms":{"description":"Storms in the model's own series, by name, as model.rain lists them.","items":{"maxLength":200,"type":"string"},"maxItems":50,"type":"array"},"periodId":{"description":"A run period of the project's.","format":"uuid","type":["string","null"]},"rainfallInputIds":{"description":"The project's rain inputs, by id.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"variables":{"additionalProperties":{"additionalProperties":false,"properties":{"held":{"type":["number","null"]},"hi":{"type":"number"},"lo":{"type":"number"},"step":{"type":"number"}},"type":"object"},"description":"The range each variable may move, by key. Wet: r1, t1, k1, r2, t2, k2, r3, t3, k3, velocity, rScale, tShift. Dry: alpha, gamma, shift. Subcatchments: imperv, width, nImperv, nPerv, sImperv, sPerv; maxRate, minRate, decay (Horton); suction, ksat, imd (Green-Ampt, in and in/h); cn (curve number); gwFlow, gwExponent (with groundwater). Each is {lo, hi, step, held}; a part left out takes the variable's default, and held pins it to one value. rScale, tShift, alpha, gamma and shift are stepped and need a step; alpha's step is a ratio above 1. A key of the other weather, or outside the variable's limits, is refused.","propertyNames":{"enum":["r1","t1","k1","r2","t2","k2","r3","t3","k3","velocity","rScale","tShift","alpha","gamma","shift","connected","imperv","sImperv","width","nImperv","nPerv","pctZero","sPerv","maxRate","minRate","decay","suction","ksat","imd","cn","gwFlow","gwExponent"]},"type":"object"},"weather":{"description":"wet fits the unit hydrograph against storms; dry fits the dry weather pattern against dry periods. Default wet.","enum":["wet","dry"]}},"required":["name","eventIds"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New calibration","tags":["Project models"]}},"/models/{modelId}/calibration-studies/import":{"post":{"description":"Records a calibration fitted outside aip as a completed study of the model, with each meter's fit in the shape a study's results take. The fitted values must already be in the model: nothing in the model changes, no version is made and nothing is charged. Each meter's record goes in the model at its current version and supersedes what that meter had for the same weather. The study can't be run, applied or promoted.","operationId":"calibration.study.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"additionalProperties":false,"description":"The study's calibration period and event set.","properties":{"criteriaSetId":{"description":"The criteria set it was judged by, from sensor.criteria.list, if it is one of the project's.","type":["string","null"]},"eventSetId":{"description":"The event set it was fitted to: one of this model's sets, or one shared by every model. Left without eventIds, the set's events of the study's weather are used.","format":"uuid","type":["string","null"]},"period":{"additionalProperties":false,"description":"The calibration period: calendar years fromYear through toYear, with a label naming it. The Trends tab compares periods by it.","properties":{"fromYear":{"maximum":2200,"minimum":1900,"type":"integer"},"label":{"description":"The period's name. Must not be blank.","maxLength":80,"type":"string"},"toYear":{"maximum":2200,"minimum":1900,"type":"integer"}},"required":["label","fromYear","toYear"],"type":["object","null"]}},"type":"object"},"eventIds":{"description":"The registered events it was fitted to, from model.calibration.event.list: this model's or shared by every model, all of the study's weather. With config.eventSetId, added to that set's events.","items":{"format":"uuid","type":"string"},"maxItems":500,"type":"array"},"fittedWith":{"additionalProperties":false,"description":"How it was fitted outside aip, kept with the study and its records.","properties":{"criteria":{"description":"The criteria it was judged by, such as WaPUG.","maxLength":80,"type":"string"},"note":{"maxLength":2000,"type":"string"},"tool":{"description":"What fitted it.","maxLength":80,"type":"string"}},"type":"object"},"name":{"description":"The study's name, trimmed. Blank is refused.","maxLength":200,"minLength":1,"type":"string"},"results":{"additionalProperties":false,"description":"The fit, meter by meter, as a study's results.","properties":{"meters":{"description":"Each meter's fit, in the shape the generator writes. A storm meter gives r, t and k and its seasons, or method `subcatchments`; a dry weather meter gives dry.","items":{"additionalProperties":false,"properties":{"conduitId":{"description":"The model link the meter reads, by name.","maxLength":200,"type":["string","null"]},"dry":{"additionalProperties":false,"description":"Dry weather only. The fitted dry weather pattern.","properties":{"alpha":{"description":"The multiplier on the meter's dry weather baselines.","exclusiveMinimum":0,"type":"number"},"infiltration":{"additionalProperties":false,"description":"Seasonal infiltration: the wettest month's flow above the driest, and the MONTHLY factors.","properties":{"cfs":{"minimum":0,"type":"number"},"factors":{"items":{"minimum":0,"type":"number"},"maxItems":12,"minItems":12,"type":"array"},"name":{"maxLength":200,"type":"string"}},"required":["cfs","factors"],"type":"object"},"patterns":{"additionalProperties":{"additionalProperties":false,"properties":{"factors":{"description":"The fitted pattern's factors, such as 24 hourly ones.","items":{"minimum":0,"type":"number"},"maxItems":168,"minItems":1,"type":"array"},"gamma":{"description":"The peaking applied to the pattern.","type":"number"},"name":{"description":"The model's pattern, by name.","maxLength":200,"type":"string"},"shift":{"description":"The pattern's shift, in hours.","type":"number"}},"type":"object"},"description":"Each day type's pattern (weekday, weekend), by day type.","maxProperties":20,"type":"object"}},"type":"object"},"events":{"description":"Each event's score: one of the study's events at this meter.","items":{"additionalProperties":false,"properties":{"dayType":{"maxLength":40,"type":"string"},"depthErrorPct":{"type":["number","null"]},"eventId":{"format":"uuid","type":"string"},"nse":{"type":["number","null"]},"pass":{"description":"Whether the event met the criteria. Null is not judged.","type":["boolean","null"]},"peakErrorPct":{"type":["number","null"]},"volumeErrorPct":{"type":["number","null"]}},"required":["eventId"],"type":"object"},"maxItems":500,"type":"array"},"hydrographs":{"description":"Storms only. The model's unit hydrographs the meter's fit is in, by name.","items":{"maxLength":200,"type":"string"},"maxItems":200,"type":"array"},"k":{"description":"Storms only. K of the short, medium and long responses, in that order.","items":{"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"method":{"description":"Storms only. What the fit moved: `rtk`, the default, the RDII unit hydrographs and their r, t and k; `subcatchments`, the model's subcatchments' runoff (split subcatchments, infiltration, groundwater, evaporation), with no r, t, k, seasons or hydrographs.","enum":["rtk","subcatchments"]},"passed":{"description":"Events that met the criteria. Left out, counted from events.","minimum":0,"type":"integer"},"r":{"description":"Storms only. R of the short, medium and long responses, in that order.","items":{"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"scored":{"description":"Events judged. Left out, counted from events.","minimum":0,"type":"integer"},"seasons":{"description":"Storms only. Each season fitted on its own, by the months (1 to 12) it governs. The months no season names are the base set's, the one r, t and k give.","items":{"additionalProperties":false,"properties":{"k":{"description":"K of the short, medium and long responses, in that order.","items":{"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"label":{"description":"The season's name, such as Summer.","maxLength":80,"type":"string"},"months":{"items":{"maximum":12,"minimum":1,"type":"integer"},"maxItems":12,"minItems":1,"type":"array"},"r":{"description":"R of the short, medium and long responses, in that order.","items":{"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"t":{"description":"T of the short, medium and long responses, in that order.","items":{"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"}},"required":["months","r","t","k"],"type":"object"},"maxItems":12,"type":"array"},"siteId":{"description":"The meter, by sensor site id: one that an event of the study is at.","format":"uuid","type":"string"},"subcatchments":{"description":"Storms with method `subcatchments` only. The model's subcatchments the meter's fit is in, by name.","items":{"maxLength":200,"type":"string"},"maxItems":5000,"type":"array"},"t":{"description":"Storms only. T, in hours, of the short, medium and long responses, in that order.","items":{"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"}},"required":["siteId"],"type":"object"},"maxItems":1000,"minItems":1,"type":"array"},"warnings":{"items":{"maxLength":1000,"type":"string"},"maxItems":200,"type":"array"}},"required":["meters"],"type":"object"},"weather":{"description":"wet records unit hydrographs fitted to storms; dry records the dry weather pattern fitted to dry periods.","enum":["wet","dry"]}},"required":["name","weather","results"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Record calibration","tags":["Project models"]}},"/models/{modelId}/calibration-studies/{studyId}":{"delete":{"description":"Deletes a calibration study that isn't running. Applied scenarios stay.","operationId":"calibration.study.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study, from model.calibration.study.list.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete calibration","tags":["Project models"]},"get":{"description":"Returns a calibration study with its settings, status, progress and results.\n","operationId":"model.calibration.study.get","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationStudy"}}},"description":"The study"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get calibration","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Changes a draft calibration study. Send `studyId` and only the fields to change. Refused once it has started.","operationId":"calibration.study.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"RTK fit 2025 v2"},"schema":{"additionalProperties":false,"properties":{"config":{"additionalProperties":false,"description":"How the search runs and what it's judged by. A field left out takes its default. In calibration.study.update, a config sent replaces the stored one whole, so send every field to keep.","properties":{"afterHours":{"description":"Storms only. Hours after the last rain that each storm is scored through, stopping at the meter's next registered storm. Default 72.","maximum":336,"minimum":0,"type":"number"},"beforeHours":{"description":"Storms only. Hours before each window read for its dry weather baseline, never scored. Default 24.","maximum":240,"minimum":1,"type":"number"},"buckets":{"description":"Subcatchments only. How many buckets each meter's subcatchments are split into, by soil group or % impervious: Green-Ampt's conductivity is fitted per bucket. Default 2.","maximum":3,"minimum":1,"type":"integer"},"budget":{"description":"With sampled, the most combinations tried per meter per event. Default 600. A subcatchment study reads it as the most runs in all, at most 40.","maximum":5000,"minimum":1,"type":"integer"},"calibrationShare":{"description":"How the objective is split between events marked calibration and the rest, 0 to 1. Default 0.6.","maximum":1,"minimum":0,"type":"number"},"checkInSwmm":{"description":"Storms only. Also check each meter's fit in SWMM on its own sub-network, scaling R until its calibration storms meet the criteria. Off or left out keeps the analytical fit alone.","type":"boolean"},"concurrency":{"description":"How many trial simulations run at once. Default 12.","maximum":40,"minimum":1,"type":"integer"},"criteriaSetId":{"description":"The criteria set to judge by, from sensor.criteria.list. Null or left out uses the one the project enforces; starting is refused if that set is gone.","type":["string","null"]},"engineVersion":{"description":"The SWMM version every trial runs on, from GET /engines. Null uses the newest stable version offered.","maxLength":20,"type":["string","null"]},"eventSetId":{"description":"The event set the study's events were chosen from: one of this model's sets, or one shared by every model. The events fitted are still those in eventIds.","format":"uuid","type":["string","null"]},"fits":{"description":"Storms only. hydrograph (default) fits the RDII unit hydrographs; subcatchments fits the runoff and infiltration of the subcatchments draining to each meter in stages: connected impervious area from the small storms with no run, then width and roughness, then infiltration on the large storms, then one check run. Each run carries every meter; budget is then the most runs in all, at most 40 (default plan 37). Starting a subcatchment study is refused where a subcatchment drains to a node that also has RDII.","enum":["hydrograph","subcatchments"]},"groundwater":{"description":"Subcatchments only. Also search the groundwater flow coefficient and exponent (A1, B1) of the [GROUNDWATER] rows. Off or left out leaves them.","type":"boolean"},"infiltration":{"description":"Subcatchments only, and needed there. The infiltration method the study fits with. Subcatchments on another method are switched to it, which only GREEN_AMPT and MODIFIED_GREEN_AMPT allow.","enum":["HORTON","MODIFIED_HORTON","GREEN_AMPT","MODIFIED_GREEN_AMPT","CURVE_NUMBER"]},"meterBuckets":{"additionalProperties":{"maximum":3,"minimum":1,"type":"integer"},"description":"Subcatchments only. A meter's own bucket count, by sensor site id, over buckets.","maxProperties":200,"type":"object"},"method":{"description":"sampled (default) tries at most `budget` combinations of the stepped variables per meter and event; grid tries every combination.","enum":["grid","sampled"]},"nseFloor":{"description":"The lowest Nash–Sutcliffe efficiency counted as a match, whatever volume and peak say. Default 0.7.","maximum":1,"minimum":-1,"type":"number"},"period":{"additionalProperties":false,"description":"The calibration period: calendar years fromYear through toYear in the project's time zone, with a label naming it. Null or left out uses all the data.","properties":{"fromYear":{"maximum":2200,"minimum":1900,"type":"integer"},"label":{"description":"The period's name, as it reads on the study and its scenario. Must not be blank.","maxLength":80,"type":"string"},"toYear":{"maximum":2200,"minimum":1900,"type":"integer"}},"required":["label","fromYear","toYear"],"type":["object","null"]},"rainSource":{"description":"Storms only. The model's own gauges, or the source each storm's QA/QC chose.","enum":["model","qa"]},"shapeWeight":{"description":"Weight on recovering the split between the short, medium and long responses. 0 (default) matches volume and peak only; above 0 recovers the split at a small cost on the peak.","minimum":0,"type":"number"},"splits":{"additionalProperties":{"additionalProperties":{"maximum":1,"minimum":0,"type":"number"},"maxProperties":20,"type":"object"},"description":"Flow splits observed in the field, by manhole name: each outlet's fraction of the flow, 0 to 1, adding up to 1 (within 0.01). Up to 200 manholes and 20 outlets each. Example: {\"MH12\": {\"C40\": 0.7, \"C41\": 0.3}}.","maxProperties":200,"type":["object","null"]},"swmmTrials":{"description":"The maximum number of SWMM trials per meter.","maximum":20,"minimum":1,"type":"integer"}},"type":"object"},"eventIds":{"description":"Registered events to fit on and validate against, from model.calibration.event.list: this model's or shared by every model, all of the study's weather. Each event's role says whether it's fitted or held back.","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array"},"name":{"description":"The study's name, trimmed. Blank is refused.","maxLength":200,"minLength":1,"type":"string"},"perMeter":{"additionalProperties":{"additionalProperties":{"additionalProperties":false,"properties":{"held":{"type":["number","null"]},"hi":{"type":"number"},"lo":{"type":"number"},"step":{"type":"number"}},"type":"object"},"propertyNames":{"enum":["r1","t1","k1","r2","t2","k2","r3","t3","k3","velocity","rScale","tShift","alpha","gamma","shift","connected","imperv","sImperv","width","nImperv","nPerv","pctZero","sPerv","maxRate","minRate","decay","suction","ksat","imd","cn","gwFlow","gwExponent"]},"type":"object"},"description":"Variable settings for single meters, by sensor site id, in the same shape as variables, laid over the study's. Each site must be a meter one of the study's events is at.","type":"object"},"runInputs":{"additionalProperties":false,"description":"What the storm trials run the model over: the project's rain inputs, storms in the model's own series, and optionally a period, an inflow set and a boundary set, all from run.input.list. With none named, the fit is made but no trial runs. In calibration.study.update, a runInputs sent replaces the stored one whole.","properties":{"boundarySetId":{"format":"uuid","type":["string","null"]},"inflowSetId":{"format":"uuid","type":["string","null"]},"modelStorms":{"description":"Storms in the model's own series, by name, as model.rain lists them.","items":{"maxLength":200,"type":"string"},"maxItems":50,"type":"array"},"periodId":{"description":"A run period of the project's.","format":"uuid","type":["string","null"]},"rainfallInputIds":{"description":"The project's rain inputs, by id.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"variables":{"additionalProperties":{"additionalProperties":false,"properties":{"held":{"type":["number","null"]},"hi":{"type":"number"},"lo":{"type":"number"},"step":{"type":"number"}},"type":"object"},"description":"The range each variable may move, by key. Wet: r1, t1, k1, r2, t2, k2, r3, t3, k3, velocity, rScale, tShift. Dry: alpha, gamma, shift. Subcatchments: imperv, width, nImperv, nPerv, sImperv, sPerv; maxRate, minRate, decay (Horton); suction, ksat, imd (Green-Ampt, in and in/h); cn (curve number); gwFlow, gwExponent (with groundwater). Each is {lo, hi, step, held}; a part left out takes the variable's default, and held pins it to one value. rScale, tShift, alpha, gamma and shift are stepped and need a step; alpha's step is a ratio above 1. A key of the other weather, or outside the variable's limits, is refused.","propertyNames":{"enum":["r1","t1","k1","r2","t2","k2","r3","t3","k3","velocity","rScale","tShift","alpha","gamma","shift","connected","imperv","sImperv","width","nImperv","nPerv","pctZero","sPerv","maxRate","minRate","decay","suction","ksat","imd","cn","gwFlow","gwExponent"]},"type":"object"},"weather":{"description":"wet fits the unit hydrograph against storms; dry fits the dry weather pattern against dry periods. Default wet.","enum":["wet","dry"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change calibration","tags":["Project models"]}},"/models/{modelId}/calibration-studies/{studyId}/apply":{"post":{"description":"Applies a completed calibration study as a new scenario. Preview it with `GET /models/{modelId}/calibration-studies/{studyId}/proposal`. The model itself changes only with `POST /models/{modelId}/calibration-studies/{studyId}/promote`.","operationId":"calibration.study.apply","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A completed study of the model, from model.calibration.study.list.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Apply calibration","tags":["Project models"]}},"/models/{modelId}/calibration-studies/{studyId}/promote":{"post":{"description":"Writes an applied calibration scenario into the model and flags the rows it wrote CAL. The model must be split. Can't be undone.","operationId":"calibration.study.promote","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A study of the model that has been applied as a scenario and not yet promoted.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Promote calibration","tags":["Project models"]}},"/models/{modelId}/calibration-studies/{studyId}/proposal":{"get":{"description":"What applying a completed calibration study would change, per meter. Returns 409 until the\nstudy is completed.\n","operationId":"model.calibration.proposal","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationProposal"}}},"description":"The proposal"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}},"summary":"Preview calibration changes","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/calibration-studies/{studyId}/run":{"post":{"description":"Starts a calibration study on a SWMM model. Follow it with `GET /models/{modelId}/calibration-studies/{studyId}`. Billed to the project owner's credit.","operationId":"calibration.study.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study, from model.calibration.study.list.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start calibration","tags":["Project models"]}},"/models/{modelId}/calibration-studies/{studyId}/stop":{"post":{"description":"Stops a running calibration study. Trial simulations already sent finish and are billed.","operationId":"calibration.study.stop","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study, from model.calibration.study.list.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop calibration","tags":["Project models"]}},"/models/{modelId}/calibration-subcatchments":{"get":{"description":"What a subcatchment calibration of these meters would move: each meter's subcatchments\n(those draining to its reach, by the smallest reach holding them), the infiltration\nmethods the model's subcatchments use, and the nodes where subcatchments drain onto RDII,\nwhich Start refuses.\n","operationId":"model.calibration.subcatchments","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The meters, as sensor site ids separated by commas. At most 200.","in":"query","name":"siteIds","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationSubcatchments"}}},"description":"The meters' subcatchments"},"400":{"$ref":"#/components/responses/Invalid"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Group subcatchments by meter","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/candidates":{"get":{"description":"A model's optimizer candidate projects, oldest first.\n","operationId":"model.candidate.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"candidates":{"items":{"$ref":"#/components/schemas/Candidate"},"type":"array"}},"required":["candidates"],"type":"object"}}},"description":"The candidates"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List candidate projects","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/candidates/import":{"post":{"description":"Imports candidate projects into a model, one scenario each. Elements are matched by name. Candidates that can't be placed are skipped; the answer lists what was made and every problem.","operationId":"optimizer.candidates.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"candidates":[{"changes":[{"element":"C-1042","field":"geom1","role":"conduit","value":2.0}],"name":"Upsize Main St trunk","project":{"cost":1850000,"durationYears":2,"group":"Main St trunk","kind":"capital","option":"24 in"}},{"name":"North storage tank","project":{"cost":4200000,"group":"North storage"},"tags":["cost-only"]}]},"schema":{"additionalProperties":false,"properties":{"candidates":{"description":"One scenario each, as parsed from a sheet. A candidate with the same name as one the model has replaces it.","items":{"additionalProperties":false,"properties":{"adds":{"items":{"additionalProperties":false,"properties":{"attributes":{"type":"object"},"geometry":{"description":"The element's GeoJSON geometry, matching its layer's shape. Without one it is placed beside the node `near` names, or between a link's ends.","type":["object","null"]},"near":{"description":"Placed next to this node when it has no shape.","type":["string","null"]},"role":{"description":"The network role of the element added, which picks the model layer it goes in.","type":"string"}},"required":["role"],"type":"object"},"maxItems":1000,"type":"array"},"changes":{"items":{"additionalProperties":false,"properties":{"element":{"description":"The element's name in its role.","type":"string"},"field":{"description":"The attribute to set on the element, as the model's layer names it.","minLength":1,"type":"string"},"role":{"description":"The element's network role in the model, such as `junction`, `conduit`, `storage`, `outfall`, `pump` or `pipe`.","type":"string"},"value":{"type":["string","number","boolean","null"]}},"required":["role","element","field"],"type":"object"},"maxItems":10000,"type":"array"},"name":{"description":"The candidate's scenario name. Trimmed and cut to 120 characters. A name the model already has replaces that candidate.","maxLength":200,"type":"string"},"project":{"additionalProperties":true,"description":"A candidate's project fields. Other stored data (a water candidate's mains) stays.","properties":{"annualCost":{"description":"Yearly cost in dollars of an operational project.","type":["number","null"]},"cost":{"description":"Capital cost in dollars, at least 0. For an operational project, its first-year cost. An I/I candidate's cost is worked out from `ii` and replaces this. Default 0.","type":"number"},"dependsOn":{"description":"Groups that must be finished before this starts, by `group` name. On import, each must be a group in the same import.","items":{"maxLength":200,"type":"string"},"maxItems":100,"type":"array"},"durationYears":{"description":"How many years it takes to build, whole years from 1 to 30. Default 1. A renewal candidate's must equal `renewal.years`.","type":"number"},"earliestYear":{"description":"The first year it may start, a whole year from 1901 to 2199. Null for no limit.","type":["number","null"]},"effects":{"description":"A desktop study's change per objective from building only this candidate, such as {\"buildingsFlooded\": -12}."},"fund":{"maxLength":200,"type":["string","null"]},"group":{"description":"The decision it is an alternative for. Its own name when it stands alone.","maxLength":200,"type":"string"},"ii":{"description":"Makes it an I/I reduction candidate. Send all six fields: `publicPct` and `privatePct` (0 to under 100), `nodes` (the RDII node names it treats, at least one), `publicCost` (dollars), `parcels` and `perParcel` (dollars a parcel). Its cost becomes the public cost plus parcels times cost per parcel when `privatePct` is above 0. The model must have RDII rows for some of the nodes.","properties":{"nodes":{"items":{"type":"string"},"maxItems":20000,"type":"array"},"parcels":{"type":"number"},"perParcel":{"type":"number"},"privatePct":{"type":"number"},"publicCost":{"type":"number"},"publicPct":{"type":"number"}},"type":["object","null"]},"kind":{"description":"One of capital, operational, ii_reduction, green, treatment, renewal. Default capital. A renewal candidate needs `renewal` with a yearly budget above zero.","type":"string"},"mandatory":{"description":"Every program includes it. Default false.","type":"boolean"},"note":{"maxLength":2000,"type":["string","null"]},"option":{"maxLength":200,"type":["string","null"]},"renewal":{"description":"A condition renewal: `annualBudget` in dollars a year (above 0), `years` it runs (equal to `durationYears`), `indexed` to grow the budget with the study's budget escalation, and `priority` for materials renewed first. Usually made with `POST /models/{modelId}/candidates/renewal`.","properties":{"annualBudget":{"type":"number"},"indexed":{"type":"boolean"},"priority":{"additionalProperties":false,"description":"Materials to renew first, and from which year. Worst assets first when null.","properties":{"fromYear":{"description":"The year the priority starts. Every year when null.","maximum":2199,"minimum":1901,"type":["integer","null"]},"materials":{"description":"Materials renewed first, worst assets first among them, then the worst of the rest.","items":{"maxLength":80,"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"}},"required":["materials"],"type":["object","null"]},"years":{"type":"number"}},"required":["annualBudget","years"],"type":["object","null"]},"riskProjectId":{"description":"The capital project it delivers.","format":"uuid","type":["string","null"]}},"required":["group"],"type":"object"},"sections":{"items":{"additionalProperties":false,"properties":{"op":{"enum":["set","delete"]},"path":{"items":{"type":"string"},"minItems":1,"type":"array"},"section":{"description":"A model section to set a value in, such as `curves`. `timeseries` is refused.","minLength":1,"type":"string"},"value":{}},"required":["section","path"],"type":"object"},"maxItems":1000,"type":"array"},"tags":{"description":"Tags added after `candidate`. `cost-only` makes a candidate with no changes or adds, such as a tank to be sited in design. Tags starting with `study:` are dropped.","items":{"maxLength":40,"type":"string"},"maxItems":19,"type":"array"}},"required":["name","project"],"type":"object"},"maxItems":500,"minItems":1,"title":"Candidates","type":"array"}},"required":["candidates"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import candidates","tags":["Plan"]}},"/models/{modelId}/candidates/inflow-infiltration":{"post":{"description":"Sets the I/I reduction on a model's I/I candidates: all of them, or those in `scenarioIds`. Costs are recalculated.","operationId":"optimizer.candidates.ii","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"perParcel":2200,"privatePct":10,"publicPct":30},"schema":{"additionalProperties":false,"properties":{"perParcel":{"description":"The private program's cost per improved parcel.","minimum":0,"type":"number"},"privatePct":{"description":"Percent of the remaining I/I the private (parcel) program removes. 0 turns the private program and its cost off. Each candidate keeps its own when left out.","exclusiveMaximum":100,"minimum":0,"type":"number"},"publicPct":{"description":"Percent of I/I the public sewer program removes. Each candidate keeps its own when left out.","exclusiveMaximum":100,"minimum":0,"type":"number"},"scenarioIds":{"description":"Only these I/I candidates. All of them when not given.","items":{"format":"uuid","type":"string"},"maxItems":500,"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set I/I assumptions","tags":["Plan"]}},"/models/{modelId}/candidates/renewal":{"post":{"description":"Replaces a model's condition renewal candidates with one per yearly budget. Each renews the worst assets first, or the `priority` materials first.","operationId":"optimizer.candidates.renewal","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"budgets":[1000000,2000000,4000000],"indexed":true,"years":20},"schema":{"additionalProperties":false,"properties":{"budgets":{"description":"One option each, in dollars a year. Budgets above zero count, each once, 12 at most.","items":{"type":"number"},"maxItems":50,"title":"Yearly budgets","type":"array"},"fund":{"description":"The fund that pays for it. The general budget when none.","maxLength":200,"type":["string","null"]},"indexed":{"description":"Each budget grows with the study's budget escalation. Flat when off.","type":"boolean"},"priority":{"additionalProperties":false,"properties":{"fromYear":{"description":"The year the priority starts. Every year when null.","maximum":2199,"minimum":1901,"type":["integer","null"]},"materials":{"description":"Materials renewed first, worst assets first among them, then the worst of the rest.","items":{"maxLength":80,"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"}},"required":["materials"],"type":["object","null"]},"years":{"description":"How many years each runs. Default 20.","maximum":30,"minimum":1,"type":"integer"}},"required":["budgets"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set condition renewal","tags":["Plan"]}},"/models/{modelId}/candidates/{scenarioId}":{"patch":{"description":"Replaces a scenario's candidate project fields (`project`). Send the whole set: fields left out reset. Null makes it an ordinary scenario.","operationId":"optimizer.candidate.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The candidate's scenario id, from the model's scenarios.","in":"path","name":"scenarioId","required":true,"schema":{"format":"uuid","title":"Candidate","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"project":{"cost":2300000,"durationYears":2,"earliestYear":2028,"group":"Main St trunk","kind":"capital","option":"30 in"}},"schema":{"additionalProperties":false,"properties":{"project":{"additionalProperties":true,"description":"The candidate's project fields, replaced whole. Null makes it an ordinary scenario.","properties":{"annualCost":{"description":"Yearly cost in dollars of an operational project.","type":["number","null"]},"cost":{"description":"Capital cost in dollars, at least 0. For an operational project, its first-year cost. An I/I candidate's cost is worked out from `ii` and replaces this. Default 0.","type":"number"},"dependsOn":{"description":"Groups that must be finished before this starts, by `group` name. On import, each must be a group in the same import.","items":{"maxLength":200,"type":"string"},"maxItems":100,"type":"array"},"durationYears":{"description":"How many years it takes to build, whole years from 1 to 30. Default 1. A renewal candidate's must equal `renewal.years`.","type":"number"},"earliestYear":{"description":"The first year it may start, a whole year from 1901 to 2199. Null for no limit.","type":["number","null"]},"effects":{"description":"A desktop study's change per objective from building only this candidate, such as {\"buildingsFlooded\": -12}."},"fund":{"maxLength":200,"type":["string","null"]},"group":{"description":"The decision it is an alternative for. Its own name when it stands alone.","maxLength":200,"type":"string"},"ii":{"description":"Makes it an I/I reduction candidate. Send all six fields: `publicPct` and `privatePct` (0 to under 100), `nodes` (the RDII node names it treats, at least one), `publicCost` (dollars), `parcels` and `perParcel` (dollars a parcel). Its cost becomes the public cost plus parcels times cost per parcel when `privatePct` is above 0. The model must have RDII rows for some of the nodes.","properties":{"nodes":{"items":{"type":"string"},"maxItems":20000,"type":"array"},"parcels":{"type":"number"},"perParcel":{"type":"number"},"privatePct":{"type":"number"},"publicCost":{"type":"number"},"publicPct":{"type":"number"}},"type":["object","null"]},"kind":{"description":"One of capital, operational, ii_reduction, green, treatment, renewal. Default capital. A renewal candidate needs `renewal` with a yearly budget above zero.","type":"string"},"mandatory":{"description":"Every program includes it. Default false.","type":"boolean"},"note":{"maxLength":2000,"type":["string","null"]},"option":{"maxLength":200,"type":["string","null"]},"renewal":{"description":"A condition renewal: `annualBudget` in dollars a year (above 0), `years` it runs (equal to `durationYears`), `indexed` to grow the budget with the study's budget escalation, and `priority` for materials renewed first. Usually made with `POST /models/{modelId}/candidates/renewal`.","properties":{"annualBudget":{"type":"number"},"indexed":{"type":"boolean"},"priority":{"additionalProperties":false,"description":"Materials to renew first, and from which year. Worst assets first when null.","properties":{"fromYear":{"description":"The year the priority starts. Every year when null.","maximum":2199,"minimum":1901,"type":["integer","null"]},"materials":{"description":"Materials renewed first, worst assets first among them, then the worst of the rest.","items":{"maxLength":80,"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"}},"required":["materials"],"type":["object","null"]},"years":{"type":"number"}},"required":["annualBudget","years"],"type":["object","null"]},"riskProjectId":{"description":"The capital project it delivers.","format":"uuid","type":["string","null"]}},"required":["group"],"type":["object","null"]}},"required":["project"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change candidate","tags":["Plan"]}},"/models/{modelId}/check":{"get":{"description":"Checks a SWMM or EPANET model for errors and warnings before a run. `model.run` refuses a\nrun while errors remain. Up to 2,000 issues.\n","operationId":"model.check","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The scenario to check, with its changes; none checks Base.","in":"query","name":"scenarioId","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCheck"}}},"description":"The check"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Check model network","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/custom-attributes":{"get":{"description":"Each network layer's custom attributes, with how many elements have a value. `engineKeys`\nlists names a new attribute can't use.\n","operationId":"model.attribute.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAttributes"}}},"description":"Its network layers and their custom attributes"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List custom attributes","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Saves the full list of custom attributes on a model's network layer. Attributes left out are removed from the list; their values are cleared only with `clearRemoved`.","operationId":"model.attributes.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"attributes":[{"key":"install_year","label":"Install year","type":"number"},{"choices":["City","County"],"default":"City","key":"owner","label":"Owner","type":"choice"}],"layerId":"00000000-0000-0000-0000-000000000003"},"schema":{"additionalProperties":false,"properties":{"attributes":{"description":"The layer's full list of custom attributes. Each has a key (a–z, 0–9 and _, starting with a letter), a label, a type (number, text, date or choice), and optionally a unit, choices, default and description. A saved key keeps pointing to its values.","items":{"additionalProperties":false,"properties":{"choices":{"description":"With type choice, the allowed values; at least one is needed. A value is matched to a choice without case.","items":{"maxLength":120,"type":"string"},"maxItems":200,"type":["array","null"]},"default":{"description":"Written to every element when the attribute is added. Must be valid for the type (a number, a date, or one of the choices). Can't change once saved.","type":["string","number","null"]},"description":{"maxLength":500,"type":["string","null"]},"key":{"maxLength":40,"minLength":1,"type":"string"},"label":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["number","text","date","choice"]},"unit":{"maxLength":40,"type":["string","null"]}},"required":["key","label","type"],"type":"object"},"maxItems":100,"title":"Custom attributes","type":"array"},"clearRemoved":{"description":"Also remove the values of attributes dropped from the list. Default false: the values stay but are no longer listed.","title":"Clear removed values","type":"boolean"},"layerId":{"description":"One of the model's network layers.","format":"uuid","title":"Layer","type":"string"}},"required":["layerId","attributes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save custom attributes","tags":["Project models"]}},"/models/{modelId}/custom-attributes/fill":{"post":{"description":"Fills a custom attribute on a model's network layer from a field of a GIS layer, matched by nearest feature or by name. Only empty values are filled unless `overwrite` is true.","operationId":"model.attributes.fill","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"key":"install_year","layerId":"00000000-0000-0000-0000-000000000003","match":"nearest","maxDistanceFt":50,"sourceField":"YEAR_BUILT","sourceLayerId":"00000000-0000-0000-0000-000000000004"},"schema":{"additionalProperties":false,"properties":{"key":{"description":"The key of one of the layer's custom attributes, as `GET /models/{modelId}/custom-attributes` lists them. Add it first with `PATCH /models/{modelId}/custom-attributes`.","maxLength":40,"minLength":1,"title":"Attribute","type":"string"},"layerId":{"description":"One of the model's network layers.","format":"uuid","title":"Layer","type":"string"},"match":{"description":"nearest matches a pipe to the source feature nearest its midpoint, and a node to the nearest feature. name matches where a source field equals the element's name.","enum":["nearest","name"],"title":"Match by"},"maxDistanceFt":{"description":"With match nearest. Default 50.","exclusiveMinimum":0,"maximum":100000,"title":"Within (ft)","type":"number"},"overwrite":{"description":"true replaces values already there. Default false: only elements without a value get one.","title":"Replace values already there","type":"boolean"},"sourceField":{"description":"The source layer's field whose value is copied into the attribute.","maxLength":200,"minLength":1,"title":"Field read","type":"string"},"sourceLayerId":{"description":"A project layer that isn't part of a model.","format":"uuid","title":"Source layer","type":"string"},"sourceNameField":{"description":"Required with match name: the source field whose value equals the element's name, compared exactly.","maxLength":200,"title":"Name field","type":["string","null"]}},"required":["layerId","key","sourceLayerId","sourceField","match"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Fill a custom attribute","tags":["Project models"]}},"/models/{modelId}/customers":{"get":{"description":"An EPANET model's customers, counted by category with their demand.\n","operationId":"model.customer.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customers"}}},"description":"The customers"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"List customers","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/customers/allocate":{"post":{"description":"Assigns each customer of an EPANET model to a junction. Customers moved by hand stay. Can't be undone.","operationId":"model.customers.allocate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"maxDistanceFt":500,"method":"nearest_pipe","minDiameterIn":4},"schema":{"additionalProperties":false,"properties":{"maxDistanceFt":{"description":"How far from a customer, in feet, the pipe or junction may be. Default 500.","maximum":100000,"minimum":1,"title":"Within (ft)","type":"number"},"method":{"description":"nearest_pipe: the nearer end junction of the nearest pipe at least minDiameterIn across. nearest_junction: the nearest junction that isn't a hydrant. own_junction: a junction within 10 ft, else as nearest_pipe.","enum":["nearest_pipe","nearest_junction","own_junction"],"title":"Method"},"minDiameterIn":{"description":"With nearest_pipe and own_junction, the smallest pipe diameter considered, in inches. Default 4.","maximum":200,"minimum":0,"title":"Mains at least (in)","type":"number"}},"required":["method"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Allocate customers","tags":["Project models"]}},"/models/{modelId}/customers/at":{"get":{"description":"The customers allocated to one junction of an EPANET model, with their demand.\n","operationId":"model.customer.at","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The junction's name (its ID in the model), as `GET /models/{modelId}/element-names` lists it. Matched exactly.","in":"query","name":"junction","required":true,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JunctionCustomers"}}},"description":"The customers"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"List junction customers","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/customers/billing":{"post":{"description":"Reads monthly billing (`csv`) into an EPANET model's customers and sets their demand from the last 12 months. Can't be undone.","operationId":"model.customers.billing","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"basis":"average_day","csv":"account,month,gallons\nA100,2024-07,5400\nA100,2024-08,6100\n"},"schema":{"additionalProperties":false,"properties":{"basis":{"description":"What sets each customer's demand: average_day (the default), its average daily use, or max_day, its highest summer month's (June to September, else any month's) daily use times maxDayFactor.","enum":["average_day","max_day"],"title":"Demand basis"},"csv":{"description":"CSV text, up to 50 MB, with a header row and one row per account per month. Columns are found by header: an account (account, acct, customer, meter, service or premise, optionally followed by id or number; or id), a month (month, period, date, read date, bill month…, as 2024-07, 07/2024 or Jul 2024), and usage in gallons, or in kgal or ccf when the header says so. Lines starting with # are skipped; rows that can't be read are counted.","maxLength":50000000,"title":"Billing file","type":"string"},"fileName":{"description":"The file's name, kept with the stored copy. Default billing.csv.","maxLength":255,"type":"string"},"maxDayFactor":{"description":"With basis max_day, max day over the highest summer month's average day. Default 1.3.","maximum":3,"minimum":1,"type":"number"},"suppliedGpd":{"description":"Water supplied, in gallons per day. Given, the unbilled share (1 − billed ÷ supplied) is kept as the default unbilledPct for model.customers.demands.","minimum":0,"title":"Supplied (gal/day)","type":["number","null"]}},"required":["csv"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Read billing","tags":["Project models"]}},"/models/{modelId}/customers/demands":{"post":{"description":"Writes an EPANET model's customer demands into its junctions' demands.","operationId":"model.customers.demands","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"patterns":{"commercial":"COM","residential":"RES"},"unbilledPct":10},"schema":{"additionalProperties":false,"properties":{"patterns":{"additionalProperties":{"maxLength":255,"type":"string"},"description":"The model's demand pattern for each category, by key (residential, commercial, industrial, institutional, irrigation, other, unaccounted). Each must be a pattern the model has; an empty string uses the model's default pattern. Left out, the patterns sent last time.","maxProperties":50,"title":"Pattern by category","type":"object"},"unbilledPct":{"description":"Water used but not billed, as a percent of supply. Each junction gets an unaccounted row of billed × p ÷ (100 − p). Left out, the value sent last time or the one billing worked out from suppliedGpd, else 0.","maximum":50,"minimum":0,"title":"Unbilled (%)","type":"number"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Write customer demands","tags":["Project models"]}},"/models/{modelId}/customers/import":{"post":{"description":"Brings in an EPANET model's customers from its junctions or from a point layer, replacing any it has. Can't be undone.","operationId":"model.customers.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"demandField":"AVG_GPD","demandUnits":"gpd","from":"layer","idField":"ACCOUNT","layerId":"00000000-0000-0000-0000-000000000003"},"schema":{"additionalProperties":false,"properties":{"categoryField":{"description":"With from layer, the field holding each customer's category. Text such as Single family or Retail is mapped to residential, commercial, industrial, institutional or irrigation; other text is kept, lowercased. Left out or blank, residential.","maxLength":255,"title":"Category field","type":["string","null"]},"demandField":{"description":"With from layer, the field holding each customer's demand, in demandUnits. Left out, demands start at 0 until billing is read.","maxLength":255,"title":"Demand field","type":["string","null"]},"demandUnits":{"description":"The demand field's unit: model (the model's flow units, the default), gpd (gallons per day) or gpm (gallons per minute).","enum":["model","gpd","gpm"],"title":"Demand units"},"from":{"description":"The model's Customer junctions, or a point or polygon layer in the project.","enum":["junctions","layer"],"title":"From"},"idField":{"description":"Required with from layer: the field that identifies each customer, matched to billing accounts by model.customers.billing. A feature without one is named F<fid>; a repeated id gets #2, #3 and so on.","maxLength":255,"title":"Id field","type":"string"},"layerId":{"description":"Required with from layer: a point or polygon layer of the project.","format":"uuid","title":"Layer","type":"string"}},"required":["from"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Bring in customers","tags":["Project models"]}},"/models/{modelId}/customers/{customerId}/move":{"post":{"description":"Moves an EPANET model customer to a junction by hand. Can't be undone.","operationId":"model.customers.move","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The customer's id, as imported: the idField value, or the junction's name.","in":"path","name":"customerId","required":true,"schema":{"maxLength":255,"minLength":1,"type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"junction":"J-12"},"schema":{"additionalProperties":false,"properties":{"junction":{"description":"The name of the junction to move it to.","maxLength":255,"minLength":1,"type":"string"}},"required":["junction"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move a customer","tags":["Project models"]}},"/models/{modelId}/data":{"patch":{"description":"Changes a model's data, section by section. Send the `etag` from `GET /models/{modelId}/sections` or `GET /models/{modelId}` (409 if it changed since). Change series with `POST /models/{modelId}/series`.","operationId":"model.data.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"etag":"<etag from model.sections>","ops":[{"op":"set","path":["options","demand_multiplier"],"value":1.2}]},"schema":{"additionalProperties":false,"properties":{"etag":{"description":"The etag from `GET /models/{modelId}/sections` (or `GET /models/{modelId}`) when you read the data. Null for a model with no data yet. If the data changed since, the save is refused.","oneOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"title":"Etag"},"ops":{"description":"Applied in order. set puts the value at the path, creating objects along the way. unset removes it, including a list entry. The first segment names the section, as `GET /models/{modelId}/sections` lists them; timeseries is refused. A number indexes a list.","items":{"additionalProperties":false,"properties":{"op":{"enum":["set","unset"],"type":"string"},"path":{"items":{"oneOf":[{"maxLength":200,"minLength":1,"type":"string"},{"minimum":0,"type":"integer"}]},"maxItems":16,"minItems":1,"type":"array"},"value":{"description":"The value set puts at the path."}},"required":["op","path"],"type":"object"},"maxItems":1000,"minItems":1,"title":"Changes","type":"array"}},"required":["etag","ops"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change model data","tags":["Project models"]}},"/models/{modelId}/design-conditions":{"get":{"description":"An EPANET model's average and max day: the max day factor, the latest design run and the max\nday fire-flow study.\n","operationId":"model.design_conditions","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignConditions"}}},"description":"The design conditions"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Get design conditions","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/design-conditions/fire-flow":{"post":{"description":"Starts a fire-flow study of an EPANET model's hydrants at max day. Read results with `GET /projects/{projectId}/fireflow-studies/{studyId}/results`.","operationId":"model.design.fireflow","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"factor":1.5},"schema":{"additionalProperties":false,"properties":{"factor":{"description":"Max day over average day. Typically 1.3 to 2.5.","maximum":5,"minimum":1,"title":"Max-day factor","type":"number"}},"required":["factor"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Fire flow at max day","tags":["Project models"]}},"/models/{modelId}/duplicate":{"post":{"description":"Copies a model with its data and network layers. Scenarios, runs and versions aren't copied. Can't be undone.","operationId":"model.duplicate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Water system copy"},"schema":{"additionalProperties":false,"properties":{"name":{"description":"The copy's name. Default is the model's name followed by \"copy\".","maxLength":255,"minLength":1,"title":"Name","type":"string"},"toProjectId":{"description":"Another project of this workspace to make the copy in. Default is this project.","format":"uuid","title":"To project","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Duplicate model","tags":["Project models"]}},"/models/{modelId}/element-names":{"get":{"description":"Every node and link name in a model, sorted.\n","operationId":"model.element_names","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"links":{"items":{"type":"string"},"type":"array"},"nodes":{"items":{"type":"string"},"type":"array"}},"required":["nodes","links"],"type":"object"}}},"description":"The names"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List element names","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/elements/convert":{"post":{"description":"Changes model elements from one role to another of the same kind, such as a junction to an outfall. Values the new role needs go in `values`.","operationId":"model.element.convert","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"elements":[{"name":"J-12"}],"to":"outfall","values":{"type":"FREE"}},"schema":{"additionalProperties":false,"properties":{"elements":{"description":"The elements to convert, all of one role.","items":{"additionalProperties":false,"description":"An element by its name, or by its layerId and fid (the feature's id in that layer). A name is matched without case when only one element has it.","properties":{"fid":{"minimum":1,"type":"integer"},"layerId":{"format":"uuid","type":"string"},"name":{"description":"The element's name (its ID in the model).","maxLength":200,"minLength":1,"type":"string"}},"type":"object"},"maxItems":500,"minItems":1,"title":"Elements","type":"array"},"scenarioId":{"description":"The scenario the edit goes into. Left out, Base. Base's linked rows (cross-sections, losses, demands) change only in Base.","format":"uuid","title":"Scenario","type":"string"},"to":{"description":"The role they become: another of their kind in their engine.","enum":["junction","outfall","storage","divider","tank","reservoir","conduit","pump","orifice","weir","outlet","pipe","valve"],"title":"Convert to","type":"string"},"values":{"additionalProperties":{"type":["string","number"]},"description":"Values the new role needs and the elements lack, by key (an outfall's type, a pump's curve). Refused (values-needed) while one is missing; the refusal lists each with its choices and default. A key not asked for is refused (not-asked-for).","maxProperties":20,"type":"object"}},"required":["elements","to"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Convert elements","tags":["Project models"]}},"/models/{modelId}/fireflow-studies":{"get":{"description":"An EPANET model's 50 newest fire-flow studies, without per-hydrant results.\n","operationId":"model.fireflow.study.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FireflowStudy"},"type":"array"}}},"description":"The studies"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"List fire-flow studies","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates a fire-flow study for an EPANET model, as a draft or started with `run: true`. Follow it with `GET /models/{modelId}/fireflow-studies`; read results with `GET /projects/{projectId}/fireflow-studies/{studyId}/results`. Most studies are free.","operationId":"fireflow.study.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"config":{"hydrants":{"kind":"all"},"multipliers":[1,1.5],"residualPsi":20,"zoneMinPsi":20},"name":"Hydrant survey 2025","run":false},"schema":{"additionalProperties":false,"properties":{"config":{"additionalProperties":false,"description":"What the study tests and how. Anything left out uses its default.","properties":{"availableFlow":{"description":"Which hydrants get their available fire flow searched for: all (default), failures (only those that fail), or none.","enum":["all","failures","none"]},"demandBasis":{"description":"What the model's demand represents, shown on every result. It labels the results and doesn't change the demand. Default \"calibration day (inferred)\".","enum":["calibration day (inferred)","average day","max day","peak hour","future max day"],"type":"string"},"flowGpm":{"description":"The needed flow, in gpm, for a tested junction with no needed flow of its own, above 0 and at most 50,000. Default 1,000.","type":"number"},"hour":{"description":"\"peak\" (default), the peak of the model's day, or hours from the simulation start, 0 to 720.","type":["string","number"]},"hydrants":{"additionalProperties":false,"description":"Which junctions to test. Default {\"kind\": \"all\"}. Starting is refused when none of them is a hydrant of the model.","properties":{"kind":{"description":"all: the junctions marked as hydrants. junctions: every named junction, marked hydrants at their own needed flow, the rest at flowGpm. customers: customer junctions and marked hydrants (junctions with demand when none are classified). mainline: the network's main-line junctions; needs junction types (model.junctions.classify). list: the marked hydrants in a selection list (listId). names: the junctions in names, marked or not.","enum":["all","junctions","customers","mainline","list","names"]},"listId":{"description":"With kind list: a selection list of this model, from model.selection_list.list.","format":"uuid","type":"string"},"names":{"description":"With kind names: junction names, 1 to 100. A junction not marked as a hydrant is tested at flowGpm.","items":{"maxLength":200,"type":"string"},"maxItems":100,"type":"array"}},"required":["kind"],"type":"object"},"maxSearchGpm":{"description":"The highest flow searched for a hydrant's available fire flow, in gpm, 500 to 50,000. Default 10,000.","type":"number"},"multipliers":{"description":"Demand multipliers, each above 0 and at most 10. The first is the design case; the rest test sensitivity. Default [1, 1.2, 1.5].","items":{"type":"number"},"maxItems":10,"type":"array"},"residualPsi":{"description":"The pressure each hydrant must keep while flowing, in psi, 0 to 200. Default 20.","type":"number"},"scenarioId":{"description":"Test the network with this scenario of the model applied. Null or left out tests Base.","format":"uuid","type":["string","null"]},"velocityLimitFps":{"description":"A pipe velocity limit, in ft/s, above 0 and below 100. Null, 0 or left out sets none.","type":["number","null"]},"zoneMinPsi":{"description":"The lowest pressure allowed at a junction in the hydrant's zone, in psi, 0 to 200. Default 20.","type":"number"},"zoneNodes":{"description":"Where the zone minimum is checked: demand (default), the customer junctions, or all junctions.","enum":["all","demand"]}},"title":"Study","type":"object"},"kind":{"description":"study (default) or quick. A quick test returns detailed results and is meant for one hydrant named in config.hydrants.names; it returns in seconds.","enum":["study","quick"],"title":"Kind"},"name":{"description":"Default \"Fire flow · <today's date>\", or \"Quick test · <first name>\" for a quick test of named hydrants.","maxLength":120,"title":"Name","type":"string"},"run":{"description":"Start the study now. Default false, which saves it as a draft. Starting needs permission to run models.","title":"Run it now","type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New fire-flow study","tags":["Project models"]}},"/models/{modelId}/fireflow-studies/{studyId}":{"delete":{"description":"Deletes a fire-flow study and its results. Can't be undone.","operationId":"fireflow.study.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study, from model.fireflow.study.list.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete fire-flow study","tags":["Project models"]}},"/models/{modelId}/fireflow-studies/{studyId}/cancel":{"post":{"description":"Stops a running fire-flow study.","operationId":"fireflow.study.cancel","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study, from model.fireflow.study.list.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop fire-flow study","tags":["Project models"]}},"/models/{modelId}/fireflow-studies/{studyId}/run":{"post":{"description":"Starts a draft fire-flow study, or reruns a finished one.","operationId":"fireflow.study.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study, from model.fireflow.study.list.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start fire-flow study","tags":["Project models"]}},"/models/{modelId}/fix":{"post":{"description":"Fixes what `GET /models/{modelId}/check` finds. Preview it first to get the `fixes` and `digest`, then apply with the `fixIds` you choose and that `digest`. Fixes go into a new scenario unless `target: base`.","operationId":"model.fix","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"digest":"0123456789abcdef0123456789abcdef","fixIds":["0123456789abcdef"],"target":"scenario"},"schema":{"additionalProperties":false,"properties":{"classes":{"description":"Only the fixes of these classes. Left out, every class.","items":{"enum":["data","topology","hydraulic","options"],"type":"string"},"maxItems":4,"type":"array","uniqueItems":true},"demRasterId":{"description":"A project raster the ground under nodes missing an elevation is sampled from.","format":"uuid","type":"string"},"demUnit":{"description":"The DEM's values' unit. Left out, the unit it records; refused when it records none (raster-unit-unknown).","enum":["meters","feet","usFeet"],"type":"string"},"digest":{"description":"The `digest` from the preview's first change (`to.digest`). Required to apply. The apply is refused (409, network-changed) when the network has changed since.","pattern":"^[0-9a-f]{32}$","type":"string"},"fixIds":{"description":"The fixes to make, by the `id` each has in a preview's `fixes`. Only these are made, so a topology or hydraulic fix is made only when named. Required to apply. On a preview, left out lists every fix; given, only those. An id not offered for the network now is refused (409).","items":{"pattern":"^[0-9a-f]{16}$","type":"string"},"maxItems":4000,"minItems":1,"type":"array","uniqueItems":true},"scenarioId":{"description":"The scenario the network is read as. Default Base.","format":"uuid","title":"Scenario","type":"string"},"target":{"default":"scenario","description":"Where the fixes go: `scenario` (the default), a new Fixes scenario made from the one read, or that Fixes scenario itself when it is the one read; or `base`. Base takes only fixes to values and options (data and options classes), and only when the network was read as Base (no `scenarioId`).","enum":["scenario","base"],"type":"string","x-titles":["Fixes scenario","Base"]},"toleranceM":{"default":1.0,"description":"How near a node, in meters, a link's end is put on it, and how near a link a node is joined to it.","maximum":50.0,"minimum":0.01,"type":"number"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Fix model","tags":["Project models"]}},"/models/{modelId}/flags":{"get":{"description":"A model's flagged data rows, with their flag and note.\n","operationId":"model.flag.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RowFlag"},"type":"array"}}},"description":"Flagged rows"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List model flags","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/flags/{flagId}":{"patch":{"description":"Marks rows of a model's data with a project flag and a note, or clears them with `flagId: null`.","operationId":"model.flags.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The flag to mark the rows with. Null clears them.","in":"path","name":"flagId","required":true,"schema":{"format":"uuid","title":"Flag","type":["string","null"]}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"note":"From the 2024 meter study","rows":[{"rowKey":"DIURNAL","section":"patterns"}]},"schema":{"additionalProperties":false,"properties":{"note":{"description":"Where the value came from, up to 500 characters. Ignored when clearing.","maxLength":500,"title":"Note","type":["string","null"]},"rows":{"items":{"additionalProperties":false,"properties":{"attributeKey":{"description":"A column of the entry, such as baseline for dwf. Left out, the whole entry.","maxLength":255,"type":"string"},"rowKey":{"description":"The entry's name in the section, or for dwf the node's name.","maxLength":255,"minLength":1,"type":"string"},"section":{"description":"The model data section, such as hydrographs, patterns or dwf.","maxLength":64,"minLength":1,"type":"string"}},"required":["section","rowKey"],"type":"object"},"maxItems":500,"minItems":1,"title":"Rows","type":"array"}},"required":["rows"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Flag model rows","tags":["Project models"]}},"/models/{modelId}/flow-splits":{"get":{"description":"Nodes where flow leaves through two or more links, with each outgoing link.\n","operationId":"model.flow_split.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"splits":{"items":{"$ref":"#/components/schemas/FlowSplit"},"type":"array"}},"required":["splits"],"type":"object"}}},"description":"The splits"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List flow splits","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/hecras/convert":{"post":{"description":"Converts a SWMM model to a new HEC-RAS 1D/2D model in the same project. The project needs a coordinate system. `created` has no usable id: watch the SWMM model's `conversion` in `GET /models` until the new model appears. Billed to the project owner's credit.","operationId":"model.hecras.convert","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"buildingN":0.5,"buildingsMode":"roughness","cellSizeFt":50,"runDurationHr":24},"schema":{"additionalProperties":false,"properties":{"buildingN":{"description":"Manning's n on a footprint, from 0.1 to 10. Only with buildingsMode roughness (or none); refused with raise. Default 0.5.","maximum":10.0,"minimum":0.1,"title":"Building n","type":"number"},"buildingsMode":{"description":"How building footprints are handled. roughness keeps bare ground with a high Manning's n on each footprint, so water can enter. raise raises footprints in the terrain, so water flows around. Default roughness.","enum":["roughness","raise"],"title":"Buildings","type":"string"},"cellSizeFt":{"description":"The 2D mesh cell size where the model has no PCSWMM cells. Default 100 ft.","maximum":2000.0,"minimum":5.0,"title":"Cell size (ft)","type":"number"},"demRasterId":{"description":"A raster of the project's to use as the ground, finished processing (409 otherwise). Default USGS 3DEP 1 m.","format":"uuid","title":"DEM","type":"string"},"runDurationHr":{"description":"The plan's length from the start of the rain, in hours. Default 12.","exclusiveMinimum":0,"maximum":240.0,"title":"Run length (h)","type":"number"},"stormWindowHr":{"description":"The hours of the model's storm to cut the plan's rain to, [start, end], start 0 or later and end after it. Its length must fit in runDurationHr (12 when left out). Default is the whole storm.","items":{"minimum":0,"type":"number"},"maxItems":2,"minItems":2,"title":"Storm hours","type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Convert to HEC-RAS","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/convert/stop":{"post":{"description":"Stops a SWMM model's conversion to HEC-RAS. Time used so far is billed.","operationId":"model.hecras.convert.stop","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop conversion","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/events":{"post":{"description":"Saves an event made from an imported unsteady flow (`baseEventId`, such as `u01`). Send `id` to change one; leave it out for a new one. The new id is in `changes[0].to.id`; `created.id` isn't usable.","operationId":"model.hecras.event.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"baseEventId":"u01","boundaries":[{"label":"Upstream","path":"Flow Hydrographs/2D: Perimeter 1 BCLine: Upstream","scale":1.5}],"title":"Inflow x1.5"},"schema":{"additionalProperties":false,"properties":{"baseEventId":{"description":"The imported unsteady flow to start from, such as u01: one an imported plan runs (its flow in hecras.plans).","maxLength":20,"minLength":1,"type":"string"},"boundaries":{"description":"The boundaries to change, at least one. Each names its boundary by path, as HEC-RAS does (\"Precipitation Hydrographs/2D: Perimeter 1\", or \"Flow Hydrographs/2D: Perimeter 1 BCLine: Upstream\"), with a label, and either scale (more than 0 and up to 100) or series: at least two [time, value] pairs, times increasing, as the design-storm read returns them (time in days from the start).","items":{"additionalProperties":false,"properties":{"label":{"maxLength":300,"type":"string"},"path":{"maxLength":300,"minLength":1,"type":"string"},"scale":{"type":"number"},"series":{"items":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"maxItems":20000,"type":"array"}},"required":["path","label"],"type":"object"},"maxItems":200,"type":"array"},"design":{"description":"The NOAA Atlas 14 design storm the series was made from: the source the design-storm read returns, kept as given. Optional.","type":"object"},"id":{"description":"An event created here, to change, such as e1. Leave it out for a new event, which gets the next free number.","pattern":"^e[0-9]+$","type":"string"},"title":{"maxLength":200,"minLength":1,"type":"string"}},"required":["title","baseEventId","boundaries"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save event","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/events/{eventId}":{"delete":{"description":"Removes an event made in NEER (`eventId`, such as `e1`) from a HEC-RAS model. Returns 409 while a plan uses it.","operationId":"model.hecras.event.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"An event made here, such as e1, from the model's hecras.madeEvents.","in":"path","name":"eventId","required":true,"schema":{"pattern":"^e[0-9]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove event","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/geometries":{"post":{"description":"Saves a copy of a model geometry (`baseGeometry`, such as `g01`) with its own cell sizes, breaklines and refinement regions (`spec`). Send `id` to change one. Build its mesh with `POST /models/{modelId}/hecras/geometries/{geometryId}/build` before running. The new id is in `changes[0].to.id`; `created.id` isn't usable.","operationId":"model.hecras.geometry.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"baseGeometry":"g01","spec":{"areas":{"Perimeter 1":{"cellSize":[50,50]}},"breaklines":[{"far":50,"name":"Levee","near":10,"points":[[-94.5,39.0],[-94.49,39.005]]}],"regions":[]},"title":"Finer channel"},"schema":{"additionalProperties":false,"properties":{"baseGeometry":{"description":"Required for a new geometry, ignored when changing one: the model's own geometry it starts from, such as g01 (hecras.geometries).","pattern":"^g[0-9]{2}$","type":"string"},"id":{"description":"A geometry made here, to change, such as g05. Leave it out for a new geometry, which gets the next free number up to g99.","pattern":"^g[0-9]{2}$","type":"string"},"spec":{"description":"areas: an object keyed by the base geometry's 2D area names, each with cellSize [dx, dy] (above 0) and optionally perimeter (3 or more points), shift [x, y] and mann (above 0). breaklines: a list of {name (up to 32 characters), points (2 or more), near, far, repeats (0 to 100), protection (boolean)}. regions: a list of {name (up to 16 characters), polygon (3 or more points), cellSize [dx, dy], perimeterSpacing, farSpacing, shift, repeats, protection}. Points are [longitude, latitude]. Names are unique in each list; up to 2,000 of each.","type":"object"},"title":{"maxLength":200,"minLength":1,"type":"string"}},"required":["title","spec"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save geometry","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/geometries/{geometryId}":{"delete":{"description":"Removes a geometry made in NEER (`geometryId`, such as `g05`) from a HEC-RAS model. Returns 409 while its mesh builds or a plan runs on it.","operationId":"model.hecras.geometry.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A geometry made here, such as g05, from the model's hecras.madeGeometries.","in":"path","name":"geometryId","required":true,"schema":{"pattern":"^g[0-9]{2}$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove geometry","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/geometries/{geometryId}/build":{"post":{"description":"Builds the mesh of a geometry made in NEER (`geometryId`). Runs in the background: follow `build.status` on the geometry in the model's `hecras.madeGeometries`. Billed to the project owner's credit.","operationId":"model.hecras.geometry.build","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A geometry made here, such as g05, from the model's hecras.madeGeometries.","in":"path","name":"geometryId","required":true,"schema":{"pattern":"^g[0-9]{2}$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Build mesh","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/land-cover":{"patch":{"description":"Sets a scenario's land cover Manning's n, replacing its table. `values` maps class names to n (0.001 to 2). `{}` clears the table.","operationId":"model.hecras.landcover.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"scenarioId":"00000000-0000-0000-0000-000000000003","values":{"Developed, High Intensity":0.15,"Open Water":null}},"schema":{"additionalProperties":false,"properties":{"scenarioId":{"description":"A scenario of the model, Base included.","format":"uuid","type":"string"},"values":{"additionalProperties":{"type":["number","null"]},"description":"Each land-cover class name to its Manning's n, from 0.001 to 2. Replaces the scenario's whole table: a null value, or a class left out, keeps the land-cover layer's own n, and {} clears it. A name can't contain a comma.","type":"object"}},"required":["scenarioId","values"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save land-cover n","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/plans":{"post":{"description":"Saves a plan made from an imported plan (`basePlanId`, such as `p01`), optionally with an event, a scenario or a geometry made in NEER (a scenario or a geometry, not both). Send `id` to change one. The new id is in `changes[0].to.id`; `created.id` isn't usable. Run it with `model.run` (`derivedPlanId`).","operationId":"model.hecras.plan.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"basePlanId":"p01","changes":{"boundaries":[{"group":"Precipitation Hydrographs","scale":1.2}],"computeInterval":"10SEC","end":"02JAN2024 00:00","outputInterval":"5MIN","start":"01JAN2024 00:00"},"title":"100-yr fine step"},"schema":{"additionalProperties":false,"properties":{"basePlanId":{"description":"The imported plan to start from, such as p01.","maxLength":20,"minLength":1,"type":"string"},"changes":{"description":"What to change; {} keeps the imported plan's settings. start and end as HEC-RAS writes them, such as 01JAN2024 00:00, end after start. computeInterval, outputInterval, hydrographInterval and mappingInterval such as 5SEC, 2MIN or 1HOUR; the last three a whole number of computeIntervals. boundaries: a list, each {\"group\": \"Precipitation Hydrographs\", \"Flow Hydrographs\" or \"Stage Hydrographs\", or \"path\": one boundary, \"scale\": more than 0 and up to 100}, or {\"path\", \"series\": at least two [time, value] pairs}.","type":"object"},"eventId":{"description":"An event created here to run instead of the plan's own, such as e1. It must be made from the base plan's own unsteady flow.","type":["string","null"]},"geometryId":{"description":"A geometry made here to run on instead of the plan's own, such as g05. It must be made from the plan's geometry.","pattern":"^g[0-9]{2}$","type":["string","null"]},"id":{"description":"A plan created here, to change, such as n1. Leave it out for a new plan, which gets the next free number.","pattern":"^n[0-9]+$","type":"string"},"scenarioId":{"description":"A model scenario whose edits to run with. None, or Base's id, runs Base. Not with geometryId.","format":"uuid","type":["string","null"]},"title":{"maxLength":200,"minLength":1,"type":"string"}},"required":["title","basePlanId","changes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save plan","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/plans/{planId}":{"delete":{"description":"Removes a plan made in NEER (`planId`, such as `n1`). Its runs stay.","operationId":"model.hecras.plan.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A plan made here, such as n1, from the model's hecras.madePlans.","in":"path","name":"planId","required":true,"schema":{"pattern":"^n[0-9]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove plan","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/reread":{"post":{"description":"Reads a HEC-RAS model's imported results again. Current results show until the new ones are ready.","operationId":"model.hecras.reread","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Read the results again","tags":["HEC-RAS editing"]}},"/models/{modelId}/hecras/summary":{"get":{"description":"For each plan and run: compute time, volume error, peak flows and water surfaces, and errors\nor warnings from the compute log. Returns 409 until results are read.\n","operationId":"model.hecras.summary","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HecRasSummary"}}},"description":"The summary"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get HEC-RAS results summary","tags":["HEC-RAS editing"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/hydrants":{"get":{"description":"An EPANET model's hydrant rules, what they match, and its marked hydrants.\n","operationId":"model.hydrant.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hydrants"}}},"description":"The hydrants"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"List hydrants","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/hydrants/apply":{"post":{"description":"Saves an EPANET model's hydrant rules and marks the junctions they match as hydrants. Try rules first with `POST /models/{modelId}/hydrants/preview`.","operationId":"model.hydrants.apply","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"exclude":["FH-0012"],"include":[],"rules":[{"id":"r1","kind":"prefix","on":true,"value":"FH-"},{"distanceFt":50,"id":"r2","kind":"layer","layerId":"00000000-0000-0000-0000-000000000002","on":true,"value":""}]},"schema":{"additionalProperties":false,"properties":{"exclude":{"description":"Junction names never marked. Wins over the rules and include.","items":{"maxLength":200,"type":"string"},"maxItems":5000,"title":"Left out by hand","type":"array"},"include":{"description":"Junction names marked whatever the rules say, including junctions with demand.","items":{"maxLength":200,"type":"string"},"maxItems":5000,"title":"Marked by hand","type":"array"},"rules":{"description":"The full set of rules that find hydrants; it replaces the saved set. Each has an `id` you choose, a `kind`, its `value`, and `on`. prefix: the junction's name starts with value (case-sensitive). regex: the name matches value. tag: the junction's tag equals value, ignoring case. description: its description contains value, ignoring case. layer: the junction nearest each point of the project layer `layerId`, within `distanceFt` feet (default 50); value isn't read. A rule that's on and can't be read is refused.","items":{"additionalProperties":false,"properties":{"distanceFt":{"description":"With kind layer: how far, in feet, a point may be from its nearest junction. Default 50.","maximum":1000,"minimum":1,"type":["number","null"]},"id":{"maxLength":64,"minLength":1,"type":"string"},"kind":{"enum":["prefix","regex","tag","description","layer"]},"layerId":{"description":"With kind layer: the id of the project's layer of hydrant points.","maxLength":64,"type":["string","null"]},"on":{"type":"boolean"},"value":{"maxLength":200,"type":"string"}},"required":["id","kind","value","on"],"type":"object"},"maxItems":50,"title":"Rules","type":"array"}},"required":["rules"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Mark hydrants","tags":["Project models"]}},"/models/{modelId}/hydrants/needed":{"post":{"description":"Sets the needed fire flow of an EPANET model's hydrants: all, or those in `names`. Send `landUse`, or `neededGpm` and `durationH`.","operationId":"model.hydrants.needed","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"landUse":"commercial"},"schema":{"additionalProperties":false,"properties":{"durationH":{"description":"How long the flow must last, in hours. Overrides the land use's.","exclusiveMinimum":0,"maximum":24,"title":"Duration (hours)","type":["number","null"]},"landUse":{"description":"Takes flow and duration from the land-use table: residential_1_2 1,000 gpm for 1 hour; residential_1_2_large and multi_family 1,500 gpm for 2 hours; commercial and institutional 2,500 gpm for 2 hours; industrial 3,500 gpm for 3 hours. Also stored on each hydrant as its land use.","enum":["residential_1_2","residential_1_2_large","multi_family","commercial","institutional","industrial",null],"title":"Land use","type":["string","null"]},"names":{"description":"The marked hydrants to set, by junction name. Left out or empty, all of them. A name that isn't a marked hydrant is skipped.","items":{"maxLength":200,"type":"string"},"maxItems":50000,"title":"Hydrants","type":"array"},"neededGpm":{"description":"The needed flow in gallons per minute. Overrides the land use's.","exclusiveMinimum":0,"maximum":50000,"title":"Needed flow (gpm)","type":["number","null"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set needed fire flow","tags":["Project models"]}},"/models/{modelId}/hydrants/preview":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Previews hydrant rules over an EPANET model's junctions without saving. Up to 50 rules.\n","operationId":"model.hydrant.preview","parameters":[{"$ref":"#/components/parameters/modelId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HydrantRuleSet"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hydrants"}}},"description":"The hydrants, under these rules"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Preview hydrant rules","tags":["Project models"]}},"/models/{modelId}/junction-types":{"get":{"description":"An EPANET model's junctions, counted by type.\n","operationId":"model.junction_types","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JunctionTypes"}}},"description":"The counts"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"List junction types","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/junction-types/classify":{"post":{"description":"Classifies each junction in an EPANET model (hydrant, demand, service line…). Types set by hand are kept. Read the counts with `GET /models/{modelId}/junction-types`.","operationId":"model.junctions.classify","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Classify junctions","tags":["Project models"]}},"/models/{modelId}/links/reverse":{"post":{"description":"Reverses the direction of model links. Pumps, orifices, weirs, outlets and valves need `confirm: true`.","operationId":"model.link.reverse","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"confirm":false,"elements":[{"name":"C12"},{"fid":42,"layerId":"00000000-0000-0000-0000-000000000002"}]},"schema":{"additionalProperties":false,"properties":{"confirm":{"default":false,"description":"Reverse a pump, orifice, weir, outlet or valve too. Reversed, these work differently: a pump pumps the other way, a weir's crest sits at the other node. Refused (needs-confirming) without it.","type":"boolean"},"elements":{"description":"The links to reverse.","items":{"additionalProperties":false,"description":"An element by its name, or by its layerId and fid (the feature's id in that layer). A name is matched without case when only one element has it.","properties":{"fid":{"minimum":1,"type":"integer"},"layerId":{"format":"uuid","type":"string"},"name":{"description":"The element's name (its ID in the model).","maxLength":200,"minLength":1,"type":"string"}},"type":"object"},"maxItems":500,"minItems":1,"title":"Elements","type":"array"},"scenarioId":{"description":"The scenario the edit goes into. Left out, Base. Base's linked rows (cross-sections, losses, demands) change only in Base.","format":"uuid","title":"Scenario","type":"string"}},"required":["elements"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Reverse links","tags":["Project models"]}},"/models/{modelId}/links/split":{"post":{"description":"Splits a model conduit or pipe in two, at a point (`at`) or an existing node (`node`). Send one.","operationId":"model.link.split","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"at":[-97.7431,30.2672],"link":{"name":"P101"}},"schema":{"additionalProperties":false,"properties":{"at":{"description":"Where to cut, as [longitude, latitude]: the nearest point along the link. A junction is made there. Give this or node.","items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"link":{"additionalProperties":false,"description":"An element by its name, or by its layerId and fid (the feature's id in that layer). A name is matched without case when only one element has it.","properties":{"fid":{"minimum":1,"type":"integer"},"layerId":{"format":"uuid","type":"string"},"name":{"description":"The element's name (its ID in the model).","maxLength":200,"minLength":1,"type":"string"}},"type":"object"},"node":{"description":"A node on the link to cut it at, by name: the two parts join at it. Give this or at.","maxLength":200,"minLength":1,"type":"string"},"scenarioId":{"description":"The scenario the edit goes into. Left out, Base. Base's linked rows (cross-sections, losses, demands) change only in Base.","format":"uuid","title":"Scenario","type":"string"},"toleranceM":{"default":1.0,"description":"With `node`: how near the link, in meters, the node has to be.","maximum":50.0,"minimum":0,"type":"number"}},"required":["link"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Split link","tags":["Project models"]}},"/models/{modelId}/move":{"post":{"description":"Moves a model up, down, to the top or to the bottom of the project's models.","operationId":"model.move","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"direction":"top"},"schema":{"additionalProperties":false,"properties":{"direction":{"enum":["up","down","top","bottom"],"type":"string"}},"required":["direction"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move model","tags":["Project models"]}},"/models/{modelId}/network":{"get":{"description":"A SWMM model's network sections (conduits, junctions, subcatchments…) in the shape\n`GET /models/{modelId}/sections` returns.\n","operationId":"model.network","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelNetwork"}}},"description":"The sections"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get model network","tags":["Models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/observed":{"post":{"description":"Adds a monitoring site with up to 9 observed series, copied from model series or given as `points`. The model must be split and `etag` must be current.","operationId":"model.observed.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"element":{"id":"C12","type":"link"},"etag":"<etag from model.get>","kind":"flow_meter","name":"Meter 4","series":[{"measure":"flow","points":[{"at":1767225600000,"value":1.8},{"at":1767226500000,"value":2.1}],"unit":"cfs"}]},"schema":{"additionalProperties":false,"properties":{"element":{"additionalProperties":false,"description":"A model element by its type and name (id). At the top level, the site is placed there; on a series, the series is measured there.","properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["node","link","subcatchment"]}},"required":["type","id"],"type":"object"},"etag":{"description":"The model data's etag from `GET /models/{modelId}`. Refused (409) when the model has changed since.","maxLength":200,"type":["string","null"]},"kind":{"enum":["flow_meter","depth_sensor","rain_gauge","stage_gauge","pressure_sensor","level_sensor","acoustic_logger","water_meter","other"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"removeFromModel":{"description":"Also delete the series copied with series from the model, as a new model version. Refused while a section or element of the model still names one. Default false.","type":"boolean"},"series":{"items":{"additionalProperties":false,"oneOf":[{"not":{"required":["points"]},"required":["series"]},{"not":{"required":["series"]},"required":["points"]}],"properties":{"element":{"additionalProperties":false,"description":"A model element by its type and name (id). At the top level, the site is placed there; on a series, the series is measured there.","properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["node","link","subcatchment"]}},"required":["type","id"],"type":"object"},"measure":{"description":"What the series measures. One series per measure.","enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"]},"points":{"description":"Readings to store instead: at in milliseconds since 1970 UTC, and value. Send this or series.","items":{"additionalProperties":false,"properties":{"at":{"type":"integer"},"value":{"type":"number"}},"required":["at","value"],"type":"object"},"maxItems":100000,"minItems":1,"type":"array"},"series":{"description":"A model series to copy, by name. Its rows need dates, read in the project's time zone. Send this or points.","maxLength":120,"minLength":1,"type":"string"},"unit":{"description":"The readings' unit, such as cfs, ft or ft/s. A known unit must suit the measure.","maxLength":120,"minLength":1,"type":"string"}},"required":["measure","unit"],"type":"object"},"maxItems":9,"minItems":1,"type":"array"}},"required":["etag","name","kind","series"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add observed data","tags":["Project models"]}},"/models/{modelId}/optimizer-studies":{"post":{"description":"Creates a draft optimizer study on a model. Every parameter is optional. Start it with `POST /models/{modelId}/optimizer-studies/{studyId}/run`.","operationId":"optimizer.study.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"constraints":{"annualBudget":5000000,"horizonYears":20,"startYear":2027},"events":{"rainfallInputIds":["00000000-0000-0000-0000-000000000004"]},"name":"2027 CIP study","objectives":[{"key":"capital"},{"key":"spill"},{"key":"flooding"}]},"schema":{"additionalProperties":false,"properties":{"candidateIds":{"description":"The model's candidates to search, as scenario ids. All of them when left out on create, or null on update. Each must be one of the model's candidates.","items":{"format":"uuid","type":"string"},"maxItems":500,"type":["array","null"]},"config":{"additionalProperties":true,"description":"How the study searches. Settings not given stay as they were, starting from the defaults.","properties":{"closeGap":{"type":["object","null"]},"concurrency":{"description":"Simulations in flight at once. Default 12. A run is refused above 50.","type":"number"},"desktop":{"description":"A desktop study's do-nothing figure per objective: `{ \"baseline\": { \"buildingsFlooded\": 140 }, \"source\": \"...\" }`. Needs a value at least 0 for every objective but capital, risk and benefit.","type":["object","null"]},"evaluation":{"description":"`model` (default) runs the model. `desktop` runs nothing and scores from `desktop.baseline` and each candidate's `effects`. A HEC-RAS model runs only as `desktop`.","enum":["model","desktop"]},"generations":{"description":"Generations the search runs. Default 40.","minimum":1,"type":"number"},"losMode":{"enum":["constrain","report"]},"mode":{"description":"`matrix` (default) runs each candidate alone, searches additively, then checks the frontier with the model. `full` has the model score every program.","enum":["matrix","full"]},"population":{"description":"Programs per generation of the search. Default 60.","minimum":1,"type":"number"},"renewAfterProjects":{"description":"UNSURE: whether condition renewal applies after the program's projects are built. Confirm with the generator before publishing.","type":"boolean"},"reuse":{"description":"UNSURE: reuse earlier simulations instead of running them again. Confirm with the generator before publishing.","type":"boolean"},"riskModelId":{"description":"One of the project's risk models (`GET /risk-models`). Needed for the `risk` objective and risk targets.","type":["string","null"]},"riskRunId":{"description":"A completed run of the study's risk model that risk year by year starts from. None: the model's adopted run, else its latest.","type":["string","null"]},"riskYear":{"description":"The year risk is scored as of, from this year to 100 years ahead. Default the last milestone year, else the schedule's last year.","type":["integer","null"]},"verify":{"description":"How many frontier programs to check with the model. Default 16.","minimum":0,"type":"number"},"verifyLadder":{"description":"Runs spent checking the cost-of-service ladder, a whole number from 0 to 100. 0 turns it off. Default 20.","type":"number"}},"type":"object"},"constraints":{"additionalProperties":true,"description":"The schedule's rules. Rules not given stay as they were.","properties":{"annualBudget":{"description":"Dollars that may be spent a year. Null for no limit.","minimum":0,"type":["number","null"]},"baseYear":{"description":"The year candidate costs are in. Default the start year.","maximum":2200,"minimum":1900,"type":"integer"},"budgetEscalationPct":{"description":"Percent a year the budget grows. A new study starts at 0.","maximum":100,"minimum":-50,"type":"number"},"costEscalationPct":{"description":"Percent a year construction costs rise. A new study starts at 3.","maximum":100,"minimum":-50,"type":"number"},"deadlines":{"description":"Groups (`group`, a candidate group name) that must be finished by a year (`byYear`).","items":{"additionalProperties":false,"properties":{"byYear":{"maximum":2200,"minimum":1900,"type":"integer"},"group":{"type":"string"}},"required":["group","byYear"],"type":"object"},"maxItems":200,"type":"array"},"discountRatePct":{"description":"Percent a year, used for present value only. A new study starts at 3.","maximum":100,"minimum":-50,"type":"number"},"funds":{"description":"Named funds a candidate's `fund` can draw on, each with its own yearly budget (null for no limit) and the years it is available.","items":{"additionalProperties":false,"properties":{"annualBudget":{"minimum":0,"type":["number","null"]},"fromYear":{"type":["integer","null"]},"name":{"maxLength":200,"type":"string"},"toYear":{"type":["integer","null"]}},"required":["name"],"type":"object"},"maxItems":50,"type":"array"},"horizonYears":{"description":"Years the schedule covers. Default 20.","maximum":100,"minimum":1,"type":"integer"},"levelOfService":{"description":"Service targets: `maxSurchargeFt` (0 to 20), `basementDepthFt` (0 to 30), `maxDepthRatio` (0.1 to 1), `minFreeboardFt` (0 to 10), `noOverflow`, and `risk` targets (`averageBre`, `topBandCount`, `topBandShare`, also under `byClass.pipe` and `byClass.structure`). Risk targets need the `risk` objective and a risk model.","type":["object","null"]},"maxConcurrent":{"description":"Projects that may be under way in one year. Null for no limit.","minimum":1,"type":["integer","null"]},"startYear":{"description":"The schedule's first year. Default next year.","maximum":2200,"minimum":1900,"type":"integer"}},"type":"object"},"events":{"additionalProperties":false,"description":"What the programs run against, either storms (rain inputs or the model's own) or a water study's conditions.","properties":{"boundarySetId":{"type":["string","null"]},"conditions":{"description":"A water study's conditions: each a scenario of the model (`scenarioId`) and its label, such as \"Max day\". A water study needs at least one.","items":{"additionalProperties":false,"properties":{"label":{"maxLength":200,"type":"string"},"scenarioId":{"type":"string"}},"required":["scenarioId","label"],"type":"object"},"maxItems":20,"type":"array"},"inflowSetId":{"type":["string","null"]},"modelStorms":{"description":"Storms the model itself holds, by name.","items":{"maxLength":200,"type":"string"},"maxItems":50,"type":"array"},"periodId":{"type":["string","null"]},"rainfallInputIds":{"description":"The project's rain inputs to run each program against. A sewer study needs these or `modelStorms`.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"milestones":{"items":{"additionalProperties":false,"properties":{"growthFactor":{"description":"Flow in that year as a multiple of today's, such as 1.2.","exclusiveMinimum":0,"type":"number"},"year":{"maximum":2200,"minimum":1900,"type":"integer"}},"required":["year","growthFactor"],"type":"object"},"maxItems":50,"type":"array"},"name":{"description":"Trimmed and cut to 120 characters. \"Study\" when empty.","maxLength":200,"title":"Name","type":"string"},"objectives":{"description":"What the programs are scored on. Default capital cost, spill and flooding.","items":{"additionalProperties":false,"properties":{"direction":{"description":"Whether lower or higher is better. Default min.","enum":["min","max"]},"key":{"description":"One of capital, spill, flooding, floodedNodes, surcharge, capacity, risk, benefit, lowPressure, highPressure, pipesVelocity, pipesHeadloss, hydrantsFailing, buildingsFlooded, streetsFlooded, crossingsOvertopping, buildingsFluvial, buildingsPluvial, buildingsDeep, streetMiles. `capital` is required. Each key once. `risk` needs `config.riskModelId`. The building, street and crossing keys need a desktop study.","type":"string"},"label":{"maxLength":200,"type":"string"},"outfalls":{"description":"For `spill`: the outfalls, by name, that count as untreated spills. Every outfall when left out.","items":{"type":"string"},"maxItems":1000,"type":"array"},"treatedOutfalls":{"description":"For `spill`: outfalls, by name, that are treated discharge and never count as a spill.","items":{"type":"string"},"maxItems":1000,"type":"array"}},"required":["key"],"type":"object"},"maxItems":20,"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New optimizer study","tags":["Plan"]}},"/models/{modelId}/optimizer-studies/{studyId}":{"delete":{"description":"Deletes an optimizer study and its results. Candidates and model runs stay. Can't be undone.","operationId":"optimizer.study.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete optimizer study","tags":["Plan"]},"patch":{"description":"Changes an optimizer study. Send only the fields to change. Refused while it runs.","operationId":"optimizer.study.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"constraints":{"annualBudget":6000000}},"schema":{"additionalProperties":false,"properties":{"candidateIds":{"description":"The model's candidates to search, as scenario ids. All of them when left out on create, or null on update. Each must be one of the model's candidates.","items":{"format":"uuid","type":"string"},"maxItems":500,"type":["array","null"]},"chosenProgram":{"description":"Null clears the chosen program.","type":"null"},"config":{"additionalProperties":true,"description":"How the study searches. Settings not given stay as they were, starting from the defaults.","properties":{"closeGap":{"type":["object","null"]},"concurrency":{"description":"Simulations in flight at once. Default 12. A run is refused above 50.","type":"number"},"desktop":{"description":"A desktop study's do-nothing figure per objective: `{ \"baseline\": { \"buildingsFlooded\": 140 }, \"source\": \"...\" }`. Needs a value at least 0 for every objective but capital, risk and benefit.","type":["object","null"]},"evaluation":{"description":"`model` (default) runs the model. `desktop` runs nothing and scores from `desktop.baseline` and each candidate's `effects`. A HEC-RAS model runs only as `desktop`.","enum":["model","desktop"]},"generations":{"description":"Generations the search runs. Default 40.","minimum":1,"type":"number"},"losMode":{"enum":["constrain","report"]},"mode":{"description":"`matrix` (default) runs each candidate alone, searches additively, then checks the frontier with the model. `full` has the model score every program.","enum":["matrix","full"]},"population":{"description":"Programs per generation of the search. Default 60.","minimum":1,"type":"number"},"renewAfterProjects":{"description":"UNSURE: whether condition renewal applies after the program's projects are built. Confirm with the generator before publishing.","type":"boolean"},"reuse":{"description":"UNSURE: reuse earlier simulations instead of running them again. Confirm with the generator before publishing.","type":"boolean"},"riskModelId":{"description":"One of the project's risk models (`GET /risk-models`). Needed for the `risk` objective and risk targets.","type":["string","null"]},"riskRunId":{"description":"A completed run of the study's risk model that risk year by year starts from. None: the model's adopted run, else its latest.","type":["string","null"]},"riskYear":{"description":"The year risk is scored as of, from this year to 100 years ahead. Default the last milestone year, else the schedule's last year.","type":["integer","null"]},"verify":{"description":"How many frontier programs to check with the model. Default 16.","minimum":0,"type":"number"},"verifyLadder":{"description":"Runs spent checking the cost-of-service ladder, a whole number from 0 to 100. 0 turns it off. Default 20.","type":"number"}},"type":"object"},"constraints":{"additionalProperties":true,"description":"The schedule's rules. Rules not given stay as they were.","properties":{"annualBudget":{"description":"Dollars that may be spent a year. Null for no limit.","minimum":0,"type":["number","null"]},"baseYear":{"description":"The year candidate costs are in. Default the start year.","maximum":2200,"minimum":1900,"type":"integer"},"budgetEscalationPct":{"description":"Percent a year the budget grows. A new study starts at 0.","maximum":100,"minimum":-50,"type":"number"},"costEscalationPct":{"description":"Percent a year construction costs rise. A new study starts at 3.","maximum":100,"minimum":-50,"type":"number"},"deadlines":{"description":"Groups (`group`, a candidate group name) that must be finished by a year (`byYear`).","items":{"additionalProperties":false,"properties":{"byYear":{"maximum":2200,"minimum":1900,"type":"integer"},"group":{"type":"string"}},"required":["group","byYear"],"type":"object"},"maxItems":200,"type":"array"},"discountRatePct":{"description":"Percent a year, used for present value only. A new study starts at 3.","maximum":100,"minimum":-50,"type":"number"},"funds":{"description":"Named funds a candidate's `fund` can draw on, each with its own yearly budget (null for no limit) and the years it is available.","items":{"additionalProperties":false,"properties":{"annualBudget":{"minimum":0,"type":["number","null"]},"fromYear":{"type":["integer","null"]},"name":{"maxLength":200,"type":"string"},"toYear":{"type":["integer","null"]}},"required":["name"],"type":"object"},"maxItems":50,"type":"array"},"horizonYears":{"description":"Years the schedule covers. Default 20.","maximum":100,"minimum":1,"type":"integer"},"levelOfService":{"description":"Service targets: `maxSurchargeFt` (0 to 20), `basementDepthFt` (0 to 30), `maxDepthRatio` (0.1 to 1), `minFreeboardFt` (0 to 10), `noOverflow`, and `risk` targets (`averageBre`, `topBandCount`, `topBandShare`, also under `byClass.pipe` and `byClass.structure`). Risk targets need the `risk` objective and a risk model.","type":["object","null"]},"maxConcurrent":{"description":"Projects that may be under way in one year. Null for no limit.","minimum":1,"type":["integer","null"]},"startYear":{"description":"The schedule's first year. Default next year.","maximum":2200,"minimum":1900,"type":"integer"}},"type":"object"},"events":{"additionalProperties":false,"description":"What the programs run against, either storms (rain inputs or the model's own) or a water study's conditions.","properties":{"boundarySetId":{"type":["string","null"]},"conditions":{"description":"A water study's conditions: each a scenario of the model (`scenarioId`) and its label, such as \"Max day\". A water study needs at least one.","items":{"additionalProperties":false,"properties":{"label":{"maxLength":200,"type":"string"},"scenarioId":{"type":"string"}},"required":["scenarioId","label"],"type":"object"},"maxItems":20,"type":"array"},"inflowSetId":{"type":["string","null"]},"modelStorms":{"description":"Storms the model itself holds, by name.","items":{"maxLength":200,"type":"string"},"maxItems":50,"type":"array"},"periodId":{"type":["string","null"]},"rainfallInputIds":{"description":"The project's rain inputs to run each program against. A sewer study needs these or `modelStorms`.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"milestones":{"items":{"additionalProperties":false,"properties":{"growthFactor":{"description":"Flow in that year as a multiple of today's, such as 1.2.","exclusiveMinimum":0,"type":"number"},"year":{"maximum":2200,"minimum":1900,"type":"integer"}},"required":["year","growthFactor"],"type":"object"},"maxItems":50,"type":"array"},"name":{"description":"Trimmed and cut to 120 characters. \"Study\" when empty.","maxLength":200,"title":"Name","type":"string"},"objectives":{"description":"What the programs are scored on. Default capital cost, spill and flooding.","items":{"additionalProperties":false,"properties":{"direction":{"description":"Whether lower or higher is better. Default min.","enum":["min","max"]},"key":{"description":"One of capital, spill, flooding, floodedNodes, surcharge, capacity, risk, benefit, lowPressure, highPressure, pipesVelocity, pipesHeadloss, hydrantsFailing, buildingsFlooded, streetsFlooded, crossingsOvertopping, buildingsFluvial, buildingsPluvial, buildingsDeep, streetMiles. `capital` is required. Each key once. `risk` needs `config.riskModelId`. The building, street and crossing keys need a desktop study.","type":"string"},"label":{"maxLength":200,"type":"string"},"outfalls":{"description":"For `spill`: the outfalls, by name, that count as untreated spills. Every outfall when left out.","items":{"type":"string"},"maxItems":1000,"type":"array"},"treatedOutfalls":{"description":"For `spill`: outfalls, by name, that are treated discharge and never count as a spill.","items":{"type":"string"},"maxItems":1000,"type":"array"}},"required":["key"],"type":"object"},"maxItems":20,"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change optimizer study","tags":["Plan"]}},"/models/{modelId}/optimizer-studies/{studyId}/accept":{"post":{"description":"Writes the chosen program's start years onto its capital projects. Only planned or designed projects change. Choose a program first with `POST /models/{modelId}/optimizer-studies/{studyId}/choose`.","operationId":"optimizer.program.accept","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Accept program","tags":["Plan"]}},"/models/{modelId}/optimizer-studies/{studyId}/choose":{"post":{"description":"Chooses a program from a finished study and schedules its candidates by year. `frontierId` is a program's `id` from `GET /projects/{projectId}/optimizer-studies/{studyId}` (`results.frontier` or `results.dominated`).","operationId":"optimizer.program.choose","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"frontierId":"p12"},"schema":{"additionalProperties":false,"properties":{"constraints":{"additionalProperties":true,"description":"Sequencing rules that override the study's own. Stored only with the chosen program.","properties":{"annualBudget":{"description":"Dollars that may be spent a year. Null for no limit.","minimum":0,"type":["number","null"]},"baseYear":{"description":"The year candidate costs are in. Default the start year.","maximum":2200,"minimum":1900,"type":"integer"},"budgetEscalationPct":{"description":"Percent a year the budget grows. A new study starts at 0.","maximum":100,"minimum":-50,"type":"number"},"costEscalationPct":{"description":"Percent a year construction costs rise. A new study starts at 3.","maximum":100,"minimum":-50,"type":"number"},"deadlines":{"description":"Groups (`group`, a candidate group name) that must be finished by a year (`byYear`).","items":{"additionalProperties":false,"properties":{"byYear":{"maximum":2200,"minimum":1900,"type":"integer"},"group":{"type":"string"}},"required":["group","byYear"],"type":"object"},"maxItems":200,"type":"array"},"discountRatePct":{"description":"Percent a year, used for present value only. A new study starts at 3.","maximum":100,"minimum":-50,"type":"number"},"funds":{"description":"Named funds a candidate's `fund` can draw on, each with its own yearly budget (null for no limit) and the years it is available.","items":{"additionalProperties":false,"properties":{"annualBudget":{"minimum":0,"type":["number","null"]},"fromYear":{"type":["integer","null"]},"name":{"maxLength":200,"type":"string"},"toYear":{"type":["integer","null"]}},"required":["name"],"type":"object"},"maxItems":50,"type":"array"},"horizonYears":{"description":"Years the schedule covers. Default 20.","maximum":100,"minimum":1,"type":"integer"},"levelOfService":{"description":"Service targets: `maxSurchargeFt` (0 to 20), `basementDepthFt` (0 to 30), `maxDepthRatio` (0.1 to 1), `minFreeboardFt` (0 to 10), `noOverflow`, and `risk` targets (`averageBre`, `topBandCount`, `topBandShare`, also under `byClass.pipe` and `byClass.structure`). Risk targets need the `risk` objective and a risk model.","type":["object","null"]},"maxConcurrent":{"description":"Projects that may be under way in one year. Null for no limit.","minimum":1,"type":["integer","null"]},"startYear":{"description":"The schedule's first year. Default next year.","maximum":2200,"minimum":1900,"type":"integer"}},"type":"object"},"frontierId":{"description":"A program from the study's results, on the frontier or off it.","maxLength":200,"minLength":1,"title":"Program","type":"string"}},"required":["frontierId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Choose program","tags":["Plan"]}},"/models/{modelId}/optimizer-studies/{studyId}/risk-projects":{"post":{"description":"Projects average risk by year for a study's programs, on the study's risk model. Billed to that model's credit. Read the result with `GET /projects/{projectId}/optimizer-studies/{studyId}/risk-projection` after a minute or two.","operationId":"optimizer.study.risk.project","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"programIds":["p12","p17"]},"schema":{"additionalProperties":false,"properties":{"programIds":{"description":"Program ids from the study's results (`results.frontier[].id`), 1 to 8. Programs with a current curve are left as they are.","items":{"minLength":1,"type":"string"},"maxItems":8,"minItems":1,"title":"Programs","type":"array"}},"required":["programIds"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Project risk over time","tags":["Plan"]}},"/models/{modelId}/optimizer-studies/{studyId}/run":{"post":{"description":"Runs an optimizer study on a SWMM or HEC-RAS model. Follow `status` and `progress` with `GET /projects/{projectId}/optimizer-studies/{studyId}`. Up to 2,000 simulations, each billed to the project owner's credit.","operationId":"optimizer.study.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run optimizer study","tags":["Plan"]}},"/models/{modelId}/optimizer-studies/{studyId}/stop":{"post":{"description":"Stops a running optimizer study. Simulations already started finish and are billed.","operationId":"optimizer.study.stop","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The study's id.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","title":"Study","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop optimizer study","tags":["Plan"]}},"/models/{modelId}/path":{"get":{"description":"The nodes and links between two nodes, in flow order, with the total length. Returns 422 if\nthey aren't connected.\n","operationId":"model.path","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"A node's name, as in `GET /models/{modelId}/element-names`.","in":"query","name":"from","required":true,"schema":{"minLength":1,"type":"string"}},{"description":"The other node's name. It may be upstream or downstream of `from`.","in":"query","name":"to","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bbox":{"items":{"type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"length":{"type":"number"},"links":{"items":{"type":"string"},"type":"array"},"nodes":{"items":{"type":"string"},"type":"array"}},"required":["nodes","links","length","bbox"],"type":"object"}}},"description":"The path"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get network path","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/profile":{"get":{"description":"A profile's nodes and links with stations, inverts, ground and grades.\n","operationId":"model.profile","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The nodes in order, by name, comma-separated: 2 to 500, each joined to the next by a link (as `GET /models/{modelId}/path` returns them). 422 otherwise.","in":"query","name":"nodes","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bbox":{"description":"West, south, east, north around the nodes and links.","items":{"type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"spans":{"items":{"properties":{"dsInvert":{"type":["number","null"]},"fid":{"type":["integer","null"]},"fromStation":{"type":"number"},"grade":{"type":["number","null"]},"height":{"type":["number","null"]},"layerId":{"format":"uuid","type":["string","null"]},"length":{"type":["number","null"]},"link":{"type":"string"},"reversed":{"type":"boolean"},"roughness":{"type":["number","null"]},"shape":{"description":"Cross-section shape, such as CIRCULAR or RECT_CLOSED.","type":["string","null"]},"toStation":{"type":"number"},"usInvert":{"type":["number","null"]}},"required":["link","layerId","fid","reversed","fromStation","toStation","usInvert","dsInvert","height","length","grade","shape","roughness"],"type":"object"},"type":"array"},"stations":{"items":{"properties":{"fid":{"type":["integer","null"]},"ground":{"type":["number","null"]},"invert":{"type":["number","null"]},"layerId":{"format":"uuid","type":["string","null"]},"maxDepth":{"description":"Depth from invert to rim, from its row.","type":["number","null"]},"node":{"type":"string"},"station":{"type":"number"}},"required":["node","layerId","fid","station","invert","ground","maxDepth"],"type":"object"},"type":"array"}},"required":["stations","spans","bbox"],"type":"object"}}},"description":"The long section"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get profile","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/profiles":{"get":{"description":"A model's saved profiles, oldest first.\n","operationId":"model.profile.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"profiles":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"links":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"nodes":{"items":{"type":"string"},"type":"array"}},"required":["id","name","nodes","links","createdAt"],"type":"object"},"type":"array"}},"required":["profiles"],"type":"object"}}},"description":"Profiles, oldest first"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List profiles","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Saves a model profile: send `nodes` in order, or `from` and `to` for the path between them. Read it with `GET /models/{modelId}/profile`.","operationId":"model.profile.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"from":"MH-101","name":"Main trunk","to":"OF-1"},"schema":{"additionalProperties":false,"properties":{"from":{"description":"A node's name. With `to`, in place of `nodes`: the profile follows the path between them along the links. Sent without `to`, it's ignored and `nodes` is required.","minLength":1,"type":"string"},"name":{"description":"The profile's name. Default: the first and last node, as \"MH1 to MH9\".","maxLength":120,"type":"string"},"nodes":{"description":"Node names in order, 2 to 500, each next to the one before along a link, as `GET /models/{modelId}/trace` returns them with no branches. Send this, or `from` and `to`.","items":{"minLength":1,"type":"string"},"maxItems":500,"minItems":2,"type":"array"},"to":{"description":"A node's name, the profile's end. Used only with `from`.","minLength":1,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Keep profile","tags":["Project models"]}},"/models/{modelId}/profiles/{profileId}":{"delete":{"description":"Deletes a model profile.","operationId":"model.profile.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The profile, from `GET /models/{modelId}/profiles`.","in":"path","name":"profileId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete profile","tags":["Project models"]},"patch":{"description":"Renames a model profile.","operationId":"model.profile.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The profile, from `GET /models/{modelId}/profiles` or the `created` id of `POST /models/{modelId}/profiles`.","in":"path","name":"profileId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Main trunk, north"},"schema":{"additionalProperties":false,"properties":{"name":{"description":"The new name, trimmed. Must differ from the current one.","maxLength":120,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename profile","tags":["Project models"]}},"/models/{modelId}/rain":{"get":{"description":"A model's rain gauges and the storms in its series, with the active one marked.","operationId":"model.rain","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRain"}}},"description":"The model's rain"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get model rain","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/rain/adopt":{"post":{"description":"Copies a storm from a model's series into the project's run inputs, so other models and runs can use it.","operationId":"rain.storm.adopt","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"storm":"DESIGN10"},"schema":{"additionalProperties":false,"properties":{"storm":{"description":"The storm's name, as model.rain lists it under storms. A storm is the model's series named STORM_GAUGE, one per gauge.","maxLength":120,"minLength":1,"title":"Storm","type":"string"}},"required":["storm"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Adopt a storm as rainfall","tags":["Project models"]}},"/models/{modelId}/rain/feed":{"post":{"description":"Copies rain from the project's run inputs (`inputId`) into a split model as a storm, and points the model's gauges at it.","operationId":"model.rain.feed","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"gauges":{"RG-1":"Gauge1"},"inputId":"00000000-0000-0000-0000-000000000004","storm":"MAY_2026"},"schema":{"additionalProperties":false,"properties":{"gauges":{"additionalProperties":{"maxLength":120,"minLength":1,"type":"string"},"description":"A map from the rain's gauge name to the model gauge it feeds, for gauges whose names differ, as {\"RG-1\": \"Gauge1\"}. Others match by name. Two rain gauges can't feed the same model gauge.","maxProperties":50,"title":"Gauges","type":"object"},"inputId":{"description":"A rain in the project's library, from `run.input.list`.","format":"uuid","title":"Rain","type":"string"},"storm":{"description":"The storm's name in the model: letters, digits and _, up to 40. Each series is named `<storm>_<gauge>`. Default: the rain's name in capitals, with each run of other characters made one _ (\"5yr 24h\" becomes \"5YR_24H\").","pattern":"^[A-Za-z0-9_]{1,40}$","title":"Storm","type":"string"}},"required":["inputId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Feed rain","tags":["Project models"]}},"/models/{modelId}/rain/storm":{"post":{"description":"Points a split model's gauges at a storm's series. `storm` is a name from `GET /models/{modelId}/rain`.","operationId":"model.storm.use","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"storm":"MAY_2026"},"schema":{"additionalProperties":false,"properties":{"storm":{"description":"A storm in the model's series, by name, as listed in the model's rain.","maxLength":200,"minLength":1,"title":"Storm","type":"string"}},"required":["storm"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Use storm","tags":["Project models"]}},"/models/{modelId}/rename":{"post":{"description":"Renames a model (1 to 120 characters).","operationId":"model.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Downtown storm 2026"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename model","tags":["Project models"]}},"/models/{modelId}/restore":{"post":{"description":"Restores a model and its network layers from the trash.","operationId":"model.restore","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Restore model","tags":["Project models"]}},"/models/{modelId}/results-symbology":{"patch":{"description":"Sets the colors a model's results are drawn in. `symbology` replaces the saved value; null clears it.","operationId":"model.results.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"symbology":{"nodes":{"metricId":"nodes.depth.max","ramp":[{"color":"#2b83ba","end":2,"start":0},{"color":"#fdae61","end":4,"start":2},{"color":"#d7191c","end":6,"start":4}]}}},"schema":{"additionalProperties":false,"properties":{"symbology":{"description":"An object keyed by class of element (`nodes`, `links`, `subcatchments`), each with `metricId` (`<class>.<result>.<aggregate>`, such as `nodes.depth.max`, or `.timestep` for the value at each step) and its colors as `ramp` (a list of {start, end, color}) or, with `classification: \"manual\"`, `classes` (a list of {start, end, color, legend?, visible?}). Up to 64 KB. Saved as sent. Null clears it.","title":"Result colors","type":["object","null"]}},"required":["symbology"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save results colors","tags":["Project models"]}},"/models/{modelId}/scenarios":{"post":{"description":"Creates a scenario from Base or from another scenario (`parentId`). Edit it with `POST /models/{modelId}/scenarios/{scenarioId}/save` and `PATCH /models/{modelId}/scenarios/{scenarioId}/sections`.","operationId":"scenario.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Upsize trunk","tags":["capacity"]},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"parentId":{"description":"A scenario of this model to start from; the new one inherits its changes. Default Base.","format":"uuid","title":"From","type":"string"},"tags":{"description":"Labels for the scenario, up to 20. Stored trimmed and lowercase, each once. A group:Name tag, which groups scenarios under Name, keeps Name's case. In scenario.update, the list sent replaces the scenario's tags.","items":{"maxLength":40,"minLength":1,"type":"string"},"maxItems":20,"title":"Tags","type":"array"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make scenario","tags":["Project models"]}},"/models/{modelId}/scenarios/compose":{"post":{"description":"Merges several scenarios, in order, into a new scenario. Later changes to the same field win.","operationId":"scenario.compose","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Program A","scenarioIds":["00000000-0000-0000-0000-000000000020","00000000-0000-0000-0000-000000000021"]},"schema":{"additionalProperties":false,"properties":{"name":{"description":"Cut to 120 characters. If blank, named \"Program of N\".","maxLength":200,"title":"Name","type":"string"},"scenarioIds":{"description":"The model's scenarios to merge, in order; a repeated id counts once. A later scenario's change to the same field wins. Base is refused.","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"title":"Scenarios","type":"array"},"studyId":{"description":"The running optimizer study it is for. Tagged study:<id>, and deleted with the study.","format":"uuid","title":"Study","type":"string"}},"required":["scenarioIds","name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Compose scenarios","tags":["Project models"]}},"/models/{modelId}/scenarios/{scenarioId}":{"delete":{"description":"Deletes a scenario. Base and scenarios that others were made from can't be deleted.","operationId":"scenario.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The scenario's id.","in":"path","name":"scenarioId","required":true,"schema":{"format":"uuid","title":"Scenario","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete scenario","tags":["Project models"]},"patch":{"description":"Renames a scenario or replaces its tags.","operationId":"scenario.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The scenario's id.","in":"path","name":"scenarioId","required":true,"schema":{"format":"uuid","title":"Scenario","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Upsize trunk sewer","tags":["capacity","group:Phase 1"]},"schema":{"additionalProperties":false,"minProperties":2,"properties":{"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"tags":{"description":"Labels for the scenario, up to 20. Stored trimmed and lowercase, each once. A group:Name tag, which groups scenarios under Name, keeps Name's case. In scenario.update, the list sent replaces the scenario's tags.","items":{"maxLength":40,"minLength":1,"type":"string"},"maxItems":20,"title":"Tags","type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change scenario","tags":["Project models"]}},"/models/{modelId}/scenarios/{scenarioId}/diff":{"get":{"description":"A scenario's own changes against Base, with `from` and `to` values. Up to 500 elements.\n","operationId":"scenario.diff","parameters":[{"$ref":"#/components/parameters/modelId"},{"$ref":"#/components/parameters/scenarioId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioDiff"}}},"description":"The diff"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Compare scenario with base","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/scenarios/{scenarioId}/save":{"post":{"description":"Saves edits to a model's network layers into a scenario. Send a new `requestId` with each save and the same one on a retry. Up to 10,000 elements. Added elements get negative fids, matched by `tempFid`.","operationId":"scenario.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The scenario's id.","in":"path","name":"scenarioId","required":true,"schema":{"format":"uuid","title":"Scenario","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"changes":[{"fid":12,"set":{"diameter":24}},{"deleted":true,"fid":13}],"layerId":"00000000-0000-0000-0000-000000000022","requestId":"00000000-0000-0000-0000-000000000023"},"schema":{"additionalProperties":false,"properties":{"added":{"items":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"geometry":{"properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"id":{"description":"Returned on the new element's change. Not stored.","format":"uuid","type":"string"},"tempFid":{"description":"Your temporary number for the new element, -1 or lower. The response pairs it with the element's saved number.","maximum":-1,"type":"integer"}},"required":["tempFid","geometry"],"type":"object"},"maxItems":10000,"title":"Elements added","type":"array"},"changes":{"description":"Set values and moved shapes become the element's change in the scenario. A delete turns the element off in the scenario.","items":{"additionalProperties":false,"properties":{"deleted":{"description":"true switches the element off in the scenario. Default false.","type":"boolean"},"fid":{"description":"The element's number in the layer, or the negative number of one this scenario, or one it was made from, added.","type":"integer"},"geometry":{"description":"The element's new shape, GeoJSON in WGS84 (longitude, latitude), of the layer's shape type.","properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"set":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"description":"Values to set, by column name.","maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"was":{"additionalProperties":true,"description":"Ignored. Scenarios have no versions, so a save isn't checked against what was read.","type":"object"},"wasShape":{"type":"string"},"wasVersion":{"type":"string"}},"required":["fid"],"type":"object"},"maxItems":10000,"title":"Changes","type":"array"},"layerId":{"description":"The model network layer the edits are for.","format":"uuid","title":"Layer","type":"string"},"linked":{"description":"Other layers of the model's network saved into the scenario with this one, in the same transaction. These are the links a moved node stretched, the nodes a moved link carried, and pending changes in the model's other layers. Either all of it is saved or none. Not for HEC-RAS models.","items":{"additionalProperties":false,"properties":{"added":{"items":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"geometry":{"properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"id":{"description":"Returned on the new element's change. Not stored.","format":"uuid","type":"string"},"tempFid":{"description":"Your temporary number for the new element, -1 or lower. The response pairs it with the element's saved number.","maximum":-1,"type":"integer"}},"required":["tempFid","geometry"],"type":"object"},"maxItems":10000,"title":"Elements added","type":"array"},"changes":{"description":"Set values and moved shapes become the element's change in the scenario. A delete turns the element off in the scenario.","items":{"additionalProperties":false,"properties":{"deleted":{"description":"true switches the element off in the scenario. Default false.","type":"boolean"},"fid":{"description":"The element's number in the layer, or the negative number of one this scenario, or one it was made from, added.","type":"integer"},"geometry":{"description":"The element's new shape, GeoJSON in WGS84 (longitude, latitude), of the layer's shape type.","properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"]}},"required":["type","coordinates"],"type":"object"},"set":{"additionalProperties":{"maxLength":10000,"type":["string","number","boolean","null"]},"description":"Values to set, by column name.","maxProperties":200,"propertyNames":{"maxLength":255,"minLength":1},"type":"object"},"was":{"additionalProperties":true,"description":"Ignored. Scenarios have no versions, so a save isn't checked against what was read.","type":"object"},"wasShape":{"type":"string"},"wasVersion":{"type":"string"}},"required":["fid"],"type":"object"},"maxItems":10000,"title":"Changes","type":"array"},"layerId":{"description":"Another network layer of the same model. Each layer may appear once in a save.","format":"uuid","type":"string"}},"required":["layerId"],"type":"object"},"maxItems":32,"title":"Other layers","type":"array"},"requestId":{"description":"Created by the client for this save, and sent again with it if the response was lost. The save that succeeded is then returned.","format":"uuid","type":"string"}},"required":["layerId","requestId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save edits to scenario","tags":["Project models"]}},"/models/{modelId}/scenarios/{scenarioId}/sections":{"patch":{"description":"Sets or deletes section values in a scenario, by path. Read sections with `GET /models/{modelId}/sections`.","operationId":"scenario.sections.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The scenario's id.","in":"path","name":"scenarioId","required":true,"schema":{"format":"uuid","title":"Scenario","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"changes":[{"op":"set","path":["UH1","rows","month=All","r1"],"section":"hydrographs","value":0.02}]},"schema":{"additionalProperties":false,"properties":{"changes":{"description":"Values inside the model's sections, by path, as a run renders them. Step into a table by key (hydrographs, options), and into a list by a row's field=value (node=J1) or its index. The last change to a path wins.","items":{"additionalProperties":false,"properties":{"op":{"description":"set puts value at the path; delete removes what's there.","enum":["set","delete"],"type":"string"},"path":{"description":"1 to 8 steps into the section: a table's key, a row's field=value (node=J1), or a row's index.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":8,"minItems":1,"type":"array"},"section":{"description":"The section's name in the model's data, such as hydrographs, dwf, patterns or inflows.","maxLength":64,"minLength":1,"type":"string"},"value":{"description":"With op set, the value to put at the path, any JSON. Ignored with delete."}},"required":["section","path","op"],"type":"object"},"maxItems":5000,"minItems":1,"title":"Changes","type":"array"}},"required":["changes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change scenario sections","tags":["Project models"]}},"/models/{modelId}/sections":{"get":{"description":"A model's data sections, with the `etag` that `PATCH /models/{modelId}/data` needs. Up to 64 MB.\n","operationId":"model.sections","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"Section names, comma separated, at most 50.","in":"query","name":"names","required":true,"schema":{"maxLength":2000,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSections"}}},"description":"The sections, by name"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get model sections","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/selection-lists":{"get":{"description":"A model's selection lists, oldest first.\n","operationId":"model.selection_list.list","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"lists":{"items":{"properties":{"bbox":{"items":{"type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"members":{"items":{"properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"},"name":{"type":"string"},"role":{"type":["string","null"]}},"required":["layerId","fid","name"],"type":"object"},"type":"array"},"modelId":{"format":"uuid","type":"string"},"name":{"type":"string"},"source":{"description":"The list's source (selection, flag, typed).","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","modelId","name","source","members","bbox","createdAt","updatedAt"],"type":"object"},"type":"array"}},"required":["lists"],"type":"object"}}},"description":"The lists"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List selection lists","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Saves model features as a named selection list: the `members` given, or every feature flagged with `flagId`.","operationId":"model.list.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"members":[{"fid":12,"layerId":"00000000-0000-0000-0000-000000000002"},{"fid":13,"layerId":"00000000-0000-0000-0000-000000000002"}],"name":"Pipes to inspect"},"schema":{"additionalProperties":false,"properties":{"flagId":{"description":"Every feature of the model with a cell marked with this project flag (`PATCH /layers/{layerId}/flags/{flagId}`), in place of members.","format":"uuid","type":"string"},"members":{"description":"Features of the model's layers, each a layerId and fid. A pair given twice is kept once, a fid the layer doesn't have is dropped, and a layer that isn't the model's is refused.","items":{"additionalProperties":false,"properties":{"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"maxItems":10000,"type":"array"},"name":{"description":"Required with members. With flagId, defaults to the flag's label.","maxLength":120,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Keep as list","tags":["Project models"]}},"/models/{modelId}/selection-lists/{listId}":{"delete":{"description":"Deletes a selection list. Its features don't change.","operationId":"model.list.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The list's id.","in":"path","name":"listId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete list","tags":["Project models"]},"patch":{"description":"Renames a selection list, or replaces its `members`.","operationId":"model.list.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The list's id.","in":"path","name":"listId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Pipes inspected"},"schema":{"additionalProperties":false,"properties":{"members":{"description":"Features of the model's layers, each a layerId and fid. A pair given twice is kept once, a fid the layer doesn't have is dropped, and a layer that isn't the model's is refused.","items":{"additionalProperties":false,"properties":{"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"maxItems":10000,"type":"array"},"name":{"maxLength":120,"minLength":1,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit list","tags":["Project models"]}},"/models/{modelId}/series":{"post":{"description":"Creates or replaces a model series. Send `rows`, or a sensor site's readings (`siteId`, `measure`, `start`, `end`). Send the model's current `etag`. The model must be split.","operationId":"model.series.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"etag":"<etag from GET /projects/{projectId}/models/{modelId}>","kind":"flow","name":"INFLOW_A","rows":[{"date":"05/01/2026","time":"00:00","value":0.5},{"date":"05/01/2026","time":"01:00","value":1.2}]},"schema":{"additionalProperties":false,"oneOf":[{"required":["rows"]},{"required":["siteId","measure","start","end"]}],"properties":{"end":{"description":"With `siteId`: the window's end, an ISO 8601 date-time. At most 20,000 raw readings may fall between start and end.","format":"date-time","type":"string"},"etag":{"description":"The model's `etag` from `GET /projects/{projectId}/models/{modelId}`, or null while it has none. If the data changed since, the write is refused (409).","oneOf":[{"maxLength":200,"type":"string"},{"type":"null"}]},"kind":{"description":"What the series holds. Default: the kind it had, else timeseries. With `siteId`, it's the `measure`.","enum":["timeseries","rain","flow","depth","velocity"]},"measure":{"description":"With `siteId`: which of the site's readings to copy. Values are converted to the model's units (its flow units for flow; in or mm for rain; ft or m for depth; ft/s or m/s for velocity). Rain needs readings at a regular whole-minute interval.","enum":["rain","flow","depth","velocity"]},"name":{"description":"The series' name, without spaces. Saving a new name creates the series.","maxLength":120,"minLength":1,"pattern":"^\\S+$","type":"string"},"rows":{"description":"Every row, in order, in SWMM's format. The series is replaced whole, or created.","items":{"additionalProperties":false,"properties":{"date":{"description":"MM/DD/YYYY. Blank for a series counted from the start.","maxLength":10,"type":"string"},"time":{"description":"The time of day (HH:MM or HH:MM:SS) when a date is given; with no date, the time since the start, as SWMM reads it.","maxLength":12,"minLength":1,"type":"string"},"value":{"type":"number"}},"required":["time","value"],"type":"object"},"maxItems":500000,"type":"array"},"siteId":{"description":"In place of rows, a sensor site's stored readings from start to end, timestamped in the project's time zone.","format":"uuid","type":"string"},"start":{"description":"With `siteId`: the window's start, an ISO 8601 date-time.","format":"date-time","type":"string"}},"required":["etag","name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save series","tags":["Project models"]}},"/models/{modelId}/series-uses":{"get":{"description":"Where each of a SWMM model's series is used, by series name.\n","operationId":"model.series_uses","parameters":[{"$ref":"#/components/parameters/modelId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"uses":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"required":["uses"],"type":"object"}}},"description":"The uses, by series"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List series uses","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/series/delete":{"post":{"description":"Deletes a model series by `name`. Send the model's current `etag`. The model must be split.","operationId":"model.series.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"etag":"<etag from GET /projects/{projectId}/models/{modelId}>","name":"INFLOW_A"},"schema":{"additionalProperties":false,"properties":{"etag":{"description":"The model's `etag` from `GET /projects/{projectId}/models/{modelId}`, or null while it has none. If the data changed since, the write is refused (409).","oneOf":[{"maxLength":200,"type":"string"},{"type":"null"}]},"name":{"maxLength":120,"minLength":1,"pattern":"^\\S+$","type":"string"}},"required":["etag","name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete series","tags":["Project models"]}},"/models/{modelId}/series/{name}":{"get":{"description":"A page of a model time series, by name. Series names are in `GET /models/{modelId}`.\n","operationId":"model.series.get","parameters":[{"$ref":"#/components/parameters/modelId"},{"$ref":"#/components/parameters/seriesName"},{"description":"How many rows to skip, to get the next page. Default 0.","in":"query","name":"offset","schema":{"minimum":0,"type":"integer"}},{"description":"The most rows to return in one page. Default 500.","in":"query","name":"limit","schema":{"maximum":5000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesPage"}}},"description":"A page of rows"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get model series","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/sewer-checks":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Checks a completed SWMM run against sewer criteria: pipe depth ratio and velocity, manhole\nsurcharge, freeboard and flooding. Name the run by `simulationId`, or `runId` and\n`scenarioId`. Criteria left out use `GET /projects/{projectId}/level-of-service`.\n","operationId":"model.sewer_check","parameters":[{"$ref":"#/components/parameters/modelId"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"condition":{"enum":["dryWeather","designStorm"],"type":"string"},"criteria":{"additionalProperties":true,"description":"Sewer criteria by name (maxDepthRatio, maxSurchargeFt, and so on), as numbers or strings. Null clears one.","type":"object"},"runId":{"format":"uuid","type":"string"},"scenarioId":{"format":"uuid","type":"string"},"simulationId":{"format":"uuid","type":"string"},"stormYears":{"description":"The design storm's return period, with condition designStorm.","type":"number"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SewerChecks"}}},"description":"The checks"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Check sewer level of service","tags":["Project models"]}},"/models/{modelId}/split":{"post":{"description":"Splits a model's data into sections and series, which rain, series edits and run inputs need. Check `split` in `GET /models/{modelId}`. Can't be undone.","operationId":"model.split","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Split model data","tags":["Project models"]}},"/models/{modelId}/swmm-cells":{"post":{"description":"Adds the 2D cells layer to an OpenSWMM 2D model from its imported mesh. Can't be undone.","operationId":"model.swmm.cells","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Show the imported 2D cells","tags":["Project models"]}},"/models/{modelId}/system":{"patch":{"description":"Sets what a SWMM model serves: `sanitary` (default), `combined` or `stormwater`. This sets which level of service criteria it's judged by (`GET /projects/{projectId}/level-of-service`). Not for EPANET or HEC-RAS models.","operationId":"model.system.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"system":{"description":"sanitary or combined: judged by the sewer criteria; stormwater: judged by the stormwater criteria. A SWMM model is sanitary until it's set.","enum":["sanitary","combined","stormwater"],"title":"System","type":"string"}},"required":["system"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set model system","tags":["Project models"]}},"/models/{modelId}/trace":{"get":{"description":"Traces everything upstream or downstream of a node or link, by name. With `simulationId` and\n`step`, traces an EPANET model by that run's flow.\n","operationId":"model.trace","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"A node's or link's name, as in `GET /models/{modelId}/element-names`. 404 when the model has neither.","in":"query","name":"from","required":true,"schema":{"minLength":1,"type":"string"}},{"description":"downstream follows the links to the outfalls; upstream follows every branch that drains to `from`.","in":"query","name":"direction","required":true,"schema":{"enum":["upstream","downstream"],"type":"string"}},{"description":"A run of this model whose flow an EPANET trace follows.","in":"query","name":"simulationId","schema":{"format":"uuid","type":"string"}},{"description":"The run's reporting period to read flow at, counted from 0. Required with `simulationId` on an EPANET model; ignored otherwise.","in":"query","name":"step","schema":{"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bbox":{"items":{"type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"byFlow":{"description":"Whether the links were followed by the run's flow rather than as drawn.","type":"boolean"},"chain":{"items":{"type":"string"},"type":["array","null"]},"ends":{"description":"Where the trace ended, the longest way first: the tops an upstream trace reached, or the outfalls a downstream one did. Each comes with the longest way to it along the traced links, which a branched trace is profiled along.","items":{"properties":{"chain":{"description":"The way's nodes, down the pipe as a profile reads them.","items":{"type":"string"},"type":"array"},"length":{"description":"The way's link lengths added up, in the model's length unit; a link with none counts nothing.","type":"number"},"links":{"minimum":1,"type":"integer"},"node":{"type":"string"}},"required":["node","length","links","chain"],"type":"object"},"maxItems":50,"type":"array"},"endsTotal":{"description":"How many ends there are; `ends` lists the first 50.","minimum":0,"type":"integer"},"layers":{"items":{"properties":{"fids":{"items":{"type":"integer"},"type":"array"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fids"],"type":"object"},"type":"array"},"links":{"minimum":0,"type":"integer"},"nodes":{"minimum":0,"type":"integer"}},"required":["layers","links","nodes","chain","bbox","byFlow","ends","endsTotal"],"type":"object"}}},"description":"Trace results"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Trace model network","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/trash":{"post":{"description":"Moves a model and its network layers to the trash. Running simulations finish and are billed.","operationId":"model.trash","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move model to trash","tags":["Project models"]}},"/models/{modelId}/versions":{"post":{"description":"Saves a model's current data as a new version, with a reason. Can't be undone.","operationId":"model.version.commit","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The model's id.","in":"path","name":"modelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"reason":"calibrated"},"schema":{"additionalProperties":false,"properties":{"reason":{"description":"Why the version was saved, kept as a label on it. Default: edited.","enum":["imported","edited","calibrated","run","agent","promoted"],"title":"Reason","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save model version","tags":["Project models"]}},"/models/{modelId}/versions/{number}":{"get":{"description":"One saved model version, by number.\n","operationId":"model.version.get","parameters":[{"$ref":"#/components/parameters/modelId"},{"description":"The version's number, from `versions` in `GET /models/{modelId}`. 404 when the model has no such version.","in":"path","name":"number","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersionDetail"}}},"description":"The version"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get model version","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/models/{modelId}/water-checks":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Checks a completed EPANET run, or the design pair, against pressure, velocity, headloss and tank limits. Limits left out use typical values.","operationId":"model.water_check","parameters":[{"$ref":"#/components/parameters/modelId"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"averageDayId":{"description":"The design pair's average-day simulation, for tank cycling. Read only with `maxDayId`.","format":"uuid","type":"string"},"criteria":{"additionalProperties":true,"description":"Limits by name, as numbers or numeric strings: minPressure, floorPressure, maxPressure (psi, or m for SI flow units), maxVelocity (ft/s or m/s), maxHeadloss (ft per 1,000 ft or m/km), headlossMinDiameter (in or mm), tankMinLevelPct, tankMinCyclePct, emergencyHours. A missing or unreadable one uses the typical value (US: 40, 20, 80, 5, 10, 4, 30, 20, 0).","type":"object"},"maxDayId":{"description":"The design pair's max-day simulation (from `GET /models/{modelId}/design-conditions`). Wins over `simulationId` when both are sent.","format":"uuid","type":"string"},"simulationId":{"description":"A completed simulation of this model to check alone. Send this or `maxDayId`.","format":"uuid","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterChecks"}}},"description":"The checks"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Check master plan limits","tags":["Project models"]}},"/notifications":{"get":{"description":"Your notifications. Filed ones have `filed=true`.\n","operationId":"notification.list","parameters":[{"description":"true lists filed notifications; false or left out lists the rest.","in":"query","name":"filed","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notifications"}}},"description":"The notifications"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List notifications","tags":["Account"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/notifications/read":{"post":{"description":"Marks notifications read: those in `ids`, or all of them when `ids` is left out.","operationId":"notification.read","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{},"schema":{"additionalProperties":false,"properties":{"ids":{"description":"Those to mark read; every one when left out.","items":{"format":"uuid","type":"string"},"maxItems":200,"minItems":1,"title":"Notifications","type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Mark notifications read","tags":["Account"]}},"/openapi.json":{"get":{"operationId":"contract","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"An OpenAPI 3.1 document"}},"security":[],"summary":"Get public contract","tags":["System"]}},"/projects":{"get":{"description":"Projects in the current workspace, most recently updated first. Projects shared with you are in `GET /collections/{kind}` (`tab=shared`).","operationId":"project.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"}}},"description":"Projects, most recently updated first"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List projects","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates a project in the current workspace. `template` is `empty`, or `collection-system`, `stormwater` or `water-distribution` for that system's starter layers.","operationId":"project.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Lawrence sewer","template":"collection-system"},"schema":{"additionalProperties":false,"properties":{"center":{"additionalProperties":false,"description":"Where the project's map opens, in WGS84 degrees.","properties":{"lat":{"maximum":90,"minimum":-90,"type":"number"},"lng":{"maximum":180,"minimum":-180,"type":"number"}},"required":["lng","lat"],"title":"Map center","type":"object"},"description":{"description":"A description of the project. Blank or null for none.","oneOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"title":"Description"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"srid":{"description":"The projection models are read in, as an EPSG code such as 2264 or an ESRI code from 100000 up such as 102698. Find one with `GET /crs` (`GET /crs`). 4326 (WGS 84) when left out.","maximum":999999,"minimum":1,"title":"Projection","type":"integer"},"template":{"description":"empty for no layers. collection-system adds gravity mains, manholes, force mains, laterals, lift stations and subcatchments; stormwater adds storm mains, inlets, outfalls, culverts and drainage areas; water-distribution adds water mains, hydrants, valves, services, meters, tanks and pressure zones. Each layer starts empty.","enum":["collection-system","stormwater","water-distribution","empty"],"title":"Start from","type":"string"},"timezone":{"description":"An IANA time zone name (America/New_York). None when left out.","oneOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"title":"Time zone"},"units":{"description":"us for feet, inches and US units; metric for meters and SI units. us when left out.","enum":["us","metric"],"title":"Units","type":"string"},"zoom":{"description":"The zoom the project's map opens at, 0 (the world) to 24.","maximum":24,"minimum":0,"title":"Map zoom","type":"number"}},"required":["name","template"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New project","tags":["Projects"]}},"/projects/{projectId}":{"get":{"description":"Returns a project. A project in the trash returns 410.\n","operationId":"project.get","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}},"description":"The project"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"In the trash. Its only action is restore, for those who may restore it."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get project","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/allows":{"get":{"description":"What the plan of the project's workspace allows in it, read apart from the project so opening one never waits on billing. A plan that can't be read allows everything; the actions check again.","operationId":"project.allows","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"digitalTwin":{"description":"model forecasts and sensor forecasts. Off on an Enterprise plan without the digital twin.","type":"boolean"},"riskAndPlan":{"description":"The Risk and Plan tabs. Off on Free and on the Team plan.","type":"boolean"},"sharing":{"type":"boolean"},"team":{"description":"The workspace is a team's: what's withheld is on Enterprise, not on a personal plan.","type":"boolean"}},"required":["sharing","riskAndPlan","digitalTwin","team"],"type":"object"}}},"description":"What the plan allows"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"What the project's plan allows","tags":["Projects"]},"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/projects/{projectId}/capital-project-documents/{documentId}":{"delete":{"description":"Deletes a capital project document. Refused while a cost line uses it.","operationId":"risk.project.document.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The document's id.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete project document","tags":["Risk"]}},"/projects/{projectId}/capital-project-documents/{documentId}/complete":{"post":{"description":"Finishes a capital project document upload started with `POST /projects/{projectId}/capital-project-documents/{documentId}/upload`.","operationId":"risk.project.document.complete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The document's id.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Complete project document","tags":["Risk"]}},"/projects/{projectId}/capital-project-documents/{documentId}/download":{"get":{"description":"A download link for a capital project document, valid for 10 minutes.\n","operationId":"plan.project.document.download","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The document's id.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorDocumentDownload"}}},"description":"The link"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download capital project document","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/capital-project-documents/{documentId}/upload":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Returns a form to upload a document declared with `POST /projects/{projectId}/capital-projects/{riskProjectId}/documents`. Post\n`fields` and the file as multipart form data to `url` before `expiresAt`, then call\n`POST /projects/{projectId}/capital-project-documents/{documentId}/complete`. Send `{}` as the body.\n","operationId":"plan.project.document.upload","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The document's id.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorDocumentUpload"}}},"description":"The upload form"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/Invalid"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start capital project document upload","tags":["Plan"]}},"/projects/{projectId}/capital-project-years":{"get":{"description":"Capital project counts and cost estimates by year. Undated projects come last. Refused over\n5,000 projects.\n","operationId":"plan.project.years","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskProjectYears"}}},"description":"Saved project year and stage totals"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List capital projects by year","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}]},"/projects/{projectId}/capital-projects/{riskProjectId}":{"delete":{"description":"Permanently deletes a capital project with its work orders, cost sheet and documents. Linked inspections stay.","operationId":"risk.project.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The risk project's id.","in":"path","name":"riskProjectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete capital project","tags":["Risk"]},"patch":{"description":"Changes a capital project's stage, year or firm. Send the new values in `set` and the current ones in `was`.","operationId":"risk.project.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The risk project's id.","in":"path","name":"riskProjectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"set":{"stage":"designed"},"was":{"stage":"planned"}},"schema":{"additionalProperties":false,"properties":{"set":{"additionalProperties":false,"minProperties":1,"properties":{"firm":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["planned","designed","construction","constructed","closed"],"type":"string"},"year":{"description":"The year it is or was built. A project dated only by year counts as built on July 1. Null for undated.","maximum":2199,"minimum":1801,"type":["integer","null"]}},"type":"object"},"was":{"additionalProperties":true,"description":"The values as you read them, for each field being set. A value that changed since is refused.","type":"object"}},"required":["set","was"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit capital project","tags":["Risk"]}},"/projects/{projectId}/capital-projects/{riskProjectId}/costs":{"get":{"description":"A capital project's actual costs, line by line, with the total and the estimate. Includes\nthe `version` a replace must match.\n","operationId":"plan.project.costs","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskCostSheet"}}},"description":"The cost sheet"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get capital project costs","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"},{"in":"path","name":"riskProjectId","required":true,"schema":{"format":"uuid","type":"string"}}],"put":{"description":"Replaces a capital project's cost sheet. Send `version` from `GET /projects/{projectId}/capital-projects/{riskProjectId}/costs` as `wasVersion`. Lines not sent are deleted.","operationId":"risk.project.costs.replace","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The risk project's id.","in":"path","name":"riskProjectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"lines":[{"authorised":1250000,"final":1310000,"key":"new-1","label":"Prime contract","payee":"Example Contractors","phase":"construction"}],"wasVersion":"0123456789abcdef0123456789abcdef"},"schema":{"additionalProperties":false,"properties":{"lines":{"description":"The whole sheet. Lines not sent are deleted.","items":{"additionalProperties":false,"properties":{"authorised":{"description":"Dollars authorized. Counts as paid until `final` is set.","minimum":0,"type":"number"},"documentId":{"description":"One of this capital project's documents, as evidence for the line.","format":"uuid","type":["string","null"]},"final":{"description":"Dollars finally paid. Null while open.","minimum":0,"type":["number","null"]},"key":{"description":"A stored line's `key` as read, to keep it, or any new value for a new line. Unique on the sheet.","maxLength":64,"minLength":1,"type":"string"},"label":{"maxLength":500,"type":"string"},"note":{"maxLength":500,"type":["string","null"]},"parentKey":{"description":"For a subconsultant's line, the `key` of the top-level line it sits under. Its amount is inside that line's and isn't added to the totals.","maxLength":64,"type":["string","null"]},"payee":{"maxLength":500,"type":["string","null"]},"phase":{"enum":["investigation","design","bid","construction","construction_services","program_management","other"],"type":"string"},"quantity":{"minimum":0,"type":["number","null"]},"unit":{"maxLength":500,"type":["string","null"]}},"required":["key","phase","label","authorised"],"type":"object"},"maxItems":500,"type":"array"},"wasVersion":{"description":"The sheet's version as you read it. If the sheet changed since, the change is refused.","pattern":"^[0-9a-f]{32}$","type":"string"}},"required":["lines","wasVersion"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save cost sheet","tags":["Risk"]}},"/projects/{projectId}/capital-projects/{riskProjectId}/documents":{"post":{"description":"Adds a document to a capital project (up to 50). Then upload it with `POST /projects/{projectId}/capital-project-documents/{documentId}/upload` and finish with `POST /projects/{projectId}/capital-project-documents/{documentId}/complete`.","operationId":"risk.project.document.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The risk project's id.","in":"path","name":"riskProjectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"contentType":"application/pdf","fileName":"Bid tabulation.pdf","sizeBytes":482113},"schema":{"additionalProperties":false,"properties":{"contentType":{"description":"The file's type: a PDF, JPEG, PNG, WebP or GIF image, plain text, CSV, or a Word, Excel or PowerPoint file (`application/pdf`, `image/png`, ...). The upload must match it.","maxLength":150,"type":"string"},"fileName":{"maxLength":200,"minLength":1,"type":"string"},"sizeBytes":{"description":"The file's exact size in bytes, up to 25 MiB.","maximum":26214400,"minimum":1,"type":"integer"}},"required":["fileName","contentType","sizeBytes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add project document","tags":["Risk"]}},"/projects/{projectId}/contents":{"get":{"description":"The project's groups, layers, rasters and services, in map order.","operationId":"project.contents","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contents"}}},"description":"The project's contents"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get project contents","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/contents/place":{"post":{"description":"Adds a raster or a service of the workspace's contents to this project: `contentId`, from `GET /contents`. It shows the same files as every project that has it; its name, group and look are this project's. Prefer it to `POST /projects/{projectId}/copy` for something shared.","operationId":"content.place","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contentId":{"description":"The workspace's content to place in this project.","format":"uuid","type":"string"},"noteId":{"description":"For a picture, a document, a link or a video: the note of this project, of the same kind, to show it.","format":"uuid","type":"string"}},"required":["contentId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add from contents","tags":["System"]}},"/projects/{projectId}/contents/replace":{"post":{"description":"Gives a shared raster or service its next version: `contentId`, and `rasterId`, a raster of this project not shared, already imported, or `serviceId`, a service of this project not shared and of the same type. Every project that has the content shows the new files, or the new address, layers and login; the earlier versions are kept. The raster or service joins the content, or goes when this project has the content already.","operationId":"content.replace","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"oneOf":[{"required":["rasterId"]},{"required":["serviceId"]},{"required":["noteId"]}],"properties":{"contentId":{"description":"The raster, service, image or document content to replace.","format":"uuid","type":"string"},"noteId":{"description":"For a picture, a document, a link or a video: a note of this project, of the same kind, whose own file or address becomes the content's next version.","format":"uuid","type":"string"},"rasterId":{"description":"For a raster: a raster of this project, not shared, whose files become the content's next version.","format":"uuid","type":"string"},"serviceId":{"description":"For a service: a service of this project, not shared and of the same type, whose address, layers and login become the content's next version.","format":"uuid","type":"string"}},"required":["contentId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Replace in contents","tags":["System"]}},"/projects/{projectId}/contents/share":{"post":{"description":"Shares a raster or a service of this project with the workspace's contents: `rasterId` or `serviceId`, from `GET /projects/{projectId}/contents`. Other projects then add it with `POST /projects/{projectId}/contents/place` and show the same files, without a copy. A raster still importing, or one showing the library's or another project's file, is refused.","operationId":"content.share","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"oneOf":[{"required":["rasterId"]},{"required":["serviceId"]},{"required":["noteId"]}],"properties":{"noteId":{"description":"The image, document, link or video note of this project whose file or address to share.","format":"uuid","type":"string"},"rasterId":{"description":"The raster of this project to share.","format":"uuid","type":"string"},"serviceId":{"description":"The service of this project to share.","format":"uuid","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Share with the workspace","tags":["System"]}},"/projects/{projectId}/copy":{"post":{"description":"Copies layers, rasters and services from another project of this workspace, by their ids in that project's `GET /projects/{projectId}/contents`, and notes by their ids in its `GET /projects/{projectId}/notes`. Use it instead of uploading the same file again. A note pinned on a feature keeps its pin when its layer is copied in the same call. A model's network is copied with `POST /models/{modelId}/duplicate`; a sensor network isn't copied.","operationId":"data.copy","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"fromProjectId":{"description":"The project to copy from: another of this workspace.","format":"uuid","title":"From project","type":"string"},"layerIds":{"description":"The layers to copy, by their ids in the other project.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array","uniqueItems":true},"noteIds":{"description":"The notes to copy, by their ids in the other project.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array","uniqueItems":true},"rasterIds":{"description":"The rasters to copy, by their ids in the other project.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array","uniqueItems":true},"serviceIds":{"description":"The services to copy, by their ids in the other project.","items":{"format":"uuid","type":"string"},"maxItems":50,"type":"array","uniqueItems":true}},"required":["fromProjectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Copy from another project","tags":["System"]}},"/projects/{projectId}/dependents":{"get":{"description":"For each layer, the risk models, inspections, work orders, risk runs and simulations that use it.","operationId":"project.dependents","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/Dependents"},"type":"object"}}},"description":"Each layer something depends on, by id"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List layer dependents","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/design-storms":{"post":{"description":"Adds a NOAA Atlas 14 design storm at a sensor site's location, for a duration and return period. Find regions with `run.noaa_regions`.","operationId":"rain.design.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"distribution":{"case":"q1","percentile":50},"durationHours":24,"gauges":["RG1"],"name":"10-year 24-hour","region":"mw_1","returnPeriodYears":10,"siteId":"00000000-0000-0000-0000-000000000018","stepSeconds":300},"schema":{"additionalProperties":false,"properties":{"distribution":{"additionalProperties":false,"description":"NOAA's temporal distribution. Either storms by the quartile their heaviest rain fell in, or all storms, at a percentile. Default is the first quartile's median.","properties":{"case":{"description":"q1 to q4: storms whose heaviest rain fell in that quarter of the duration. all: every storm.","enum":["q1","q2","q3","q4","all"],"type":"string"},"percentile":{"description":"The curve's percentile, 10 to 90. 50 is the median.","enum":[10,20,30,40,50,60,70,80,90],"type":"integer"}},"required":["case","percentile"],"title":"Distribution","type":"object"},"durationHours":{"description":"The storm's length in hours: 6, 12, 24 or 96.","enum":[6,12,24,96],"title":"Duration","type":"integer"},"gauges":{"description":"The model gauges it is for, by name. Each reads the same storm.","items":{"maxLength":120,"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"title":"Gauges","type":"array","uniqueItems":true},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"region":{"description":"NOAA's temporal region, such as mw_1 or sa_general, from GET /projects/{projectId}/run-inputs/noaa-regions?siteId=… for the same site.","maxLength":40,"minLength":4,"pattern":"^[a-z]{2,3}_[a-z0-9_]+$","title":"Region","type":"string"},"returnPeriodYears":{"description":"The return period in years, above 0 and at most 1000, such as 2, 10 or 100.","exclusiveMinimum":0,"maximum":1000,"title":"Return period","type":"number"},"siteId":{"description":"A sensor site of the project's whose location is used for the Atlas 14 depth. Any site with a location works, not only a rain gauge.","format":"uuid","title":"Site","type":"string"},"stepSeconds":{"description":"Whole minutes, 1 to 60. Default 5.","maximum":3600,"minimum":60,"multipleOf":60,"title":"Step","type":"integer"}},"required":["name","gauges","siteId","returnPeriodYears","durationHours","region"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add a design storm","tags":["Project models"]}},"/projects/{projectId}/duplicate":{"post":{"description":"Makes a new project from this one, in its workspace or `teamId`, another team you are a member of: `name`, and the `areas` it takes (`contents`, `notes`, `models`, `monitoring`, `risk`, `plans`; every one when left out; `risk` and `plans` need `contents`). Forecasts and scheduled analyses come turned off; sensor networks go on pulling readings in both projects. A model still importing, running or being studied refuses `models`; an analysis or calibration running refuses `monitoring`; a risk run going refuses `risk`. Risk schedules come manual. A job fills it; follow it in `GET /projects`. In another team, saved sensor and server logins stay behind: readings come, feeds pull again once a login is saved there. Use it to start a new phase from a finished project, not to copy a few layers (`POST /projects/{projectId}/copy`).","operationId":"project.duplicate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"areas":{"description":"What the new project holds of this one: contents (layers, rasters, services, groups, flags, data tables and media), notes, models (with their scenarios, versions, finished runs and results, and forecast schedules, which start off), and monitoring (sensor networks with their connections and readings, which go on updating in both projects, and what is built on them; forecasts and scheduled analyses start off). risk (risk models with their finished runs and scores, inspections and maintenance, unit costs; schedules start manual), and plans (capital projects with their costs and documents, lining packages). Risk and plans sit on the project's layers, so they need contents. Calibration comes when models and monitoring both do. Every one when left out.","items":{"enum":["contents","notes","models","monitoring","risk","plans"],"type":"string"},"title":"What comes","type":"array","uniqueItems":true},"name":{"description":"The new project's name.","maxLength":120,"minLength":1,"title":"Name","type":"string"},"teamId":{"description":"The team the new project goes in: another team you are a member of. The original's workspace when left out. A copy in another team leaves out the original's saved sensor and server logins: its readings come, and its feeds pull again once a login is saved there.","format":"uuid","title":"Team","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Duplicate project","tags":["Projects"]}},"/projects/{projectId}/export":{"patch":{"description":"Sets who can read the project's data through its WFS export: `none`, `private` (token holders), `public`, or `layers` (each layer's own setting).","operationId":"project.export.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"access":"private"},"schema":{"additionalProperties":false,"properties":{"access":{"description":"Nobody, holders of the token, anyone with the address, or a setting for each layer.","enum":["none","private","public","layers"],"title":"WFS access","type":"string","x-titles":["Off","Token","Public","By layer"]}},"required":["access"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set project export access","tags":["Projects"]}},"/projects/{projectId}/export/token":{"post":{"description":"Replaces the project's WFS export token. The old one stops working at once. Read the new token in the app.","operationId":"project.export.token","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Create a new export token","tags":["Projects"]}},"/projects/{projectId}/fireflow-studies/{studyId}/results":{"get":{"description":"A fire-flow study's results, one row per hydrant. Empty until the study is completed.\n","operationId":"model.fireflow.results","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"A fire-flow study's id, from `GET /models/{modelId}/fireflow-studies`.","in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The case to return, as one of the demand multipliers the study ran (`multipliers`). Leave it out, or send one it didn't run, for the design case: the study's first configured multiplier.","in":"query","name":"multiplier","required":false,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FireflowResults"}}},"description":"The study's rows"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get fire-flow results","tags":["Project models"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/flags":{"get":{"description":"The project's flags. Use a flag's id as `flagId` in other flag actions.","operationId":"project.flag.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FlagDefinition"},"type":"array"}}},"description":"The flags, by label"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List flags","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a flag (label, color, short code) for marking layer cells and model rows. Labels are unique in a project. The new flag's id is in `changes[0].target.id`.","operationId":"flag.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"code":"SRV","color":"#2e7d32","label":"Surveyed"},"schema":{"additionalProperties":false,"properties":{"code":{"description":"A short code shown in the cell, as in ICM (SRV, ASM). Stored in uppercase.","maxLength":6,"pattern":"^[A-Za-z0-9]*$","title":"Code","type":["string","null"]},"color":{"description":"A CSS color: #rgb or #rrggbb, a color name such as red, or rgb(), rgba(), hsl() or hsla().","maxLength":40,"minLength":1,"title":"Color","type":"string"},"description":{"maxLength":500,"title":"Description","type":["string","null"]},"label":{"description":"The flag's name, unique among the project's flags.","maxLength":60,"minLength":1,"title":"Name","type":"string"}},"required":["label","color"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New flag","tags":["Projects"]}},"/projects/{projectId}/flags/{flagId}":{"delete":{"description":"Deletes a project flag. Creating one with the same label later brings it back with its marks.","operationId":"flag.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The flag's id.","in":"path","name":"flagId","required":true,"schema":{"format":"uuid","title":"Flag","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete flag","tags":["Projects"]},"patch":{"description":"Changes a flag's label, color, code, description or `enabled`. Send `flagId` and only the fields to change.","operationId":"flag.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The flag's id.","in":"path","name":"flagId","required":true,"schema":{"format":"uuid","title":"Flag","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"enabled":false},"schema":{"additionalProperties":false,"properties":{"code":{"description":"A short code shown in the cell, as in ICM (SRV, ASM). Stored in uppercase.","maxLength":6,"pattern":"^[A-Za-z0-9]*$","title":"Code","type":["string","null"]},"color":{"description":"A CSS color: #rgb or #rrggbb, a color name such as red, or rgb(), rgba(), hsl() or hsla().","maxLength":40,"minLength":1,"title":"Color","type":"string"},"description":{"maxLength":500,"title":"Description","type":["string","null"]},"enabled":{"title":"Offered","type":"boolean"},"label":{"description":"The flag's name, unique among the project's flags.","maxLength":60,"minLength":1,"title":"Name","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change flag","tags":["Projects"]}},"/projects/{projectId}/grants/{userId}":{"delete":{"description":"Stops sharing the project with someone. `userId` is from `GET /projects/{projectId}/people` (`named`).","operationId":"share.grant.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The user's id.","in":"path","name":"userId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop sharing with someone","tags":["Sharing"]},"patch":{"description":"Changes someone's role on the project: `viewer`, `commenter` or `editor`. `userId` is from `GET /projects/{projectId}/people` (`named`).","operationId":"share.grant.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The person's id, from `GET /projects/{projectId}/people` (`named[].id`).","in":"path","name":"userId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"grant":"commenter"},"schema":{"additionalProperties":false,"properties":{"grant":{"description":"viewer can read. commenter can also add notes. editor can also change the project's contents.","enum":["viewer","commenter","editor"],"title":"May","type":"string"}},"required":["grant"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change someone's role","tags":["Sharing"]}},"/projects/{projectId}/history":{"get":{"description":"Every change made in the project, newest first, with who made it and whether it was undone.\nYour recent changes include an undo token.\n","operationId":"project.history","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"Returns the page before this time. Pass a page's `next`.","in":"query","name":"before","schema":{"format":"date-time","type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectHistory"}}},"description":"A page of history"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get project history","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/huc-boundaries":{"post":{"description":"Adds one hydrologic unit's boundary as a layer, by its full HUC code (2 to 16 digits, such as 103001010202): that unit alone, from the NEER library's Watershed Boundary Dataset, imported as one polygon, for a project boundary or a study area. To add a whole HUC level as a map layer (all of HUC-6, \"HUC 12 watersheds\"), use library.add instead.","operationId":"huc.boundary.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"huc":{"description":"A USGS hydrologic unit code, HUC-2 to HUC-16, such as 103001010202 (a HUC-12).","pattern":"^[0-9]{2,16}$","title":"HUC","type":"string"}},"required":["huc"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add a HUC's boundary","tags":["System"]}},"/projects/{projectId}/inspection-media":{"get":{"description":"The project's inspection videos, photos and reports, oldest first. `pending=true` lists files still to upload.","operationId":"risk.inspection.media.list","parameters":[{"description":"true lists files not uploaded yet, false only uploaded ones. Both when left out.","in":"query","name":"pending","schema":{"type":"boolean"}},{"description":"Only files of this inspection import.","in":"query","name":"importId","schema":{"format":"uuid","type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"How many to skip, to get the next page.","in":"query","name":"offset","schema":{"default":0,"maximum":1000000,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionMediaPage"}}},"description":"Scoped media rows and total"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List inspection files","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}]},"/projects/{projectId}/invitations":{"post":{"description":"Invites someone by email to the project as a `viewer`, `commenter` or `editor`. The invitation lasts 14 days.","operationId":"share.invite","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"email":"alex@example.com","grant":"viewer"},"schema":{"additionalProperties":false,"properties":{"email":{"description":"The email the invitation was (or is to be) sent to. Case doesn't matter.","maxLength":254,"minLength":3,"title":"Email","type":"string"},"grant":{"description":"viewer can read. commenter can also add notes. editor can also change the project's contents.","enum":["viewer","commenter","editor"],"title":"May","type":"string"}},"required":["email","grant"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Invite someone","tags":["Sharing"]}},"/projects/{projectId}/invitations/accept":{"post":{"description":"Accepts your invitation to a project. Find invitations in `GET /home` under `waiting`.","operationId":"invitation.accept","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{},"schema":{"additionalProperties":false,"properties":{"token":{"description":"The token from the invitation email's link, to accept that invitation. Leave out to accept your newest invitation to the project.","maxLength":128,"minLength":8,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Accept an invitation","tags":["Sharing"]}},"/projects/{projectId}/invitations/cancel":{"post":{"description":"Cancels a project invitation, by the email it was sent to.","operationId":"share.invite.cancel","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"email":"alex@example.com"},"schema":{"additionalProperties":false,"properties":{"email":{"maxLength":254,"minLength":3,"type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Cancel an invitation","tags":["Sharing"]}},"/projects/{projectId}/invitations/resend":{"post":{"description":"Emails a project invitation again with a new link. The old link stops working.","operationId":"share.invite.resend","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"email":"alex@example.com"},"schema":{"additionalProperties":false,"properties":{"email":{"maxLength":254,"minLength":3,"type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Resend invitation","tags":["Sharing"]}},"/projects/{projectId}/leave":{"post":{"description":"Removes your access to a project shared with you. Can't be undone.","operationId":"project.leave","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Leave project","tags":["Projects"]}},"/projects/{projectId}/level-of-service":{"get":{"description":"The project's level of service criteria for water, sewer, stormwater and flood impact, with\neach model's system. Unset values are `null`.\n","operationId":"project.los","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LevelOfService"}}},"description":"The criteria"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get level of service","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Sets the project's level of service criteria, in the project's units. Null restores a default; `reset` clears them all first. Read them with `GET /projects/{projectId}/level-of-service`.","operationId":"project.los.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"minProperties":1,"properties":{"flood":{"additionalProperties":false,"description":"What a forecast's flood impact counts a feature by: the wet depth, the Minor, Moderate and Major bounds and the Record depth on its maximum depth, and the smallest wet area kept.","properties":{"minIslandAcres":{"description":"Null puts the default back. In ac for a US project, ha for a metric one.","type":["number","null"]},"minorMaxFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"moderateMaxFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"recordMinFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"wetDepthFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]}},"title":"Flood impact","type":"object"},"reset":{"description":"Clears every value the project set before the groups given are laid on.","title":"Reset to defaults","type":"boolean"},"sewer":{"additionalProperties":false,"description":"Sanitary sewer criteria: the design standard and storm, d/D, surcharge, flooding, freeboard and velocity.","properties":{"basementDepthFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"designStormYears":{"description":"Null puts the default back. In yr.","type":["number","null"]},"maxDepthRatio":{"description":"Null puts the default back.","type":["number","null"]},"maxSurchargeFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"maxVelocity":{"description":"Null puts the default back. In ft/s for a US project, m/s for a metric one.","type":["number","null"]},"minFreeboardFt":{"description":"Null puts the default back. In ft for a US project, m for a metric one.","type":["number","null"]},"minVelocity":{"description":"Null puts the default back. In ft/s for a US project, m/s for a metric one.","type":["number","null"]},"noOverflow":{"description":"Null puts the default back.","type":["boolean","null"]},"standard":{"description":"Null puts the default back.","maxLength":80,"type":["string","null"]}},"title":"Sewer","type":"object"},"stormwater":{"additionalProperties":false,"description":"Post-development against pre-development: the storms compared and the water-quality volume.","properties":{"postAtMostPre":{"description":"Null puts the default back.","type":["boolean","null"]},"storms":{"description":"Null puts the default back. In yr.","items":{"type":"number"},"maxItems":10,"type":["array","null"]},"waterQualityVolume":{"description":"Null puts the default back. In ft³ for a US project, m³ for a metric one.","type":["number","null"]}},"title":"Stormwater","type":"object"},"water":{"additionalProperties":false,"description":"Distribution criteria: pressures, velocity, headloss, tanks and demand factors.","properties":{"emergencyHours":{"description":"Null puts the default back. In h.","type":["number","null"]},"floorPressure":{"description":"Null puts the default back. In psi for a US project, m for a metric one.","type":["number","null"]},"headlossMinDiameter":{"description":"Null puts the default back. In in for a US project, mm for a metric one.","type":["number","null"]},"maxDayFactor":{"description":"Null puts the default back.","type":["number","null"]},"maxHeadloss":{"description":"Null puts the default back. In ft/1000 ft for a US project, m/km for a metric one.","type":["number","null"]},"maxPressure":{"description":"Null puts the default back. In psi for a US project, m for a metric one.","type":["number","null"]},"maxVelocity":{"description":"Null puts the default back. In ft/s for a US project, m/s for a metric one.","type":["number","null"]},"minPressure":{"description":"Null puts the default back. In psi for a US project, m for a metric one.","type":["number","null"]},"peakHourFactor":{"description":"Null puts the default back.","type":["number","null"]},"tankMinCyclePct":{"description":"Null puts the default back. In %.","type":["number","null"]},"tankMinLevelPct":{"description":"Null puts the default back. In %.","type":["number","null"]}},"title":"Water","type":"object"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Level of service","tags":["Projects"]}},"/projects/{projectId}/library":{"get":{"description":"Searches the NEER library for data to add with `POST /projects/{projectId}/library`, such as boundaries, rivers, flood zones and elevation.","operationId":"library.search","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"Words, each of which must appear (case ignored) in a dataset's title, description, source, publisher, region or a tag.","in":"query","name":"q","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"category","required":false,"schema":{"$ref":"#/components/schemas/LibraryCategory"}},{"in":"query","name":"type","required":false,"schema":{"enum":["vector","raster"],"type":"string"}},{"in":"query","name":"region","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Library"}}},"description":"The datasets that match, in the library's order"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Search library","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds up to 20 datasets from the NEER library, by their ids from `GET /projects/{projectId}/library`.","operationId":"library.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"datasetIds":["00000000-0000-0000-0000-000000000006"]},"schema":{"additionalProperties":false,"properties":{"datasetIds":{"description":"Dataset ids from library.search, 1 to 20.","items":{"format":"uuid","type":"string"},"maxItems":20,"minItems":1,"title":"Datasets","type":"array","uniqueItems":true}},"required":["datasetIds"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add from the library","tags":["Layers & data"]}},"/projects/{projectId}/lining-layers":{"get":{"description":"The project's layers, with the ones a lining package would use for sewer and storm systems.\n","operationId":"lining.layers","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiningLayers"}}},"description":"The layers and the guessed lining layers"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List lining layers","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}]},"/projects/{projectId}/lining-network":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"post":{"description":"Builds the pipe network from the given layers and reports its health: unjoined ends,\nrepeated names and manholes missing a rim or invert. Saves nothing.\n","operationId":"lining.network","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiningSpec"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiningNetwork"}}},"description":"The network"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get lining network","tags":["Risk"]}},"/projects/{projectId}/lining-package":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"post":{"description":"Previews a lining package: segment and manhole schedules in flow order, items to check, and\na cost estimate when `options.cost.enabled`. Send `{ packageId }` to build a saved package.\nSaves nothing.\n","operationId":"lining.package","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LiningPackageAsk"},{"$ref":"#/components/schemas/LiningSavedAsk"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiningPackage"}}},"description":"The package"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Preview lining package","tags":["Risk"]}},"/projects/{projectId}/lining-package/export":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"},{"description":"What to export as CSV: the whole package, or one schedule. Required for CSV, ignored for PDF.","in":"query","name":"schedule","schema":{"enum":["package","segments","manholes"],"type":"string"}},{"in":"query","name":"format","schema":{"default":"csv","enum":["csv","pdf"],"type":"string"}}],"post":{"description":"Exports a lining package as CSV or PDF. Takes the same body as `POST /projects/{projectId}/lining-package`.\n","operationId":"lining.package.export","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LiningPackageAsk"},{"$ref":"#/components/schemas/LiningSavedAsk"}]}}},"required":true},"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Export lining package","tags":["Risk"]}},"/projects/{projectId}/lining-packages":{"get":{"description":"Saved lining packages, most recently changed first.\n","operationId":"lining.saved.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LiningSavedSummary"},"type":"array"}}},"description":"The saved packages"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List lining packages","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"post":{"description":"Saves a lining package as a planned capital project. Takes the same layers, pipes and options as `POST /projects/{projectId}/lining-package`.","operationId":"lining.saved.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"nodeLayerIds":["00000000-0000-0000-0000-000000000003"],"options":{"name":"Main St lining"},"pipeLayerIds":["00000000-0000-0000-0000-000000000002"],"pipes":[{"fid":12,"layerId":"00000000-0000-0000-0000-000000000002"},{"fid":13,"layerId":"00000000-0000-0000-0000-000000000002"}],"system":"sewer"},"schema":{"additionalProperties":false,"properties":{"defaultDepthFt":{"exclusiveMinimum":0,"maximum":200,"type":["number","null"]},"linedLayerIds":{"items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"mapping":{"description":"Corrections to the guessed field mapping, by layer, in the format the lining reads use.","type":["object","null"]},"nodeLayerIds":{"items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"options":{"additionalProperties":false,"properties":{"adjustments":{"description":"Feet added to a pipe's total length, or taken off when negative, one per pipe.","items":{"additionalProperties":false,"properties":{"fid":{"type":"integer"},"ft":{"maximum":10000,"minimum":-10000,"type":"number"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid","ft"],"type":"object"},"maxItems":5000,"type":"array"},"cost":{"description":"The cost options, in the format the package read uses. Stored even with cost off.","type":"object"},"name":{"description":"The package's name, which the planned project takes.","maxLength":200,"type":"string"},"notes":{"maxLength":5000,"type":["string","null"]}},"type":"object"},"pipeLayerIds":{"items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"pipes":{"items":{"additionalProperties":false,"properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"maxItems":5000,"type":"array"},"snapToleranceM":{"maximum":50,"minimum":0,"type":["number","null"]},"stage":{"default":"planned","description":"Work still to do. Completed work comes in as records.","enum":["planned","designed"],"type":"string"},"system":{"default":"sewer","enum":["sewer","storm"],"type":"string"}},"required":["pipeLayerIds","nodeLayerIds","pipes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save lining package as planned project","tags":["Risk"]}},"/projects/{projectId}/lining-packages/{packageId}":{"delete":{"description":"Deletes a saved lining package and its planned project. Only while the project is planned and has no records, costs or documents.","operationId":"lining.saved.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The package's id.","in":"path","name":"packageId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete saved lining package","tags":["Risk"]},"get":{"description":"Returns a saved lining package. Layers or pipes removed since are dropped and listed in\n`warnings`.\n","operationId":"lining.saved.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiningSavedPackage"}}},"description":"The package"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get lining package","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"},{"in":"path","name":"packageId","required":true,"schema":{"format":"uuid","type":"string"}}],"patch":{"description":"Changes a saved lining package and its planned project. Send `packageId` and only the fields to change.","operationId":"lining.saved.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The package's id.","in":"path","name":"packageId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Main St lining, phase 2"},"schema":{"additionalProperties":false,"description":"What is sent replaces what is stored. Everything else stays.","properties":{"defaultDepthFt":{"exclusiveMinimum":0,"maximum":200,"type":["number","null"]},"linedLayerIds":{"items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"mapping":{"description":"Corrections to the guessed field mapping, by layer, in the format the lining reads use.","type":["object","null"]},"name":{"maxLength":200,"minLength":1,"type":"string"},"nodeLayerIds":{"items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"notes":{"maxLength":5000,"type":["string","null"]},"options":{"additionalProperties":false,"properties":{"adjustments":{"description":"Feet added to a pipe's total length, or taken off when negative, one per pipe.","items":{"additionalProperties":false,"properties":{"fid":{"type":"integer"},"ft":{"maximum":10000,"minimum":-10000,"type":"number"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid","ft"],"type":"object"},"maxItems":5000,"type":"array"},"cost":{"description":"The cost options, in the format the package read uses. Stored even with cost off.","type":"object"},"name":{"description":"The package's name, which the planned project takes.","maxLength":200,"type":"string"},"notes":{"maxLength":5000,"type":["string","null"]}},"type":"object"},"pipeLayerIds":{"items":{"format":"uuid","type":"string"},"maxItems":40,"type":"array"},"pipes":{"items":{"additionalProperties":false,"properties":{"fid":{"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"maxItems":5000,"type":"array"},"snapToleranceM":{"maximum":50,"minimum":0,"type":["number","null"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save lining package changes","tags":["Risk"]}},"/projects/{projectId}/lining-segments":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"post":{"description":"The chosen pipes in flow order, with the manholes they touch. Pipes not on the pipe layers\nare in `missing`.\n","operationId":"lining.segments","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LiningSpec"},{"properties":{"pipes":{"$ref":"#/components/schemas/LiningPipesAsk"}},"required":["pipes"],"type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiningSelection"}}},"description":"The chosen pipes in flow order"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List lining segments","tags":["Risk"]}},"/projects/{projectId}/lining-trace":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"post":{"description":"Traces pipes between a start and an end, or every pipe upstream or downstream of the start\nwith `direction` (up to 5,000).\n","operationId":"lining.trace","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LiningSpec"},{"properties":{"direction":{"enum":["upstream","downstream"],"type":"string"},"endNode":{"$ref":"#/components/schemas/LiningNodeAsk"},"startNode":{"$ref":"#/components/schemas/LiningNodeAsk"}},"required":["startNode"],"type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiningTrace"}}},"description":"The path, or why there is none"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Trace lining network","tags":["Risk"]}},"/projects/{projectId}/link":{"get":{"description":"A link that opens the project's map at a location, with layers on and features selected.\n","operationId":"project.link","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"query","name":"lat","required":false,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"lng","required":false,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"in":"query","name":"zoom","required":false,"schema":{"maximum":24,"minimum":0,"type":"number"}},{"description":"Layers to show, as comma-separated ids.","in":"query","name":"on","required":false,"schema":{"type":"string"}},{"description":"The layer the selected features are in. Use with fids.","in":"query","name":"layer","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The selected features, comma-separated. Use with layer.","in":"query","name":"fids","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}}},"description":"The address"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get map view link","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/link-probe":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Checks a link before you add it: a service (for `POST /services`) or a file (for `POST /imports/from-url`). A working login returns a `loginToken`, valid for 30 minutes. 10 logins per 10 minutes.","operationId":"link.probe","parameters":[{"$ref":"#/components/parameters/projectId"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"login":{"properties":{"password":{"maxLength":200,"minLength":1,"type":"string"},"username":{"maxLength":200,"minLength":1,"type":"string"}},"required":["username","password"],"type":"object"},"url":{"maxLength":2048,"minLength":1,"type":"string"}},"required":["url"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkProbe"}}},"description":"What the link points to"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"502":{"$ref":"#/components/responses/Failed"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Check link","tags":["Layers & data"]}},"/projects/{projectId}/links":{"get":{"description":"The project's share links, including expired ones. Only users who can share the project see\nthe tokens.\n","operationId":"share.link.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLinks"}}},"description":"The links","headers":{"Cache-Control":{"schema":{"const":"no-store","type":"string"}},"Referrer-Policy":{"schema":{"const":"no-referrer","type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List project share links","tags":["Sharing"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates one of the project's share links, for 7, 30 (default) or 90 days. A viewer link, the default, is a read-only link to the project's map that anyone can open; a commenter or editor link asks its holder to sign in and grants their account that access. Returns 422 while a link of that kind is active. Read the links with `GET /projects/{projectId}/links`.","operationId":"share.link.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"days":30},"schema":{"additionalProperties":false,"properties":{"days":{"description":"How long the link works, in days. Default 30. Leave out when the link never expires.","enum":[7,30,90],"title":"Expires in (days)","type":"integer"},"includeSurveyResponses":{"description":"Whether a viewer link's visitors see survey-response layers. Off when not given; a commenter's or editor's link has no visitors.","title":"Survey responses","type":"boolean"},"neverExpires":{"description":"Whether the link works until it is revoked. Off when not given; days is then used.","title":"Never expires","type":"boolean"},"restriction":{"description":"A viewer link opens without an account. A commenter or editor link asks its holder to sign in, and grants their account that access. Default viewer.","enum":["viewer","commenter","editor"],"title":"Who the link lets in","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make share link","tags":["Sharing"]}},"/projects/{projectId}/links/revoke":{"post":{"description":"Turns off one of the project's share links. Send `restriction`: `viewer`, `commenter` or `editor`. Access already granted through a commenter or editor link stays.","operationId":"share.link.revoke","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"restriction":"viewer"},"schema":{"additionalProperties":false,"properties":{"restriction":{"description":"Which link to revoke: viewer, commenter or editor.","enum":["viewer","commenter","editor"],"type":"string"}},"required":["restriction"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Revoke link","tags":["Sharing"]}},"/projects/{projectId}/maintenance-records":{"get":{"description":"The project's work orders, with counts by activity, year and layer.","operationId":"risk.maintenance.list","parameters":[{"description":"Only work orders matched to this layer.","in":"query","name":"layerId","schema":{"format":"uuid","type":"string"}},{"description":"Only work orders on this feature. Needs `layerId`.","in":"query","name":"fid","schema":{"minimum":0,"type":"integer"}},{"description":"Part of the asset reference, notes, method, source, document name or capital project name, any case.","in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},{"description":"Only this activity.","in":"query","name":"activity","schema":{"enum":["jetting","root_cutting","cctv","cleaning","repair","rehab","overflow","blockage","main_break","other"],"type":"string"}},{"description":"Only this kind of work.","in":"query","name":"kind","schema":{"enum":["preventive","corrective","emergency","capital"],"type":"string"}},{"description":"Only work orders from this import.","in":"query","name":"importId","schema":{"format":"uuid","type":"string"}},{"description":"true lists paper work orders whose document hasn't been attached; false the rest.","in":"query","name":"pendingDocument","schema":{"type":"boolean"}},{"description":"Only this crew, exactly as written.","in":"query","name":"crew","schema":{"maxLength":160,"type":"string"}},{"description":"Only work done in this year.","in":"query","name":"year","schema":{"maximum":2200,"minimum":1800,"type":"integer"}},{"description":"A column and its direction. `asset` is `asset_asc`. `notes` sorts by the method, and `source` by the document name.","in":"query","name":"sort","schema":{"default":"date_desc","enum":["date_desc","date_asc","asset","asset_asc","asset_desc","activity_asc","activity_desc","kind_asc","kind_desc","notes_asc","notes_desc","crew_asc","crew_desc","project_asc","project_desc","source_asc","source_desc"],"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"How many to skip, to get the next page.","in":"query","name":"offset","schema":{"default":0,"maximum":1000000,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskMaintenancePage"}}},"description":"Paged maintenance records and facets"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List work orders","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}]},"/projects/{projectId}/monitoring-periods":{"get":{"description":"The project's monitoring periods, latest start first.","operationId":"sensor.period.list","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The previous page's `nextCursor`, to get the next page. Leave out for the first page.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringPeriods"}}},"description":"The result"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List monitoring periods","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates a monitoring period: a named time window over a set of sensor sites. Leave out `siteIds` for every site. Up to 3,660 days.","operationId":"sensor.period.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"endAt":"2026-05-31T23:59:59Z","name":"Spring 2026 study","startAt":"2026-03-01T00:00:00Z"},"schema":{"additionalProperties":false,"properties":{"endAt":{"description":"When the period ends, after `startAt` and at most 3,660 days later. An RFC 3339 date and time.","format":"date-time","type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"},"note":{"description":"Free text about the period. Null clears it.","maxLength":4000,"type":["string","null"]},"siteIds":{"description":"The sensor sites the period covers. Leave out for every sensor site in the project (on update, to keep the current sites).","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array","uniqueItems":true},"startAt":{"description":"When the period starts. An RFC 3339 date and time.","format":"date-time","type":"string"}},"required":["name","startAt","endAt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Create monitoring period","tags":["Sensors"]}},"/projects/{projectId}/monitoring-periods/from-storm":{"post":{"description":"Creates a monitoring period over every sensor site, from a storm's start to 24 hours after its end.","operationId":"sensor.period.storm","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"stormId":"00000000-0000-0000-0000-000000000002"},"schema":{"additionalProperties":false,"properties":{"stormId":{"description":"A storm's id, from `GET /projects/{projectId}/sensor-storms`.","format":"uuid","type":"string"}},"required":["stormId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Create period from storm","tags":["Sensors"]}},"/projects/{projectId}/monitoring-periods/{periodId}":{"delete":{"description":"Deletes a monitoring period. Readings and storms aren't touched.","operationId":"sensor.period.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The period, from `GET /projects/{projectId}/monitoring-periods`.","in":"path","name":"periodId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete monitoring period","tags":["Sensors"]},"patch":{"description":"Changes a monitoring period's name, window, sites or note. Send only the fields to change.","operationId":"sensor.period.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The period's id.","in":"path","name":"periodId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"endAt":"2026-06-30T23:59:59Z"},"schema":{"additionalProperties":false,"properties":{"endAt":{"description":"When the period ends, after `startAt` and at most 3,660 days later. An RFC 3339 date and time.","format":"date-time","type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"},"note":{"description":"Free text about the period. Null clears it.","maxLength":4000,"type":["string","null"]},"siteIds":{"description":"The sensor sites the period covers. Leave out for every sensor site in the project (on update, to keep the current sites).","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array","uniqueItems":true},"startAt":{"description":"When the period starts. An RFC 3339 date and time.","format":"date-time","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Update monitoring period","tags":["Sensors"]}},"/projects/{projectId}/notes":{"get":{"description":"The notes on the project's map, top first.","operationId":"note.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Note"},"type":"array"}}},"description":"The notes"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List notes","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a note to the project's map. `kind` sets the geometry it takes: Point and card kinds take a Point, Line a LineString, shapes a Polygon. Card kinds also need `paint.zoom`.","operationId":"note.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"geometry":{"coordinates":[-94.58,39.1],"type":"Point"},"kind":"Point","name":"Low manhole","text":"Rim looks low after paving."},"schema":{"additionalProperties":false,"properties":{"geometry":{"additionalProperties":false,"description":"GeoJSON in WGS84 ([longitude, latitude]). A Point, a LineString of 2 or more positions, or a Polygon whose rings close, to match the kind. At most 10,000 positions.","properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","LineString","Polygon"],"type":"string"}},"required":["type","coordinates"],"title":"Shape","type":"object"},"highlight":{"description":"Draws a Line note as a highlighter stroke. Only for kind Line. Off when not sent.","title":"Highlighter","type":"boolean"},"kind":{"description":"What the note is. Point, PointMarker, Notes, Text, Link, Video, Image and Document are placed at a point; Line is a line; Irregular, Rectangle, Square and Circle are areas.","enum":["Point","PointMarker","Notes","Text","Link","Video","Line","Irregular","Rectangle","Square","Circle","Image","Document"],"title":"Kind","type":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"paint":{"additionalProperties":false,"properties":{"borderColor":{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},"borderSize":{"maximum":100,"minimum":0,"type":"number"},"fontStyle":{"enum":["light","regular","semibold","bold"],"type":"string"},"horizontalAlignment":{"enum":["left","center","right"],"type":"string"},"resize":{"additionalProperties":false,"properties":{"height":{"exclusiveMinimum":0,"maximum":100000,"type":"number"},"width":{"exclusiveMinimum":0,"maximum":100000,"type":"number"}},"type":"object"},"rotate":{"maximum":360,"minimum":-360,"type":"number"},"scale":{"items":{"exclusiveMinimum":0,"maximum":1000,"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"shapeFillColor":{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},"shapeFillOpacity":{"maximum":1,"minimum":0,"type":"number"},"shapeStrokeColor":{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},"shapeStrokeOpacity":{"maximum":1,"minimum":0,"type":"number"},"shapeStrokeWidth":{"exclusiveMinimum":0,"maximum":100,"type":"number"},"showLabel":{"type":"boolean"},"textColor":{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},"textSize":{"maximum":400,"minimum":4,"type":"number"},"verticalAlignment":{"enum":["top","middle","bottom"],"type":"string"},"zoom":{"maximum":24,"minimum":0,"type":"number"}},"title":"Appearance","type":"object"},"pin":{"additionalProperties":false,"description":"Attaches the note to a feature of one of the project's layers, by layer id and feature id (fid). The note keeps the feature's label as it is now.","properties":{"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"title":"Pinned on","type":"object"},"text":{"description":"The text of a note or text item, or the address of a link or video.","maxLength":10000,"title":"Words","type":["string","null"]}},"required":["kind","name","geometry"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add note","tags":["Projects"]}},"/projects/{projectId}/notes/{noteId}":{"delete":{"description":"Deletes a note. Only its author or a project editor can.","operationId":"note.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The note's id.","in":"path","name":"noteId","required":true,"schema":{"format":"uuid","title":"Note","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete note","tags":["Projects"]},"patch":{"description":"Changes a note's name, text, shape, pin or paint. Send `noteId` and only the fields to change. Only its author or a project editor can.","operationId":"note.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The note's id.","in":"path","name":"noteId","required":true,"schema":{"format":"uuid","title":"Note","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"text":"Rim is 0.4 ft low."},"schema":{"additionalProperties":false,"minProperties":2,"properties":{"geometry":{"additionalProperties":false,"description":"GeoJSON in WGS84 ([longitude, latitude]). A Point, a LineString of 2 or more positions, or a Polygon whose rings close, to match the kind. At most 10,000 positions.","properties":{"coordinates":{"type":"array"},"type":{"enum":["Point","LineString","Polygon"],"type":"string"}},"required":["type","coordinates"],"title":"Shape","type":"object"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"paint":{"additionalProperties":false,"properties":{"borderColor":{"oneOf":[{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},{"type":"null"}]},"borderSize":{"oneOf":[{"maximum":100,"minimum":0,"type":"number"},{"type":"null"}]},"fontStyle":{"oneOf":[{"enum":["light","regular","semibold","bold"],"type":"string"},{"type":"null"}]},"horizontalAlignment":{"oneOf":[{"enum":["left","center","right"],"type":"string"},{"type":"null"}]},"resize":{"oneOf":[{"additionalProperties":false,"properties":{"height":{"exclusiveMinimum":0,"maximum":100000,"type":"number"},"width":{"exclusiveMinimum":0,"maximum":100000,"type":"number"}},"type":"object"},{"type":"null"}]},"rotate":{"oneOf":[{"maximum":360,"minimum":-360,"type":"number"},{"type":"null"}]},"scale":{"oneOf":[{"items":{"exclusiveMinimum":0,"maximum":1000,"type":"number"},"maxItems":2,"minItems":2,"type":"array"},{"type":"null"}]},"shapeFillColor":{"oneOf":[{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},{"type":"null"}]},"shapeFillOpacity":{"oneOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"shapeStrokeColor":{"oneOf":[{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},{"type":"null"}]},"shapeStrokeOpacity":{"oneOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"shapeStrokeWidth":{"oneOf":[{"exclusiveMinimum":0,"maximum":100,"type":"number"},{"type":"null"}]},"showLabel":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"textColor":{"oneOf":[{"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","type":"string"},{"type":"null"}]},"textSize":{"oneOf":[{"maximum":400,"minimum":4,"type":"number"},{"type":"null"}]},"verticalAlignment":{"oneOf":[{"enum":["top","middle","bottom"],"type":"string"},{"type":"null"}]},"zoom":{"oneOf":[{"maximum":24,"minimum":0,"type":"number"},{"type":"null"}]}},"title":"Appearance","type":"object"},"pin":{"oneOf":[{"additionalProperties":false,"description":"Attaches the note to a feature of one of the project's layers, by layer id and feature id (fid). The note keeps the feature's label as it is now.","properties":{"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"title":"Pinned on","type":"object"},{"type":"null"}],"title":"Pinned on"},"text":{"description":"The text of a note or text item, or the address of a link or video.","maxLength":10000,"title":"Words","type":["string","null"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change note","tags":["Projects"]}},"/projects/{projectId}/notes/{noteId}/file":{"post":{"description":"Attaches an uploaded file to an Image or Document note. Uploads can't be started through the API yet, so this only works with a `key` from the app.","operationId":"note.file","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The note's id.","in":"path","name":"noteId","required":true,"schema":{"format":"uuid","title":"Note","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"key":"project/00000000-0000-0000-0000-000000000001/annotations/00000000-0000-0000-0000-000000000005/document/inspection.pdf"},"schema":{"additionalProperties":false,"properties":{"key":{"description":"Where the file was uploaded: under project/{projectId}/annotations/{noteId}/image/ or …/document/, as the note upload returned it.","maxLength":1024,"minLength":1,"title":"File","type":"string"}},"required":["key"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Attach a file to a note","tags":["Projects"]}},"/projects/{projectId}/notes/{noteId}/group":{"post":{"description":"Moves a note into a group of notes, or out of any group with `groupId: null`.","operationId":"note.group","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The note's id.","in":"path","name":"noteId","required":true,"schema":{"format":"uuid","title":"Note","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"groupId":null},"schema":{"additionalProperties":false,"properties":{"groupId":{"description":"A group of notes, or none. The note goes on top of the group's notes.","oneOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Group"}},"required":["groupId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move note to a group","tags":["Projects"]}},"/projects/{projectId}/notes/{noteId}/order":{"post":{"description":"Moves a note within its group: one `step`, or to position `at`. Send one of them.","operationId":"note.order","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The note's id.","in":"path","name":"noteId","required":true,"schema":{"format":"uuid","title":"Note","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"step":"front"},"schema":{"additionalProperties":false,"properties":{"at":{"description":"The note's new position among its group's notes as `GET /projects/{projectId}/notes` lists them, 0 on top. Send this or step.","minimum":0,"title":"Place","type":"integer"},"step":{"description":"front: to the top. forward: up one. backward: down one. back: to the bottom. Send this or at.","enum":["forward","backward","front","back"],"title":"Where","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move note forward or back","tags":["Projects"]}},"/projects/{projectId}/optimizer-studies":{"get":{"description":"The project's optimizer studies, newest first, without results.\n","operationId":"optimizer.study.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"studies":{"items":{"$ref":"#/components/schemas/OptimizerStudy"},"type":"array"}},"required":["studies"],"type":"object"}}},"description":"The studies"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List optimizer studies","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/optimizer-studies/{studyId}":{"get":{"description":"Returns an optimizer study and its results. Can be tens of megabytes for a large study.\n","operationId":"optimizer.study.get","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizerStudy"}}},"description":"The study"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get optimizer study","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/optimizer-studies/{studyId}/risk-projection":{"get":{"description":"Average risk by year for doing nothing and for up to 8 of a study's programs. `missing`\nlists programs with no curve yet; make one with `POST /models/{modelId}/optimizer-studies/{studyId}/risk-projects`.\n","operationId":"optimizer.study.risk","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"path","name":"studyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Frontier program ids, comma-separated. Ids past the eighth are ignored.","in":"query","name":"programIds","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizerRiskProjection"}}},"description":"The curves"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Get optimizer risk projection","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/people":{"get":{"description":"The project's team, the people it's shared with and their roles, and its invitations.","operationId":"share.people","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/People"}}},"description":"People and invitations"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List project people","tags":["Sharing"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/place-boundaries":{"post":{"description":"Adds a US city's, town's, county's or state's boundary as a layer: found by its name in the Census Bureau's TIGERweb and imported as one polygon. Name the place with its state (\"Agawam, MA\"). Refused, naming each, when the name matches more than one place.","operationId":"place.boundary.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"description":"What it is, where a name is both (a city and a county). Default: a city or town first, then a county, then a state.","enum":["city","town","county","state"],"title":"Kind","type":"string"},"place":{"description":"A US city, town, county or state, with its state for any but a state: \"Agawam, MA\", \"Raytown, Missouri\", \"Jackson County, MO\", \"Massachusetts\".","maxLength":120,"minLength":2,"title":"Place","type":"string"}},"required":["place"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add a place's boundary","tags":["System"]}},"/projects/{projectId}/rain-inputs":{"post":{"description":"Adds rain to the project's run inputs: a series for each gauge, by its name in the model. Up to 50 gauges and 1,000,000 rows.","operationId":"rain.input.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"gauges":[{"gauge":"RG1","rows":[{"date":"05/01/2025","time":"00:00","value":0},{"date":"05/01/2025","time":"00:15","value":0.12},{"date":"05/01/2025","time":"00:30","value":0.05}]}],"name":"May 1 storm"},"schema":{"additionalProperties":false,"properties":{"fileName":{"description":"With from file, the file's name, kept with the input. Ignored otherwise.","maxLength":200,"title":"File","type":"string"},"from":{"description":"Where the rows came from, kept with the input: typed (default) or file.","enum":["typed","file"],"title":"From","type":"string"},"gauges":{"description":"Each gauge the rain is for, by its name in the model, with its rows. A gauge may be listed once; names that differ only in punctuation count as the same. Up to 1,000,000 rows across all gauges.","items":{"additionalProperties":false,"properties":{"gauge":{"maxLength":120,"minLength":1,"type":"string"},"rows":{"items":{"additionalProperties":false,"properties":{"date":{"description":"MM/DD/YYYY. Leave it out on every row for a storm timed from its start.","maxLength":20,"type":"string"},"time":{"description":"H:MM or H:MM:SS, or hours from the start. Without dates, hours may pass 24.","maxLength":20,"minLength":1,"type":"string"},"value":{"description":"The rain at this row, 0 or more. A series of four or more rows that never falls and rises at least twice is stored as a running total; any other as the amount per step.","type":"number"}},"required":["time","value"],"type":"object"},"maxItems":500000,"minItems":1,"type":"array"}},"required":["gauge","rows"],"type":"object"},"maxItems":50,"minItems":1,"title":"Gauges","type":"array"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"}},"required":["name","gauges"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add rain","tags":["Project models"]}},"/projects/{projectId}/rain-inputs/{id}":{"delete":{"description":"Deletes a rain input.","operationId":"rain.input.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The rain input, from run.input.list, or `created.id` from rain.input.create, rain.design.create or rain.storm.adopt.","in":"path","name":"id","required":true,"schema":{"format":"uuid","title":"Rain","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete rain","tags":["Project models"]}},"/projects/{projectId}/rename":{"post":{"description":"Renames the project.","operationId":"project.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Lawrence sewer 2026"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"New name","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename project","tags":["Projects"]}},"/projects/{projectId}/reports":{"get":{"description":"The project's Word reports, newest first, up to 50.\n","operationId":"report.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectReport"},"type":"array"}}},"description":"The reports"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List reports","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Writes a Word report from a title and Markdown body. Runs in the background: poll `GET /projects/{projectId}/reports/{reportId}` until `state` is `ready`. Charged to the project owner's wallet.","operationId":"report.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"body":"# Summary\n\nThree pipes surcharge in the 10-year storm.\n\n| Pipe | Peak flow (cfs) |\n|---|---|\n| P-101 | 12.4 |","preparedFor":"City of Lawrence","title":"Basin 4 capacity study"},"schema":{"additionalProperties":false,"properties":{"body":{"description":"The report in Markdown: # headings for its sections, paragraphs, lists and tables, the figures from the project's own reads.","maxLength":200000,"minLength":1,"title":"Body","type":"string"},"branding":{"additionalProperties":false,"description":"The firm's colors and fonts. The colors draw the title and headings and shade tables; a template's own heading colors stay unless primaryColor is given.","properties":{"accentColor":{"description":"A hex color, #RRGGBB.","pattern":"^#[0-9A-Fa-f]{6}$","title":"Accent color","type":"string"},"bodyFont":{"description":"A font's name as Word knows it, e.g. Arial. One the reader lacks shows in Word's stand-in.","maxLength":60,"minLength":1,"title":"Body font","type":"string"},"headingFont":{"description":"A font's name as Word knows it, e.g. Arial. One the reader lacks shows in Word's stand-in.","maxLength":60,"minLength":1,"title":"Heading font","type":"string"},"primaryColor":{"description":"A hex color, #RRGGBB.","pattern":"^#[0-9A-Fa-f]{6}$","title":"Primary color","type":"string"},"secondaryColor":{"description":"A hex color, #RRGGBB.","pattern":"^#[0-9A-Fa-f]{6}$","title":"Secondary color","type":"string"}},"title":"Branding","type":"object"},"draft":{"default":true,"description":"Marks every page DRAFT, FOR REVIEW ONLY.","title":"Draft","type":"boolean"},"logo":{"additionalProperties":false,"description":"A PNG or JPEG of at most 10 MB for the cover, attached in the chat and sent with POST /uploads. Send the upload and the ETag of each part.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"Logo","type":"object"},"preparedBy":{"maxLength":200,"title":"Prepared by","type":"string"},"preparedFor":{"maxLength":200,"title":"Prepared for","type":"string"},"subtitle":{"maxLength":200,"title":"Subtitle","type":"string"},"template":{"additionalProperties":false,"description":"A Word document (.docx) of at most 50 MB: the report takes its styles, margins, header and footer, and none of its text, attached in the chat and sent with POST /uploads. Send the upload and the ETag of each part.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"Template","type":"object"},"title":{"maxLength":200,"minLength":1,"title":"Title","type":"string"}},"required":["title","body"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Write a report","tags":["Projects"]}},"/projects/{projectId}/reports/{reportId}":{"get":{"description":"One Word report: `making`, `ready` or `failed`. Poll it after `POST /projects/{projectId}/reports`.\n","operationId":"report.get","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"path","name":"reportId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectReport"}}},"description":"The report"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get report","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/restore":{"post":{"description":"Restores the project from the trash.","operationId":"project.restore","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Restore project","tags":["Projects"]}},"/projects/{projectId}/risk-benchmarks":{"get":{"description":"Median costs from the project's own cost sheets. `source` is `none` when there are none.\n","operationId":"plan.benchmark.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskBenchmarks"}}},"description":"The benchmarks"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get cost benchmarks","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}]},"/projects/{projectId}/risk-cost-markup":{"get":{"description":"The project's markup on construction cost, as a multiplier. Default is 1.35.\n","operationId":"plan.markup.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskCostMarkup"}}},"description":"The markup"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get cost markup","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"patch":{"description":"Sets the project's markup on construction cost, or clears it to use the default of 1.35. Send the current value from `GET /projects/{projectId}/risk-cost-markup` as `was`.","operationId":"risk.markup.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"markup":1.55,"was":null},"schema":{"additionalProperties":false,"properties":{"markup":{"description":"A multiplier on construction cost (1.55 is +55%). Null uses the default of 1.35.","maximum":3,"minimum":1,"type":["number","null"]},"was":{"description":"The project's own markup as read. Null when it had none.","type":["number","null"]}},"required":["markup","was"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set markup","tags":["Risk"]}},"/projects/{projectId}/risk-inspections":{"get":{"description":"The project's camera inspections, with counts by standard, year and layer.","operationId":"risk.inspection.list","parameters":[{"description":"Only inspections matched to this layer.","in":"query","name":"layerId","schema":{"format":"uuid","type":"string"}},{"description":"Only inspections of this feature. Needs `layerId`.","in":"query","name":"fid","schema":{"minimum":0,"type":"integer"}},{"description":"Part of the asset reference, source or capital project name, any case.","in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},{"description":"Only this inspection standard.","in":"query","name":"standard","schema":{"enum":["pacp","macp","lacp","other"],"type":"string"}},{"description":"What the inspection was for.","in":"query","name":"purpose","schema":{"enum":["routine","pre_design","acceptance","follow_up"],"type":"string"}},{"description":"Inspections whose worst grade is at least this.","in":"query","name":"grade","schema":{"enum":[3,4,5],"type":"integer"}},{"description":"Only inspections from this year.","in":"query","name":"year","schema":{"maximum":2200,"minimum":1800,"type":"integer"}},{"description":"A column and its direction. `asset` is `asset_asc`.","in":"query","name":"sort","schema":{"default":"date_desc","enum":["date_desc","date_asc","asset","asset_asc","asset_desc","worst_asc","worst_desc","index_asc","index_desc","purpose_asc","purpose_desc","defects_asc","defects_desc","length_asc","length_desc","project_asc","project_desc","crew_asc","crew_desc"],"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"description":"How many to skip, to get the next page.","in":"query","name":"offset","schema":{"default":0,"maximum":1000000,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionPage"}}},"description":"Paged inspections and facets"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List inspections","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}]},"/projects/{projectId}/risk-inspections/imports":{"get":{"description":"The 20 newest inspection imports, with how many rows matched and how much media has arrived.\n","operationId":"risk.inspection.import.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionImports"}}},"description":"The newest imports"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List inspection imports","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}]},"/projects/{projectId}/risk-service-life":{"get":{"description":"Service lives for a system: NEER's defaults with the team's overrides.","operationId":"risk.service_life","parameters":[{"in":"query","name":"systemType","required":true,"schema":{"enum":["water","wastewater","stormwater"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskServiceLife"}}},"description":"The service lives"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List service lives","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"patch":{"description":"Saves service lives as the team's defaults for one system. New risk models use them. Team projects only.","operationId":"risk.servicelife.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"rows":[{"assetClass":"pipe","material":"VCP","serviceLifeYears":80}],"systemType":"wastewater"},"schema":{"additionalProperties":false,"properties":{"rows":{"items":{"additionalProperties":false,"properties":{"assetClass":{"enum":["pipe","structure"],"type":"string"},"material":{"maxLength":120,"minLength":1,"type":"string"},"serviceLifeYears":{"maximum":500,"minimum":1,"type":"integer"},"structureType":{"maxLength":120,"type":["string","null"]}},"required":["assetClass","material","serviceLifeYears"],"type":"object"},"maxItems":1000,"minItems":1,"type":"array"},"systemType":{"enum":["water","wastewater","stormwater"],"type":"string"}},"required":["systemType","rows"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save service lives as team defaults","tags":["Risk"]}},"/projects/{projectId}/risk-unit-costs":{"get":{"description":"Unit costs for one system. `scope` is `defaults` (NEER's), `team` (default, with the team's\noverrides) or `effective` (also the project's).\n","operationId":"plan.unit_cost.list","parameters":[{"in":"query","name":"systemType","required":true,"schema":{"enum":["water","wastewater","stormwater"],"type":"string"}},{"description":"`effective` is what pricing uses: NEER's rates, the team's, then the project's. `team` leaves out the project's. `defaults` is NEER's only.","in":"query","name":"scope","schema":{"default":"team","enum":["effective","team","defaults"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskUnitCost"},"type":"array"}}},"description":"Effective rates in stable inherited order, followed by scope-specific additions"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List unit costs","tags":["Plan"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"$ref":"#/components/parameters/projectId"}],"patch":{"description":"Replaces the unit costs for one system: the team's (`scope: team`, default) or the project's (`scope: project`). Rows not sent are removed. Capital projects are repriced.","operationId":"risk.unitcosts.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"rows":[{"assetClass":"pipe","cost":65,"diameterMaxIn":10,"diameterMinIn":6,"label":"8 in CIPP","match":"cipp|lining","unit":"ft"}],"scope":"project","systemType":"wastewater"},"schema":{"additionalProperties":false,"properties":{"rows":{"items":{"additionalProperties":false,"properties":{"assetClass":{"enum":["pipe","structure"],"type":"string"},"cost":{"description":"Construction cost in dollars per `unit`, before markup.","maximum":100000000,"minimum":0,"type":"number"},"diameterMaxIn":{"description":"Largest diameter in inches the rate applies to. Null for no upper limit. Not less than `diameterMinIn`.","maximum":1000,"minimum":0,"type":["number","null"]},"diameterMinIn":{"description":"Smallest diameter in inches the rate applies to. Null for no lower limit.","maximum":1000,"minimum":0,"type":["number","null"]},"label":{"description":"The item, such as \"8 in CIPP\". A row with the same asset class and label as a NEER default replaces it.","maxLength":120,"minLength":1,"type":"string"},"match":{"description":"A case-insensitive pattern the record's method must match. Separate alternatives with |.","maxLength":300,"minLength":1,"type":"string"},"note":{"maxLength":500,"type":["string","null"]},"unit":{"description":"What `cost` is per: a foot, each asset, a segment, a gallon, or a gallon per minute.","enum":["ft","each","segment","gal","gpm"],"type":"string"}},"required":["assetClass","label","match","unit","cost"],"type":"object"},"maxItems":500,"type":"array"},"scope":{"default":"team","description":"`team` sets the owning team's rates, used by all its projects; it needs a team project and a team member. `project` sets rates for this project only.","enum":["team","project"],"type":"string"},"systemType":{"enum":["water","wastewater","stormwater"],"type":"string"}},"required":["systemType","rows"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save unit costs","tags":["Risk"]}},"/projects/{projectId}/sensor-alerts":{"get":{"description":"The project's sensor alerts: open ones first, then those closed in the last 7 days. Up to 500.","operationId":"sensor.alert.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"alerts":{"items":{"properties":{"closedAt":{"format":"date-time","type":["string","null"]},"detail":{"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`threshold` (a reading past a value set with `PATCH /sensors/{siteId}/alerts`), `forecast_exceeds` or `forecast_near` (a meter's forecast peak over or near its pipe's capacity), or `stale_feed` (no reading for more than twice the site's pull interval).","type":"string"},"lastSeenAt":{"format":"date-time","type":"string"},"openedAt":{"format":"date-time","type":"string"},"siteId":{"format":"uuid","type":["string","null"]},"siteName":{"type":["string","null"]},"title":{"type":"string"}},"required":["id","kind","siteId","siteName","title","detail","openedAt","lastSeenAt","closedAt"],"type":"object"},"type":"array"}},"required":["alerts"],"type":"object"}}},"description":"The alerts"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor alerts","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-analyses":{"get":{"description":"Sensor analyses of one `kind` (default `dry_weather`), newest first, without results. Read one with `GET /projects/{projectId}/sensor-analyses/{analysisId}`.","operationId":"sensor.analysis.list","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"query","name":"kind","schema":{"enum":["dry_weather","wet_weather","regression","forecast"],"type":"string"}},{"in":"query","name":"siteId","schema":{"format":"uuid","type":"string"}},{"description":"Only the records a flow analysis's runs created.","in":"query","name":"analysisId","schema":{"format":"uuid","type":"string"}},{"description":"The previous page's `nextCursor`, to get the next page. Leave out for the first page.","in":"query","name":"cursor","schema":{"maxLength":100,"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":200,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorAnalyses"}}},"description":"Metadata in newest-first order. Results load separately."},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor analyses","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Analyzes flow meters' readings for dry weather, wet weather or `regression`. Runs as a job; read results with `GET /projects/{projectId}/sensor-analyses`. Run wet weather before regression.","operationId":"sensor.analysis.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"end":1790812800000,"kind":"dry_weather","siteIds":["00000000-0000-0000-0000-000000000002"],"start":1788220800000},"schema":{"additionalProperties":false,"properties":{"criteriaSetId":{"anyOf":[{"format":"uuid","type":"string"},{"enum":["us","wapug"],"type":"string"}],"description":"The criteria set: `us`, `wapug` or a saved set's id from `GET /projects/{projectId}/sensor-criteria`. Defaults to the project's default set. Dry weather uses its dry-day rules, wet weather its storm minimum."},"end":{"description":"The window's end, in epoch milliseconds. At most 3,660 days after `start`. Leave out to end at the last stored reading. Not allowed for `regression`.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},"gwiMethod":{"description":"How groundwater infiltration is estimated. Defaults to `stevens_schutzbach`. Dry weather only.","enum":["minimum","wastewater_production","stevens_schutzbach","mitchell","kcmo"],"type":"string"},"kind":{"enum":["dry_weather","wet_weather","regression"],"title":"Analysis","type":"string","x-titles":["Dry weather","Wet weather","Regression"]},"siteIds":{"description":"The flow meters, each with stored flow. Leave out to analyze every approved flow meter with stored flow (at most 500).","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array","uniqueItems":true},"start":{"description":"The window's start, in epoch milliseconds. Leave out to start at the first stored reading. Not allowed for `regression`, which uses the wet-weather analysis's window.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},"strictness":{"description":"How strictly unusual days are dropped from the dry-weather pattern. Defaults to `normal`. Dry weather only.","enum":["mild","normal","strict"],"type":"string"},"timeZone":{"description":"An IANA time zone, such as America/Chicago, that days are counted in. Defaults to the project's, or UTC.","maxLength":100,"minLength":1,"type":"string"}},"required":["kind"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Analyze sensor readings","tags":["Sensors"]}},"/projects/{projectId}/sensor-analyses/{analysisId}":{"delete":{"description":"Deletes a sensor analysis. Refused while a job is working on it.","operationId":"sensor.analysis.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The analysis, from `GET /projects/{projectId}/sensor-analyses`.","in":"path","name":"analysisId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete analysis","tags":["Sensors"]},"get":{"description":"One sensor analysis and its result. Flows are in MGD. `error` says why when `result` is null.","operationId":"sensor.analysis.get","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The analysis's id.","in":"path","name":"analysisId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorAnalysis"}}},"description":"A stored result. An empty stored result is represented as null."},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get sensor analysis","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-analyses/{analysisId}/events":{"post":{"description":"Edits a wet-weather analysis's events: whether each counts, its note and its window. The analysis is recalculated shortly after; read it again with `GET /projects/{projectId}/sensor-analyses/{analysisId}`.","operationId":"sensor.analysis.events","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The wet-weather analysis.","in":"path","name":"analysisId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"events":{"00000000-0000-0000-0000-000000000004":{"note":"Gauge clogged","status":"drop"}}},"schema":{"additionalProperties":false,"properties":{"events":{"additionalProperties":{"additionalProperties":false,"minProperties":1,"properties":{"endAt":{"description":"When the response ends, in epoch milliseconds, after `startAt` and no more than 14 days past the analysis window. Null puts back the detected window.","maximum":253402300799999,"minimum":-62135596800000,"type":["integer","null"]},"note":{"description":"A note on the event. Null clears it.","maxLength":2000,"type":["string","null"]},"startAt":{"description":"When the response starts, in epoch milliseconds, inside the analysis window. Null with `endAt` null puts back the detected window.","maximum":253402300799999,"minimum":-62135596800000,"type":["integer","null"]},"status":{"description":"`keep` counts the event in the results; `drop` leaves it out.","enum":["keep","drop"],"type":"string"}},"type":"object"},"description":"Changes by event, keyed by the event's `stormId` in the analysis's `result.events`. 1 to 200 events. Fields left out are kept.","maxProperties":200,"minProperties":1,"propertyNames":{"format":"uuid"},"type":"object"}},"required":["events"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit wet-weather events","tags":["Sensors"]}},"/projects/{projectId}/sensor-criteria":{"get":{"description":"Storm criteria sets the project can use. `defaultId` is used when an action doesn't name one.","operationId":"sensor.criteria.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorCriteriaSets"}}},"description":"Available sensor criteria sets"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List criteria sets","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Saves a criteria set: storm rules, dry days and model fit limits. Send `setId` to change one, or leave it out to create one from `from`.","operationId":"sensor.criteria.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"criteria":{"storm":{"minRainfallIn":0.5}},"from":"us","name":"Half-inch storms"},"schema":{"additionalProperties":false,"properties":{"criteria":{"description":"Changes to the set, by group and field: `storm` (minRainfallIn, minIntensityInPerHr, minIntensityMinutes, interEventHours), `dry` (timingHours, peakPct, peakMinutes as 5 or 60, volumePct, depthFt, days, antecedentDryDays, maxDailyRainIn), `wet` (peakUpPct, peakDownPct, volumeUpPct, volumeDownPct, surchargeUpFt, surchargeDownFt, depthFt, eventsOf as [min, max], surchargeRule as true or false: a surcharged storm judged on its peak depth in the surcharged band, and its volume when the surcharge lasted 2 h or less and no more than a tenth of the event, its peak flow not judged) and `stats` (nseMin, r2Min, pbiasPct). Numbers are 0 or more; `interEventHours` above 0. Fields left out are kept.","type":"object"},"from":{"anyOf":[{"format":"uuid","type":"string"},{"enum":["us","wapug"],"type":"string"}],"description":"What a new set starts from: `us`, `wapug` or a saved set's id. Defaults to `us`."},"name":{"maxLength":80,"minLength":1,"type":"string"},"scope":{"description":"Who a new set belongs to: the project (the default) or its team. A team set needs a team member and is shared with the team's projects.","enum":["project","team"],"type":"string"},"setId":{"description":"The saved set to change. Leave out to create a set. Can't be sent with `from` or `scope`.","format":"uuid","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save criteria set","tags":["Sensors"]}},"/projects/{projectId}/sensor-criteria/{setId}":{"delete":{"description":"Deletes a saved criteria set. Built-in sets (`us`, `wapug`) can't be deleted.","operationId":"sensor.criteria.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The saved set, from `GET /projects/{projectId}/sensor-criteria`.","in":"path","name":"setId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete criteria set","tags":["Sensors"]}},"/projects/{projectId}/sensor-documents/{documentId}":{"delete":{"description":"Deletes a sensor document and its file.","operationId":"sensor.document.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The document, from `POST /sensors/{siteId}/documents`.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete sensor document","tags":["Sensors"]}},"/projects/{projectId}/sensor-documents/{documentId}/complete":{"post":{"description":"Finishes a sensor document upload. Refused if the file's size or type differs from what was declared.","operationId":"sensor.document.complete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The document, from `POST /sensors/{siteId}/documents`.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Complete sensor document","tags":["Sensors"]}},"/projects/{projectId}/sensor-documents/{documentId}/download":{"get":{"description":"A download link for a sensor document, valid for 10 minutes. Returns 404 until the upload is complete.","operationId":"sensor.document.download","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The document's id.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorDocumentDownload"}}},"description":"The result"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download sensor document","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-documents/{documentId}/upload":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Returns a form to upload a sensor document's file. POST `fields` and the file (as `file`) as multipart form data to `url` before `expiresAt`, then call `POST /projects/{projectId}/sensor-documents/{documentId}/complete`.","operationId":"sensor.document.upload","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The document's id.","in":"path","name":"documentId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorDocumentUpload"}}},"description":"The result"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start sensor document upload","tags":["Sensors"]}},"/projects/{projectId}/sensor-flags/{flagId}":{"delete":{"description":"Deletes a sensor flag.","operationId":"sensor.flag.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The flag, from the site's flags in `GET /sensors` or `GET /sensors/{siteId}/readings`.","in":"path","name":"flagId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete sensor flag","tags":["Sensors"]}},"/projects/{projectId}/sensor-flow-analyses":{"get":{"description":"The project's flow analyses, newest first. Read one's settings with `GET /projects/{projectId}/sensor-flow-analyses/{analysisId}`.","operationId":"sensor.flow_analysis.list","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The previous page's `nextCursor`, to get the next page. Leave out for the first page.","in":"query","name":"cursor","schema":{"maxLength":100,"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorFlowAnalyses"}}},"description":"Current project-scoped data."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List flow analyses","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Saves a flow analysis: meters, window, recipe and schedule. Send `analysisId` to change one, or leave it out to create one. After it has run, its recipe, meters, window and time zone can't change.","operationId":"sensor.flow.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"end":"2026-10-01T00:00:00Z","name":"North basin I/I","recipe":"us","siteIds":["00000000-0000-0000-0000-000000000002"],"start":"2026-09-01T00:00:00Z"},"schema":{"additionalProperties":false,"properties":{"analysisId":{"description":"The flow analysis to change. Leave out to create one.","format":"uuid","type":"string"},"end":{"description":"The window's end, RFC 3339 with an offset, at most 3,660 days after `start`. Null ends at the last stored reading.","format":"date-time","type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"overrides":{"description":"Changes to the recipe's settings, by group as `GET /projects/{projectId}/sensor-recipes` shows them (storm, dryDay, pattern, groundwater, response, qc, rtk, normalise, regression). Only known fields.","maxProperties":9,"type":"object"},"recipe":{"description":"The recipe: `ssoap`, `us`, `wapug` or a saved recipe's id from `GET /projects/{projectId}/sensor-recipes`. Defaults to `us`.","maxLength":100,"minLength":1,"type":"string"},"schedule":{"description":"How often it runs on its own. Defaults to `manual`.","enum":["manual","hourly","daily"],"type":"string"},"scheduleSteps":{"description":"The steps a scheduled run takes. Defaults to all five. A scheduled forecast spends the project owner's weather allowance and needs permission to run.","items":{"enum":["storms","dry_weather","wet_weather","regression","forecast"],"type":"string"},"maxItems":5,"minItems":1,"type":"array","uniqueItems":true},"siteIds":{"description":"The flow meters. Empty or left out runs every approved flow meter with stored flow.","items":{"format":"uuid","type":"string"},"maxItems":500,"type":"array","uniqueItems":true},"start":{"description":"The window's start, RFC 3339 with an offset. Null starts at the first stored reading.","format":"date-time","type":["string","null"]},"timeZone":{"description":"An IANA time zone for days and schedules. Null uses the project's, or UTC.","maxLength":100,"type":["string","null"]}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save flow analysis","tags":["Sensors"]}},"/projects/{projectId}/sensor-flow-analyses/{analysisId}":{"delete":{"description":"Deletes a flow analysis with its runs and results. Refused while a run is in progress.","operationId":"sensor.flow.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The flow analysis, from `GET /projects/{projectId}/sensor-flow-analyses`.","in":"path","name":"analysisId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete flow analysis","tags":["Sensors"]},"get":{"description":"Returns a flow analysis with its settings (`params`) and last run.","operationId":"sensor.flow_analysis.get","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The analysis's id.","in":"path","name":"analysisId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorFlowAnalysis"}}},"description":"Current project-scoped data."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get flow analysis","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-flow-analyses/{analysisId}/run":{"post":{"description":"Runs a saved flow analysis. Runs as a job; its id is the run's id for `GET /projects/{projectId}/sensor-flow-runs/{runId}`. A forecast step uses the weather allowance.","operationId":"sensor.flow.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The flow analysis, from `GET /projects/{projectId}/sensor-flow-analyses`.","in":"path","name":"analysisId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"steps":["storms","dry_weather","wet_weather"]},"schema":{"additionalProperties":false,"properties":{"pullFirst":{"description":"Pull the meters' and rain gauges' newest readings from their vendors before running. Defaults to false.","title":"Fetch the meters' and rain gauges' latest readings first","type":"boolean"},"steps":{"description":"The steps to run, in this order: storms, dry_weather, wet_weather, regression, forecast. Defaults to every step but forecast.","items":{"enum":["storms","dry_weather","wet_weather","regression","forecast"],"type":"string"},"maxItems":5,"minItems":1,"type":"array","uniqueItems":true}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run flow analysis","tags":["Sensors"]}},"/projects/{projectId}/sensor-flow-analyses/{analysisId}/runs":{"get":{"description":"A flow analysis's runs, newest first, with status and progress.","operationId":"sensor.flow_run.list","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The analysis's id.","in":"path","name":"analysisId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The previous page's `nextCursor`, to get the next page. Leave out for the first page.","in":"query","name":"cursor","schema":{"maxLength":100,"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorFlowRuns"}}},"description":"Current project-scoped data."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List flow analysis runs","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-flow-runs/{runId}":{"get":{"description":"One flow analysis run, its settings and a summary of each step.","operationId":"sensor.flow_run.get","parameters":[{"$ref":"#/components/parameters/projectId"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorFlowRun"}}},"description":"Current project-scoped data."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get flow analysis run","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-forecasts":{"get":{"description":"The project's scheduled sensor forecasts, each with its newest runs, and the sites that have\na trained model.\n","operationId":"sensor.forecast.scheduled","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorScheduledForecasts"}}},"description":"Stored data only."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor scheduled forecasts","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-forecasts/batch":{"post":{"description":"Creates scheduled forecasts for several sensor sites at once, each as `POST /sensors/{siteId}/forecasts` takes one.","operationId":"sensor.forecast.batch","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"forecasts":[{"siteId":"00000000-0000-0000-0000-000000000002"},{"everyHours":12,"siteId":"00000000-0000-0000-0000-000000000009"}]},"schema":{"additionalProperties":false,"properties":{"forecasts":{"description":"1 to 100 forecasts, each as `POST /sensors/{siteId}/forecasts` takes one. A site may appear more than once. If any is refused, none is made.","items":{"additionalProperties":false,"description":"One forecast, as sensor.forecast.create takes it.","properties":{"enabled":{"description":"Whether cycles run on schedule. Defaults to true.","type":"boolean"},"everyHours":{"description":"How often a cycle starts, in hours. Defaults to 6.","enum":[1,3,6,12,24]},"hindcastHours":{"const":36,"description":"Hours of the site's readings the model reads: fixed by how it was trained."},"horizonHours":{"const":18,"description":"Hours the model forecasts: fixed by how it was trained."},"model":{"description":"What each cycle runs: the sewer forecast service's trained model for the site.","enum":["sewer"]},"name":{"description":"Defaults to the site's name followed by \"forecast\".","maxLength":120,"type":"string"},"siteId":{"description":"The flow meter. It must measure flow and have a trained model.","format":"uuid","type":"string"}},"required":["siteId"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"required":["forecasts"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New sensor forecasts","tags":["Sensors"]}},"/projects/{projectId}/sensor-forecasts/run":{"post":{"description":"Forecasts flow meters' flow from the weather forecast, or from rain you send in `rain`. Runs as a job; read results with `GET /projects/{projectId}/sensor-analyses` (`kind=forecast`). Without `rain`, uses the weather allowance.","operationId":"sensor.forecast.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"rain":{"points":[{"at":1796083200000,"valueIn":0.4},{"at":1796086800000,"valueIn":0.2}],"stepMinutes":60},"siteIds":["00000000-0000-0000-0000-000000000002"]},"schema":{"additionalProperties":false,"properties":{"rain":{"additionalProperties":false,"description":"Rain to forecast from instead of the weather forecast. It must start at least a minute from now and end within 14 days.","properties":{"points":{"items":{"additionalProperties":false,"properties":{"at":{"description":"The point's time in epoch milliseconds. Increasing, no repeats.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},"valueIn":{"description":"Rain in inches over the point's step.","maximum":1000,"minimum":0,"type":"number"}},"required":["at","valueIn"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"stepMinutes":{"description":"Minutes each point covers.","maximum":1440,"minimum":1,"type":"number"}},"required":["stepMinutes","points"],"type":"object"},"siteIds":{"description":"The flow meters, each with stored flow. Leave out for every approved flow meter with stored flow.","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array","uniqueItems":true},"timeZone":{"description":"An IANA time zone. Defaults to the project's, or UTC.","maxLength":100,"minLength":1,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run sensor forecast","tags":["Sensors"]}},"/projects/{projectId}/sensor-forecasts/{forecastId}":{"delete":{"description":"Deletes a sensor site's scheduled forecast.","operationId":"sensor.forecast.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The scheduled forecast, from `GET /projects/{projectId}/sensor-forecasts`.","in":"path","name":"forecastId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete sensor forecast","tags":["Sensors"]},"patch":{"description":"Changes a sensor site's scheduled forecast: its name and times, or turns it on or off.","operationId":"sensor.forecast.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The forecast's id.","in":"path","name":"forecastId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"enabled":false},"schema":{"additionalProperties":false,"properties":{"enabled":{"description":"Whether cycles run on schedule. Defaults to true.","type":"boolean"},"everyHours":{"description":"How often a cycle starts, in hours. Defaults to 6.","enum":[1,3,6,12,24]},"hindcastHours":{"const":36,"description":"Hours of the site's readings the model reads: fixed by how it was trained."},"horizonHours":{"const":18,"description":"Hours the model forecasts: fixed by how it was trained."},"model":{"description":"What each cycle runs: the sewer forecast service's trained model for the site.","enum":["sewer"]},"name":{"description":"Defaults to the site's name followed by \"forecast\".","maxLength":120,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change sensor forecast","tags":["Sensors"]}},"/projects/{projectId}/sensor-forecasts/{forecastId}/start":{"post":{"description":"Runs a site's scheduled forecast now. Follow it in `GET /projects/{projectId}/sensor-forecasts`. Uses one weather allowance request.","operationId":"sensor.forecast.start","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The scheduled forecast, from `GET /projects/{projectId}/sensor-forecasts`.","in":"path","name":"forecastId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run sensor forecast now","tags":["Sensors"]}},"/projects/{projectId}/sensor-metrics":{"get":{"description":"Figures for each flow meter, such as dry-weather flow, infiltration, RDII and peak against capacity, with a rank. `analysisId` and `stormId` narrow them.","operationId":"sensor.metric.list","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"query","name":"analysisId","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"stormId","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"siteIds","schema":{"maxLength":18500,"type":"string"}},{"description":"The dry days the dry-weather figures are from. Leave out for every dry day.","in":"query","name":"dryGroup","schema":{"enum":["weekday","weekend"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorMetrics"}}},"description":"Current project-scoped data."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor metrics","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-metrics/color":{"post":{"description":"Colors a polygon layer of sewersheds by a flow metric of the meters that drain them. Pick the layer and `mode` from `GET /projects/{projectId}/sensor-metrics/color-candidates`.","operationId":"sensor.metrics.colour","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"layerId":"00000000-0000-0000-0000-000000000002","metric":"gwiPerIdm","mode":"name","nameField":"METER"},"schema":{"additionalProperties":false,"properties":{"analysisId":{"description":"The flow analysis (`GET /projects/{projectId}/sensor-flow-analyses`) whose latest run gives the figures. Leave out to use each meter's newest analyses, whatever made them.","format":"uuid","type":"string"},"layerId":{"description":"The polygon layer to color, one `GET /projects/{projectId}/sensor-metrics/color-candidates` lists. At most 5,000 features.","format":"uuid","type":"string"},"metric":{"description":"The metric to color by, as `GET /projects/{projectId}/sensor-metrics` reports it per meter.","enum":["addf","mddf","dpf","gwi","gwiShare","gwiPerIdm","gwiPerCapita","gwiPerAcre","wastewaterProduction","dwfPerCapita","rdiiVolume","peakRdii","peakFlow","peakFactor","r","rPerInch","rdiiPerAcrePerInch","rdiiPerIdmPerInch","leakageSeverity","peakRdiiPerInch","peakVsCapacity","wetPerCapita","designRdiiVolume","designRdiiPerAcre","designRdiiPerIdm","designRdiiPerInch","designPeakVsCapacity","rainAtCapacity"],"type":"string"},"mode":{"description":"How polygons are matched to meters. `outlet`: the layer is the subcatchments of the meters' model, each going to the meter its outlet drains to. `nodes`: each polygon goes to the meter whose traced network nodes fall in it. `name`: a column of the layer holds meter names (send `nameField`). Use the mode `GET /projects/{projectId}/sensor-metrics/color-candidates` gives the layer, or `name`. `outlet` and `nodes` need meters bound to model pipes.","enum":["outlet","nodes","name"],"type":"string"},"nameField":{"description":"The layer's column holding meter names. Required with `mode` `name`, refused with the others.","maxLength":255,"minLength":1,"type":"string"},"stormId":{"description":"One kept storm in those results (`storms` in `GET /projects/{projectId}/sensor-metrics`), to color by that storm's figures. Leave out for the figures over all kept storms.","format":"uuid","type":"string"}},"required":["metric","layerId","mode"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Color sewersheds","tags":["Sensors"]}},"/projects/{projectId}/sensor-metrics/color-candidates":{"get":{"description":"Polygon layers that `POST /projects/{projectId}/sensor-metrics/color` can color, with a suggested `mode` and their attribute names.","operationId":"sensor.colour_candidates","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"query","name":"analysisId","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorColourCandidates"}}},"description":"Current project-scoped data."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List layers to color","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-ml-forecasts":{"get":{"description":"Each flow and depth site's newest forecast from its trained model, without the series.\n","operationId":"sensor.ml_forecast.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorMlForecasts"}}},"description":"Stored data only."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor ML forecasts","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-qa/run":{"post":{"description":"Checks stored readings for dropouts, frozen values, spikes and out-of-range values, and flags them. Leave out `siteIds` and `measures` to check every site. Flags added by hand stay. Runs as a job.","operationId":"sensor.qa.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"measures":["flow","depth"],"siteIds":["00000000-0000-0000-0000-000000000002"]},"schema":{"additionalProperties":false,"properties":{"measures":{"description":"The measures to check. Leave out for all, which also clears the automatic flags on every measure first.","items":{"enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"],"type":"string"},"maxItems":9,"minItems":1,"type":"array"},"siteIds":{"description":"The sites to check. Each must have stored readings of the measures asked for. Leave out for every such site in the project (refused over 500).","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run QA","tags":["Sensors"]}},"/projects/{projectId}/sensor-recipes":{"get":{"description":"Flow recipes a flow analysis can start from: built-in, project and team.","operationId":"sensor.recipe.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorRecipes"}}},"description":"Current project-scoped data."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor recipes","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Saves a flow recipe for flow analyses. Leave out `recipeId` to create one from `from`; send it to change one.","operationId":"sensor.recipe.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"from":"us","name":"Half-inch storms, 8 dry days","params":{"dryDay":{"antecedentDryDays":8}}},"schema":{"additionalProperties":false,"properties":{"description":{"maxLength":500,"type":["string","null"]},"from":{"description":"What a new recipe starts from: a built-in recipe (`ssoap`, `us` or `wapug`) or a saved recipe's id. Defaults to `us`.","maxLength":100,"type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"},"params":{"description":"The settings to change, by group: storm, dryDay, pattern, groundwater, response, qc, rtk, normalise and regression. Only the fields sent change; the rest come from the recipe or `from`.","maxProperties":9,"type":"object"},"recipeId":{"description":"A saved recipe to change. Leave out to create one. Can't be sent with `from` or `scope`.","format":"uuid","type":"string"},"scope":{"description":"Who can use a new recipe: this project (the default) or the whole team. Only team members can create team recipes.","enum":["project","team"],"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save flow recipe","tags":["Sensors"]}},"/projects/{projectId}/sensor-recipes/{recipeId}":{"delete":{"description":"Deletes a saved flow recipe. Flow analyses that use it go back to its built-in recipe. Built-in recipes can't be deleted.","operationId":"sensor.recipe.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The saved recipe, from `GET /projects/{projectId}/sensor-recipes`.","in":"path","name":"recipeId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete flow recipe","tags":["Sensors"]}},"/projects/{projectId}/sensor-schematic":{"get":{"description":"The project's saved flow schematic. Empty when it's drawn from the network.","operationId":"sensor.schematic","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorSchematic"}}},"description":"The drawing"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get flow schematic","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Saves the project's flow schematic, replacing the whole drawing. Send the `version` from `GET /projects/{projectId}/sensor-schematic` (0 for a drawing never saved).","operationId":"sensor.schematic.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"doc":{"lines":[{"from":"m1","id":"l1","kind":"pipe","to":"p1"}],"nodes":[{"id":"m1","kind":"meter","siteId":"00000000-0000-0000-0000-000000000002","x":100,"y":80},{"id":"p1","kind":"plant","label":"WWTP","x":400,"y":80}],"version":1},"ifVersion":0},"schema":{"additionalProperties":false,"properties":{"doc":{"description":"The drawing. Shapes (meter, junction, pump, plant, diversion, outfall, note) at their top-left corners, with pipes or overflows between them.","properties":{"lines":{"description":"The connections, each `{id, from, to, kind}`: `id` unique, up to 120 characters; `from` and `to` two different shape ids; `kind` pipe or overflow.","items":{"type":"object"},"maxItems":1000,"type":"array"},"nodes":{"description":"The shapes, each `{id, kind, x, y}`: `id` unique, up to 80 characters; `kind` meter, junction, pump, plant, diversion, outfall or note; `x` and `y` whole pixels within ±1,000,000. A meter needs `siteId`. Optional `label` (120 characters) and `text` (1,000).","items":{"type":"object"},"maxItems":500,"type":"array"},"version":{"const":1,"description":"The drawing format, 1. Optional."}},"required":["nodes","lines"],"type":"object"},"ifVersion":{"description":"The version it was read at. 0 for the computed drawing.","minimum":0,"type":"integer"}},"required":["doc","ifVersion"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save schematic","tags":["Sensors"]}},"/projects/{projectId}/sensor-schematic/reset":{"post":{"description":"Deletes the saved flow schematic, so it's drawn from the network again. Send the `version` from `GET /projects/{projectId}/sensor-schematic`.","operationId":"sensor.schematic.reset","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"ifVersion":3},"schema":{"additionalProperties":false,"properties":{"ifVersion":{"description":"The saved drawing's `version`, from `GET /projects/{projectId}/sensor-schematic`.","minimum":1,"type":"integer"}},"required":["ifVersion"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Reset schematic","tags":["Sensors"]}},"/projects/{projectId}/sensor-storms":{"get":{"description":"Storms found at the project's rain gauges, newest first. Filter by gauge and by `start` and `end`.","operationId":"sensor.storm.list","parameters":[{"$ref":"#/components/parameters/projectId"},{"in":"query","name":"gaugeId","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"start","schema":{"format":"int64","type":"integer"}},{"in":"query","name":"end","schema":{"format":"int64","type":"integer"}},{"description":"The previous page's `nextCursor`, to get the next page. Leave out for the first page.","in":"query","name":"cursor","schema":{"maxLength":100,"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":200,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorStorms"}}},"description":"Stored storms for a project"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List storms","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/sensor-storms/detect":{"post":{"description":"Detects storms in rain gauges' readings over a window, replacing storms found there before. Statuses and notes are kept. Runs as a job.","operationId":"sensor.storms.detect","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"criteriaSetId":"us","end":1777593600000,"start":1775001600000},"schema":{"additionalProperties":false,"properties":{"criteriaSetId":{"anyOf":[{"format":"uuid","type":"string"},{"enum":["us","wapug"],"type":"string"}],"description":"The storm criteria: a saved set's id or a built-in set, `us` or `wapug`. Defaults to the project's default set (`defaultId` in `GET /projects/{projectId}/sensor-criteria`)."},"end":{"description":"The window's end, in milliseconds since 1970-01-01 UTC, not before `start`. Leave out to run to the last reading.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},"gaugeIds":{"description":"The gauges: rain gauges, or sites with no rain gauge of their own, that store rain. Leave out for every such site in the project (refused over 500).","items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array"},"start":{"description":"The window's start, in milliseconds since 1970-01-01 UTC. Leave out to start at the first reading.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Detect storms","tags":["Sensors"]}},"/projects/{projectId}/sensor-storms/{eventId}":{"delete":{"description":"Deletes a detected storm. Detecting again can find it again.","operationId":"sensor.storm.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The storm's id, from `GET /projects/{projectId}/sensor-storms`.","in":"path","name":"eventId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete storm","tags":["Sensors"]},"patch":{"description":"Sets a storm's status, note, or both. Wet-weather analyses use only kept storms.","operationId":"sensor.storm.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The storm's id, from `GET /projects/{projectId}/sensor-storms`.","in":"path","name":"eventId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"note":"Gauge clogged.","status":"drop"},"schema":{"additionalProperties":false,"properties":{"note":{"description":"A note on the storm. Null or empty clears it.","maxLength":2000,"type":["string","null"]},"status":{"description":"`keep` to use the storm in wet-weather analysis, `drop` to leave it out.","enum":["keep","drop"],"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Update storm","tags":["Sensors"]}},"/projects/{projectId}/sensor-weather":{"get":{"description":"The project's weather allowance: who pays, requests used and allowed, and when the period ends.","operationId":"sensor.weather","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorWeather"}}},"description":"Stored data only."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get weather allowance","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/settings":{"patch":{"description":"Changes the project's description, units, time zone or projection. Send only the fields to change.","operationId":"project.settings.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"timezone":"America/Chicago","units":"us"},"schema":{"additionalProperties":false,"minProperties":1,"properties":{"description":{"description":"A description of the project. Blank or null removes it.","oneOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"title":"Description"},"srid":{"description":"The project's working projection, as an EPSG code such as 2263 or an ESRI code from 100000 up such as 102698. Find one with `GET /crs` (`GET /crs`).","maximum":999999,"minimum":1,"title":"Projection","type":"integer"},"timezone":{"description":"An IANA time zone name (America/New_York). Null for none.","oneOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"title":"Time zone"},"units":{"description":"us for feet, inches and US units; metric for meters and SI units.","enum":["us","metric"],"title":"Units","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Project settings","tags":["Projects"]}},"/projects/{projectId}/storm-checks":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Compares each outfall's peak flow between a pre- and post-development SWMM run. Criteria\nleft out use `GET /projects/{projectId}/level-of-service`.\n","operationId":"model.storm_check","parameters":[{"$ref":"#/components/parameters/projectId"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"criteria":{"additionalProperties":true,"description":"Stormwater criteria by name: storms, postAtMostPre, waterQualityVolume.","type":"object"},"postSimulationId":{"format":"uuid","type":"string"},"preSimulationId":{"format":"uuid","type":"string"}},"required":["preSimulationId","postSimulationId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StormChecks"}}},"description":"The comparison"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Check pre versus post development","tags":["Project models"]}},"/projects/{projectId}/studio-models":{"get":{"description":"The models registered in the project's team's AI Studio that an ML forecast can run, by\nname, each with its aliases and its ready versions, newest first (at most 50). Project\neditors who are the team's Members or above. `state` says why none are listed: the\nproject has no team (`noTeam`), you aren't one of its Members (`notMember`), this\ndeployment doesn't take a forecast's model from AI Studio (`off`), the studio isn't\nrunning (`notRunning`) or didn't answer (`unreachable`).\n","operationId":"project.studio.models","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioModels"}}},"description":"Its models"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List AI Studio models","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/projects/{projectId}/trash":{"get":{"description":"The project's trashed layers, rasters and models, newest first. Restore one with its restore action, or delete for good with `trash.empty`.","operationId":"project.trash.list","parameters":[{"$ref":"#/components/parameters/projectId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trash"}}},"description":"Trashed items, most recent first"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List trash","tags":["Projects"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Moves the project to the trash. Reads of it return 410 until it's restored.","operationId":"project.trash","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move project to trash","tags":["Projects"]}},"/projects/{projectId}/view":{"patch":{"description":"Sets the project's default map view: hidden layers, center and zoom.","operationId":"project.view.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The project's id.","in":"path","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"center":{"lat":39.1,"lng":-94.58},"hidden":["00000000-0000-0000-0000-000000000003"],"zoom":13},"schema":{"additionalProperties":false,"properties":{"center":{"additionalProperties":false,"description":"Where the map opens, in WGS84 degrees.","properties":{"lat":{"maximum":90,"minimum":-90,"type":"number"},"lng":{"maximum":180,"minimum":-180,"type":"number"}},"required":["lng","lat"],"type":"object"},"hidden":{"description":"Layer ids hidden by default. Layers not listed are shown. Send [] to show all.","items":{"format":"uuid","type":"string"},"maxItems":5000,"title":"Hidden layers","type":"array"},"zoom":{"description":"The map's zoom, 0 (the world) to 24.","maximum":24,"minimum":0,"type":"number"}},"required":["hidden","center","zoom"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set as default view","tags":["Projects"]}},"/rasters/{rasterId}/derive":{"post":{"description":"Makes a new raster or layer from a DEM, such as slope, hillshade, flow accumulation, streams, contours or a watershed. Ready in minutes. Billed to the project owner's credit.","operationId":"raster.derive","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"interval":2,"tool":"contours"},"schema":{"additionalProperties":false,"properties":{"altitude":{"default":45,"description":"hillshade only: the light's height above the horizon in degrees.","maximum":90,"minimum":0,"title":"Light height (°)","type":"number"},"area":{"description":"streams: the least drainage area that starts a stream (50 acres by default). subwatersheds: the least area of one (0.5 sq mi by default). In areaUnits.","exclusiveMinimum":0,"title":"Drainage area","type":"number"},"areaUnits":{"description":"The unit of area. Default acres for streams, sq_mi for subwatersheds.","enum":["acres","sq_mi","sq_km","hectares"],"title":"Area in","type":"string"},"azimuth":{"default":315,"description":"hillshade only: the light's direction in degrees from north.","maximum":360,"minimum":0,"title":"Light from (°)","type":"number"},"clipLayerId":{"description":"Required for clip: a layer of polygons in the project.","format":"uuid","title":"Clip to","type":"string"},"curvature":{"default":"total","description":"curvature only.","enum":["total","plan","profile"],"title":"Curvature","type":"string"},"interval":{"default":10,"description":"In the DEM's elevation units.","exclusiveMinimum":0,"title":"Contour interval","type":"number"},"method":{"default":"bilinear","description":"resample only: nearest for classes, bilinear or cubic for elevations, average to coarsen.","enum":["nearest","bilinear","cubic","lanczos","average"],"title":"Resampling","type":"string"},"order":{"default":"strahler","description":"streamOrder only.","enum":["strahler","shreve"],"title":"Ordering","type":"string"},"pourPoint":{"description":"watershed: [longitude, latitude], snapped to the nearest stream.","items":{"type":"number"},"maxItems":2,"minItems":2,"title":"Pour point","type":"array"},"resolution":{"description":"Required for resample: the new cell size, in the raster's own units (feet or meters for a projected one).","exclusiveMinimum":0,"title":"Cell size","type":"number"},"slopeUnits":{"default":"degrees","description":"slope only.","enum":["degrees","percent"],"title":"Slope in","type":"string"},"targetCrs":{"description":"Required for reproject: an EPSG code, as EPSG:2965.","pattern":"^EPSG:[0-9]{4,6}$","title":"Coordinate system","type":"string"},"tool":{"description":"slope, aspect, hillshade, curvature and wetness (topographic wetness index) are rasters; filled is the DEM with its sinks filled; flowDirection (D8) and flowAccumulation are rasters; streams, streamOrder, subwatersheds and contours are layers. watershed: the area draining to pourPoint, or to the DEM's main outlet without one, as a layer. clip: the raster within clipLayerId's polygons. reproject: the raster in targetCrs. resample: the raster at resolution, by method.","enum":["slope","aspect","hillshade","curvature","wetness","filled","flowDirection","flowAccumulation","streams","streamOrder","subwatersheds","contours","watershed","clip","reproject","resample"],"title":"Make","type":"string"}},"required":["tool"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Derive from DEM","tags":["Layers & data"]}},"/rasters/{rasterId}/files":{"get":{"description":"A raster's files to download.\n","operationId":"raster.file.list","parameters":[{"$ref":"#/components/parameters/rasterId"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ObjectFile"},"type":"array"}}},"description":"The raster's files"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List raster files","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/rasters/{rasterId}/move":{"post":{"description":"Moves a raster within its group: `front`, `forward`, `backward` or `back`.","operationId":"raster.move","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"step":"back"},"schema":{"additionalProperties":false,"properties":{"step":{"enum":["front","forward","backward","back"],"title":"Where","type":"string"}},"required":["step"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move raster","tags":["Layers & data"]}},"/rasters/{rasterId}/own":{"post":{"description":"Makes a raster added from another project this project's own copy: its files are copied here, and a new version of the content no longer changes it.","operationId":"raster.own","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Make a project copy","tags":["Layers & data"]}},"/rasters/{rasterId}/place":{"post":{"description":"Moves a raster into a group (`groupId`, or null for none), below the item in `below` or at the top.","operationId":"raster.place","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"groupId":null},"schema":{"additionalProperties":false,"properties":{"below":{"description":"An item of that group (a layer, raster or service) to go directly below. Left out, the top of the group.","format":"uuid","title":"Below","type":"string"},"groupId":{"description":"The group to put it in, from project.contents. Null for no group.","oneOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Group"}},"required":["groupId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Put raster in a group","tags":["Layers & data"]}},"/rasters/{rasterId}/rename":{"post":{"description":"Renames a raster.","operationId":"raster.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Lidar DEM 2024"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"New name","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename raster","tags":["Layers & data"]}},"/rasters/{rasterId}/restore":{"post":{"description":"Restores a raster from the trash.","operationId":"raster.restore","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Restore raster","tags":["Layers & data"]}},"/rasters/{rasterId}/styles":{"get":{"description":"A raster's styles, with the active one marked. Each has the `version` a save needs.","operationId":"raster.style.list","parameters":[{"$ref":"#/components/parameters/rasterId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RasterStyles"}}},"description":"The raster's styles"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List raster styles","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a style to a raster and uses it. You choose its `styleId`. The block named by `category` is required.","operationId":"raster.style.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"style":{"category":"Simple","simple":{"band":1,"max":null,"min":null,"paint":{"raster-opacity":0.8}}},"styleId":"00000000-0000-0000-0000-000000000007"},"schema":{"additionalProperties":false,"properties":{"style":{"additionalProperties":false,"properties":{"categorical":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"value":{"type":"number"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","paint","classes"],"type":"object"},"category":{"description":"type: how the layer draws: Circle or Symbol for points, Line for lines, Fill or Line for polygons. category: which block draws it, singleSymbol, categorical or graduated (rasters: simple, categorical, graduated, hillshade; services: featureSingleSymbol and so on); that block is required, and blocks left out are kept.","enum":["Simple","Categorical","Graduated","Hillshade"]},"graduated":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"linearContrast":{"maximum":1,"minimum":-1,"type":["number","null"]},"linearMax":{"type":["number","null"]},"linearMin":{"type":["number","null"]},"linearOpacity":{"maximum":1,"minimum":0,"type":["number","null"]},"linearSaturation":{"maximum":1,"minimum":-1,"type":["number","null"]},"mode":{"enum":["EqualInterval","Manual","Linear"],"type":"string"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","mode","equalInterval","linearMin","linearMax","linearOpacity","linearContrast","linearSaturation","classes","paint"],"type":"object"},"hillshade":{"additionalProperties":false,"properties":{"accentColor":{"maxLength":50,"type":["string","null"]},"altitude":{"maximum":90,"minimum":0,"type":"integer"},"azimuth":{"maximum":360,"minimum":0,"type":"integer"},"band":{"maximum":65535,"minimum":1,"type":"integer"},"blendWithColor":{"type":"boolean"},"colorMax":{"type":["number","null"]},"colorMin":{"type":["number","null"]},"colorRamp":{"items":{"maxLength":50,"type":"string"},"maxItems":256,"type":"array"},"exaggeration":{"maximum":1,"minimum":0,"type":"number"},"highlightColor":{"maxLength":50,"type":["string","null"]},"opacity":{"maximum":1,"minimum":0,"type":"number"},"shadowColor":{"maxLength":50,"type":["string","null"]}},"required":["band","azimuth","altitude","exaggeration","shadowColor","highlightColor","accentColor","opacity","blendWithColor","colorMin","colorMax","colorRamp"],"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"simple":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":["integer","null"]},"max":{"type":["number","null"]},"min":{"type":["number","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","min","max","paint"],"type":"object"}},"required":["category"],"title":"Style","type":"object"},"styleId":{"format":"uuid","title":"New style's id","type":"string"}},"required":["styleId","style"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save as new raster style","tags":["Layers & data"]}},"/rasters/{rasterId}/styles/{styleId}":{"delete":{"description":"Deletes a raster style. A raster's last style can't be deleted.","operationId":"raster.style.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The style's id.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete raster style","tags":["Layers & data"]},"patch":{"description":"Changes a raster style. Send its `version` from `GET /rasters/{rasterId}/styles` as `baseVersion` (409 if it changed since).","operationId":"raster.style.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Left out: the style in use, as a request to change how it looks means.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"baseVersion":"0123456789abcdef0123456789abcdef","style":{"category":"Simple","simple":{"band":1,"max":null,"min":null,"paint":{"raster-opacity":0.8}}}},"schema":{"additionalProperties":false,"properties":{"baseVersion":{"description":"The `version` you read from the styles list; if it changed since, the save is refused. Left out with styleId: the style in use as it is now.","pattern":"^[0-9a-f]{32}$","type":"string"},"style":{"additionalProperties":false,"properties":{"categorical":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"value":{"type":"number"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","paint","classes"],"type":"object"},"category":{"description":"type: how the layer draws: Circle or Symbol for points, Line for lines, Fill or Line for polygons. category: which block draws it, singleSymbol, categorical or graduated (rasters: simple, categorical, graduated, hillshade; services: featureSingleSymbol and so on); that block is required, and blocks left out are kept.","enum":["Simple","Categorical","Graduated","Hillshade"]},"graduated":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"linearContrast":{"maximum":1,"minimum":-1,"type":["number","null"]},"linearMax":{"type":["number","null"]},"linearMin":{"type":["number","null"]},"linearOpacity":{"maximum":1,"minimum":0,"type":["number","null"]},"linearSaturation":{"maximum":1,"minimum":-1,"type":["number","null"]},"mode":{"enum":["EqualInterval","Manual","Linear"],"type":"string"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","mode","equalInterval","linearMin","linearMax","linearOpacity","linearContrast","linearSaturation","classes","paint"],"type":"object"},"hillshade":{"additionalProperties":false,"properties":{"accentColor":{"maxLength":50,"type":["string","null"]},"altitude":{"maximum":90,"minimum":0,"type":"integer"},"azimuth":{"maximum":360,"minimum":0,"type":"integer"},"band":{"maximum":65535,"minimum":1,"type":"integer"},"blendWithColor":{"type":"boolean"},"colorMax":{"type":["number","null"]},"colorMin":{"type":["number","null"]},"colorRamp":{"items":{"maxLength":50,"type":"string"},"maxItems":256,"type":"array"},"exaggeration":{"maximum":1,"minimum":0,"type":"number"},"highlightColor":{"maxLength":50,"type":["string","null"]},"opacity":{"maximum":1,"minimum":0,"type":"number"},"shadowColor":{"maxLength":50,"type":["string","null"]}},"required":["band","azimuth","altitude","exaggeration","shadowColor","highlightColor","accentColor","opacity","blendWithColor","colorMin","colorMax","colorRamp"],"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"simple":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":["integer","null"]},"max":{"type":["number","null"]},"min":{"type":["number","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","min","max","paint"],"type":"object"}},"required":[],"title":"Style","type":"object"}},"required":["style"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save raster style","tags":["Layers & data"]}},"/rasters/{rasterId}/styles/{styleId}/activate":{"post":{"description":"Makes a saved style the one a raster is drawn with.","operationId":"raster.style.activate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The style's id.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Use raster style","tags":["Layers & data"]}},"/rasters/{rasterId}/trash":{"post":{"description":"Moves a raster to the trash.","operationId":"raster.trash","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The raster's id.","in":"path","name":"rasterId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move raster to trash","tags":["Layers & data"]}},"/rasters/{rasterId}/value":{"get":{"description":"A raster's value in each band at a longitude and latitude.","operationId":"raster.value","parameters":[{"$ref":"#/components/parameters/rasterId"},{"in":"query","name":"lng","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"in":"query","name":"lat","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RasterValue"}}},"description":"One value per band, null where the raster has none"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get raster value","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/reference":{"get":{"description":"Searches the water modeling reference: error codes, parameter ranges, design tables and\ntroubleshooting for SWMM, EPANET and HEC-RAS.\n","operationId":"reference.search","parameters":[{"description":"What to look up.","in":"query","name":"q","required":true,"schema":{"maxLength":500,"minLength":1,"type":"string"}},{"description":"How many sections to return, 4 by default.","in":"query","name":"limit","schema":{"maximum":8,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}},"description":"The sections found"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Search the water modeling reference","tags":["Project models"]}},"/risk-inspections/{inspectionId}":{"get":{"description":"One inspection with its observations, files and matched asset.","operationId":"risk.inspection.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskInspectionDetail"}}},"description":"Stored inspection evidence"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get inspection","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"inspectionId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-models":{"get":{"description":"The project's risk models, each with its source layers and five newest runs.","operationId":"risk.model.list","parameters":[{"description":"The project's id. `GET /projects` lists them.","in":"query","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskModel"},"type":"array"}}},"description":"Live models with ordered sources and five newest runs each"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List risk models","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates a risk model for a water, wastewater or stormwater system. Add its layers with `PUT /risk-models/{riskModelId}/sources`, then run it with `POST /risk-models/{riskModelId}/runs`.","operationId":"risk.model.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Sewer mains risk","projectId":"00000000-0000-0000-0000-000000000001","schedule":"manual","systemType":"wastewater"},"schema":{"additionalProperties":false,"properties":{"config":{"description":"Overrides of the recipe's settings, at most 64 KB. Allowed keys: weights, condition, categories, economic, buffers, rehab, roads, hull, install, materialByEra, recommend, scorers, context. An update replaces the whole object.","type":"object"},"description":{"maxLength":2000,"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"recipeId":{"description":"A recipe for the same system, from `GET /risk-recipes`. NEER's own recipe for the system when left out on create.","format":"uuid","type":"string"},"recipeVersion":{"description":"A published version of the recipe. The latest when left out.","minimum":1,"type":"integer"},"schedule":{"description":"When the model runs again by itself: `manual` (default, only when asked), `on_new_records` (after inspections or work orders are imported), `weekly` or `monthly` (counted from when it is set). Each scheduled run belongs to the model's creator and is billed like a run they asked for.","enum":["manual","on_new_records","weekly","monthly"],"type":"string"},"serviceLifeOverrides":{"description":"This model's own service lives, each `{ \"material\", \"assetClass\": \"pipe\" or \"structure\", \"structureType\" (optional), \"years\": 1 to 500 }`. They win over the team's and NEER's table. An update replaces the whole list.","items":{"type":"object"},"maxItems":200,"type":"array"},"systemType":{"enum":["water","wastewater","stormwater"],"title":"System","type":"string","x-titles":["Water","Wastewater","Stormwater"]}},"required":["systemType","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Create risk model","tags":["Risk"]}},"/risk-models/{riskModelId}":{"delete":{"description":"Deletes a risk model. Its runs and scores are kept.","operationId":"risk.model.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk model's id.","in":"path","name":"riskModelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete risk model","tags":["Risk"]},"get":{"description":"Returns a risk model with its recipe, settings, source layers, adopted run and five newest runs.","operationId":"risk.model.get","parameters":[{"description":"The risk model's id.","in":"path","name":"riskModelId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskModel"}}},"description":"Model and recent runs"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get risk model","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Changes a risk model's name, recipe, settings or schedule. Send only the fields to change; `config` and `serviceLifeOverrides` are replaced whole.","operationId":"risk.model.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk model's id.","in":"path","name":"riskModelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"schedule":"monthly"},"schema":{"additionalProperties":false,"properties":{"config":{"description":"Overrides of the recipe's settings, at most 64 KB. Allowed keys: weights, condition, categories, economic, buffers, rehab, roads, hull, install, materialByEra, recommend, scorers, context. An update replaces the whole object.","type":"object"},"description":{"maxLength":2000,"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"recipeId":{"description":"A recipe for the same system, from `GET /risk-recipes`. NEER's own recipe for the system when left out on create.","format":"uuid","type":"string"},"recipeVersion":{"description":"A published version of the recipe. The latest when left out.","minimum":1,"type":"integer"},"schedule":{"description":"When the model runs again by itself: `manual` (default, only when asked), `on_new_records` (after inspections or work orders are imported), `weekly` or `monthly` (counted from when it is set). Each scheduled run belongs to the model's creator and is billed like a run they asked for.","enum":["manual","on_new_records","weekly","monthly"],"type":"string"},"serviceLifeOverrides":{"description":"This model's own service lives, each `{ \"material\", \"assetClass\": \"pipe\" or \"structure\", \"structureType\" (optional), \"years\": 1 to 500 }`. They win over the team's and NEER's table. An update replaces the whole list.","items":{"type":"object"},"maxItems":200,"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit risk model","tags":["Risk"]}},"/risk-models/{riskModelId}/adopt":{"post":{"description":"Makes a completed run the risk model's default. Read `GET /risk-runs/{runId}/compare` first, then send its `seed`, `adoptedRunId` as `expectedAdoptedRunId`, and each spot-check asset's `layerId` and `fid` as `agreedAssetKeys`.","operationId":"risk.run.adopt","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk model's id.","in":"path","name":"riskModelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"agreedAssetKeys":[{"fid":412,"layerId":"00000000-0000-0000-0000-000000000005"},{"fid":977,"layerId":"00000000-0000-0000-0000-000000000005"}],"candidateRunId":"00000000-0000-0000-0000-000000000004","expectedAdoptedRunId":null,"seed":0},"schema":{"additionalProperties":false,"properties":{"agreedAssetKeys":{"description":"Every asset in the comparison's `spotCheck` for this seed, no more and no fewer.","items":{"additionalProperties":false,"properties":{"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"maxItems":100,"type":"array"},"candidateRunId":{"description":"The completed run to adopt, a run of `modelId` that isn't a what-if.","format":"uuid","type":"string"},"expectedAdoptedRunId":{"description":"The adopted run the review compared against. Null when none.","format":"uuid","type":["string","null"]},"seed":{"description":"The redraw seed of the reviewed spot check.","maximum":4294967295,"minimum":0,"type":"integer"}},"required":["candidateRunId","expectedAdoptedRunId","seed","agreedAssetKeys"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Adopt risk run","tags":["Risk"]}},"/risk-models/{riskModelId}/runs":{"get":{"description":"A risk model's runs, newest first, up to 50.\n","operationId":"risk.run.list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskRun"},"maxItems":50,"type":"array"}}},"description":"Recent run records"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List risk runs","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The risk model's id.","in":"path","name":"riskModelId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Runs a risk model. `asOfYear` ages the network; `whatIf` scores it with chosen capital projects built. Follow `created` with `GET /risk-runs/{runId}`. Needs credit.","operationId":"risk.run.request","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk model's id.","in":"path","name":"riskModelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"label":"Spring 2027 baseline"},"schema":{"additionalProperties":false,"properties":{"asOfYear":{"description":"Scores the network as it will be on July 1 of this year, with nothing else built. From this year to 100 years ahead. Not with `whatIf`.","maximum":2199,"minimum":1901,"type":"integer"},"label":{"description":"The run's name. Default the model's name, or \"As of <year>\" for an aged run.","maxLength":120,"type":"string"},"scenario":{"additionalProperties":false,"description":"A what-if with these capital projects built by the year. Read as whatIf. When asOfYear is given, it sets the year.","properties":{"asBuilt":{"items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array"},"year":{"maximum":2199,"minimum":1901,"type":"integer"}},"required":["asBuilt","year"],"type":"object"},"studyId":{"description":"The running optimizer study the run is for. The run is listed in the study, never as the risk model's latest.","format":"uuid","type":"string"},"whatIf":{"additionalProperties":false,"description":"Capital projects to treat as built, scored as of July 1 of `year` (this year to 50 years ahead). Each must be planned or designed, dated no later than `year`, and renew an asset the model scores. Send this or `scenario`, not both.","properties":{"projectIds":{"items":{"format":"uuid","type":"string"},"maxItems":500,"minItems":1,"type":"array","uniqueItems":true},"year":{"maximum":2199,"minimum":1901,"type":"integer"}},"required":["year","projectIds"],"type":"object"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run risk model","tags":["Risk"]}},"/risk-models/{riskModelId}/sources":{"put":{"description":"Replaces the layers a risk model scores and how their columns map to the recipe. Pipes need a line layer, structures a point layer. Up to 100 layers.","operationId":"risk.model.sources.replace","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk model's id.","in":"path","name":"riskModelId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"sources":[{"assetClass":"pipe","fieldMapping":{"assetId":"FACILITYID","diameter":"DIAMETER","installationDate":"INSTALLDATE","material":"MATERIAL","units":{"diameter":"in","length":"ft"}},"layerId":"00000000-0000-0000-0000-000000000005"}]},"schema":{"additionalProperties":false,"properties":{"sources":{"items":{"additionalProperties":false,"properties":{"assetClass":{"enum":["pipe","structure"],"type":"string"},"fieldMapping":{"description":"The layer's column for each input, as `{ \"input\": \"COLUMN\" }`. Inputs: assetId, installationDate, rehabDate, rehabbed, material, serviceLife, diameter, length, shape, conditionScore, conditionDate, lofOverride, structureType, upstreamNode, downstreamNode, status. `units` sets `diameter` (in, mm, ft or m) and `length` (ft or m). Column names up to 200 characters.","type":"object"},"layerId":{"format":"uuid","type":"string"},"structureType":{"description":"For a structure layer, the kind of structure it holds, such as Manhole, when the layer has no column for it.","maxLength":120,"type":["string","null"]}},"required":["layerId","assetClass"],"type":"object"},"maxItems":100,"type":"array"}},"required":["sources"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save risk sources","tags":["Risk"]}},"/risk-recipes":{"get":{"description":"Risk recipes you can use. Pass one's `id` as `recipeId` to `POST /risk-models`.","operationId":"risk.recipe.list","parameters":[{"description":"Only recipes for this system. All systems when left out.","in":"query","name":"systemType","schema":{"enum":["water","wastewater","stormwater"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskRecipe"},"type":"array"}}},"description":"Built-in, personal and joined-team recipes at their latest published version"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List risk recipes","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/risk-records/export":{"get":{"description":"A page of the project's risk records, models, runs, hydraulic models or planning studies,\nfor `POST /risk-records/import` into a project of another deployment. `part` is `projects`\n(capital projects with their documents, costs and work orders), `work-orders` (those on no\ncapital project), `inspections` (with their observations and media), `models` (risk models\nwith their sources, the recipes of a team they pin and the project's unit costs), `runs`\n(the models' finished runs and their scores), `hydraulic-models` (the hydraulic models the\nstudies and scenarios use, or the one `modelId` names, with their networks, sections,\nseries, own run sets and Base scenario, ids and element numbers kept) or `studies`\n(planning studies with their scenarios, and a finished study's model runs and\nsimulations). A simulation's or model's file may be in a bucket this API reads for runs or\nforecasts. A part is cut into `pages`\nof about 6 MB, from 0; import them in order, and the parts in that order. `files` holds a\nlink to each file the rows name, valid for up to 24 hours; a folder's link opens a listing\nof links to its files, and a study's results go as a file. The listings and results are\nkept under the project's `risk-records/listings/` folder. Admins only. Only by hand.\n","operationId":"risk.records.export","parameters":[{"description":"The project's id. `GET /projects` lists them.","in":"query","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"part","required":true,"schema":{"enum":["projects","work-orders","inspections","models","runs","hydraulic-models","studies"],"type":"string"}},{"description":"The page, from 0.","in":"query","name":"page","schema":{"default":0,"minimum":0,"type":"integer"}},{"description":"For the hydraulic-models part: the one model to copy.","in":"query","name":"modelId","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRecordsPage"}}},"description":"The page"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/Failed"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Export risk records","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/risk-records/import":{"post":{"description":"Copies a page of another deployment's risk records, risk models, runs, hydraulic models or planning studies into the project, from `GET /risk-records/export?projectId=` there, sent as `bundle` unchanged. Rows keep their ids, so a page sent again adds only what's missing. Each record or score goes to the layer of its layer's name, or the one `layers` names, and to the feature its asset matches; one that matches none is listed in `unattached`. A hydraulic model comes as it is, with its network as new layers. A study goes to the hydraulic model of its model's name, or the one `models` names. Preview first. Nothing is run: the files are fetched by a job (`jobId`). Admins only.","operationId":"risk.records.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"bundle":{"files":[],"layers":{"00000000-0000-0000-0000-0000000000b1":{"geometry":"POINT","name":"Juctions"}},"page":0,"pages":1,"part":"work-orders","project":"00000000-0000-0000-0000-0000000000a1","tables":{"risk_maintenance":[{"activity":"cleaning","asset_key":"mh104","asset_ref":"MH-104","fid":12,"id":"00000000-0000-0000-0000-0000000000c1","import_id":"00000000-0000-0000-0000-0000000000d1","layer_id":"00000000-0000-0000-0000-0000000000b1","performed_at":"2025-03-04","project_id":"00000000-0000-0000-0000-0000000000a1","raw":{}}]}},"layers":{"Juctions":"9ede01ff-f3a1-47cc-9738-4931ee602ceb"},"projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"properties":{"bundle":{"description":"A page as the source deployment's `GET /risk-records/export?projectId=` answered it, unchanged.","required":["project","part","page","pages","layers","tables","files"],"title":"Records","type":"object"},"inputs":{"additionalProperties":{"maxLength":255,"minLength":1,"type":"string"},"description":"For the studies part: where a rain input, period, inflow set or boundary set a study runs under goes when no single one here has its name, from its name or id to one's name or id in this project.","maxProperties":200,"title":"Run inputs","type":"object"},"layers":{"additionalProperties":{"maxLength":255,"minLength":1,"type":"string"},"description":"Where a source layer's records, a risk model's sources and context, or a run's scores go when no single layer here has its name: the source layer's name or id, to a layer's name or id in this project. Give an id where two layers here share the name.","maxProperties":200,"title":"Layers","type":"object"},"models":{"additionalProperties":{"maxLength":255,"minLength":1,"type":"string"},"description":"For the studies part: where a study's hydraulic model goes when no single model here has its name, from its name or id to a model's name or id in this project. The hydraulic-models part copies the source's models as they are, so their names match.","maxProperties":200,"title":"Hydraulic models","type":"object"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"rasters":{"additionalProperties":{"maxLength":255,"minLength":1,"type":"string"},"description":"For the models part: where a raster a risk model's context reads goes when no single raster here has its name, from its name or id to a raster's name or id in this project.","maxProperties":200,"title":"Rasters","type":"object"}},"required":["bundle","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Copy risk records from another deployment","tags":["Risk"]}},"/risk-runs/{riskRunId}":{"delete":{"description":"Permanently deletes a finished risk run and its scores. Refused for the adopted run. Can't be undone.","operationId":"risk.run.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk run's id.","in":"path","name":"riskRunId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete risk run","tags":["Risk"]}},"/risk-runs/{riskRunId}/package":{"post":{"description":"Creates a capital project from a risk run's worst assets that match `selection`. Assets already in a project are left out. Preview it with `GET /risk-runs/{runId}/package`.","operationId":"risk.run.package","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk run's id.","in":"path","name":"riskRunId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"2028 lining package","selection":{"assetClasses":["pipe"],"categories":[5],"topN":200},"year":2028},"schema":{"additionalProperties":false,"properties":{"firm":{"maxLength":200,"type":["string","null"]},"methods":{"additionalProperties":false,"description":"The renewal method written on each record, which picks its unit cost. Default `CIPP lining` for pipes and `Manhole rehabilitation` for structures.","properties":{"pipe":{"maxLength":120,"type":"string"},"structure":{"maxLength":120,"type":"string"}},"type":"object"},"name":{"maxLength":200,"minLength":1,"type":"string"},"note":{"maxLength":1000,"type":["string","null"]},"selection":{"additionalProperties":false,"description":"Which scored assets to take. Filters combine: `categories` (risk bands 1 to 5), `minBre`, `layerIds`, `assetClasses`, `assets` (exact layer and feature ids), and `topN` (the worst N by BRE, counted before assets already in a project are left out). `{}` takes every scored asset.","properties":{"assetClasses":{"items":{"enum":["pipe","structure"],"type":"string"},"maxItems":2,"type":"array"},"assets":{"items":{"additionalProperties":false,"properties":{"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"maxItems":50000,"type":"array"},"categories":{"items":{"maximum":5,"minimum":1,"type":"integer"},"maxItems":5,"type":"array"},"layerIds":{"items":{"format":"uuid","type":"string"},"maxItems":100,"type":"array"},"minBre":{"maximum":5,"minimum":1,"type":"number"},"topN":{"maximum":50000,"minimum":1,"type":"integer"}},"type":"object"},"stage":{"default":"planned","enum":["planned","designed"],"type":"string"},"year":{"maximum":2199,"minimum":1901,"type":"integer"}},"required":["name","year","selection"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Plan project from risk results","tags":["Risk"]}},"/risk-runs/{riskRunId}/rename":{"post":{"description":"Names a risk run, or clears its name with null.","operationId":"risk.run.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk run's id.","in":"path","name":"riskRunId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"label":"Adopted for 2027 CIP"},"schema":{"additionalProperties":false,"properties":{"label":{"description":"The run's name. Empty or null names it by its date.","maxLength":120,"type":["string","null"]}},"required":["label"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename risk run","tags":["Risk"]}},"/risk-runs/{riskRunId}/stop":{"post":{"description":"Stops a queued or running risk run. A run already sent to the paid risk worker still finishes and is billed.","operationId":"risk.run.stop","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The risk run's id.","in":"path","name":"riskRunId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop risk run","tags":["Risk"]}},"/risk-runs/{runId}":{"get":{"description":"Returns a risk run's progress and results.\n","operationId":"risk.run.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRunDetail"}}},"description":"Run and its model context"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get risk run","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/budget-assets":{"get":{"description":"The assets to renew within a budget, from a completed run, best value first. `chosenAssets`\nis what `POST /risk-runs/{riskRunId}/package` takes.\n","operationId":"risk.run.budget_assets","parameters":[{"description":"Dollars to spend.","in":"query","name":"budget","required":true,"schema":{"maximum":1000000000000,"minimum":0.01,"type":"number"}},{"description":"Layer ids, comma-separated.","in":"query","name":"layerIds","schema":{"maxLength":4000,"type":"string"}},{"in":"query","name":"pipeMethod","schema":{"maxLength":120,"type":"string"}},{"in":"query","name":"structureMethod","schema":{"maxLength":120,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskBudgetAssets"}}},"description":"The chosen assets, best ratio first"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List budget assets","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/compare":{"get":{"description":"Compares a completed run with the adopted run, asset by asset, with a sample to spot-check.\nRead this before `POST /risk-models/{riskModelId}/adopt`.\n","operationId":"risk.run.compare.baseline","parameters":[{"description":"Picks the spot-check sample. The same seed gives the same sample; another draws a new one.","in":"query","name":"seed","schema":{"default":0,"maximum":4294967295,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskComparison"}}},"description":"Band shifts, flags, and a deterministic review sample"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Compare risk run with baseline","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/package":{"get":{"description":"Previews what `POST /risk-runs/{riskRunId}/package` would create: the matching assets, counted and priced.\n","operationId":"risk.run.package_preview","parameters":[{"description":"Bands to take, 1–5, comma-separated.","in":"query","name":"categories","schema":{"maxLength":4000,"type":"string"}},{"in":"query","name":"minBre","schema":{"maximum":5,"minimum":1,"type":"number"}},{"description":"How many of the worst assets by BRE to take, counted before already planned assets are left out.","in":"query","name":"topN","schema":{"maximum":50000,"minimum":1,"type":"integer"}},{"description":"Layer ids, comma-separated.","in":"query","name":"layerIds","schema":{"maxLength":4000,"type":"string"}},{"description":"Asset kinds to take, comma-separated (pipe, structure).","in":"query","name":"assetClasses","schema":{"maxLength":4000,"type":"string"}},{"in":"query","name":"pipeMethod","schema":{"maxLength":120,"type":"string"}},{"in":"query","name":"structureMethod","schema":{"maxLength":120,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPackagePreview"}}},"description":"Counts, risk, and price of the selection"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Preview planned project","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/plan-preview":{"get":{"description":"Estimates which capital projects a budget would fund, from a completed run. Refused over\n5,000 projects.\n","operationId":"risk.run.plan_preview","parameters":[{"in":"query","name":"budget","required":true,"schema":{"exclusiveMinimum":0,"maximum":1000000000000,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPlanPreview"}}},"description":"Chosen projects first, then every excluded project with a reason"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Preview capital plan","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/programs":{"get":{"description":"Camera inspection and cleaning schedules by year, worst assets first, at `feetPerYear`.\n","operationId":"risk.run.programs","parameters":[{"description":"Feet of camera inspection a year. Default the whole network once per inspection cycle the run was scored with.","in":"query","name":"feetPerYear","schema":{"maximum":1000000000,"minimum":1,"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskPrograms"}}},"description":"The programs"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get maintenance programs","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/run-compare":{"get":{"description":"Compares two completed runs of the same risk model, asset by asset. For a what-if and its\nbase, use `GET /risk-runs/{runId}/scenario-compare`.\n","operationId":"risk.run.compare.run","parameters":[{"in":"query","name":"againstRunId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskRunPairComparison"}}},"description":"Whole-run totals and matched-asset BRE change"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Compare risk runs","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/scenario-compare":{"get":{"description":"Compares a what-if run with a base run of the same risk model, asset by asset.\n","operationId":"risk.run.compare.scenario","parameters":[{"in":"query","name":"againstRunId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScenarioComparison"}}},"description":"Whole-run totals and matched-asset BRE change"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Compare risk run with base run","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/risk-runs/{runId}/scores":{"get":{"description":"A risk run's scores, one row per asset: likelihood (LOF), consequence (COF), BRE, band, rank and recommended action.","operationId":"risk.score.list","parameters":[{"in":"query","name":"layerId","schema":{"format":"uuid","type":"string"}},{"description":"One feature's scores. Use with `layerId`.","in":"query","name":"fid","schema":{"minimum":0,"type":"integer"}},{"in":"query","name":"assetClass","schema":{"enum":["pipe","structure"],"type":"string"}},{"description":"The column to sort by. Ties fall back to layer and feature id.","in":"query","name":"sort","schema":{"default":"bre","enum":["bre","lof","cof","rank","assetId","rulYears","action","nextInspectionYear"],"type":"string"}},{"description":"Defaults to `desc` for bre, lof and cof, and `asc` for the others.","in":"query","name":"order","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"Only assets in this risk band, 1 (lowest) to 5 (highest).","in":"query","name":"category","schema":{"maximum":5,"minimum":1,"type":"integer"}},{"in":"query","name":"minBre","schema":{"maximum":5,"minimum":1,"type":"number"}},{"description":"Part of an asset id, any case.","in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},{"description":"The most to return in one page.","in":"query","name":"limit","schema":{"default":100,"maximum":500,"minimum":1,"type":"integer"}},{"description":"How many to skip, to get the next page.","in":"query","name":"offset","schema":{"default":0,"maximum":1000000,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskScorePage"}}},"description":"Asset scores and total count after filters"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List risk scores","tags":["Risk"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"The run's id.","in":"path","name":"runId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/search":{"get":{"description":"Searches by name across your projects, layers, models, runs, sensor sites, dashboards, field maps and surveys. Returns up to 20 results, best first.","operationId":"search","parameters":[{"description":"Words to find in names, or an id. 1 to 200 characters.","in":"query","name":"q","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"description":"Rank hits in this project first.","in":"query","name":"projectId","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SearchHit"},"type":"array"}}},"description":"Hits, best first, at most 20"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Search","tags":["Account"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/sensors":{"get":{"description":"The project's sensor sites, by kind then name, and sensor features that don't have a site yet.","operationId":"sensor.list","parameters":[{"description":"The project's id. `GET /projects` lists them.","in":"query","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorBoard"}}},"description":"The sites"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensors","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a monitoring site for readings and site sheets that come as files, in the project's observed-data layer, placed on a feature (`at`) or left to be placed. Its readings come by `POST /sensors/{siteId}/readings`, its site sheets by `POST /sensors/{siteId}/documents`. One site of a name per project.","operationId":"sensor.site.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"at":{"fid":412,"layerId":"00000000-0000-0000-0000-000000000002"},"kind":"flow_meter","measures":["depth","velocity","flow","rain"],"name":"MONMOUTH_TFM0126","projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"properties":{"at":{"additionalProperties":false,"description":"A feature of the project to place the site on: a pipe at its middle, a manhole or anything else at its centre. Without it the site has no location until it's moved on the map.","properties":{"fid":{"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},"kind":{"enum":["flow_meter","depth_sensor","rain_gauge","stage_gauge","pressure_sensor","level_sensor","acoustic_logger","water_meter","other"]},"measures":{"description":"What the site measures. Its readings come by `POST /sensors/{siteId}/readings`, a measure at a time.","items":{"enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"]},"maxItems":9,"minItems":1,"type":"array","uniqueItems":true},"name":{"description":"The site's name, as its files name it. One site of a name per project.","maxLength":120,"minLength":1,"type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"}},"required":["name","kind","measures","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add site","tags":["Sensors"]}},"/sensors/connect":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Checks a sensor network login and counts its sites, without saving anything. Returns a `loginToken` for `POST /sensors/import`, valid for 30 minutes. 10 tries per 10 minutes.","operationId":"sensors.connect","parameters":[{"description":"The project's id. `GET /projects` lists them.","in":"query","name":"projectId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorConnect"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorConnection"}}},"description":"Sites the network lists"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"502":{"$ref":"#/components/responses/Failed"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Check sensor network login","tags":["Sensors"]}},"/sensors/fetch/stop":{"post":{"description":"Stops a fetch started with `POST /sensors/{siteId}/fetch` or `POST /sensors/{siteId}/readings/sync`. Readings already stored stay.","operationId":"sensors.fetch.stop","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"jobId":"00000000-0000-0000-0000-000000000002","projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"properties":{"jobId":{"description":"The job `POST /sensors/{siteId}/fetch` or `POST /sensors/{siteId}/readings/sync` returned as `created`.","format":"uuid","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"}},"required":["jobId","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop fetching readings","tags":["Sensors"]}},"/sensors/import":{"post":{"description":"Imports a sensor network's sites as a layer. Check the login with `POST /sensors/connect` first and send its `loginToken` as `login` (USGS needs none). Runs as a job.","operationId":"sensors.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"River gages","network":"usgs","projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"if":{"properties":{"network":{"not":{"const":"usgs"}}},"required":["network"]},"properties":{"area":{"additionalProperties":true,"description":"USGS gages only: the gages to import, `{ \"state\": \"MO\" }` (a state's two-letter code) or `{ \"within\": <GeoJSON Polygon or MultiPolygon> }` in longitude and latitude, at most 10,000 positions. Left out, every gage in the country. `POST /sensors/connect` with the same area counts them first.","title":"Area","type":"object"},"label":{"description":"The label above each sensor's readings.","items":{"oneOf":[{"additionalProperties":false,"properties":{"text":{"maxLength":2000,"type":"string"},"type":{"const":"text"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"attributeKey":{"maxLength":255,"type":"string"},"type":{"const":"attribute"}},"required":["type","attributeKey"],"type":"object"}]},"maxItems":100,"type":"array"},"login":{"description":"The `loginToken` `POST /sensors/connect` returned, within 30 minutes, for the same network. Required for every network but `usgs`.","maxLength":8192,"minLength":1,"type":"string"},"name":{"description":"The layer's name. Defaults to the network's, such as USGS Gages.","maxLength":200,"title":"Name","type":"string"},"network":{"enum":["ads","cipher","fcs","smartcover","stormwatch","usgs"],"title":"Network","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"rainLogin":{"description":"The `loginToken` `POST /sensors/connect` returned for the ADS key an ADS rainfall source reads with. Required when `rainfall.source` is `ads`.","maxLength":8192,"minLength":1,"type":"string"},"rainfall":{"additionalProperties":false,"description":"The layer's rainfall source, shown under its charts.","properties":{"chartKinds":{"description":"The charts the rain shows under, by name, such as Depth or Flow for ADS, Level, Flow Rate or Velocity for Cipher, Stage for USGS. An empty list shows it under none.","items":{"maxLength":120,"type":"string"},"maxItems":100,"type":"array"},"latitudeDataKey":{"maxLength":255,"type":"string"},"longitudeDataKey":{"maxLength":255,"type":"string"},"source":{"description":"Where the rain comes from: `ads` (by the location id in `targetDataKey`, needs `rainLogin`), `stormwatch` (by the station in `targetDataKey`), `neer-weather-api` (radar at the coordinates in `latitudeDataKey` and `longitudeDataKey`, spending weather allowance) or `neer-geospatial-fetch` (not offered yet). Not the network's own: ADS and Storm Watch layers can't take themselves.","enum":["ads","stormwatch","neer-weather-api","neer-geospatial-fetch"],"type":"string"},"targetDataKey":{"maxLength":255,"type":"string"}},"required":["source","chartKinds"],"type":"object"}},"required":["network","projectId"],"then":{"required":["login"]},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import a sensor network","tags":["Sensors"]}},"/sensors/sync":{"post":{"description":"Creates sensor sites for a sensor layer's features that don't have one, or for every sensor layer when `layerId` is left out. Runs as a job.","operationId":"sensor.sites.sync","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"layerId":"00000000-0000-0000-0000-000000000002","projectId":"00000000-0000-0000-0000-000000000001"},"schema":{"additionalProperties":false,"properties":{"layerId":{"description":"The sensor layer. Leave out for every sensor layer in the project.","format":"uuid","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"}},"required":["projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Update sensor sites from layers","tags":["Sensors"]}},"/sensors/{siteId}":{"delete":{"description":"Removes a monitoring site for good, with its readings, flags, site sheets, analyses and forecasts. Flow analyses that haven't run and monitoring periods drop it. Refused while it's another site's rain gauge or upstream meter, a meter in a flow analysis that has run, or used by a calibration.","operationId":"sensor.site.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site to remove, with its readings, flags, site sheets, analyses and forecasts.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove sensor site","tags":["Sensors"]},"get":{"description":"Returns a sensor site with its attributes, documents and settings.","operationId":"sensor.get","parameters":[{"$ref":"#/components/parameters/siteId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorSiteDetail"}}},"description":"The site"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get sensor","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"patch":{"description":"Changes a sensor site's details. Send `siteId` and only the fields to change; null clears one.","operationId":"sensor.site.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"areaAcres":639,"capacityMgd":1.67,"rainGauge":"00000000-0000-0000-0000-000000000003"},"schema":{"additionalProperties":false,"minProperties":2,"properties":{"areaAcres":{"oneOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]},"asset":{"description":"The feature the site is on, as `{layerId, fid}` of a layer in the project. Null unbinds it.","oneOf":[{"additionalProperties":false,"properties":{"fid":{"maximum":2147483647,"minimum":0,"type":"integer"},"layerId":{"format":"uuid","type":"string"}},"required":["layerId","fid"],"type":"object"},{"type":"null"}]},"capacityMgd":{"oneOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]},"conduitSizeIn":{"oneOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]},"deployedFrom":{"description":"When the sensor was installed. An RFC 3339 date and time, or null.","oneOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"deployedTo":{"oneOf":[{"description":"When the sensor was removed, an RFC 3339 date and time not before `deployedFrom`, or null. A temporary sensor, such as one for a study, has an end date, and readings are not pulled past it.","format":"date-time","type":"string"},{"type":"null"}]},"element":{"description":"The model element the site is compared with: `modelId`, `type` (link, node or subcatchment) and `id`, the element's name in the model. Null unbinds it, after clearing `seriesElements`.","oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"modelId":{"format":"uuid","type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["modelId","type","id"],"type":"object"},{"type":"null"}]},"idm":{"oneOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]},"kind":{"description":"What the site is. Refused while the site is another site's rain gauge (for a change from rain_gauge) or upstream meter (from flow_meter).","enum":["flow_meter","depth_sensor","rain_gauge","stage_gauge","pressure_sensor","level_sensor","acoustic_logger","water_meter","other"],"type":"string"},"measures":{"description":"The measures the site reports, replacing the list. A fetch with no measures pulls these, and an alert needs its measure here.","items":{"enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"],"type":"string"},"maxItems":50,"type":"array"},"modelDepthAt":{"description":"Where a site bound to a pipe has its model depth read: `downstream`, the pipe's downstream end (the default, where most meters sit looking upstream); `upstream`, its upstream end; `average`, the engine's depth over the pipe; or `manhole`, the downstream node's depth with no offset taken off, for a pipe that drops into its manhole in the model but not in the field. An end's depth is the node's there less the pipe's offset at that end. Null for the default.","oneOf":[{"enum":["downstream","upstream","average","manhole"],"type":"string"},{"type":"null"}]},"name":{"maxLength":120,"minLength":1,"type":"string"},"pipeLengthFt":{"oneOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]},"population":{"oneOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]},"rainGauge":{"description":"The rain gauge site whose rain goes with this site. Another site of kind rain_gauge in the project. Null clears it.","oneOf":[{"format":"uuid","type":"string"},{"type":"null"}]},"seriesElements":{"additionalProperties":false,"description":"Binds a stored measure to a different element of the site's model than `element`, by measure: `{type, id}` with the element's name, or null to clear. The measure must have stored readings, and `element` must be set.","minProperties":1,"properties":{"battery":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"depth":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"flow":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"level":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"pressure":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"rain":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"stage":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"velocity":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]},"volume":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"type":"string"},"type":{"enum":["link","node","subcatchment"],"type":"string"}},"required":["type","id"],"type":"object"},{"type":"null"}]}},"required":[],"type":"object"},"surchargeDepthUnreliable":{"description":"True for a meter whose depth reads wrong when its pipe surcharges, such as one reading above the meter upstream of it: a criteria set's surcharge rule never judges its storms. Null for the default, false.","oneOf":[{"type":"boolean"},{"type":"null"}]},"syncEveryHours":{"oneOf":[{"description":"How often readings are pulled from the vendor, in hours. Null for never. Only ADS and FCS sites are pulled.","enum":[1,3,6,12,24],"type":"integer"},{"type":"null"}]},"upstreamSiteIds":{"description":"Flow meters upstream of this one, whose flow is subtracted for its net figures. Replaces the list; an empty list clears it.","items":{"format":"uuid","type":"string"},"maxItems":1000,"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit sensor site","tags":["Sensors"]}},"/sensors/{siteId}/alerts":{"patch":{"description":"Sets an alert for when a site's latest reading of a measure goes above or below a value, in the measure's stored unit. Replaces the measure's earlier alert, so send both values to keep both. Send neither to remove it.","operationId":"sensor.alert.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The sensor site.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"above":4.5,"measure":"depth"},"schema":{"additionalProperties":false,"properties":{"above":{"oneOf":[{"description":"Alert while the latest reading is above this, in the measure's unit. Must be greater than `below` when both are sent.","type":"number"},{"type":"null"}]},"below":{"oneOf":[{"description":"Alert while the latest reading is below this, in the measure's unit. Must be less than `above` when both are sent.","type":"number"},{"type":"null"}]},"measure":{"description":"The measure to watch. The site must measure it.","enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"],"title":"Measure","type":"string"}},"required":["measure"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set a sensor alert","tags":["Sensors"]}},"/sensors/{siteId}/basin":{"post":{"description":"Traces the area that drains to a flow meter through its model network and saves it on the site. Bind the site to a model pipe first (`PATCH /sensors/{siteId}`, `element` of type `link`).","operationId":"sensor.basin.trace","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The flow meter, bound to a model pipe.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Trace basin","tags":["Sensors"]}},"/sensors/{siteId}/copy-rain":{"post":{"description":"Copies a site's rain readings into the project's run inputs, in inches, for model runs. Readings must be at a regular whole-minute interval with no gaps, up to 20,000.","operationId":"sensor.rain.copy","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"end":"2026-04-12T00:00:00Z","name":"April storm","start":"2026-04-10T00:00:00Z"},"schema":{"additionalProperties":false,"properties":{"end":{"description":"The window's end. An RFC 3339 date and time.","format":"date-time","type":"string"},"name":{"description":"The name of the new rain input (for sensor.series.copy, of the model's new time series, which must be unused in the model).","maxLength":120,"minLength":1,"type":"string"},"start":{"description":"The window's start. An RFC 3339 date and time.","format":"date-time","type":"string"}},"required":["name","start","end"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Copy readings to rain","tags":["Sensors"]}},"/sensors/{siteId}/copy-to-model":{"post":{"description":"Copies a site's readings of one measure into a split model (`modelId`) as a new time series. `etag` must match the model's. Up to 20,000 readings.","operationId":"sensor.series.copy","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"end":"2026-04-12T00:00:00Z","etag":"00000000000000000001","measure":"flow","modelId":"00000000-0000-0000-0000-000000000003","name":"MH-12 observed flow","start":"2026-04-10T00:00:00Z"},"schema":{"additionalProperties":false,"properties":{"end":{"description":"The window's end. An RFC 3339 date and time.","format":"date-time","type":"string"},"etag":{"description":"The model data's etag from `GET /models/{modelId}`. Refused (409) when the model has changed since.","maxLength":200,"type":["string","null"]},"measure":{"enum":["flow","depth","stage","level","velocity","rain"]},"modelId":{"format":"uuid","type":"string"},"name":{"description":"The name of the new rain input (for sensor.series.copy, of the model's new time series, which must be unused in the model).","maxLength":120,"minLength":1,"type":"string"},"start":{"description":"The window's start. An RFC 3339 date and time.","format":"date-time","type":"string"}},"required":["name","start","end","modelId","etag","measure"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Copy readings to model","tags":["Sensors"]}},"/sensors/{siteId}/documents":{"get":{"description":"A site's documents, newest first. `uploaded` is false until the upload is complete.","operationId":"sensor.document.list","parameters":[{"description":"The sensor site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorDocuments"}}},"description":"The result"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor documents","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a document to a sensor site (up to 200). Then upload the file with `POST /projects/{projectId}/sensor-documents/{documentId}/upload` and call `POST /projects/{projectId}/sensor-documents/{documentId}/complete`.","operationId":"sensor.document.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The sensor site.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"contentType":"application/pdf","fileName":"MH-12 site sheet.pdf","kind":"site_sheet","sizeBytes":184320},"schema":{"additionalProperties":false,"properties":{"contentType":{"description":"The file's type: image/jpeg, image/png, image/webp, image/gif, application/pdf, text/plain, text/csv, or a Word, Excel or PowerPoint type (.doc, .docx, .xls, .xlsx, .ppt, .pptx). The upload must match it.","maxLength":150,"type":"string"},"fileName":{"description":"The file's name, as it will be downloaded.","maxLength":200,"minLength":1,"type":"string"},"kind":{"description":"What the document is: a site sheet, an interrogation, a calibration, a photo or other.","enum":["site_sheet","interrogation","calibration","photo","other"]},"sizeBytes":{"description":"The file's size in bytes, up to 25 MiB. The upload must match it.","maximum":26214400,"minimum":1,"type":"integer"}},"required":["kind","fileName","contentType","sizeBytes"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add sensor document","tags":["Sensors"]}},"/sensors/{siteId}/fetch":{"post":{"description":"Fetches and stores a site's readings for up to 92 days. Runs as a job; stop it with `POST /sensors/fetch/stop`.","operationId":"sensors.fetch","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"end":1777593600000,"start":1775001600000},"schema":{"additionalProperties":false,"properties":{"end":{"description":"The window's end, in milliseconds since 1970-01-01 UTC. After `start` and at most 92 days later.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},"measures":{"description":"The measures to fetch, each one the site reports. Leave out for all the site's measures.","items":{"enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"],"type":"string"},"maxItems":9,"minItems":1,"type":"array","uniqueItems":true},"start":{"description":"The window's start, in milliseconds since 1970-01-01 UTC.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"}},"required":["start","end"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Fetch and store observations","tags":["Sensors"]}},"/sensors/{siteId}/flags":{"post":{"description":"Flags a window of a site's readings, for one measure or all, with a note. Flagged readings have no value and are left out of analyses.","operationId":"sensor.flag.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The sensor site.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"endAt":"2026-10-01T10:30:00Z","kind":"maintenance","measure":"flow","note":"Sensor cleaned","startAt":"2026-10-01T08:00:00Z"},"schema":{"additionalProperties":false,"properties":{"endAt":{"description":"The last flagged instant, RFC 3339 with an offset, on or after `startAt`.","format":"date-time","maxLength":40,"type":"string"},"kind":{"description":"Why the readings are suspect.","enum":["dropout","frozen","spike","out_of_range","maintenance","suspect"],"type":"string"},"measure":{"description":"The measure flagged. Leave out or null to flag every measure.","oneOf":[{"enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"],"type":"string"},{"type":"null"}]},"note":{"maxLength":500,"type":["string","null"]},"startAt":{"description":"The first flagged instant, RFC 3339 with an offset, to the millisecond.","format":"date-time","maxLength":40,"type":"string"}},"required":["kind","startAt","endAt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add sensor flag","tags":["Sensors"]}},"/sensors/{siteId}/forecasts":{"get":{"description":"Flow forecasts stored for a site, oldest first. Send `since` and `until` (up to 90 days; default the last 3 days), or one `issuedAt`.","operationId":"sensor.forecast.list","parameters":[{"description":"The sensor site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"since","schema":{"format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"format":"date-time","type":"string"}},{"in":"query","name":"issuedAt","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorForecasts"}}},"description":"Stored data only."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor forecasts","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Creates a scheduled forecast for a flow meter that has a trained model, found by the meter's name. Runs every 6 hours by default.","operationId":"sensor.forecast.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The flow meter. It must measure flow and have a trained model.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"everyHours":6},"schema":{"additionalProperties":false,"properties":{"enabled":{"description":"Whether cycles run on schedule. Defaults to true.","type":"boolean"},"everyHours":{"description":"How often a cycle starts, in hours. Defaults to 6.","enum":[1,3,6,12,24]},"hindcastHours":{"const":36,"description":"Hours of the site's readings the model reads: fixed by how it was trained."},"horizonHours":{"const":18,"description":"Hours the model forecasts: fixed by how it was trained."},"model":{"description":"What each cycle runs: the sewer forecast service's trained model for the site.","enum":["sewer"]},"name":{"description":"Defaults to the site's name followed by \"forecast\".","maxLength":120,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New sensor forecast","tags":["Sensors"]}},"/sensors/{siteId}/history":{"post":{"description":"Pulls an ADS or FCS site's readings from `since` to now. Follow progress in the site's `sync` (`GET /sensors/{siteId}`). Sending the same `since` again resumes a stopped pull.","operationId":"sensor.history.pull","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The ADS or FCS sensor site to pull.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"since":"2026-01-01T00:00:00Z"},"schema":{"additionalProperties":false,"properties":{"replace":{"default":false,"description":"Drop the site's stored readings of each measure the vendor answers with, over each piece's window, before storing the vendor's: a pull again after the project's time zone changed leaves one copy at the right instants. Off, the vendor's readings merge into what is stored.","type":"boolean"},"since":{"description":"Readings are pulled from this instant to now. An RFC 3339 date and time in the past.","format":"date-time","type":"string"}},"required":["since"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Pull the history","tags":["Sensors"]}},"/sensors/{siteId}/ml-forecast":{"get":{"description":"A site's newest flow or depth forecast from its trained model. Null if there isn't one.\n","operationId":"sensor.ml_forecast.get","parameters":[{"description":"The sensor site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorMlForecast"}}},"description":"Stored data only."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get sensor ML forecast","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/sensors/{siteId}/qa":{"patch":{"description":"Sets a sensor site's QA status, note, or both.","operationId":"sensor.qa.set","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"note":"Velocity sensor cleaned on 2026-04-02.","status":"checked"},"schema":{"additionalProperties":false,"minProperties":2,"properties":{"note":{"description":"A note on the site's QA. Null clears it. Left out, it stays as it is.","oneOf":[{"maxLength":2000,"type":"string"},{"type":"null"}]},"status":{"description":"The site's QA status. Left out, it stays as it is.","enum":["unchecked","checked","approved"],"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Set site QA","tags":["Sensors"]}},"/sensors/{siteId}/radar":{"post":{"description":"Stores radar rain at a sensor site's location for a window. Uses the weather allowance. Not for rain gauges or sites that already have rain. Runs as a job.","operationId":"sensor.radar.fetch","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"end":1777593600000,"start":1775001600000},"schema":{"additionalProperties":false,"properties":{"end":{"description":"The window's end, in milliseconds since 1970-01-01 UTC. Not before `start`, and at most five years after it.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},"start":{"description":"The window's start, in milliseconds since 1970-01-01 UTC.","maximum":253402300799999,"minimum":-62135596800000,"type":"integer"},"timeZone":{"description":"An IANA time zone, such as America/Chicago. Defaults to the project's time zone, or UTC.","maxLength":100,"minLength":1,"type":"string"}},"required":["start","end"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Fetch radar rain","tags":["Sensors"]}},"/sensors/{siteId}/rainfall":{"get":{"description":"Rain at a sensor site over a window, from its layer's rain source. Radar reads use the\nweather allowance. `missing` says what's not set up.\n","operationId":"sensor.rainfall.get","parameters":[{"description":"The sensor site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The window's start, an RFC 3339 instant.","in":"query","name":"start","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"The window's end, an RFC 3339 instant.","in":"query","name":"end","required":true,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorRainfall"}}},"description":"The rain, or what is missing to read it."},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get sensor rainfall","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/sensors/{siteId}/readings":{"get":{"description":"A site's readings between `start` and `end`, or averages over `step` seconds (sums for rain). Up to 20,000 points.","operationId":"sensor.reading.list","parameters":[{"$ref":"#/components/parameters/siteId"},{"in":"query","name":"measure","required":true,"schema":{"$ref":"#/components/schemas/SensorMeasure"}},{"in":"query","name":"start","required":true,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"end","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Seconds per point. 0 or absent returns every reading, if they fit.","in":"query","name":"step","required":false,"schema":{"maximum":2678400,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorReadings"}}},"description":"The readings"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List sensor readings","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Stores readings staged with `POST /sensors/{siteId}/readings/upload`. Send the same site, measure and unit within an hour. Runs as a job.","operationId":"sensor.readings.import","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The site's id.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"inputToken":"<inputToken from sensor.reading.stage>","measure":"flow","unit":"mgd"},"schema":{"additionalProperties":false,"properties":{"inputToken":{"description":"The `inputToken` `POST /sensors/{siteId}/readings/upload` returned. Lasts one hour.","maxLength":8192,"minLength":1,"type":"string"},"measure":{"description":"The measure the readings are, as staged.","enum":["depth","velocity","flow","rain","stage","pressure","level","volume","battery"],"type":"string"},"unit":{"description":"The readings' unit, as staged, such as in, ft, m, ft/s, mgd, cfs or l/s. It must suit the measure.","maxLength":80,"minLength":1,"type":"string"}},"required":["measure","unit","inputToken"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Import readings","tags":["Sensors"]}},"/sensors/{siteId}/readings/live":{"get":{"description":"A site's readings for up to 31 days, from storage or straight from the vendor. Vendor reads are limited to 10 a minute.","operationId":"sensor.reading.live","parameters":[{"$ref":"#/components/parameters/siteId"},{"in":"query","name":"measure","required":true,"schema":{"$ref":"#/components/schemas/SensorMeasure"}},{"in":"query","name":"start","required":true,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"end","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Seconds per point. 0 or absent returns every reading, if they fit.","in":"query","name":"step","required":false,"schema":{"maximum":2678400,"minimum":0,"type":"integer"}},{"description":"Ask NWPS for USGS predictions even when stored observations cover the window.","in":"query","name":"forecast","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSensorReadings"}}},"description":"The readings"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List live sensor readings","tags":["Sensors"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/sensors/{siteId}/readings/sync":{"post":{"description":"Pulls the last 3 days of an ADS or FCS site's readings now. Runs as a job; stop it with `POST /sensors/fetch/stop`.","operationId":"sensor.readings.sync","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The ADS or FCS sensor site to pull.","in":"path","name":"siteId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Pull now","tags":["Sensors"]}},"/sensors/{siteId}/readings/upload":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Checks readings for one measure of a site and holds them for import. Up to 2,000,000 points and 96 MiB. Send the returned `inputToken` to `POST /sensors/{siteId}/readings` within an hour.","operationId":"sensor.reading.stage","parameters":[{"$ref":"#/components/parameters/siteId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorReadingsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"inputToken":{"type":"string"}},"required":["inputToken"],"type":"object"}}},"description":"Staged input"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start sensor readings import","tags":["Sensors"]}},"/services":{"post":{"description":"Adds an ArcGIS service or PMTiles archive, drawn live from its host. Check it first with `POST /projects/{projectId}/link-probe`: `layerIds` come from there, and a `loginToken` if it needs a login.","operationId":"service.add","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"layerIds":["0"],"name":"Parcels","projectId":"00000000-0000-0000-0000-000000000001","url":"https://services.example.com/arcgis/rest/services/Parcels/FeatureServer"},"schema":{"additionalProperties":false,"properties":{"layerIds":{"description":"The layers to draw, by their `id` in link.probe's `service.layers`. At least one, or none for a service drawn whole.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":200,"title":"Layers","type":"array","uniqueItems":true},"login":{"description":"The loginToken returned by probeLink for a working login.","maxLength":4096,"minLength":1,"type":"string"},"name":{"description":"The name shown in the project. Blank takes the name from the address.","maxLength":200,"title":"Name","type":"string"},"projectId":{"description":"The project's id. `GET /projects` lists them.","format":"uuid","type":"string"},"url":{"description":"The service's address, as link.probe returned it in `url`.","maxLength":2048,"minLength":1,"title":"Address","type":"string"}},"required":["url","name","layerIds","projectId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Add a service","tags":["Layers & data"]}},"/services/{serviceId}":{"delete":{"description":"Removes a service from the project. Its data stays where it's hosted. Can't be undone.","operationId":"service.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete service","tags":["Layers & data"]},"patch":{"description":"Changes a service's address, login or layers. Send the full `layerIds` list every time. A new address needs a new `login` from `POST /projects/{projectId}/link-probe`. Can't be undone.","operationId":"service.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"layerIds":["0","1"]},"schema":{"additionalProperties":false,"properties":{"dropLogin":{"description":"Removes the stored login. The service is then called without one.","type":"boolean"},"layerIds":{"description":"Every layer to draw after the change, by its id on the service (as link.probe lists them). Send the current list to keep it. Empty only for a service drawn whole.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":200,"title":"Layers","type":"array","uniqueItems":true},"login":{"description":"The loginToken returned by probeLink for a working login.","maxLength":4096,"minLength":1,"type":"string"},"url":{"description":"A new address for the service. Left out, the address stays.","maxLength":2048,"minLength":1,"title":"Address","type":"string"}},"required":["layerIds"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change service settings","tags":["Layers & data"]}},"/services/{serviceId}/definition":{"get":{"description":"A service's layers with their ids, geometry type, extent and `maxRecordCount`.","operationId":"service.definition","parameters":[{"$ref":"#/components/parameters/serviceId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDefinition"}}},"description":"The service's layers"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service didn't respond, or returned something that isn't a service."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get service definition","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/services/{serviceId}/image/legend":{"get":{"description":"An ArcGIS image service's legend. Only for services with a stored login.","operationId":"service.image.legend","parameters":[{"$ref":"#/components/parameters/serviceId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageLegend"}}},"description":"The legend, as returned by the service"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service refused the login, didn't respond, or returned an error."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get image legend","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/services/{serviceId}/labels/{labelId}":{"patch":{"description":"Creates or changes a label of one service layer (`subLayer`). For a new label send a new `labelId`; to change one send its `baseVersion` from `GET /services/{serviceId}/styles`.","operationId":"service.label.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The label's id from layer.style.list, or a new UUID of your own to create one.","in":"path","name":"labelId","required":true,"schema":{"format":"uuid","title":"Label","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"label":{"active":true,"layout":{"text-size":12},"paint":{"text-color":"#222222"},"property":"NAME"},"subLayer":"0"},"schema":{"additionalProperties":false,"properties":{"baseVersion":{"description":"The `version` you read from the styles list (layer.style.list, raster.style.list or service.style.list). If it changed since, the save is refused. For a label: required to change an existing one, left out to create a new one.","pattern":"^[0-9a-f]{32}$","type":"string"},"label":{"additionalProperties":false,"properties":{"active":{"description":"True shows the label on the map.","type":"boolean"},"layout":{"description":"MapLibre symbol layout properties, such as text-size and symbol-placement.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"paint":{"description":"MapLibre text and icon paint properties, such as text-color and text-halo-width.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"property":{"description":"The column the label shows. Null for none; an active label needs one.","maxLength":255,"minLength":1,"type":["string","null"]},"type":{"enum":["Symbol","Icon","Text"]}},"required":["property","active","paint","layout"],"title":"Label","type":"object"},"subLayer":{"description":"The service's own id for the layer: an id from link.probe's `service.layers` or service.definition's `layers`, such as \"0\".","maxLength":255,"minLength":1,"title":"Service layer","type":"string"}},"required":["subLayer","label"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save service labels","tags":["Layers & data"]}},"/services/{serviceId}/labels/{labelId}/delete":{"post":{"description":"Deletes a label of one service layer (`subLayer`).","operationId":"service.label.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The label's id.","in":"path","name":"labelId","required":true,"schema":{"format":"uuid","title":"Label","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"subLayer":"0"},"schema":{"additionalProperties":false,"properties":{"subLayer":{"description":"The service's own id for the layer: an id from link.probe's `service.layers` or service.definition's `layers`, such as \"0\".","maxLength":255,"minLength":1,"title":"Service layer","type":"string"}},"required":["subLayer"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete service label","tags":["Layers & data"]}},"/services/{serviceId}/layers/{layer}/attachments":{"get":{"description":"The attachments of the features with the given object ids on one layer of an ArcGIS feature service, grouped by feature. A feature with none is left out. Only for services with a stored login.","operationId":"service.attachment.query","parameters":[{"$ref":"#/components/parameters/serviceId"},{"description":"The service's own id for the layer.","in":"path","name":"layer","required":true,"schema":{"pattern":"^[0-9]{1,6}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The service's response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"502":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service refused the login or didn't respond."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List attachments of several features","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/services/{serviceId}/layers/{layer}/definition":{"get":{"description":"One ArcGIS feature service layer's fields, id field, attachments and relationships. Only for services with a stored login.","operationId":"service.layer.definition","parameters":[{"$ref":"#/components/parameters/serviceId"},{"description":"The service's own id for the layer.","in":"path","name":"layer","required":true,"schema":{"pattern":"^[0-9]{1,6}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The service's response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service refused the login, has no such layer, or didn't respond."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get service layer definition","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/services/{serviceId}/layers/{layer}/features/{objectId}/attachments":{"get":{"description":"One feature's attachments in an ArcGIS feature service. Only for services with a stored login.","operationId":"service.attachment.list","parameters":[{"$ref":"#/components/parameters/serviceId"},{"description":"The service's own id for the layer.","in":"path","name":"layer","required":true,"schema":{"pattern":"^[0-9]{1,6}$","type":"string"}},{"description":"The feature's object id on the service.","in":"path","name":"objectId","required":true,"schema":{"pattern":"^[0-9]{1,10}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The service's response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service refused the login or didn't respond."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List attachments","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/services/{serviceId}/layers/{layer}/query":{"get":{"description":"Queries one layer of an ArcGIS feature service. Takes standard ArcGIS query parameters (`where`, `outFields`, `geometry`, `f`…); others return 422. Only for services with a stored login.","operationId":"service.query","parameters":[{"$ref":"#/components/parameters/serviceId"},{"description":"The service's own id for the layer.","in":"path","name":"layer","required":true,"schema":{"pattern":"^[0-9]{1,6}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The service's response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"502":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service refused the login or didn't respond."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List service features","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/services/{serviceId}/layers/{layer}/related":{"get":{"description":"Queries related records on one layer of an ArcGIS feature service. Only for services with a stored login.","operationId":"service.related","parameters":[{"$ref":"#/components/parameters/serviceId"},{"description":"The service's own id for the layer.","in":"path","name":"layer","required":true,"schema":{"pattern":"^[0-9]{1,6}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"The service's response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"502":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The service refused the login or didn't respond."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List related records","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/services/{serviceId}/move":{"post":{"description":"Moves a service within its group: `front`, `forward`, `backward` or `back`.","operationId":"service.move","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"step":"front"},"schema":{"additionalProperties":false,"properties":{"step":{"enum":["front","forward","backward","back"],"title":"Where","type":"string"}},"required":["step"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Move service","tags":["Layers & data"]}},"/services/{serviceId}/place":{"post":{"description":"Moves a service into a group (`groupId`, or null for none), below the item in `below` or at the top.","operationId":"service.place","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"groupId":null},"schema":{"additionalProperties":false,"properties":{"below":{"description":"An item of that group (a layer, raster or service) to go directly below. Left out, the top of the group.","format":"uuid","title":"Below","type":"string"},"groupId":{"description":"The group to put it in, from project.contents. Null for no group.","oneOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Group"}},"required":["groupId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Put service in a group","tags":["Layers & data"]}},"/services/{serviceId}/rename":{"post":{"description":"Renames a service.","operationId":"service.rename","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"County parcels"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"New name","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Rename service","tags":["Layers & data"]}},"/services/{serviceId}/styles":{"get":{"description":"A service's styles and labels, by layer, with the active ones marked.","operationId":"service.style.list","parameters":[{"$ref":"#/components/parameters/serviceId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceStyles"}}},"description":"The service's styles and labels"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List service styles","tags":["Layers & data"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Adds a style to one service layer (`subLayer`) and uses it. You choose its `styleId`.","operationId":"service.style.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"style":{"category":"FeatureSingleSymbol","featureSingleSymbol":{"paint":{"circle-color":"#e31a1c","circle-radius":4}}},"styleId":"00000000-0000-0000-0000-000000000007","subLayer":"0"},"schema":{"additionalProperties":false,"properties":{"style":{"additionalProperties":false,"properties":{"category":{"description":"type: how the layer draws: Circle or Symbol for points, Line for lines, Fill or Line for polygons. category: which block draws it, singleSymbol, categorical or graduated (rasters: simple, categorical, graduated, hillshade; services: featureSingleSymbol and so on); that block is required, and blocks left out are kept.","enum":["FeatureSingleSymbol","FeatureCategorical","FeatureGraduated","RasterSimple","RasterCategorical","RasterGraduated"]},"featureCategorical":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"},"value":{"maxLength":500,"type":"string"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","classes"],"type":"object"},"featureGraduated":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","equalInterval","classes"],"type":"object"},"featureSingleSymbol":{"additionalProperties":false,"properties":{"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["paint"],"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"rasterCategorical":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"value":{"type":"number"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","paint","classes"],"type":"object"},"rasterGraduated":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"linearContrast":{"maximum":1,"minimum":-1,"type":["number","null"]},"linearMax":{"type":["number","null"]},"linearMin":{"type":["number","null"]},"linearOpacity":{"maximum":1,"minimum":0,"type":["number","null"]},"linearSaturation":{"maximum":1,"minimum":-1,"type":["number","null"]},"mode":{"enum":["EqualInterval","Manual","Linear"],"type":"string"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","mode","equalInterval","linearMin","linearMax","linearOpacity","linearContrast","linearSaturation","classes","paint"],"type":"object"},"rasterSimple":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":["integer","null"]},"max":{"type":["number","null"]},"min":{"type":["number","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","min","max","paint"],"type":"object"}},"required":["category"],"title":"Style","type":"object"},"styleId":{"format":"uuid","title":"New style's id","type":"string"},"subLayer":{"description":"The service's own id for the layer: an id from link.probe's `service.layers` or service.definition's `layers`, such as \"0\".","maxLength":255,"minLength":1,"title":"Service layer","type":"string"}},"required":["subLayer","styleId","style"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save as new service style","tags":["Layers & data"]}},"/services/{serviceId}/styles/{styleId}":{"patch":{"description":"Changes a service layer's style. Send its `version` from `GET /services/{serviceId}/styles` as `baseVersion` (409 if it changed since).","operationId":"service.style.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Left out: the style in use, as a request to change how it looks means.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"baseVersion":"0123456789abcdef0123456789abcdef","style":{"category":"FeatureSingleSymbol","featureSingleSymbol":{"paint":{"circle-color":"#e31a1c","circle-radius":4}}},"subLayer":"0"},"schema":{"additionalProperties":false,"properties":{"baseVersion":{"description":"The `version` you read from the styles list; if it changed since, the save is refused. Left out with styleId: the style in use as it is now.","pattern":"^[0-9a-f]{32}$","type":"string"},"label":{"additionalProperties":false,"properties":{"baseVersion":{"description":"The `version` you read from the styles list (layer.style.list, raster.style.list or service.style.list). If it changed since, the save is refused. For a label: required to change an existing one, left out to create a new one.","pattern":"^[0-9a-f]{32}$","type":"string"},"label":{"additionalProperties":false,"properties":{"active":{"description":"True shows the label on the map.","type":"boolean"},"layout":{"description":"MapLibre symbol layout properties, such as text-size and symbol-placement.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"paint":{"description":"MapLibre text and icon paint properties, such as text-color and text-halo-width.","maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"property":{"description":"The column the label shows. Null for none; an active label needs one.","maxLength":255,"minLength":1,"type":["string","null"]},"type":{"enum":["Symbol","Icon","Text"]}},"required":["property","active","paint","layout"],"title":"Label","type":"object"},"labelId":{"description":"The label's id from layer.style.list, or a new UUID of your own to create one.","format":"uuid","title":"Label","type":"string"}},"required":["labelId","label"],"type":"object"},"style":{"additionalProperties":false,"properties":{"category":{"description":"type: how the layer draws: Circle or Symbol for points, Line for lines, Fill or Line for polygons. category: which block draws it, singleSymbol, categorical or graduated (rasters: simple, categorical, graduated, hillshade; services: featureSingleSymbol and so on); that block is required, and blocks left out are kept.","enum":["FeatureSingleSymbol","FeatureCategorical","FeatureGraduated","RasterSimple","RasterCategorical","RasterGraduated"]},"featureCategorical":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"},"value":{"maxLength":500,"type":"string"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","classes"],"type":"object"},"featureGraduated":{"additionalProperties":false,"properties":{"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"property":{"maxLength":255,"minLength":1,"type":"string"},"propertyLegend":{"maxLength":120,"type":"string"}},"required":["property","legendFormat","legendPrecision","propertyLegend","equalInterval","classes"],"type":"object"},"featureSingleSymbol":{"additionalProperties":false,"properties":{"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["paint"],"type":"object"},"name":{"maxLength":120,"type":["string","null"]},"rasterCategorical":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"value":{"type":"number"}},"required":["isActive","value","paint"],"type":"object"},"maxItems":256,"type":"array"},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","paint","classes"],"type":"object"},"rasterGraduated":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":"integer"},"classes":{"items":{"additionalProperties":false,"properties":{"end":{"type":"number"},"isActive":{"type":"boolean"},"legend":{"maxLength":200,"type":["string","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"},"start":{"type":"number"}},"required":["isActive","start","end","paint"],"type":"object"},"maxItems":256,"type":"array"},"equalInterval":{"maximum":10,"minimum":2,"type":["integer","null"]},"legendFormat":{"maxLength":100,"minLength":1,"type":"string"},"legendPrecision":{"maximum":10,"minimum":0,"type":"integer"},"linearContrast":{"maximum":1,"minimum":-1,"type":["number","null"]},"linearMax":{"type":["number","null"]},"linearMin":{"type":["number","null"]},"linearOpacity":{"maximum":1,"minimum":0,"type":["number","null"]},"linearSaturation":{"maximum":1,"minimum":-1,"type":["number","null"]},"mode":{"enum":["EqualInterval","Manual","Linear"],"type":"string"},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","legendFormat","legendPrecision","mode","equalInterval","linearMin","linearMax","linearOpacity","linearContrast","linearSaturation","classes","paint"],"type":"object"},"rasterSimple":{"additionalProperties":false,"properties":{"band":{"maximum":65535,"minimum":1,"type":["integer","null"]},"max":{"type":["number","null"]},"min":{"type":["number","null"]},"paint":{"maxProperties":60,"propertyNames":{"maxLength":100,"minLength":1},"type":"object"}},"required":["band","min","max","paint"],"type":"object"}},"required":[],"title":"Style","type":"object"},"subLayer":{"description":"The service's own id for the layer, such as \"0\". Left out where the service shows one layer.","maxLength":255,"minLength":1,"title":"Service layer","type":"string"}},"required":["style"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save service style","tags":["Layers & data"]}},"/services/{serviceId}/styles/{styleId}/activate":{"post":{"description":"Makes a saved style the one a service layer (`subLayer`) is drawn with.","operationId":"service.style.activate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The style's id.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"subLayer":"0"},"schema":{"additionalProperties":false,"properties":{"subLayer":{"description":"The service's own id for the layer: an id from link.probe's `service.layers` or service.definition's `layers`, such as \"0\".","maxLength":255,"minLength":1,"title":"Service layer","type":"string"}},"required":["subLayer"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Use service style","tags":["Layers & data"]}},"/services/{serviceId}/styles/{styleId}/delete":{"post":{"description":"Deletes a service layer's style.","operationId":"service.style.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The service's id.","in":"path","name":"serviceId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The style's id.","in":"path","name":"styleId","required":true,"schema":{"format":"uuid","title":"Style","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"subLayer":"0"},"schema":{"additionalProperties":false,"properties":{"subLayer":{"description":"The service's own id for the layer: an id from link.probe's `service.layers` or service.definition's `layers`, such as \"0\".","maxLength":255,"minLength":1,"title":"Service layer","type":"string"}},"required":["subLayer"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete service style","tags":["Layers & data"]}},"/simulations":{"get":{"description":"Every simulation you can see in the workspace, newest first: its own runs outside any\nproject, and the runs of each of its projects. `projectId` lists one project's, in this\nworkspace or shared with you.\n","operationId":"file_run.list","parameters":[{"description":"One engine's runs: swmm, epanet or hecras.","in":"query","name":"type","schema":{"enum":["swmm","epanet","hecras"],"type":"string"}},{"description":"One project's runs.","in":"query","name":"projectId","schema":{"format":"uuid","type":"string"}},{"description":"One model's runs.","in":"query","name":"modelId","schema":{"format":"uuid","type":"string"}},{"description":"One model run's simulations: the `created.id` that running a project's model answers.","in":"query","name":"runId","schema":{"format":"uuid","type":"string"}},{"description":"Those in one state.","in":"query","name":"status","schema":{"$ref":"#/components/schemas/SimulationState"}},{"description":"The last page's `next`. Leave it out for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"How many to return.","in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Simulation"},"type":"array"},"next":{"description":"Send it as `cursor` for the next page. Null on the last page.","type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"The runs"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List simulations","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Runs a simulation of a model file, or of a project's model. Billed once it starts.\n\nA file without a project: send it as `input` (from `POST /uploads`, up to 64 GiB) or a public `url`. HEC-RAS also needs `planNumber`. Follow `created` with `GET /simulations/{simulationId}`.\n\nA file in a project: add `projectId`. SWMM or EPANET only, uploaded with that `projectId` or from a `url`, up to 256 MB. The project owner's wallet pays. Follow `created` with `GET /simulations/{simulationId}`.\n\nA project's model: send `modelId` in place of a file, with the run's own fields: `planId` for a HEC-RAS plan (or `plan`), `scenarioIds` for SWMM or EPANET (or one `scenarioId`). The model's project is the run's, and you must be allowed to run models there. The answer's `created` is the model's run; list its simulations with `GET /simulations` and `runId`.","operationId":"simulation.run","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"epanet-file-by-link-no-project":{"summary":"EPANET file by link, no project","value":{"type":"epanet","url":"https://example.com/models/network.inp"}},"hec-ras-project-zip-by-upload-no-project":{"summary":"HEC-RAS project zip by upload, no project","value":{"computeSize":"standard","floodplainMaps":true,"input":{"parts":[{"etag":"\"3858f62230ac3c915f300c664312c11f\"","number":1}],"upload":"<upload from POST /uploads>"},"planNumber":"p01","runner":"windows","type":"hecras"}},"swmm-file-by-upload-no-project":{"summary":"SWMM file by upload, no project","value":{"input":{"parts":[{"etag":"\"3858f62230ac3c915f300c664312c11f\"","number":1}],"upload":"<upload from POST /uploads>"},"name":"Downtown test","type":"swmm"}},"swmm-file-in-a-project":{"summary":"SWMM file in a project","value":{"name":"Downtown test","projectId":"00000000-0000-0000-0000-000000000001","type":"swmm","url":"https://example.com/models/downtown.inp"}}},"schema":{"anyOf":[{"additionalProperties":false,"description":"An .inp, or a zip holding one and the files it names. In a project or without one.","properties":{"engineVersion":{"description":"The engine version, one that GET /engines offers for the type. Default is the newest stable version offered. A preview is never a default.","enum":["5.1.15","5.2.1","5.2.2","5.2.3","5.2.4","6.0.0-alpha.4","2.2","2.3","2.3.1","2.3.2","2.3.3","6.0.0-alpha.3"],"title":"Engine version","type":"string"},"input":{"additionalProperties":false,"description":"The file, sent with POST /uploads (with the run's projectId, if any): an .inp, a zip holding one and the files it names, or for HEC-RAS the project's zip. Send the upload and the ETag of each part. Give this or url.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"File","type":"object"},"name":{"description":"What the run is called. The file's name when left out.","maxLength":120,"title":"Name","type":"string"},"projectId":{"description":"The project the run is kept in. Leave it out for the workspace's own run.","format":"uuid","type":"string"},"type":{"description":"swmm or epanet.","enum":["swmm","epanet"],"title":"Engine","type":"string"},"url":{"description":"A public link to the file, run in place of input: the server fetches it. An .inp or a zip holding one, 256 MB at most; for HEC-RAS, the project's zip, 1 GiB at most, downloaded before the answer: send a larger one as input.","maxLength":2048,"minLength":1,"title":"Link","type":"string"}},"required":["type"],"title":"SWMM or EPANET file","type":"object"},{"additionalProperties":false,"description":"A HEC-RAS project's zip and the plan to run. Without a project only: in one, run a HEC-RAS model's plan with model.run.","properties":{"computeSize":{"description":"HEC-RAS on Windows only. The machine, each billed at its own hourly rate: standard (4 cores, 32 GB) 1.5 credits an hour, large (6 fast cores, 48 GB) 3, xlarge (12 fast cores, 96 GB) 6.","enum":["standard","large","xlarge"],"title":"Machine","type":"string"},"depthThreshold":{"description":"HEC-RAS on Windows only. The least depth, in the model's units, the floodplain maps show. Default 0.1.","minimum":0,"title":"Depth threshold","type":"number"},"engineVersion":{"description":"The engine version, one that GET /engines offers for the type. Default is the newest stable version offered. A preview is never a default.","enum":["6.6","7.0.1","7.0.2"],"title":"Engine version","type":"string"},"floodplainMaps":{"description":"HEC-RAS on Windows only. Whether RAS Mapper writes the depth maps after the compute. Default false.","title":"Floodplain maps","type":"boolean"},"input":{"additionalProperties":false,"description":"The file, sent with POST /uploads (with the run's projectId, if any): an .inp, a zip holding one and the files it names, or for HEC-RAS the project's zip. Send the upload and the ETag of each part. Give this or url.","properties":{"parts":{"items":{"additionalProperties":false,"properties":{"etag":{"maxLength":200,"minLength":1,"type":"string"},"number":{"maximum":10000,"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"maxItems":10000,"minItems":1,"type":"array"},"upload":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"title":"File","type":"object"},"name":{"description":"What the run is called. The file's name when left out.","maxLength":120,"title":"Name","type":"string"},"planNumber":{"description":"HEC-RAS only, and required for it: the plan in the project's zip to run, such as p01 (its .p01 file). 01 is the same plan.","pattern":"^[pP]?[0-9]{2,3}$","title":"Plan","type":"string"},"preprocess":{"description":"HEC-RAS only. Whether the geometry's hydraulic tables are computed before the plan runs. Default false.","title":"Preprocess","type":"boolean"},"runner":{"description":"HEC-RAS only. Where the plan computes: windows (the default), or linux, which needs the files a Windows compute writes.","enum":["windows","linux"],"title":"Runner","type":"string"},"type":{"const":"hecras","title":"Engine","type":"string"},"url":{"description":"A public link to the file, run in place of input: the server fetches it. An .inp or a zip holding one, 256 MB at most; for HEC-RAS, the project's zip, 1 GiB at most, downloaded before the answer: send a larger one as input.","maxLength":2048,"minLength":1,"title":"Link","type":"string"},"useExistingResults":{"description":"HEC-RAS on Windows only. Whether the maps are made from results already in the zip, without computing the plan. Default false.","title":"Use existing results","type":"boolean"}},"required":["type","planNumber"],"title":"HEC-RAS project","type":"object"},{"additionalProperties":false,"description":"Every field is optional: none runs the model as it is. One simulation runs per scenario and rain, at most 50.","properties":{"boundarySetId":{"description":"SWMM only. A saved set of outfall stages (run.set.create) in place of the model's own.","format":"uuid","type":"string"},"dryDays":{"description":"SWMM only. Days without rain before the run starts. Only with window, as for steps.","maximum":3650,"minimum":0,"title":"Antecedent dry days","type":"number"},"engineVersion":{"description":"Any SWMM version from GET /engines, the newest stable one by default (a preview runs only when named). A model with a 2D surface must name OpenSWMM 6 (6.0.0-alpha.4). 6.0.0-alpha.3 is retired and runs on 6.0.0-alpha.4.","enum":["5.1.15","5.2.1","5.2.2","5.2.3","5.2.4","6.0.0-alpha.4","6.0.0-alpha.3"],"title":"Engine version","type":"string"},"inflowSetId":{"description":"SWMM only. A saved set of dry weather and direct inflows (run.set.create) in place of the model's own.","format":"uuid","type":"string"},"modelId":{"description":"The project's model to run: one from `GET /models`. Its project is the run's.","format":"uuid","type":"string"},"name":{"description":"What the run is called. Default: its rain and scenarios, such as \"Model as it is · Base\".","maxLength":120,"title":"Name","type":"string"},"options":{"additionalProperties":{"maxLength":200,"type":"string"},"description":"SWMM only. SWMM options for this run, by name, overriding the model's own.","maxProperties":40,"propertyNames":{"pattern":"^[A-Za-z_]{1,40}$"},"title":"Options","type":"object"},"periodId":{"description":"SWMM only. One of the project's saved periods, its dates, steps and dry days, in place of window.","format":"uuid","type":"string"},"rain":{"description":"SWMM only. Each item is {\"storm\": name}, a storm in the model (`GET /projects/{projectId}/models/{modelId}/rain` lists them), or {\"inputId\": id}, rain from the project's run inputs (`run.input.list`, rainfall). Each runs as one simulation per scenario. None runs the gauges as they are now.","items":{"additionalProperties":false,"maxProperties":1,"minProperties":1,"properties":{"inputId":{"format":"uuid","type":"string"},"storm":{"maxLength":200,"minLength":1,"type":"string"}},"type":"object"},"maxItems":20,"title":"Rain","type":"array"},"scenarioIds":{"description":"SWMM or EPANET. The model scenarios to run, each as one simulation per rain. None runs the network itself (Base).","items":{"format":"uuid","type":"string"},"maxItems":20,"title":"Scenarios","type":"array"},"steps":{"additionalProperties":false,"description":"SWMM only. Report, wet, dry and routing steps in seconds. Only with window: refused with periodId, which brings its own, and without dates.","properties":{"dry":{"exclusiveMinimum":0,"maximum":86400,"type":"number"},"report":{"exclusiveMinimum":0,"maximum":86400,"type":"number"},"routing":{"exclusiveMinimum":0,"maximum":86400,"type":"number"},"wet":{"exclusiveMinimum":0,"maximum":86400,"type":"number"}},"title":"Steps","type":"object"},"studyId":{"description":"SWMM only. The running study of this model that the run belongs to. The run is listed inside the study, not among the model's runs. An optimizer study's runs count against its simulations. A calibration study's trials name it through the generator's token.","format":"uuid","title":"Study","type":"string"},"window":{"additionalProperties":false,"description":"SWMM only. The run's start and end in the project's time zone, YYYY-MM-DDTHH:MM. None uses the model's own. Send this or periodId, not both.","properties":{"end":{"pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$","type":"string"},"start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$","type":"string"}},"required":["start","end"],"title":"Dates","type":"object"}},"required":["modelId"],"title":"SWMM model in a project","type":"object"},{"additionalProperties":false,"description":"Every field is optional: none runs the network as it is (Base).","properties":{"modelId":{"description":"The project's model to run: one from `GET /models`. Its project is the run's.","format":"uuid","type":"string"},"name":{"description":"What the run is called. Default: its rain and scenarios, such as \"Model as it is · Base\".","maxLength":120,"title":"Name","type":"string"},"scenarioIds":{"description":"SWMM or EPANET. The model scenarios to run, each as one simulation per rain. None runs the network itself (Base).","items":{"format":"uuid","type":"string"},"maxItems":20,"title":"Scenarios","type":"array"}},"required":["modelId"],"title":"EPANET model in a project","type":"object"},{"additionalProperties":false,"description":"One plan of the model, which must be ready (hecras.status).","properties":{"computeSize":{"description":"HEC-RAS on Windows only. The machine, each billed at its own hourly rate: standard (4 cores, 32 GB) 1.5 credits an hour, large (6 fast cores, 48 GB) 3, xlarge (12 fast cores, 96 GB) 6.","enum":["standard","large","xlarge"],"title":"Machine","type":"string"},"derivedPlanId":{"description":"HEC-RAS only. A plan made in NEER (`POST /models/{modelId}/hecras/plans`), such as n1, from the model's hecras.madePlans. It runs its base plan with its changes, its scenario's edits written first. Send that base plan (its basePlanId) as planId.","pattern":"^n[0-9]+$","title":"Plan made here","type":"string"},"engineVersion":{"description":"6.6, 7.0.1 or 7.0.2, and only 7.0.1 or 7.0.2 on Linux. By default, the plan's linuxEngine on Linux and the model's hecras.defaultEngine on Windows.","enum":["6.6","7.0.1","7.0.2"],"title":"Engine version","type":"string"},"modelId":{"description":"The project's model to run: one from `GET /models`. Its project is the run's.","format":"uuid","type":"string"},"planId":{"description":"HEC-RAS only, and required for it. The imported plan to run, such as p01, from the model's hecras.plans. A HEC-RAS run takes only planId, derivedPlanId, runner, engineVersion and computeSize.","pattern":"^[pP][0-9]{2,3}$","title":"Plan","type":"string"},"runner":{"description":"HEC-RAS only. Where the plan computes. Linux needs the files a Windows compute writes; the plan's linuxMissing lists any it lacks. A plan made in NEER is refused on Windows when Linux can run it. By default, Linux when the files allow, otherwise Windows.","enum":["linux","windows"],"title":"Runner","type":"string"}},"required":["planId","modelId"],"title":"HEC-RAS model in a project","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Run a simulation","tags":["Model runs"]}},"/simulations/{simulationId}":{"delete":{"description":"Hides a model simulation (`simulationId`) from the model's runs. A running simulation finishes and is billed.","operationId":"simulation.delete","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"A simulation of the model, from `model.run.list` or `model.run.get`.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Delete simulation","tags":["Model runs"]},"get":{"description":"Returns a simulation and its state: `queued`, `starting`, `running`, `finishing`, `done`,\n`failed` or `stuck`.\n","operationId":"file_run.get","parameters":[{"in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Simulation"}}},"description":"The simulation"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get simulation","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/calibration-scorecard":{"get":{"description":"Scores a run against each registered calibration event its window holds, at the event's\nmeter, judged by a criteria set: the one you name with `criteriaSetId` (`us`, `wapug` or\na stored set's id), or the project's enforced set. Each row passes or fails each measure's\nchecks (volume, peak, depth and timing, as the set asks) with the fit statistics beside\nthem; `meters` gives each meter's verdict and `summary` the counts.\n\nA long run can take longer to score than one request waits. Until it's ready the answer is\n`200` with `{ scoring: true, simulationId }`: ask again with the same parameters every few\nseconds until the card comes back. A run that hasn't written its results yet answers 404.\n","operationId":"simulation.scorecard","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A criteria set the project can use, built-in (us, wapug) or stored.","in":"query","name":"criteriaSetId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CalibrationScorecard"},{"$ref":"#/components/schemas/ScorecardScoring"}]}}},"description":"The scorecard"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get calibration scorecard","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/calibration-scorecard/trace":{"get":{"description":"The meter's and the model's series for one scorecard event, up to 2,000 points, with the\nchecks the card judged it by. Returns `{ scoring: true, simulationId }` while the card is\nstill scoring: ask again in a few seconds.\n","operationId":"simulation.scorecard.trace","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A registered event the run covers.","in":"query","name":"eventId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A criteria set the project can use, built-in (us, wapug) or stored.","in":"query","name":"criteriaSetId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScorecardTrace"},{"$ref":"#/components/schemas/ScorecardScoring"}]}}},"description":"The event's series"},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get scorecard event","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/calibration-scorecard/traces":{"get":{"description":"The meter and model series for every event in a run's scorecard, in the card's row order.\nReturns `{ scoring: true, simulationId }` while the card is still scoring: ask again in a\nfew seconds.\n","operationId":"simulation.scorecard.traces","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A criteria set the project can use, built-in (us, wapug) or stored.","in":"query","name":"criteriaSetId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScorecardTraces"},{"$ref":"#/components/schemas/ScorecardScoring"}]}}},"description":"The series for each covered event."},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List scorecard events","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/cancel":{"post":{"description":"Stops a queued or running simulation, in a project or outside one. It ends `failed`, and what it ran before it stopped is billed. A HEC-RAS plan on Windows can't be stopped (409).","operationId":"simulation.cancel","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The simulation to stop: the `id` in `created` from `POST /simulations`, or one from `GET /simulations`.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","title":"Simulation","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Stop a simulation","tags":["Model runs"]}},"/simulations/{simulationId}/files":{"get":{"description":"A simulation's inputs, report and outputs, each with a download link.\n","operationId":"file_run.file.list","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SimulationFile"},"type":"array"}}},"description":"The files"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List simulation files","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/files.zip":{"get":{"description":"Every file a simulation has, in one zip named simulation-{id}.zip, sent as it is read. A folder, and a file not yet written, are left out. Returns 404 when the simulation has no files.","operationId":"file_run.zip","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"The zip"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download simulation files","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/files/{fileId}":{"get":{"description":"Redirects (302) to one of the run's files for 5 minutes, as a download under its own name. Use it for the full report when the report's text stops at 2 MiB, or for the output to use in another tool.","operationId":"file_run.file","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The file's id, from `GET /simulations/{simulationId}/files`.","in":"path","name":"fileId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"302":{"description":"Redirect to the file","headers":{"Location":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download a simulation file","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/input":{"get":{"description":"The .inp file a SWMM or EPANET simulation ran, as text.\n","operationId":"file_run.input","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationInput"}}},"description":"The input file"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download simulation input","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/report":{"get":{"description":"A simulation's times, balances, warnings and errors, plus the report text (up to 2 MiB).\nReturns 404 until it's written.\n","operationId":"file_run.report","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Whether to send the report's text. Leave it false to read the summary, balances, errors and warnings alone: a large model's text runs to megabytes.","in":"query","name":"text","required":false,"schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationReport"}}},"description":"The report"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get simulation report","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/report.json":{"get":{"description":"A simulation's full `report.json`, up to 64 MiB. Returns 404 until it's written.\n","operationId":"file_run.report_file","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationReportFile"}}},"description":"The report.json"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Download simulation report","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/results":{"get":{"description":"A simulation's engine, start, flow units, periods, and the metrics and element ids for each\nclass. Returns 404 until written.\n","operationId":"file_run.results","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Results"}}},"description":"The results' index"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get simulation results","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/simulations/{simulationId}/results/{class}/{metric}/elements":{"get":{"description":"A metric's values at every period for the element ids you ask for, in a simulation.","operationId":"file_run.result.elements","parameters":[{"description":"The simulation's id.","in":"path","name":"simulationId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"class","required":true,"schema":{"$ref":"#/components/schemas/ResultsClassName"}},{"in":"path","name":"metric","required":true,"schema":{"type":"string"}},{"description":"One to 24 comma-separated engine element IDs, each 1 to 200 characters.","in":"query","name":"ids","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResultElementSeries"},"type":"array"}}},"description":"The result"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get result series by element","tags":["Model runs"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/surveys":{"post":{"description":"Creates a survey in the current workspace with an empty draft. You choose its `id`. Add questions with `PATCH /surveys/{surveyId}/draft`, then open it with `POST /surveys/{surveyId}/publish`.","operationId":"survey.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"description":"Report a light that's out","id":"00000000-0000-0000-0000-000000000001","name":"Street light outages"},"schema":{"additionalProperties":false,"properties":{"description":{"maxLength":500,"title":"Description","type":["string","null"]},"id":{"description":"The new survey's id, a UUID you generate. Reusing one returns 409.","format":"uuid","type":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"}},"required":["id","name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New survey","tags":["Surveys"]}},"/surveys/{surveyId}":{"get":{"description":"Returns a survey, its versions (newest first) and its public link. The draft is the version with no `publishedAt`; its `version` and `schema` are what `PATCH /surveys/{surveyId}/draft` takes as `was`.","operationId":"survey.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Survey"}}},"description":"The survey"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get survey","tags":["Surveys"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}}],"patch":{"description":"Changes a survey's name or description. Send each current value in `was` (409 if it changed since). Change its look with `PATCH /surveys/{surveyId}/draft`.","operationId":"survey.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"set":{"name":"Street light reports"},"was":{"name":"Street light outages"}},"schema":{"additionalProperties":false,"properties":{"set":{"additionalProperties":false,"minProperties":1,"properties":{"description":{"maxLength":500,"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"}},"type":"object"},"was":{"additionalProperties":true,"description":"Each key in `set` with its value as you read it, for example {\"name\": \"Street lights\"}. Required for every key in `set`. A value that changed since returns 409.","type":"object"}},"required":["set","was"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Edit survey details","tags":["Surveys"]}},"/surveys/{surveyId}/archive":{"post":{"description":"Archives a survey. Its link stops taking responses; responses are kept.","operationId":"survey.archive","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Archive survey","tags":["Surveys"]}},"/surveys/{surveyId}/draft":{"patch":{"description":"Saves a survey's questions and look as its draft. Send the draft's `version` and `schema` from `GET /surveys/{surveyId}` as `was` (both null when there's no draft; 409 if it changed since). Nothing goes live until `POST /surveys/{surveyId}/publish`.","operationId":"survey.draft.save","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"schema":{"fields":[{"key":"pole_number","label":"Pole number","type":"string"},{"key":"problem","label":"Problem","options":[{"label":"Light out","value":"out"},{"label":"Flickering","value":"flicker"}],"type":"dropdown"},{"geometryType":"POINT","key":"location","label":"Where is it?","projectId":"00000000-0000-0000-0000-0000000000a1","type":"map"}]},"was":{"schema":{"fields":[],"version":1},"version":1}},"schema":{"additionalProperties":false,"properties":{"schema":{"description":"The whole draft, in the same format survey.get returns for a version and survey.preview accepts. `fields` is the questions in order, at most 200. Each has `type` (string, textarea, number, integer, dropdown, multiselect, boolean, date, datetime, map, photo, email, phone or section), `key` (1 to 40 lowercase letters, digits or underscores, unique; answers are stored under it) and `label`, plus its type's settings: `options` [{value, label}] for dropdown and multiselect; `projectId` and `geometryType` (POINT, LINESTRING or POLYGON) for map. Optional `header`, `footer` and `theme` set its look; a picture is {\"uri\": ...} from survey.picture.upload.","properties":{"fields":{"maxItems":200,"type":"array"}},"required":["fields"],"type":"object"},"was":{"description":"The draft as you read it, with its version and schema, both null when there was no draft. If the draft changed since, the save is refused.","properties":{"schema":{"type":["object","null"]},"version":{"type":["integer","null"]}},"required":["version","schema"],"type":"object"}},"required":["schema","was"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Save survey draft","tags":["Surveys"]}},"/surveys/{surveyId}/draft/discard":{"post":{"description":"Discards a survey's unpublished draft. Returns 422 if the survey was never published (archive it instead).","operationId":"survey.draft.discard","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Discard survey draft","tags":["Surveys"]}},"/surveys/{surveyId}/duplicate":{"post":{"description":"Copies a survey as a new unpublished survey. You choose the copy's `id`. Header and footer pictures aren't copied.","operationId":"survey.duplicate","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"id":"00000000-0000-0000-0000-000000000002"},"schema":{"additionalProperties":false,"properties":{"id":{"description":"The copy's id, a UUID you generate.","format":"uuid","type":"string"}},"required":["id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Duplicate survey","tags":["Surveys"]}},"/surveys/{surveyId}/link":{"patch":{"description":"Pauses or reopens a published survey's link, and sets a response cap (`maxSubmissions`) or close date (`expiresAt`). Send only the fields to change.","operationId":"survey.link.update","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"expiresAt":"2026-12-31T23:59:00-05:00","maxSubmissions":500},"schema":{"additionalProperties":false,"minProperties":2,"properties":{"expiresAt":{"description":"The link closes at this time, an RFC 3339 date-time with its offset, after now. Null removes the close date.","format":"date-time","title":"Close date","type":["string","null"]},"maxSubmissions":{"description":"The link closes at this many responses, no fewer than it has already. Null allows any number.","maximum":1000000,"minimum":1,"title":"Response cap","type":["integer","null"]},"open":{"description":"Off pauses the link. On reopens it. Neither publishes a version.","title":"Open","type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change survey link","tags":["Surveys"]}},"/surveys/{surveyId}/pictures":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Returns an upload URL for a survey picture, valid for 15 minutes. PUT the file there, then save its `uri` in the draft with `PATCH /surveys/{surveyId}/draft`.","operationId":"survey.picture.upload","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"byteSize":{"maximum":5242880,"minimum":1,"type":"integer"},"contentType":{"enum":["image/png","image/jpeg","image/webp"],"type":"string"}},"required":["contentType","byteSize"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PictureUpload"}}},"description":"The upload URL"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Start survey picture upload","tags":["Surveys"]}},"/surveys/{surveyId}/preview":{"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Shows how a survey schema would look as the public form, without saving. Returns 422 with the reason if the schema is invalid.","operationId":"survey.preview","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"schema":{"$ref":"#/components/schemas/SurveySchema"}},"required":["schema"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicForm"}}},"description":"The form"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Preview survey","tags":["Surveys"]}},"/surveys/{surveyId}/publish":{"post":{"description":"Publishes the draft as the survey's live version and opens its link. Returns 422 with every problem found if the draft can't be published. Can't be previewed or undone.","operationId":"survey.publish","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Publish survey","tags":["Surveys"]}},"/surveys/{surveyId}/responses":{"get":{"description":"Responses to a survey, newest first, 50 per page. `status` filters by status.","operationId":"survey.response.list","parameters":[{"description":"The last page's `next`. Leave it out for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next":{"description":"Send it as `cursor` for the next page. Null on the last page.","type":["string","null"]},"page":{"minimum":0,"type":"integer"},"pageSize":{"minimum":1,"type":"integer"},"rows":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"receivedAt":{"type":"string"},"reference":{"type":["string","null"]},"reviewedAt":{"type":["string","null"]},"reviewedBy":{"type":["string","null"]},"status":{"enum":["received","under_review","accepted","rejected","spam"],"type":"string"},"values":{"additionalProperties":true,"type":"object"},"version":{"type":"integer"}},"required":["id","version","status","receivedAt","reference","values","reviewedAt","reviewedBy"],"type":"object"},"type":"array"},"statusCounts":{"properties":{"accepted":{"type":"integer"},"received":{"type":"integer"},"rejected":{"type":"integer"},"spam":{"type":"integer"},"under_review":{"type":"integer"}},"required":["received","under_review","accepted","rejected","spam"],"type":"object"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total","page","pageSize","statusCounts"],"type":"object"}}},"description":"A page of responses"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"List survey responses","tags":["Surveys"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only responses with this status. Omitted or empty, every status.","in":"query","name":"status","schema":{"enum":["","received","under_review","accepted","rejected","spam"],"type":"string"}}]},"/surveys/{surveyId}/responses/export":{"get":{"description":"Downloads a survey's responses as CSV or GeoJSON, oldest first, optionally for one status.\nUp to 50,000 responses.\n","operationId":"survey.response.export","parameters":[],"responses":{"200":{"content":{"application/geo+json":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"}},"summary":"Export survey responses","tags":["Surveys"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"csv for a CSV file, geojson for a GeoJSON feature collection.","in":"query","name":"format","required":true,"schema":{"enum":["csv","geojson"],"type":"string"}},{"description":"Only responses with this status. Omitted, every status.","in":"query","name":"status","schema":{"enum":["received","under_review","accepted","rejected","spam"],"type":"string"}}]},"/surveys/{surveyId}/responses/map":{"get":{"description":"One map feature per drawn answer to a survey's map questions. Up to the newest 2,000;\n`capped` is true when there are more.\n","operationId":"survey.response.map","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"capped":{"type":"boolean"},"features":{"items":{"properties":{"fieldKey":{"type":"string"},"geometry":{"additionalProperties":true,"type":"object"},"id":{"format":"uuid","type":"string"},"receivedAt":{"type":"string"},"reference":{"type":["string","null"]},"status":{"enum":["received","under_review","accepted","rejected","spam"],"type":"string"},"values":{"additionalProperties":true,"description":"The answers, without the drawings.","type":"object"},"version":{"type":"integer"}},"required":["id","fieldKey","status","version","receivedAt","reference","geometry","values"],"type":"object"},"type":"array"},"shown":{"type":"integer"},"total":{"type":"integer"}},"required":["features","total","shown","capped"],"type":"object"}}},"description":"The drawn answers"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get survey response map","tags":["Surveys"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/surveys/{surveyId}/responses/status":{"post":{"description":"Sets the status of survey responses: `received`, `under_review`, `accepted`, `rejected` or `spam`. Ids are from `GET /surveys/{surveyId}/responses`.","operationId":"survey.responses.status","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"ids":["00000000-0000-0000-0000-000000000009"],"status":"accepted"},"schema":{"additionalProperties":false,"properties":{"ids":{"description":"Response ids from survey.response.list, 1 to 100.","items":{"format":"uuid","type":"string"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"status":{"enum":["received","under_review","accepted","rejected","spam"],"type":"string"}},"required":["ids","status"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Mark responses","tags":["Surveys"]}},"/surveys/{surveyId}/responses/{responseId}/photos":{"get":{"description":"A response's photos as links valid for 15 minutes. Photos come from the public, so show them\nonly as images.\n","operationId":"survey.response.photos","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"photos":{"items":{"properties":{"byteSize":{"type":"integer"},"contentType":{"enum":["image/jpeg","image/png","image/webp","image/heic"],"type":"string"},"fieldKey":{"type":"string"},"id":{"format":"uuid","type":"string"},"url":{"type":"string"}},"required":["id","fieldKey","contentType","byteSize","url"],"type":"object"},"type":"array"}},"required":["photos"],"type":"object"}}},"description":"The photos"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"List survey response photos","tags":["Surveys"]},"parameters":[{"$ref":"#/components/parameters/workspace"},{"in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"responseId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/surveys/{surveyId}/restore":{"post":{"description":"Copies an earlier published version into the draft. Publish the draft to make it live.","operationId":"survey.version.restore","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"version":1},"schema":{"additionalProperties":false,"properties":{"version":{"description":"The published version number to restore, from survey.get.","minimum":1,"type":"integer"}},"required":["version"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Restore survey version","tags":["Surveys"]}},"/surveys/{surveyId}/unpublish":{"post":{"description":"Closes a survey's link. Responses stay. Reopen it with `POST /surveys/{surveyId}/publish` or `PATCH /surveys/{surveyId}/link`.","operationId":"survey.unpublish","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The survey's id.","in":"path","name":"surveyId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Unpublish survey","tags":["Surveys"]}},"/teams":{"post":{"description":"Creates a team you own. Use its id as `X-NEER-Workspace`. API keys can only preview this (403 otherwise).","operationId":"team.create","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Lawrence Public Works"},"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"slug":{"description":"The team's short address: lowercase letters, digits and hyphens, up to 30. Made from its name when left out.","maxLength":30,"pattern":"^[a-z0-9-]*$","title":"Address","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"New team","tags":["Account"]}},"/teams/{teamId}":{"get":{"description":"Returns a team, its members and seats. Only owners and admins see emails.\n","operationId":"team.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"The team"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get team","tags":["Account"]},"parameters":[{"description":"The team's id, from GET /me (workspaces).","in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/teams/{teamId}/billing":{"get":{"description":"The team's plan, wallet, auto top-up, cards and payments. Owners and admins only.\n","operationId":"billing.team","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}},"description":"The billing"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"description":"Stripe did not respond"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get team billing","tags":["Account"]},"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/teams/{teamId}/billing/charges":{"get":{"description":"The team wallet's charges, newest first. Owners and admins only.\n","operationId":"billing.charges.team","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charges"}}},"description":"Charges"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List team charges","tags":["Account"]},"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/teams/{teamId}/billing/machines":{"get":{"description":"The cost of each of the team's machines. Owners and admins only.\n","operationId":"machine.usage.team","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineUsage"}}},"description":"Machine usage"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get team machine costs","tags":["Compute"]},"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/teams/{teamId}/storage":{"get":{"description":"Storage the team's projects use against its plan.\n","operationId":"storage.team","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUse"}}},"description":"The storage used"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"description":"The storage used could not be read"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get team storage","tags":["Account"]},"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/teams/{teamId}/studio":{"get":{"description":"The team's AI Studio status and address. Returns 503 where AI Studio isn't available.\n","operationId":"studio.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Studio"}}},"description":"The studio"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/Failed"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get AI Studio","tags":["Compute"]},"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"format":"uuid","type":"string"}}]},"/uploads":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Starts a file upload, for `POST /simulations` outside a project (up to 64 GiB), or with\n`projectId` for that project (up to 3 GiB): to import with `POST /imports`, or to run\nthere. Upload each part to its URL, then send the `upload` and each part's number and ETag\nto `POST /simulations` as `input`, or the `upload` to `POST /imports`.\n","operationId":"file_run.upload.start","parameters":[{"description":"The same as projectId in the body.","in":"query","name":"projectId","schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunUploadStart"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RunUpload"},{"$ref":"#/components/schemas/Upload"}],"type":"object"}}},"description":"An upload address for each part"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"422":{"$ref":"#/components/responses/Invalid"},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"This deployment doesn't start runs."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Start an upload","tags":["Model runs"]}},"/uploads/cancel":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Cancels an unfinished upload and deletes the parts sent. Send the `projectId` it was\nstarted with, if any.\n","operationId":"file_run.upload.cancel","parameters":[{"description":"The same as projectId in the body.","in":"query","name":"projectId","schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"projectId":{"description":"The project the upload was started for.","format":"uuid","type":"string"},"upload":{"description":"The `upload` that POST /uploads returned.","maxLength":4096,"minLength":1,"type":"string"}},"required":["upload"],"type":"object"}}},"required":true},"responses":{"204":{"description":"Canceled, or nothing to cancel"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"This deployment doesn't start runs."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Cancel an upload","tags":["Model runs"]}},"/uploads/read":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Finishes an upload started outside any project (POST /uploads) of a SWMM or EPANET report\n(.rpt) or a SWMM output (.out), and says what it holds: a report's judged summary,\ncontinuity tables, errors and warnings, each figure in its unit; an output's elements,\nperiods and peaks (node depth and flooding, link flow and capacity). Nothing is imported.\nAn output over 512 MB, an EPANET output, or anything else is answered `unread` with why.\n","operationId":"file_run.upload.summary","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"parts":{"description":"Each part's number and ETag, as sent.","items":{"properties":{"etag":{"type":"string"},"number":{"minimum":1,"type":"integer"}},"required":["number","etag"],"type":"object"},"type":"array"},"upload":{"description":"The `upload` that POST /uploads returned.","maxLength":4096,"minLength":1,"type":"string"}},"required":["upload","parts"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRead"}}},"description":"What the file says"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"This deployment doesn't start runs."},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Read a sent report or output","tags":["Model runs"]}},"/weather/forecast":{"get":{"description":"One rain forecast at a location. Without `issuedAt`, returns the newest.\n\nEach value is the rain, in inches, in the interval that ends at `at`. Add them for a total.\n`null` means no data. Each request counts against your weather allowance.\n","operationId":"weather.forecast.get","parameters":[{"in":"query","name":"lat","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"lon","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"description":"`hourly`, or `quarterHourly` for every 15 minutes. Both in inches.","in":"query","name":"product","schema":{"default":"hourly","enum":["hourly","quarterHourly"],"type":"string"}},{"description":"A past forecast, by the UTC hour it was issued. Default is the newest.","in":"query","name":"issuedAt","schema":{"format":"date-time","type":"string"}},{"description":"Hours ahead. Up to 48 for hourly forecasts issued at 00, 06, 12 or 18 UTC; otherwise up to 18.","in":"query","name":"hours","schema":{"maximum":48,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherForecast"}}},"description":"The forecast"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a rain forecast","tags":["HRRR"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/weather/forecast/grid":{"get":{"description":"One rain forecast for every grid cell whose center is inside a latitude and longitude box,\nup to 2,500 cells (about 150 km square). Without `issuedAt`, returns the newest.\n\n`times` are shared by every cell: each value is the rain, in inches, in the interval that\nends at the matching time. `null` means no data. The whole area counts as one request\nagainst your weather allowance.\n","operationId":"weather.forecast.grid.get","parameters":[{"in":"query","name":"south","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"west","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"in":"query","name":"north","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"east","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"description":"`hourly`, or `quarterHourly` for every 15 minutes. Both in inches.","in":"query","name":"product","schema":{"default":"hourly","enum":["hourly","quarterHourly"],"type":"string"}},{"description":"A past forecast, by the UTC hour it was issued. Default is the newest.","in":"query","name":"issuedAt","schema":{"format":"date-time","type":"string"}},{"description":"Hours ahead. Up to 48 for hourly forecasts issued at 00, 06, 12 or 18 UTC; otherwise up to 18.","in":"query","name":"hours","schema":{"maximum":48,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherForecastGrid"}}},"description":"The forecast over the area"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a rain forecast over an area","tags":["HRRR"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/weather/forecast/points":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"One rain forecast at each location listed, up to 2,500, from the grid cell nearest it, in\nthe order listed. Without `issuedAt`, returns the newest. `product`, `issuedAt` and\n`hours` work as for `GET /weather/forecast`.\n\n`times` are shared by every location: each value is the rain, in inches, in the interval\nthat ends at the matching time. `null` means no data. A location outside the contiguous\nUS is refused, naming it. The whole list counts as one request against your weather\nallowance.\n","operationId":"weather.forecast.points","parameters":[],"requestBody":{"content":{"application/json":{"example":{"points":[{"lat":39.0997,"lon":-94.5786},{"lat":38.9717,"lon":-95.2353}]},"schema":{"additionalProperties":false,"properties":{"hours":{"description":"Hours ahead. Up to 48 for hourly forecasts issued at 00, 06, 12 or 18 UTC; otherwise up to 18.","maximum":48,"minimum":1,"type":"integer"},"issuedAt":{"description":"A past forecast, by the UTC hour it was issued. Default is the newest.","format":"date-time","type":"string"},"points":{"$ref":"#/components/schemas/WeatherListedPoints"},"product":{"default":"hourly","description":"`hourly`, or `quarterHourly` for every 15 minutes. Both in inches.","enum":["hourly","quarterHourly"],"type":"string"}},"required":["points"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherForecastPoints"}}},"description":"The forecast at each location"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get a rain forecast at many locations","tags":["HRRR"]}},"/weather/forecasts":{"get":{"description":"Every forecast issued between `start` and `end`, at a location. Up to 31 days.\n\n`start` and `end` are when forecasts were issued, not the hours they cover. `missing` lists\nforecasts that were never published. Each request counts against your weather allowance.\n","operationId":"weather.forecast.list","parameters":[{"in":"query","name":"lat","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"lon","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"description":"`hourly`, or `quarterHourly` for every 15 minutes. Both in inches.","in":"query","name":"product","schema":{"default":"hourly","enum":["hourly","quarterHourly"],"type":"string"}},{"description":"Issued at or after.","in":"query","name":"start","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"Issued at or before.","in":"query","name":"end","required":true,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherForecasts"}}},"description":"The forecasts"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"List rain forecasts","tags":["HRRR"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/weather/rain":{"get":{"description":"Measured rainfall at a location. Without `start` and `end`, returns the last 24 hours.\n\nEach value is the rain in the interval that ends at `at`. `0` means no rain; `null` means\nno data. Up to 20,000 values per request. Each request counts against your weather\nallowance.\n","operationId":"weather.rain.get","parameters":[{"in":"query","name":"lat","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"lon","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"description":"First interval end to return. Default is 24 hours before `end`.","in":"query","name":"start","schema":{"format":"date-time","type":"string"}},{"description":"Last interval end to return. Default is now.","in":"query","name":"end","schema":{"format":"date-time","type":"string"}},{"description":"`hourly`: inches per interval. `rate`: inches per hour, every 2 minutes.","in":"query","name":"product","schema":{"default":"hourly","enum":["hourly","rate"],"type":"string"}},{"description":"Interval length in seconds: a multiple of 3600 for `hourly` or 120 for `rate`. Use 86400 for daily totals, each labeled with the UTC midnight it ends.","in":"query","name":"step","schema":{"minimum":120,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherRain"}}},"description":"The rain"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get observed rainfall","tags":["GARR"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/weather/rain/grid":{"get":{"description":"Measured rainfall for every radar cell (about 1 km) whose center is inside a latitude and\nlongitude box, up to 2,500 cells (about 50 km square). `start`, `end`, `product` and\n`step` work as for `GET /weather/rain`, over at most 744 of the product's own steps (31\ndays hourly, or about a day of the 2-minute rate) and 200,000 values.\n\n`times` are shared by every cell: each value is the rain in the interval that ends at the\nmatching time. `0` means no rain; `null` means no data. The whole area counts as one\nrequest against your weather allowance.\n","operationId":"weather.rain.grid.get","parameters":[{"in":"query","name":"south","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"west","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"in":"query","name":"north","required":true,"schema":{"maximum":90,"minimum":-90,"type":"number"}},{"in":"query","name":"east","required":true,"schema":{"maximum":180,"minimum":-180,"type":"number"}},{"description":"First interval end to return. Default is 24 hours before `end`.","in":"query","name":"start","schema":{"format":"date-time","type":"string"}},{"description":"Last interval end to return. Default is now.","in":"query","name":"end","schema":{"format":"date-time","type":"string"}},{"description":"`hourly`: inches per interval. `rate`: inches per hour, every 2 minutes.","in":"query","name":"product","schema":{"default":"hourly","enum":["hourly","rate"],"type":"string"}},{"description":"Interval length in seconds, a multiple of the product's own (3600 or 120).","in":"query","name":"step","schema":{"minimum":120,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherRainGrid"}}},"description":"The rain over the area"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get observed rainfall over an area","tags":["GARR"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/weather/rain/points":{"parameters":[{"$ref":"#/components/parameters/workspace"}],"post":{"description":"Measured rainfall at each location listed, up to 2,500, from the radar cell nearest it, in\nthe order listed. `start`, `end`, `product` and `step` work as for `GET /weather/rain`,\nover at most 744 of the product's own steps and 200,000 values in all.\n\n`times` are shared by every location: each value is the rain in the interval that ends\nat the matching time. `0` means no rain; `null` means no data. A location outside the\ncontiguous US is refused, naming it. The whole list counts as one request against your\nweather allowance.\n","operationId":"weather.rain.points","parameters":[],"requestBody":{"content":{"application/json":{"example":{"end":"2025-06-02T00:00:00Z","points":[{"lat":39.0997,"lon":-94.5786},{"lat":38.9717,"lon":-95.2353}],"start":"2025-06-01T01:00:00Z"},"schema":{"additionalProperties":false,"properties":{"end":{"description":"Last interval end to return. Default is now.","format":"date-time","type":"string"},"points":{"$ref":"#/components/schemas/WeatherListedPoints"},"product":{"default":"hourly","description":"`hourly`: inches per interval. `rate`: inches per hour, every 2 minutes.","enum":["hourly","rate"],"type":"string"},"start":{"description":"First interval end to return. Default is 24 hours before `end`.","format":"date-time","type":"string"},"step":{"description":"Interval length in seconds, a multiple of the product's own.","minimum":120,"type":"integer"}},"required":["points"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherRainPoints"}}},"description":"The rain at each location"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/AllowanceSpent"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get observed rainfall at many locations","tags":["GARR"]}},"/workspace":{"get":{"description":"The current workspace's people, roles, invitations, plan, seats and storage.","operationId":"workspace.get","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDetail"}}},"description":"The workspace"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Get workspace","tags":["Account"]},"parameters":[{"$ref":"#/components/parameters/workspace"}]},"/workspace/invitations":{"post":{"description":"Invites someone by email to the team, as a `member` unless `role` says otherwise. Only owners and admins can invite, and only owners can invite an admin or owner. API keys can only preview this (403 otherwise).","operationId":"team.invite","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"email":"alex@example.com","role":"member"},"schema":{"additionalProperties":false,"properties":{"email":{"maxLength":320,"minLength":3,"title":"Email","type":"string"},"role":{"default":"member","enum":["member","admin","owner","guest"],"title":"Role","type":"string","x-titles":["Member","Admin","Owner","Guest"]}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Invite to the team","tags":["Account"]}},"/workspace/members/{personId}":{"delete":{"description":"Removes someone from the team, or removes you to leave it. The last owner can't leave. API keys can only preview this (403 otherwise).","operationId":"team.member.remove","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The person's id.","in":"path","name":"personId","required":true,"schema":{"format":"uuid","title":"Person","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Remove from the team","tags":["Account"]},"patch":{"description":"Changes a member's role on the team. Owners and admins only. API keys can only preview this (403 otherwise).","operationId":"team.member.role","parameters":[{"$ref":"#/components/parameters/workspace"},{"description":"Makes a retry safe: a repeat with the same key returns the first result instead of acting again. Reusing a key with different parameters returns 422.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"description":"The member's user id, from `GET /workspace` (`people[].id`).","in":"path","name":"personId","required":true,"schema":{"format":"uuid","title":"Person","type":"string"}},{"description":"Show what would change, without changing anything.","in":"query","name":"preview","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Apply a preview exactly as it was shown: send the same request with the `previewId` the preview returned. 409 if the result would now differ.","in":"query","name":"previewId","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"role":"admin"},"schema":{"additionalProperties":false,"properties":{"role":{"enum":["member","admin","owner","guest"],"title":"Role","type":"string","x-titles":["Member","Admin","Owner","Guest"]}},"required":["role"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}},"description":"The result, or the preview","headers":{"Idempotent-Replayed":{"description":"\"true\" when this response is replayed from an earlier call with the same Idempotency-Key","schema":{"enum":["true"],"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Refused"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"429":{"$ref":"#/components/responses/Throttled"},"default":{"$ref":"#/components/responses/Failed"}},"summary":"Change a member's role","tags":["Account"]}}},"security":[{"bearer":[]}],"servers":[{"url":"https://api.neer.ai/v1"}],"tags":[{"description":"Your profile, workspaces, teams, billing, notifications, jobs and search.","name":"Account"},{"description":"Projects, groups, notes, flags, trash and reports.","name":"Projects"},{"description":"Project sharing, invitations and visitor links.","name":"Sharing"},{"description":"Imports, layers, rasters and ArcGIS services.","name":"Layers & data"},{"description":"Run a model and read its results.\n\n**Run a model file**\n\n1. `POST /uploads` with `{\"name\": \"model.inp\", \"size\": 48213}`. PUT each part to its `url` and keep its `ETag`. Or skip this and send a public `url` in step 2.\n2. `POST /simulations` with `{\"type\": \"swmm\", \"input\": {\"upload\": \"…\", \"parts\": [{\"number\": 1, \"etag\": \"…\"}]}}`. For EPANET use `\"type\": \"epanet\"`. For HEC-RAS use `\"type\": \"hecras\"` with the project's zip and `\"planNumber\": \"p01\"`.\n3. Poll `GET /simulations/{simulationId}` until it's done, then follow its `links` to its `report`, `results` and `files`.\n\nAdd `\"projectId\"` to both requests to keep the run in a project.\n\n**Run a model in a project**\n\n1. `POST /uploads` with `projectId`, then `POST /imports` with `projectId`. The model appears in `GET /models?projectId=`.\n2. `POST /simulations` with `{\"modelId\": \"…\"}`. HEC-RAS also needs `planId`; SWMM and EPANET may name `scenarioIds`. The answer's `created.id` is the model's run.\n3. List its simulations with `GET /simulations?runId=`, and follow each as above.\n\nEvery run is read the same way, in a project or not. `GET /simulations` lists them all; `projectId`, `modelId`, `runId` and `status` narrow it. `POST /simulations/{simulationId}/cancel` stops one.\n\n**From WRM.** `POST /simulations` takes WRM's fields under new names: `input_file_uri` is `url`, `hec_ras_plan_number` is `planNumber`, `generate_floodplain_maps` is `floodplainMaps`, `depth_threshold` is `depthThreshold`, `use_existing_results` is `useExistingResults`.","name":"Model runs"},{"description":"SWMM and EPANET models, scenarios, rain, calibration and fire flow.","name":"Models"},{"description":"HEC-RAS plans, geometry, land cover, events and results.","name":"HEC-RAS"},{"description":"Sensor sites, readings, QA, storms and flow studies.","name":"Sensors"},{"description":"A project's models: making, editing and versioning them, scenarios, rain, calibration, fire flow, customers and checks. Run them with `POST /simulations` (Simulations).","name":"Project models"},{"description":"A HEC-RAS model's geometries, plans, events and land cover, and converting a model to HEC-RAS.","name":"HEC-RAS editing"},{"description":"A model's scheduled forecasts and what their flood impact counts.\n\n`GET /forecasts?modelId=` lists a model's forecasts with their impact settings. `POST /forecasts` makes one, `PATCH /forecasts/{forecastId}` changes its schedule, `POST /forecasts/{forecastId}/start` runs a cycle now, and `PATCH /forecasts/{forecastId}/impact` sets the buildings, streets, rails and terrain its flood impact counts.","name":"Forecasts"},{"description":"Measured rainfall from radar and rain gauges (NOAA MRMS), since January 2022.\n\n```\nGET /weather/rain?lat=39.0997&lon=-94.5786\n```\n\nReturns the last 24 hours. Add `start` and `end` for another period, use `GET /weather/rain/grid` for every cell in an area, or `POST /weather/rain/points` for a list of locations. Contiguous US only.","name":"GARR"},{"description":"Flood depth and the NEER Flood Score across India, from the India Flood Atlas.\n\n```\nGET /flood/point?lat=25.85&lon=87.0\n```\n\nReturns the modelled 100-year flood depth in metres and its score, 0 to 100. Each request counts against your workspace's Flood allowance, which renews each month; your Flood plan decides which reads, return periods and climate scenarios you can use.","name":"Flood"},{"description":"Rain forecast from NOAA's HRRR model, updated every hour.\n\n```\nGET /weather/forecast?lat=39.0997&lon=-94.5786\n```\n\nReturns the next 18 hours from the newest forecast. Add `issuedAt` for a past forecast, use `GET /weather/forecasts` for every forecast in a period, `GET /weather/forecast/grid` for every cell in an area, or `POST /weather/forecast/points` for a list of locations. Contiguous US only.","name":"HRRR"},{"description":"Risk models and runs, asset scores, inspections, maintenance and pipe lining.","name":"Risk"},{"description":"Capital projects, costs and optimizer studies.","name":"Plan"},{"description":"Dashboards, tiles and sharing.","name":"Dashboards"},{"description":"Field maps and their submissions.","name":"Field maps"},{"description":"Surveys and responses.","name":"Surveys"},{"description":"Virtual machines and AI Studio: what's running, prices, use and cost. Start and stop them in the app.","name":"Compute"},{"description":"Health, the API spec, the lists of reads and actions, and undo.","name":"System"}],"x-tagGroups":[{"name":"Platform","tags":["Account","Projects","Sharing","Layers & data","Sensors","Project models","HEC-RAS editing","Forecasts","Risk","Plan","Dashboards","Field maps","Surveys","Compute","System"]},{"name":"Simulations","tags":["Model runs","Models","HEC-RAS"]},{"name":"Weather","tags":["GARR","HRRR"]},{"name":"Flood","tags":["Flood"]}]}