Documentation Index

Fetch the complete documentation index at: https://support.keypro.fi/llms.txt

Use this file to discover all available pages before exploring further.

2025-11-06 14.00 UTC - There are currently no active events. All systems operational.

Calculate supply interruption affected objects.

Prev Next
Post
/keydh-supply-interruption/calculate/

Calculates affected objects, valves to close, and related data for a given network object.

Security
API Key: Token
Header parameter nameAuthorization

Token issued for API consumer.

Body parameters
object
target_pk
integer Required

Primary key of the target network object.

target_type
string Required

Type of the target object.

Valid values[ "DH_CONDUIT", "DH_VALVE", "SN_WATER_DUCT", "SN_WATER_NODE" ]
Responses
200

Calculation result.

{
  "affected_objects": [
    {
      "duct_volume": null,
      "id": null,
      "object_ct": 41,
      "object_identification": "277446",
      "object_pk": 277446,
      "object_type": "WaterDuct"
    },
    {
      "duct_volume": null,
      "id": null,
      "object_ct": 45,
      "object_identification": "322388",
      "object_pk": 322388,
      "object_type": "WaterNode"
    }
  ],
  "consumerpoint_count": 0,
  "duct_volume": 0.0,
  "history": "",
  "interruption_address": null,
  "interruption_description": "",
  "interruption_net_type": 1,
  "observations": [],
  "power_sum": 0.0,
  "valves_to_close": [
    {
      "id": null,
      "is_valve_to_close": true,
      "manhole_identification": null,
      "manhole_pk": null,
      "manhole_type": null,
      "object_ct": 45,
      "object_identification": "322408",
      "object_pk": 322408,
      "object_type": "WaterValve"
    }
  ],
  "water_flow_sum": 0.0
}
Expand All
object
affected_objects
Array of object

List of affected network objects.

object
duct_volume
number
id
integer

SupplyInterruptionConnection ID if already saved, otherwise null.

object_ct
integer
object_identification
string
object_pk
integer
object_type
string
consumerpoint_count
integer
duct_volume
number
interruption_net_type
integer

Network type ID.

power_sum
number
valves_to_close
Array of object

List of valves that should be closed.

object
id
integer
is_valve_to_close
boolean
object_ct
integer
object_identification
string
object_pk
integer
object_type
string
water_flow_sum
number
400

Validation error or the target is a blind/ignored conduit.

{
  "detail": "The picked object is a blind. Please pick a different object."
}
object
detail
string
401

Authentication credentials are missing or invalid

{
  "details": "Authentication credentials were not provided"
}
object

Standard error response payload

details
string

Detailed description of error

404

Target object not found.

{
  "detail": "Object not found."
}
object
detail
string