{
  "openapi": "3.1.0",
  "info": {
    "title": "NetworkRepo API",
    "version": "1",
    "description": "The NetworkRepo API lets another system (billing, GIS, ticketing, monitoring) read a NetworkRepo server's networks: its structures, closures, termination points, equipment, ports, cable spans, strands, duct banks, slack loops, customers, devices, alarms and saved routes, plans, inside plant and work orders; splicing, patching and terminations; the services on them; traces, and where a fault is; and what the app's other screens show: work order costs, outages, search, splice history, the write audit, locks, reports, taper and splice reports, WaveView, integrity runs, files, duct cross sections, pole attachments, leases and exports. Writes go through the app's own saves, as the token's administrator.\n\n## Getting started\n\n1. The server's owner turns on the **Integrations** add-on. An administrator then makes an API token in **Settings → Integrations → New Token**, named after the system that will use it. The token (`nrk_…`) is shown once.\n\n2. The system swaps the API token for an **access token** (one hour): `POST /api/v1/token`.\n\n3. It sends the access token on every call: `Authorization: Bearer <accessToken>`. When a call answers 401, it gets a new access token.\n\nA token acts as the administrator who made it, on the networks that account can see. It stops at once if it is revoked, if that account is disabled or stops being an administrator, or if the add-on is switched off.\n\n**Two kinds of token.** A *standard* token reads, edits and creates. A *network-changes* token also makes the calls marked **Needs a network-changes token** (splicing, patching, terminating, deletes); an administrator makes one on its own form, it runs out within 90 days and it can be held to some networks. A standard token gets 403 `needs_change_token` from those calls.\n\n## Notes\n\n- **Ids.** Networks are known by their `network` id, objects by their **GUID** (`id` in every answer), never by their database number. An object that refers to another (its `location`, `owner`, `route`…) gives it as `{id, type, name}`.\n\n- **Answers.** `{status: {code, message}, data}`; lists add `paging: {page, size, last_page, count, total}`. Errors are the HTTP status with `{error, code}`.\n\n- **Features.** A call that says *Needs the … feature* needs that part of the app too, as its screen does (an add-on the server doesn't hold answers 403).\n\n- **Dry run.** Every write takes `?dryRun=true`: the same checks and saves, then nothing kept; the answer (200) lists what each save would have changed.\n\n- **Jobs.** A call whose work runs on a worker (a Taper Report) answers 202 with a job; follow it with `GET /api/v1/networks/{network}/jobs/{id}`.\n\n- **Pages.** Lists return a page at a time: `page` from 1, `size` 20 by default and 50 at most.\n\n- **Geometry.** `geo` is GeoJSON in WGS 84 longitude/latitude (EPSG:4326) unless `srid` asks for another system, such as 3857.\n\n- **Times.** `startCreateTime` … `endUpdateTime` take ISO 8601 (`2021-05-01T16:20:00Z`). A time with Z or an offset is taken in UTC, as the server writes them; one without, as written; a date alone, its midnight. Fetch what changed since your last sync with `startUpdateTime`."
  },
  "servers": [
    {
      "url": "/",
      "description": "This server"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Authentication"
    },
    {
      "name": "Networks"
    },
    {
      "name": "Access points"
    },
    {
      "name": "Buildings"
    },
    {
      "name": "Poles"
    },
    {
      "name": "Cable spans"
    },
    {
      "name": "Strands"
    },
    {
      "name": "Saved routes"
    },
    {
      "name": "Enclosures"
    },
    {
      "name": "Termination points"
    },
    {
      "name": "Equipment"
    },
    {
      "name": "Ports"
    },
    {
      "name": "Duct banks"
    },
    {
      "name": "Slack loops"
    },
    {
      "name": "Customers"
    },
    {
      "name": "Devices"
    },
    {
      "name": "Alarms"
    },
    {
      "name": "Plan lines"
    },
    {
      "name": "Plan points"
    },
    {
      "name": "Pole lines"
    },
    {
      "name": "Floors"
    },
    {
      "name": "Rooms"
    },
    {
      "name": "Racks"
    },
    {
      "name": "Work orders"
    },
    {
      "name": "Outages"
    },
    {
      "name": "Search"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Integrity"
    },
    {
      "name": "Files"
    },
    {
      "name": "Auto Splice"
    }
  ],
  "paths": {
    "/api/v1/token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Get an access token",
        "operationId": "token",
        "security": [],
        "description": "Swaps an API token (made by an administrator in **Settings → Integrations**) for an access token valid one hour. Send the access token on every other call as `Authorization: Bearer <accessToken>`. POST only: an API token in a URL would end up in server logs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apiToken"
                ],
                "properties": {
                  "apiToken": {
                    "type": "string",
                    "description": "The API token, `nrk_…`",
                    "example": "nrk_8oE3…"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Token"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "accessToken": "mZ0q7…",
                    "expiresIn": 3600
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/api/v1/networks": {
      "get": {
        "tags": [
          "Networks"
        ],
        "summary": "Get networks",
        "operationId": "networks",
        "description": "The networks the token may read: those of the administrator who made it.",
        "responses": {
          "200": {
            "description": "Networks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Network"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "network": "f2f91656-607b-4854-880e-79054a68ee9c",
                      "name": "City Test",
                      "designation": "Production",
                      "version": "8.5.0.23",
                      "srid": 4326,
                      "center": {
                        "lat": 0.3136,
                        "lng": 32.5811
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/api/v1/networks/{network}": {
      "get": {
        "tags": [
          "Networks"
        ],
        "summary": "Get network",
        "operationId": "network",
        "description": "One network's name, designation, version and map centre.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          }
        ],
        "responses": {
          "200": {
            "description": "The network",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Network"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "network": "f2f91656-607b-4854-880e-79054a68ee9c",
                    "name": "City Test",
                    "designation": "Production",
                    "version": "8.5.0.23",
                    "srid": 4326,
                    "center": {
                      "lat": 0.3136,
                      "lng": 32.5811
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/accesspoints": {
      "get": {
        "tags": [
          "Access points"
        ],
        "summary": "Get access points",
        "operationId": "list_accesspoints",
        "description": "A page of access points (manholes, handholes, vaults), in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of access points",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AccessPoint"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "geo": {
                        "type": "Polygon",
                        "coordinates": [
                          [
                            [
                              32.5793,
                              0.212
                            ],
                            [
                              32.5795,
                              0.212
                            ],
                            [
                              32.5795,
                              0.2122
                            ],
                            [
                              32.5793,
                              0.2122
                            ],
                            [
                              32.5793,
                              0.212
                            ]
                          ]
                        ]
                      },
                      "access_pointid": 2698,
                      "name": "A1576",
                      "access_pointtypeid": 3,
                      "street": "Ndejje Rd",
                      "city": "Kampala",
                      "createtime": "2019-08-12T15:29:53",
                      "createuser": "brenda",
                      "updatetime": "2020-08-06T11:47:43",
                      "updateuser": "solomon"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Access points"
        ],
        "summary": "New access point",
        "operationId": "create_accesspoints",
        "description": "Makes a access point where `geometry` (required, GeoJSON) says, as drawing one on the map does: the network's default name and type rules apply. Other fields as Update access point.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "A1576",
                "street": "Ndejje Rd",
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "The new access point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccessPoint"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                    "geo": {
                      "type": "Polygon",
                      "coordinates": [
                        [
                          [
                            32.5793,
                            0.212
                          ],
                          [
                            32.5795,
                            0.212
                          ],
                          [
                            32.5795,
                            0.2122
                          ],
                          [
                            32.5793,
                            0.2122
                          ],
                          [
                            32.5793,
                            0.212
                          ]
                        ]
                      ]
                    },
                    "access_pointid": 2698,
                    "name": "A1576",
                    "access_pointtypeid": 3,
                    "street": "Ndejje Rd",
                    "city": "Kampala",
                    "createtime": "2019-08-12T15:29:53",
                    "createuser": "brenda",
                    "updatetime": "2020-08-06T11:47:43",
                    "updateuser": "solomon"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/accesspoints/{id}": {
      "get": {
        "tags": [
          "Access points"
        ],
        "summary": "Get access point",
        "operationId": "get_accesspoints",
        "description": "One access point by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Access point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccessPoint"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                    "geo": {
                      "type": "Polygon",
                      "coordinates": [
                        [
                          [
                            32.5793,
                            0.212
                          ],
                          [
                            32.5795,
                            0.212
                          ],
                          [
                            32.5795,
                            0.2122
                          ],
                          [
                            32.5793,
                            0.2122
                          ],
                          [
                            32.5793,
                            0.212
                          ]
                        ]
                      ]
                    },
                    "access_pointid": 2698,
                    "name": "A1576",
                    "access_pointtypeid": 3,
                    "street": "Ndejje Rd",
                    "city": "Kampala",
                    "createtime": "2019-08-12T15:29:53",
                    "createuser": "brenda",
                    "updatetime": "2020-08-06T11:47:43",
                    "updateuser": "solomon"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Access points"
        ],
        "summary": "Update access point",
        "operationId": "update_accesspoints",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, street, city, state, zip, owner, placement, stage, comments, installcompany, installdate, typ, ea1 … ea36 (as the network's Attributes form offers them), `geometry`. Answers the access point as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "A1576",
                "street": "Ndejje Rd",
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The access point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/AccessPoint"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                    "geo": {
                      "type": "Polygon",
                      "coordinates": [
                        [
                          [
                            32.5793,
                            0.212
                          ],
                          [
                            32.5795,
                            0.212
                          ],
                          [
                            32.5795,
                            0.2122
                          ],
                          [
                            32.5793,
                            0.2122
                          ],
                          [
                            32.5793,
                            0.212
                          ]
                        ]
                      ]
                    },
                    "access_pointid": 2698,
                    "name": "A1576",
                    "access_pointtypeid": 3,
                    "street": "Ndejje Rd",
                    "city": "Kampala",
                    "createtime": "2019-08-12T15:29:53",
                    "createuser": "brenda",
                    "updatetime": "2020-08-06T11:47:43",
                    "updateuser": "solomon"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Access points"
        ],
        "summary": "Delete access point",
        "operationId": "delete_accesspoints",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). What sat in it stays, placed nowhere. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete access point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/buildings": {
      "get": {
        "tags": [
          "Buildings"
        ],
        "summary": "Get buildings",
        "operationId": "list_buildings",
        "description": "A page of buildings, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of buildings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Building"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "geo": {
                        "type": "Polygon",
                        "coordinates": [
                          [
                            [
                              32.58,
                              0.21
                            ],
                            [
                              32.5802,
                              0.21
                            ],
                            [
                              32.5802,
                              0.2102
                            ],
                            [
                              32.58,
                              0.2102
                            ],
                            [
                              32.58,
                              0.21
                            ]
                          ]
                        ]
                      },
                      "buildingid": 20,
                      "name": "Hub",
                      "street": "Ring Rd",
                      "city": "Kampala",
                      "createtime": "2018-01-15T09:00:00",
                      "updatetime": "2023-03-02T10:12:00"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Buildings"
        ],
        "summary": "New building",
        "operationId": "create_buildings",
        "description": "Makes a building where `geometry` (required, GeoJSON) says, as drawing one on the map does: the network's default name and type rules apply. Other fields as Update building.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Hub",
                "city": "Kampala",
                "geometry": {
                  "type": "Polygon",
                  "coordinates": [
                    [
                      [
                        32.58,
                        0.21
                      ],
                      [
                        32.5802,
                        0.21
                      ],
                      [
                        32.5802,
                        0.2102
                      ],
                      [
                        32.58,
                        0.2102
                      ],
                      [
                        32.58,
                        0.21
                      ]
                    ]
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "The new building",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Building"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                    "geo": {
                      "type": "Polygon",
                      "coordinates": [
                        [
                          [
                            32.58,
                            0.21
                          ],
                          [
                            32.5802,
                            0.21
                          ],
                          [
                            32.5802,
                            0.2102
                          ],
                          [
                            32.58,
                            0.2102
                          ],
                          [
                            32.58,
                            0.21
                          ]
                        ]
                      ]
                    },
                    "buildingid": 20,
                    "name": "Hub",
                    "street": "Ring Rd",
                    "city": "Kampala",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2023-03-02T10:12:00"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/buildings/{id}": {
      "get": {
        "tags": [
          "Buildings"
        ],
        "summary": "Get building",
        "operationId": "get_buildings",
        "description": "One building by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Building",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Building"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                    "geo": {
                      "type": "Polygon",
                      "coordinates": [
                        [
                          [
                            32.58,
                            0.21
                          ],
                          [
                            32.5802,
                            0.21
                          ],
                          [
                            32.5802,
                            0.2102
                          ],
                          [
                            32.58,
                            0.2102
                          ],
                          [
                            32.58,
                            0.21
                          ]
                        ]
                      ]
                    },
                    "buildingid": 20,
                    "name": "Hub",
                    "street": "Ring Rd",
                    "city": "Kampala",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2023-03-02T10:12:00"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Buildings"
        ],
        "summary": "Update building",
        "operationId": "update_buildings",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, street, city, state, zip, owner, stage, comments, ea1 … ea36 (as the form offers them), `geometry`. Answers the building as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Hub",
                "city": "Kampala"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The building; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Building"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                    "geo": {
                      "type": "Polygon",
                      "coordinates": [
                        [
                          [
                            32.58,
                            0.21
                          ],
                          [
                            32.5802,
                            0.21
                          ],
                          [
                            32.5802,
                            0.2102
                          ],
                          [
                            32.58,
                            0.2102
                          ],
                          [
                            32.58,
                            0.21
                          ]
                        ]
                      ]
                    },
                    "buildingid": 20,
                    "name": "Hub",
                    "street": "Ring Rd",
                    "city": "Kampala",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2023-03-02T10:12:00"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Buildings"
        ],
        "summary": "Delete building",
        "operationId": "delete_buildings",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). What sat in it stays, placed nowhere. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete building; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/poles": {
      "get": {
        "tags": [
          "Poles"
        ],
        "summary": "Get poles",
        "operationId": "list_poles",
        "description": "A page of poles, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of poles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pole"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "aac62889-aa17-e811-a94c-bc9cef5a1839",
                      "geo": {
                        "type": "Point",
                        "coordinates": [
                          32.5794,
                          0.2121
                        ]
                      },
                      "poleid": 70,
                      "name": "P-70",
                      "poletypeid": 2,
                      "createtime": "2018-02-01T08:30:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Poles"
        ],
        "summary": "New pole",
        "operationId": "create_poles",
        "description": "Makes a pole where `geometry` (required, GeoJSON) says, as drawing one on the map does: the network's default name and type rules apply. Other fields as Update pole.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "P-70",
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "The new pole",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Pole"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "aac62889-aa17-e811-a94c-bc9cef5a1839",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "poleid": 70,
                    "name": "P-70",
                    "poletypeid": 2,
                    "createtime": "2018-02-01T08:30:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/poles/{id}": {
      "get": {
        "tags": [
          "Poles"
        ],
        "summary": "Get pole",
        "operationId": "get_poles",
        "description": "One pole by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Pole",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Pole"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "aac62889-aa17-e811-a94c-bc9cef5a1839",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "poleid": 70,
                    "name": "P-70",
                    "poletypeid": 2,
                    "createtime": "2018-02-01T08:30:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Poles"
        ],
        "summary": "Update pole",
        "operationId": "update_poles",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, owner, height, stage, comments, ea1 … ea36 (as the form offers them), `geometry`. Answers the pole as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "P-70",
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pole; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Pole"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "aac62889-aa17-e811-a94c-bc9cef5a1839",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "poleid": 70,
                    "name": "P-70",
                    "poletypeid": 2,
                    "createtime": "2018-02-01T08:30:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Poles"
        ],
        "summary": "Delete pole",
        "operationId": "delete_poles",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete pole; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "aac62889-aa17-e811-a94c-bc9cef5a1839",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/spans": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get cable spans",
        "operationId": "list_spans",
        "description": "A page of cable spans. `name` filters on `locateid`. `geo` is the span's cables, as the map draws it, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of cable spans",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Span"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "geo": {
                        "type": "MultiLineString",
                        "coordinates": [
                          [
                            [
                              32.5794,
                              0.2121
                            ],
                            [
                              32.5812,
                              0.2133
                            ]
                          ],
                          [
                            [
                              32.5812,
                              0.2133
                            ],
                            [
                              32.5815,
                              0.2136
                            ]
                          ]
                        ]
                      },
                      "spanid": 10412,
                      "locateid": "ndejje lubuguumu",
                      "spantypeid": 1,
                      "length": 340,
                      "units": "m",
                      "stage": "posted",
                      "designated": "backbone",
                      "owner": "CSquared",
                      "createtime": "2019-08-12T15:29:53",
                      "updatetime": "2020-08-06T11:47:43"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Cable spans"
        ],
        "summary": "New cable span",
        "operationId": "create_spans",
        "description": "Draws a cable span as the map does: `geometry` a LineString from a closure, term point or slack loop to another (each end found where the line ends, or given as `ends`: two of `{id, type}`); `spantype` ({id}) and its fields. Its strands are made from the span type. Checked and saved as on screen, recorded as the token's account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "LineString",
                  "coordinates": [
                    [
                      32.5794,
                      0.2121
                    ],
                    [
                      32.5812,
                      0.2133
                    ]
                  ]
                },
                "spantype": {
                  "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
                },
                "name": "ndejje lubuguumu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New cable span",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Span"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "geo": {
                      "type": "MultiLineString",
                      "coordinates": [
                        [
                          [
                            32.5794,
                            0.2121
                          ],
                          [
                            32.5812,
                            0.2133
                          ]
                        ],
                        [
                          [
                            32.5812,
                            0.2133
                          ],
                          [
                            32.5815,
                            0.2136
                          ]
                        ]
                      ]
                    },
                    "spanid": 10412,
                    "locateid": "ndejje lubuguumu",
                    "spantypeid": 1,
                    "length": 340,
                    "units": "m",
                    "stage": "posted",
                    "designated": "backbone",
                    "owner": "CSquared",
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": "2020-08-06T11:47:43"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get cable span",
        "operationId": "get_spans",
        "description": "One cable span by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Cable span",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Span"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "geo": {
                      "type": "MultiLineString",
                      "coordinates": [
                        [
                          [
                            32.5794,
                            0.2121
                          ],
                          [
                            32.5812,
                            0.2133
                          ]
                        ],
                        [
                          [
                            32.5812,
                            0.2133
                          ],
                          [
                            32.5815,
                            0.2136
                          ]
                        ]
                      ]
                    },
                    "spanid": 10412,
                    "locateid": "ndejje lubuguumu",
                    "spantypeid": 1,
                    "length": 340,
                    "units": "m",
                    "stage": "posted",
                    "designated": "backbone",
                    "owner": "CSquared",
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": "2020-08-06T11:47:43"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Update cable span",
        "operationId": "update_spans",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: locateid (or `name`), owner, stage, designated, units, comments, ea1 … ea36; `spantypeid` (re-makes its strands, as on screen). Answers the cable span as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "ndejje lubuguumu",
                "stage": "posted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The cable span; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Span"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "geo": {
                      "type": "MultiLineString",
                      "coordinates": [
                        [
                          [
                            32.5794,
                            0.2121
                          ],
                          [
                            32.5812,
                            0.2133
                          ]
                        ],
                        [
                          [
                            32.5812,
                            0.2133
                          ],
                          [
                            32.5815,
                            0.2136
                          ]
                        ]
                      ]
                    },
                    "spanid": 10412,
                    "locateid": "ndejje lubuguumu",
                    "spantypeid": 1,
                    "length": 340,
                    "units": "m",
                    "stage": "posted",
                    "designated": "backbone",
                    "owner": "CSquared",
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": "2020-08-06T11:47:43"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Delete cable span",
        "operationId": "delete_spans",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). All of its cable segments go, with their splices and terminations; asks first (409) when it has any. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete cable span; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/routes": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Get saved routes",
        "operationId": "list_routes",
        "description": "A page of saved routes (circuits through the network), in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of saved routes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Route"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "routeid": 48261,
                      "name": "Kajjansi <> Kigo",
                      "status": "Used",
                      "portid": 61441,
                      "ispermanent": 1,
                      "isdirty": 0,
                      "createtime": "2021-04-09T07:44:10",
                      "updatetime": "2024-11-20T16:02:00"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Saved routes"
        ],
        "summary": "New saved route",
        "operationId": "create_routes",
        "x-feature": "saved-routes",
        "description": "Saves the route through the network from a port (`port`: {id}) or a strand (`strand`: {id}, or `{span: {id}, num}`), as the Trace window's Save: its legs are written from today's trace (`legsSaved` says whether they were). Needs the **saved-routes** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "port": {
                  "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New saved route",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Route"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                    "routeid": 48261,
                    "name": "Kajjansi <> Kigo",
                    "status": "Used",
                    "portid": 61441,
                    "ispermanent": 1,
                    "isdirty": 0,
                    "createtime": "2021-04-09T07:44:10",
                    "updatetime": "2024-11-20T16:02:00",
                    "legsSaved": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/routes/{id}": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Get saved route",
        "operationId": "get_routes",
        "description": "One saved route by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Saved route",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Route"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                    "routeid": 48261,
                    "name": "Kajjansi <> Kigo",
                    "status": "Used",
                    "portid": 61441,
                    "ispermanent": 1,
                    "isdirty": 0,
                    "createtime": "2021-04-09T07:44:10",
                    "updatetime": "2024-11-20T16:02:00"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Update saved route",
        "operationId": "update_routes",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: `name`, status, priority, designation, suffix, ringtype, fni, tida, tidz, ea1 … ea36. Answers the saved route as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Kajjansi <> Kigo",
                "priority": "High"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved route; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Route"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                    "routeid": 48261,
                    "name": "Kajjansi <> Kigo",
                    "status": "Used",
                    "portid": 61441,
                    "ispermanent": 1,
                    "isdirty": 0,
                    "createtime": "2021-04-09T07:44:10",
                    "updatetime": "2024-11-20T16:02:00"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Delete saved route",
        "operationId": "deleteRoute",
        "x-feature": "saved-routes",
        "description": "Deletes a saved route, as Route Manager's Delete (its customers' relations to it go too). The network's connections are not touched. Needs the **saved-routes** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete saved route; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/strands": {
      "get": {
        "tags": [
          "Strands"
        ],
        "summary": "Get strands",
        "operationId": "list_strands",
        "description": "A page of strands (fibres). Strands have no name; a strand row carries its span's GUID (`span`) and number (`num`), in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of strands",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Strand"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 28359,
                    "count": 20,
                    "total": 567174
                  },
                  "data": [
                    {
                      "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                      "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "strandid": 35143683,
                      "x_table": "span",
                      "x_id": 10412,
                      "num": 3,
                      "color": "gr",
                      "bundle": "blue",
                      "status": null,
                      "scalefactor": 1,
                      "createtime": "2019-08-12T15:29:53",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/strands/{id}": {
      "get": {
        "tags": [
          "Strands"
        ],
        "summary": "Get strand",
        "operationId": "get_strands",
        "description": "One strand by its GUID. Copied strands can share a GUID; then this answers 409 and the strand is asked for by its span and number instead (Get strand of a span).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Strand",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Strand"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                    "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "strandid": 35143683,
                    "x_table": "span",
                    "x_id": 10412,
                    "num": 3,
                    "color": "gr",
                    "bundle": "blue",
                    "status": null,
                    "scalefactor": 1,
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "put": {
        "tags": [
          "Strands"
        ],
        "summary": "Update strand",
        "operationId": "update_strands",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: status, medium, typ, label, scalefactor, conntypea, conntypez, … (any of its own columns but keys and stamps). A shared GUID answers 409: use Update strand of a span. Answers the strand as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "status": "damaged"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The strand; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Strand"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                    "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "strandid": 35143683,
                    "x_table": "span",
                    "x_id": 10412,
                    "num": 3,
                    "color": "gr",
                    "bundle": "blue",
                    "status": null,
                    "scalefactor": 1,
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures": {
      "get": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Get enclosures",
        "operationId": "list_enclosures",
        "description": "A page of enclosures (closures, splice points), each with its `location` and `enclosuretype`, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of enclosures",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Enclosure"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                      "geo": {
                        "type": "Point",
                        "coordinates": [
                          32.5794,
                          0.2121
                        ]
                      },
                      "location": {
                        "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                        "type": "accesspoint",
                        "name": "A1576"
                      },
                      "enclosuretype": {
                        "id": "3fa904a3-1346-e711-9acd-782bcb19c20c",
                        "type": "enclosuretype",
                        "name": "FOSC 450D"
                      },
                      "enclosureid": 373,
                      "name": "SP-1576",
                      "enclosuretypeid": 1,
                      "access_pointid": 2698,
                      "buildingid": null,
                      "poleid": null,
                      "comments": "none",
                      "stage": "posted",
                      "createtime": "2019-08-12T15:29:53",
                      "updatetime": "2020-08-06T11:47:43"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Enclosures"
        ],
        "summary": "New enclosure",
        "operationId": "create_enclosures",
        "description": "Places a closure: `geometry` a Point, `enclosuretype` ({id}) and its fields. Checked and saved as on screen, recorded as the token's account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                },
                "enclosuretype": {
                  "id": "3fa904a3-1346-e711-9acd-782bcb19c20c"
                },
                "name": "SP-1577"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Enclosure"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "enclosuretype": {
                      "id": "3fa904a3-1346-e711-9acd-782bcb19c20c",
                      "type": "enclosuretype",
                      "name": "FOSC 450D"
                    },
                    "enclosureid": 373,
                    "name": "SP-1576",
                    "enclosuretypeid": 1,
                    "access_pointid": 2698,
                    "buildingid": null,
                    "poleid": null,
                    "comments": "none",
                    "stage": "posted",
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": "2020-08-06T11:47:43"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}": {
      "get": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Get enclosure",
        "operationId": "get_enclosures",
        "description": "One enclosure by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Enclosure"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "enclosuretype": {
                      "id": "3fa904a3-1346-e711-9acd-782bcb19c20c",
                      "type": "enclosuretype",
                      "name": "FOSC 450D"
                    },
                    "enclosureid": 373,
                    "name": "SP-1576",
                    "enclosuretypeid": 1,
                    "access_pointid": 2698,
                    "buildingid": null,
                    "poleid": null,
                    "comments": "none",
                    "stage": "posted",
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": "2020-08-06T11:47:43"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Update enclosure",
        "operationId": "update_enclosures",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, comments, splicecomments, stage, installcompany, installdate, priority, ea1 … ea36, `enclosuretype` ({id}), `geometry`. Answers the enclosure as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "SP-1576",
                "comments": "tray 2 full"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The enclosure; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Enclosure"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "enclosuretype": {
                      "id": "3fa904a3-1346-e711-9acd-782bcb19c20c",
                      "type": "enclosuretype",
                      "name": "FOSC 450D"
                    },
                    "enclosureid": 373,
                    "name": "SP-1576",
                    "enclosuretypeid": 1,
                    "access_pointid": 2698,
                    "buildingid": null,
                    "poleid": null,
                    "comments": "none",
                    "stage": "posted",
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": "2020-08-06T11:47:43"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Delete enclosure",
        "operationId": "delete_enclosures",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). Its splices and its splice history go, and it is taken off the cables that end there. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete enclosure; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/terminationpoints": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get termination points",
        "operationId": "list_terminationpoints",
        "description": "A page of termination points (patch panels, term points), each with its `location` and `fibermngrtype`, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of termination points",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TerminationPoint"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                      "geo": {
                        "type": "Point",
                        "coordinates": [
                          32.5794,
                          0.2121
                        ]
                      },
                      "location": {
                        "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                        "type": "building",
                        "name": "Hub"
                      },
                      "fibermngrtype": {
                        "id": "30f77966-1346-e711-9acd-782bcb19c20c",
                        "type": "fibermngrtype",
                        "name": "024p-SM"
                      },
                      "fibermngrid": 12,
                      "name": "TP-Hub",
                      "fibermngrtypeid": 1,
                      "buildingid": 20,
                      "designation": "none",
                      "createtime": "2018-01-15T09:00:00",
                      "updatetime": "2021-03-29T17:13:49"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Termination points"
        ],
        "summary": "New termination point",
        "operationId": "create_terminationpoints",
        "description": "Places a term point: `geometry` a Point, `fibermngrtype` ({id}: its ports are made from it) and its fields. Checked and saved as on screen, recorded as the token's account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                },
                "fibermngrtype": {
                  "id": "30f77966-1346-e711-9acd-782bcb19c20c"
                },
                "name": "TP-Hub-2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TerminationPoint"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "fibermngrtype": {
                      "id": "30f77966-1346-e711-9acd-782bcb19c20c",
                      "type": "fibermngrtype",
                      "name": "024p-SM"
                    },
                    "fibermngrid": 12,
                    "name": "TP-Hub",
                    "fibermngrtypeid": 1,
                    "buildingid": 20,
                    "designation": "none",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2021-03-29T17:13:49"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get termination point",
        "operationId": "get_terminationpoints",
        "description": "One termination point by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TerminationPoint"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "fibermngrtype": {
                      "id": "30f77966-1346-e711-9acd-782bcb19c20c",
                      "type": "fibermngrtype",
                      "name": "024p-SM"
                    },
                    "fibermngrid": 12,
                    "name": "TP-Hub",
                    "fibermngrtypeid": 1,
                    "buildingid": 20,
                    "designation": "none",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2021-03-29T17:13:49"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Termination points"
        ],
        "summary": "Update termination point",
        "operationId": "update_terminationpoints",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, comments, designation, rack_unit, stage, installcompany, installdate, ea1 … ea36, `fibermngrtype` ({id}: re-makes its ports, as on screen), `geometry`. Answers the termination point as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "TP-Hub",
                "designation": "ODF-1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The termination point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/TerminationPoint"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "fibermngrtype": {
                      "id": "30f77966-1346-e711-9acd-782bcb19c20c",
                      "type": "fibermngrtype",
                      "name": "024p-SM"
                    },
                    "fibermngrid": 12,
                    "name": "TP-Hub",
                    "fibermngrtypeid": 1,
                    "buildingid": 20,
                    "designation": "none",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2021-03-29T17:13:49"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Termination points"
        ],
        "summary": "Delete termination point",
        "operationId": "delete_terminationpoints",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). Its ports go, with their patches and terminations (the fibres stay, unterminated); asks first (409) when it has any. Saved routes through it are kept, out of date. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete termination point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/equipment": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Get equipment",
        "operationId": "list_equipment",
        "description": "A page of equipment, each with its `location` and `equipmenttype`, in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of equipment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Equipment"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 5,
                    "total": 5
                  },
                  "data": [
                    {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "location": {
                        "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                        "type": "building",
                        "name": "Hub"
                      },
                      "equipmenttype": {
                        "id": "9a1d0c4e-5f2b-4c3a-8d7e-6b5a4c3d2e1f",
                        "type": "equipmenttype",
                        "name": "GPON OLT 16-port"
                      },
                      "equipmentid": 5,
                      "name": "OLT-1",
                      "manufacturer": "Acme",
                      "serial_number": "SN-0042",
                      "buildingid": 20,
                      "createtime": "2022-06-01T10:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Equipment"
        ],
        "summary": "New equipment",
        "operationId": "create_equipment",
        "description": "Adds equipment inside a building or access point (`location`: {id}), with `equipmenttype` ({id}) and its fields. Checked and saved as on screen, recorded as the token's account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "location": {
                  "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9"
                },
                "equipmenttype": {
                  "id": "9a1d0c4e-5f2b-4c3a-8d7e-6b5a4c3d2e1f"
                },
                "name": "OLT-2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New equipment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Equipment"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "equipmenttype": {
                      "id": "9a1d0c4e-5f2b-4c3a-8d7e-6b5a4c3d2e1f",
                      "type": "equipmenttype",
                      "name": "GPON OLT 16-port"
                    },
                    "equipmentid": 5,
                    "name": "OLT-1",
                    "manufacturer": "Acme",
                    "serial_number": "SN-0042",
                    "buildingid": 20,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/equipment/{id}": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Get equipment",
        "operationId": "get_equipment",
        "description": "One equipment by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Equipment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Equipment"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "equipmenttype": {
                      "id": "9a1d0c4e-5f2b-4c3a-8d7e-6b5a4c3d2e1f",
                      "type": "equipmenttype",
                      "name": "GPON OLT 16-port"
                    },
                    "equipmentid": 5,
                    "name": "OLT-1",
                    "manufacturer": "Acme",
                    "serial_number": "SN-0042",
                    "buildingid": 20,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Equipment"
        ],
        "summary": "Update equipment",
        "operationId": "update_equipment",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, manufacturer, serial_number, ip_address, stage, … (as the form offers them). Answers the equipment as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "OLT-1",
                "serial_number": "SN-0042"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The equipment; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Equipment"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "equipmenttype": {
                      "id": "9a1d0c4e-5f2b-4c3a-8d7e-6b5a4c3d2e1f",
                      "type": "equipmenttype",
                      "name": "GPON OLT 16-port"
                    },
                    "equipmentid": 5,
                    "name": "OLT-1",
                    "manufacturer": "Acme",
                    "serial_number": "SN-0042",
                    "buildingid": 20,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Equipment"
        ],
        "summary": "Delete equipment",
        "operationId": "delete_equipment",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete equipment; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/ports": {
      "get": {
        "tags": [
          "Ports"
        ],
        "summary": "Get ports",
        "operationId": "list_ports",
        "description": "A page of ports of termination points and equipment, each with its `owner` and the port it is patched to (`patchedTo`). `name` filters on `label`, in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of ports",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Port"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 2892,
                    "count": 20,
                    "total": 57829
                  },
                  "data": [
                    {
                      "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                      "owner": {
                        "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                        "type": "terminationpoint",
                        "name": "TP-Hub"
                      },
                      "patchedTo": null,
                      "portid": 61441,
                      "x_table": "fibermngr",
                      "x_id": 12,
                      "num": 1,
                      "label": "TP-Hub: 1",
                      "status": "Used",
                      "users": "Acme",
                      "createtime": "2018-01-15T09:00:00",
                      "updatetime": "2024-11-20T16:02:00"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ports/{id}": {
      "get": {
        "tags": [
          "Ports"
        ],
        "summary": "Get port",
        "operationId": "get_ports",
        "description": "One port by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Port",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Port"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                    "owner": {
                      "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                      "type": "terminationpoint",
                      "name": "TP-Hub"
                    },
                    "patchedTo": null,
                    "portid": 61441,
                    "x_table": "fibermngr",
                    "x_id": 12,
                    "num": 1,
                    "label": "TP-Hub: 1",
                    "status": "Used",
                    "users": "Acme",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2024-11-20T16:02:00"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Ports"
        ],
        "summary": "Update port",
        "operationId": "update_ports",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: status, users, priority, grp, fiberid, comments, termtype, side, porttype, `level`, units, frequency (a termination point's ports; an equipment's answer 409). Answers the port as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "status": "Reserved",
                "users": "Acme"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The port; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Port"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                    "owner": {
                      "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                      "type": "terminationpoint",
                      "name": "TP-Hub"
                    },
                    "patchedTo": null,
                    "portid": 61441,
                    "x_table": "fibermngr",
                    "x_id": 12,
                    "num": 1,
                    "label": "TP-Hub: 1",
                    "status": "Used",
                    "users": "Acme",
                    "createtime": "2018-01-15T09:00:00",
                    "updatetime": "2024-11-20T16:02:00"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ductbanks": {
      "get": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Get duct banks",
        "operationId": "list_ductbanks",
        "description": "A page of duct banks, each with its `start_location` and `end_location`, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of duct banks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DuctBank"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "ee00aa8f-4555-e711-81f1-782bcb19c20c",
                      "geo": {
                        "type": "LineString",
                        "coordinates": [
                          [
                            32.5794,
                            0.2121
                          ],
                          [
                            32.5812,
                            0.2133
                          ]
                        ]
                      },
                      "start_location": {
                        "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                        "type": "accesspoint",
                        "name": "A1576"
                      },
                      "end_location": {
                        "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                        "type": "building",
                        "name": "Hub"
                      },
                      "ductbankid": 48,
                      "name": "DB-00048",
                      "placement": "underground",
                      "totlength": 34,
                      "length_units": "m",
                      "n_innerducts": 1,
                      "createtime": null,
                      "updatetime": "2021-03-30T13:21:23"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Duct banks"
        ],
        "summary": "New duct bank",
        "operationId": "create_ductbanks",
        "description": "Draws a duct bank: `geometry` a LineString and its fields; its ducts come from its type, as on screen. Checked and saved as on screen, recorded as the token's account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "LineString",
                  "coordinates": [
                    [
                      32.5794,
                      0.2121
                    ],
                    [
                      32.5812,
                      0.2133
                    ]
                  ]
                },
                "name": "DB-00049"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New duct bank",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/DuctBank"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "ee00aa8f-4555-e711-81f1-782bcb19c20c",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "start_location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "end_location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "ductbankid": 48,
                    "name": "DB-00048",
                    "placement": "underground",
                    "totlength": 34,
                    "length_units": "m",
                    "n_innerducts": 1,
                    "createtime": null,
                    "updatetime": "2021-03-30T13:21:23"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ductbanks/{id}": {
      "get": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Get duct bank",
        "operationId": "get_ductbanks",
        "description": "One duct bank by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Duct bank",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/DuctBank"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "ee00aa8f-4555-e711-81f1-782bcb19c20c",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "start_location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "end_location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "ductbankid": 48,
                    "name": "DB-00048",
                    "placement": "underground",
                    "totlength": 34,
                    "length_units": "m",
                    "n_innerducts": 1,
                    "createtime": null,
                    "updatetime": "2021-03-30T13:21:23"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Update duct bank",
        "operationId": "update_ductbanks",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, owner, placement, stage, start_/end_ depth and comments, ea1 … ea36, `geometry`. Answers the duct bank as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "placement": "underground"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The duct bank; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/DuctBank"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "ee00aa8f-4555-e711-81f1-782bcb19c20c",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "start_location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "end_location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "ductbankid": 48,
                    "name": "DB-00048",
                    "placement": "underground",
                    "totlength": 34,
                    "length_units": "m",
                    "n_innerducts": 1,
                    "createtime": null,
                    "updatetime": "2021-03-30T13:21:23"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Delete duct bank",
        "operationId": "delete_ductbanks",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). Its ducts go with it. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete duct bank; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "ee00aa8f-4555-e711-81f1-782bcb19c20c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/slackloops": {
      "get": {
        "tags": [
          "Slack loops"
        ],
        "summary": "Get slack loops",
        "operationId": "list_slackloops",
        "description": "A page of slack loops, each with its `location` and `span`. Slack loops have no name, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of slack loops",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SlackLoop"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 309,
                    "count": 20,
                    "total": 6180
                  },
                  "data": [
                    {
                      "id": "62efafd0-e252-e711-81f1-782bcb19c20c",
                      "geo": {
                        "type": "Point",
                        "coordinates": [
                          32.5794,
                          0.2121
                        ]
                      },
                      "location": {
                        "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                        "type": "accesspoint",
                        "name": "A1576"
                      },
                      "span": {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      },
                      "slackid": 12,
                      "spanid": 10412,
                      "placement": "none",
                      "comments": "none",
                      "createtime": null,
                      "updatetime": "2017-06-16T16:26:18"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Slack loops"
        ],
        "summary": "New slack loop",
        "operationId": "create_slackloops",
        "description": "Places a slack loop: `geometry` a Point and its fields. Its span is the cable it is on, as on the map. Checked and saved as on screen, recorded as the token's account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                },
                "comments": "20 m coiled"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New slack loop",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SlackLoop"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "62efafd0-e252-e711-81f1-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "span": {
                      "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "type": "span",
                      "name": "ndejje lubuguumu"
                    },
                    "slackid": 12,
                    "spanid": 10412,
                    "placement": "none",
                    "comments": "none",
                    "createtime": null,
                    "updatetime": "2017-06-16T16:26:18"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/slackloops/{id}": {
      "get": {
        "tags": [
          "Slack loops"
        ],
        "summary": "Get slack loop",
        "operationId": "get_slackloops",
        "description": "One slack loop by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Slack loop",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SlackLoop"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "62efafd0-e252-e711-81f1-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "span": {
                      "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "type": "span",
                      "name": "ndejje lubuguumu"
                    },
                    "slackid": 12,
                    "spanid": 10412,
                    "placement": "none",
                    "comments": "none",
                    "createtime": null,
                    "updatetime": "2017-06-16T16:26:18"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Slack loops"
        ],
        "summary": "Update slack loop",
        "operationId": "update_slackloops",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: placement, comments, ea1 … ea36, `geometry`. Answers the slack loop as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "comments": "20 m coiled"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The slack loop; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SlackLoop"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "62efafd0-e252-e711-81f1-782bcb19c20c",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "location": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "span": {
                      "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "type": "span",
                      "name": "ndejje lubuguumu"
                    },
                    "slackid": 12,
                    "spanid": 10412,
                    "placement": "none",
                    "comments": "none",
                    "createtime": null,
                    "updatetime": "2017-06-16T16:26:18"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Slack loops"
        ],
        "summary": "Delete slack loop",
        "operationId": "delete_slackloops",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). On a cable, the cable's segments join. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete slack loop; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "62efafd0-e252-e711-81f1-782bcb19c20c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/customers": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customers",
        "operationId": "list_customers",
        "description": "A page of customers, each with its `equipment`. `name` filters on `customer`, in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 3,
                    "count": 20,
                    "total": 51
                  },
                  "data": [
                    {
                      "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                      "equipment": {
                        "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                        "type": "equipment",
                        "name": "OLT-1"
                      },
                      "customerid": 80,
                      "customer": "Acme Ltd",
                      "contact": "J. Okello",
                      "phone": "+256 700 000000",
                      "equipmentid": 5,
                      "createtime": "2023-05-02T09:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "New customer",
        "operationId": "create_customers",
        "description": "Makes a customer: `name` (required), its other fields and its `equipment` ({id}).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Acme Ltd",
                "contact": "J. Okello",
                "equipment": {
                  "id": "3005e625-9ec9-4372-acee-b75673c3585a"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "The new customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "customerid": 80,
                    "customer": "Acme Ltd",
                    "contact": "J. Okello",
                    "phone": "+256 700 000000",
                    "equipmentid": 5,
                    "createtime": "2023-05-02T09:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customers/{id}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customer",
        "operationId": "get_customers",
        "description": "One customer by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "customerid": 80,
                    "customer": "Acme Ltd",
                    "contact": "J. Okello",
                    "phone": "+256 700 000000",
                    "equipmentid": 5,
                    "createtime": "2023-05-02T09:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Customers"
        ],
        "summary": "Update customer",
        "operationId": "update_customers",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: `name`, contact, phone, cell, pager, comments, ea1 … ea36, `equipment` ({id} or null). Answers the customer as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Acme Ltd",
                "phone": "+256 700 000000",
                "equipment": {
                  "id": "3005e625-9ec9-4372-acee-b75673c3585a"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The customer; or, with dryRun, what would have changed; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "status",
                            "data"
                          ],
                          "properties": {
                            "status": {
                              "$ref": "#/components/schemas/Status"
                            },
                            "data": {
                              "$ref": "#/components/schemas/Customer"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "$ref": "#/components/schemas/DryRunAnswer"
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "customerid": 80,
                    "customer": "Acme Ltd",
                    "contact": "J. Okello",
                    "phone": "+256 700 000000",
                    "equipmentid": 5,
                    "createtime": "2023-05-02T09:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/devices": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Get devices",
        "operationId": "list_devices",
        "description": "A page of devices (splitters), each with the `enclosure` it is in and its `devicetype`, in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of devices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Device"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 9,
                    "count": 20,
                    "total": 161
                  },
                  "data": [
                    {
                      "id": "d3f352bf-f572-e911-a975-d2718faeb054",
                      "enclosure": {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      },
                      "devicetype": {
                        "id": "5b8f0e2a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
                        "type": "devicetype",
                        "name": "PON Splitter 1x8"
                      },
                      "deviceid": 90,
                      "name": "Splitter 1x8",
                      "x_table": "enclosure",
                      "x_id": 373,
                      "createtime": "2019-06-03T12:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Devices"
        ],
        "summary": "New device",
        "operationId": "create_devices",
        "description": "Adds a splitter of a device type (`devicetype`: {id}) to a closure (`enclosure`: {id}), as the Splice Editor's Add Splitter: with its fibres, unconnected. Change its other fields afterwards. Checked and saved as on screen, recorded as the token's account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "enclosure": {
                  "id": "d0301ab2-0347-e711-9acd-782bcb19c20c"
                },
                "devicetype": {
                  "id": "5b8f0e2a-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New device",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Device"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "d3f352bf-f572-e911-a975-d2718faeb054",
                    "enclosure": {
                      "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                      "type": "enclosure",
                      "name": "SP-1576"
                    },
                    "devicetype": {
                      "id": "5b8f0e2a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "type": "devicetype",
                      "name": "PON Splitter 1x8"
                    },
                    "deviceid": 90,
                    "name": "Splitter 1x8",
                    "x_table": "enclosure",
                    "x_id": 373,
                    "createtime": "2019-06-03T12:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/devices/{id}": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Get device",
        "operationId": "get_devices",
        "description": "One device by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Device",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Device"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "d3f352bf-f572-e911-a975-d2718faeb054",
                    "enclosure": {
                      "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                      "type": "enclosure",
                      "name": "SP-1576"
                    },
                    "devicetype": {
                      "id": "5b8f0e2a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "type": "devicetype",
                      "name": "PON Splitter 1x8"
                    },
                    "deviceid": 90,
                    "name": "Splitter 1x8",
                    "x_table": "enclosure",
                    "x_id": 373,
                    "createtime": "2019-06-03T12:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Devices"
        ],
        "summary": "Update device",
        "operationId": "update_devices",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, description, ipaddress, barcode, serialnumber, installdate, installcompany, acceptance_date, acceptance_name, firmware_version, software_version, power_draw, power_draw_units. Answers the device as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "ipaddress": "10.0.0.9"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The device; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Device"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "d3f352bf-f572-e911-a975-d2718faeb054",
                    "enclosure": {
                      "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                      "type": "enclosure",
                      "name": "SP-1576"
                    },
                    "devicetype": {
                      "id": "5b8f0e2a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "type": "devicetype",
                      "name": "PON Splitter 1x8"
                    },
                    "deviceid": 90,
                    "name": "Splitter 1x8",
                    "x_table": "enclosure",
                    "x_id": 373,
                    "createtime": "2019-06-03T12:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/alarms": {
      "get": {
        "tags": [
          "Alarms"
        ],
        "summary": "Get alarms",
        "operationId": "list_alarms",
        "description": "A page of alarms, each with its saved `route`. Alarms have no name; their made time is `alarm_time`, and they have no changed time, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of alarms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Alarm"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 3,
                    "total": 3
                  },
                  "data": [
                    {
                      "id": "d92648de-974b-4c47-b9aa-3c1246659719",
                      "geo": {
                        "type": "Point",
                        "coordinates": [
                          32.5794,
                          0.2121
                        ]
                      },
                      "route": {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      },
                      "alarmid": 1,
                      "severity": "Medium",
                      "state": "Acknowledged",
                      "event": "Offline",
                      "referenceid": "NOC-5512",
                      "comments": "",
                      "event_time": "2026-10-28T23:33:24",
                      "alarm_time": "2026-10-28T23:29:53",
                      "fault_type": "No Signal",
                      "fault_distance": 1000,
                      "fault_units": "m",
                      "gpslatitude": "0.209497",
                      "gpslongitude": "32.579071"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Alarms"
        ],
        "summary": "New alarm",
        "operationId": "create_alarms",
        "description": "Raises an alarm: severity (High, Medium, Low, Resolved), state, event, event_time, alarm_time (now if left out), comments, referenceid, fault_type, fault_distance, fault_units, its saved `route` ({id}) and `geometry` (a Point, also kept as gpslatitude / gpslongitude), each optional.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "severity": "High",
                "state": "New",
                "event": "Offline",
                "referenceid": "NOC-5512",
                "comments": "raised by monitoring",
                "event_time": "2026-10-28T23:33:24Z",
                "fault_type": "No Signal",
                "route": {
                  "id": "809612c6-2328-e811-a94c-bc9cef5a1839"
                },
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "The new alarm",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Alarm"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "d92648de-974b-4c47-b9aa-3c1246659719",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo"
                    },
                    "alarmid": 1,
                    "severity": "Medium",
                    "state": "Acknowledged",
                    "event": "Offline",
                    "referenceid": "NOC-5512",
                    "comments": "",
                    "event_time": "2026-10-28T23:33:24",
                    "alarm_time": "2026-10-28T23:29:53",
                    "fault_type": "No Signal",
                    "fault_distance": 1000,
                    "fault_units": "m",
                    "gpslatitude": "0.209497",
                    "gpslongitude": "32.579071"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/alarms/{id}": {
      "get": {
        "tags": [
          "Alarms"
        ],
        "summary": "Get alarm",
        "operationId": "get_alarms",
        "description": "One alarm by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Alarm",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Alarm"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "d92648de-974b-4c47-b9aa-3c1246659719",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo"
                    },
                    "alarmid": 1,
                    "severity": "Medium",
                    "state": "Acknowledged",
                    "event": "Offline",
                    "referenceid": "NOC-5512",
                    "comments": "",
                    "event_time": "2026-10-28T23:33:24",
                    "alarm_time": "2026-10-28T23:29:53",
                    "fault_type": "No Signal",
                    "fault_distance": 1000,
                    "fault_units": "m",
                    "gpslatitude": "0.209497",
                    "gpslongitude": "32.579071"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Alarms"
        ],
        "summary": "Update alarm",
        "operationId": "update_alarms",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: severity, state, event, event_time, alarm_time, comments, referenceid, fault_type, fault_distance, fault_units, `route` ({id} or null), `geometry` (a Point). Answers the alarm as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "state": "Acknowledged",
                "comments": "crew sent",
                "route": {
                  "id": "809612c6-2328-e811-a94c-bc9cef5a1839"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The alarm; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Alarm"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "d92648de-974b-4c47-b9aa-3c1246659719",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo"
                    },
                    "alarmid": 1,
                    "severity": "Medium",
                    "state": "Acknowledged",
                    "event": "Offline",
                    "referenceid": "NOC-5512",
                    "comments": "",
                    "event_time": "2026-10-28T23:33:24",
                    "alarm_time": "2026-10-28T23:29:53",
                    "fault_type": "No Signal",
                    "fault_distance": 1000,
                    "fault_units": "m",
                    "gpslatitude": "0.209497",
                    "gpslongitude": "32.579071"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/planlines": {
      "get": {
        "tags": [
          "Plan lines"
        ],
        "summary": "Get plan lines",
        "operationId": "list_planlines",
        "x-feature": "plans",
        "description": "A page of plan lines (drawn plans), in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of plan lines",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlanLine"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 12,
                    "total": 12
                  },
                  "data": [
                    {
                      "id": "5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                      "geo": {
                        "type": "LineString",
                        "coordinates": [
                          [
                            32.5794,
                            0.2121
                          ],
                          [
                            32.5812,
                            0.2133
                          ]
                        ]
                      },
                      "planlineid": 14,
                      "name": "Proposed route B",
                      "planlinetypeid": 2,
                      "createtime": "2025-02-11T09:30:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Plan lines"
        ],
        "summary": "New plan line",
        "operationId": "create_planlines",
        "description": "Draws a plan line: `geometry` a LineString and its fields. Checked and saved as on screen, recorded as the token's account. Needs the **plans** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "LineString",
                  "coordinates": [
                    [
                      32.5794,
                      0.2121
                    ],
                    [
                      32.5812,
                      0.2133
                    ]
                  ]
                },
                "name": "Proposed route C"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New plan line",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PlanLine"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "planlineid": 14,
                    "name": "Proposed route B",
                    "planlinetypeid": 2,
                    "createtime": "2025-02-11T09:30:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/planlines/{id}": {
      "get": {
        "tags": [
          "Plan lines"
        ],
        "summary": "Get plan line",
        "operationId": "get_planlines",
        "x-feature": "plans",
        "description": "One plan line by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Plan line",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PlanLine"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "planlineid": 14,
                    "name": "Proposed route B",
                    "planlinetypeid": 2,
                    "createtime": "2025-02-11T09:30:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Plan lines"
        ],
        "summary": "Update plan line",
        "operationId": "update_planlines",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, comments, stage, … (as the form offers them), `geometry`. Needs **plans**. Answers the plan line as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Proposed route B"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The plan line; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/PlanLine"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "planlineid": 14,
                    "name": "Proposed route B",
                    "planlinetypeid": 2,
                    "createtime": "2025-02-11T09:30:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Plan lines"
        ],
        "summary": "Delete plan line",
        "operationId": "delete_planlines",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete plan line; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/planpoints": {
      "get": {
        "tags": [
          "Plan points"
        ],
        "summary": "Get plan points",
        "operationId": "list_planpoints",
        "x-feature": "plans",
        "description": "A page of plan points, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of plan points",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlanPoint"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 2,
                    "count": 20,
                    "total": 40
                  },
                  "data": [
                    {
                      "id": "6b2c3d4e-5f6a-4b7c-9d8e-0f1a2b3c4d5e",
                      "geo": {
                        "type": "Point",
                        "coordinates": [
                          32.5794,
                          0.2121
                        ]
                      },
                      "planpointid": 7,
                      "name": "Survey mark 7",
                      "planpointtypeid": 1,
                      "createtime": "2025-02-11T09:31:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Plan points"
        ],
        "summary": "New plan point",
        "operationId": "create_planpoints",
        "description": "Places a plan point: `geometry` a Point and its fields. Checked and saved as on screen, recorded as the token's account. Needs the **plans** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    32.5794,
                    0.2121
                  ]
                },
                "name": "Survey mark 8"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New plan point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PlanPoint"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "6b2c3d4e-5f6a-4b7c-9d8e-0f1a2b3c4d5e",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "planpointid": 7,
                    "name": "Survey mark 7",
                    "planpointtypeid": 1,
                    "createtime": "2025-02-11T09:31:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/planpoints/{id}": {
      "get": {
        "tags": [
          "Plan points"
        ],
        "summary": "Get plan point",
        "operationId": "get_planpoints",
        "x-feature": "plans",
        "description": "One plan point by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Plan point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PlanPoint"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "6b2c3d4e-5f6a-4b7c-9d8e-0f1a2b3c4d5e",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "planpointid": 7,
                    "name": "Survey mark 7",
                    "planpointtypeid": 1,
                    "createtime": "2025-02-11T09:31:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Plan points"
        ],
        "summary": "Update plan point",
        "operationId": "update_planpoints",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, comments, stage, … (as the form offers them), `geometry`. Needs **plans**. Answers the plan point as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Survey mark 7"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The plan point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/PlanPoint"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "6b2c3d4e-5f6a-4b7c-9d8e-0f1a2b3c4d5e",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "planpointid": 7,
                    "name": "Survey mark 7",
                    "planpointtypeid": 1,
                    "createtime": "2025-02-11T09:31:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Plan points"
        ],
        "summary": "Delete plan point",
        "operationId": "delete_planpoints",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete plan point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "6b2c3d4e-5f6a-4b7c-9d8e-0f1a2b3c4d5e",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/polelines": {
      "get": {
        "tags": [
          "Pole lines"
        ],
        "summary": "Get pole lines",
        "operationId": "list_polelines",
        "x-feature": "span-tools",
        "description": "A page of pole lines, in id order. Every row has `id` (its GUID) and `geo` (GeoJSON), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of pole lines",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PoleLine"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 9,
                    "total": 9
                  },
                  "data": [
                    {
                      "id": "7c3d4e5f-6a7b-4c8d-8e9f-1a2b3c4d5e6f",
                      "geo": {
                        "type": "LineString",
                        "coordinates": [
                          [
                            32.5794,
                            0.2121
                          ],
                          [
                            32.5812,
                            0.2133
                          ]
                        ]
                      },
                      "pole_lineid": 3,
                      "name": "Ndejje poles",
                      "createtime": "2020-04-02T08:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Pole lines"
        ],
        "summary": "New pole line",
        "operationId": "create_polelines",
        "description": "Draws a pole line (aerial strand): `geometry` a LineString; a pole is made at each end where there is none, as on screen. Checked and saved as on screen, recorded as the token's account. Needs the **span-tools** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "geometry": {
                  "type": "LineString",
                  "coordinates": [
                    [
                      32.5794,
                      0.2121
                    ],
                    [
                      32.5812,
                      0.2133
                    ]
                  ]
                },
                "name": "Ndejje poles 2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New pole line",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PoleLine"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "7c3d4e5f-6a7b-4c8d-8e9f-1a2b3c4d5e6f",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "pole_lineid": 3,
                    "name": "Ndejje poles",
                    "createtime": "2020-04-02T08:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/polelines/{id}": {
      "get": {
        "tags": [
          "Pole lines"
        ],
        "summary": "Get pole line",
        "operationId": "get_polelines",
        "x-feature": "span-tools",
        "description": "One pole line by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "Pole line",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PoleLine"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "7c3d4e5f-6a7b-4c8d-8e9f-1a2b3c4d5e6f",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "pole_lineid": 3,
                    "name": "Ndejje poles",
                    "createtime": "2020-04-02T08:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Pole lines"
        ],
        "summary": "Update pole line",
        "operationId": "update_polelines",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, owner, comments, … (as the form offers them), `geometry`. Needs **span-tools**. Answers the pole line as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Ndejje poles"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pole line; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/PoleLine"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "7c3d4e5f-6a7b-4c8d-8e9f-1a2b3c4d5e6f",
                    "geo": {
                      "type": "LineString",
                      "coordinates": [
                        [
                          32.5794,
                          0.2121
                        ],
                        [
                          32.5812,
                          0.2133
                        ]
                      ]
                    },
                    "pole_lineid": 3,
                    "name": "Ndejje poles",
                    "createtime": "2020-04-02T08:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Pole lines"
        ],
        "summary": "Delete pole line",
        "operationId": "delete_polelines",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete pole line; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "7c3d4e5f-6a7b-4c8d-8e9f-1a2b3c4d5e6f",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/floors": {
      "get": {
        "tags": [
          "Floors"
        ],
        "summary": "Get floors",
        "operationId": "list_floors",
        "x-feature": "isp",
        "description": "A page of floors, each with its `building`, in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of floors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Floor"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 4,
                    "total": 4
                  },
                  "data": [
                    {
                      "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                      "building": {
                        "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                        "type": "building",
                        "name": "Hub"
                      },
                      "floorid": 1,
                      "name": "Ground",
                      "buildingid": 20,
                      "createtime": "2022-06-01T10:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Floors"
        ],
        "summary": "New floor",
        "operationId": "create_floors",
        "description": "Adds a floor to a building (`building`: {id}). Checked and saved as on screen, recorded as the token's account. Needs the **isp** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "building": {
                  "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9"
                },
                "name": "First"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New floor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Floor"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                    "building": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "floorid": 1,
                    "name": "Ground",
                    "buildingid": 20,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/floors/{id}": {
      "get": {
        "tags": [
          "Floors"
        ],
        "summary": "Get floor",
        "operationId": "get_floors",
        "x-feature": "isp",
        "description": "One floor by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Floor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Floor"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                    "building": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "floorid": 1,
                    "name": "Ground",
                    "buildingid": 20,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Floors"
        ],
        "summary": "Update floor",
        "operationId": "update_floors",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, … (as the form offers them). Needs **isp**. Answers the floor as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Ground"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The floor; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Floor"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                    "building": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "floorid": 1,
                    "name": "Ground",
                    "buildingid": 20,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Floors"
        ],
        "summary": "Delete floor",
        "operationId": "delete_floors",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete floor; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/rooms": {
      "get": {
        "tags": [
          "Rooms"
        ],
        "summary": "Get rooms",
        "operationId": "list_rooms",
        "x-feature": "isp",
        "description": "A page of rooms, each with its `building` and the floor it is on (`onFloor`), in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of rooms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Room"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 6,
                    "total": 6
                  },
                  "data": [
                    {
                      "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                      "building": {
                        "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                        "type": "building",
                        "name": "Hub"
                      },
                      "onFloor": {
                        "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                        "type": "floor",
                        "name": "Ground"
                      },
                      "roomid": 1,
                      "floor": "Ground",
                      "name": "Comms room",
                      "buildingid": 20,
                      "floorid": 1,
                      "createtime": "2022-06-01T10:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Rooms"
        ],
        "summary": "New room",
        "operationId": "create_rooms",
        "description": "Adds a room to a building (`building`: {id}), optionally on a floor (`onFloor`: {id}). Checked and saved as on screen, recorded as the token's account. Needs the **isp** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "building": {
                  "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9"
                },
                "onFloor": {
                  "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b"
                },
                "name": "Plant room"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New room",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Room"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                    "building": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "onFloor": {
                      "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                      "type": "floor",
                      "name": "Ground"
                    },
                    "roomid": 1,
                    "floor": "Ground",
                    "name": "Comms room",
                    "buildingid": 20,
                    "floorid": 1,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/rooms/{id}": {
      "get": {
        "tags": [
          "Rooms"
        ],
        "summary": "Get room",
        "operationId": "get_rooms",
        "x-feature": "isp",
        "description": "One room by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Room",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Room"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                    "building": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "onFloor": {
                      "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                      "type": "floor",
                      "name": "Ground"
                    },
                    "roomid": 1,
                    "floor": "Ground",
                    "name": "Comms room",
                    "buildingid": 20,
                    "floorid": 1,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Rooms"
        ],
        "summary": "Update room",
        "operationId": "update_rooms",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, … (as the form offers them). Needs **isp**. Answers the room as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Comms room"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The room; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Room"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                    "building": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "onFloor": {
                      "id": "1c9e7b52-3a0d-4f6e-9b8a-7d6c5e4f3a2b",
                      "type": "floor",
                      "name": "Ground"
                    },
                    "roomid": 1,
                    "floor": "Ground",
                    "name": "Comms room",
                    "buildingid": 20,
                    "floorid": 1,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Rooms"
        ],
        "summary": "Delete room",
        "operationId": "delete_rooms",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete room; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/racks": {
      "get": {
        "tags": [
          "Racks"
        ],
        "summary": "Get racks",
        "operationId": "list_racks",
        "x-feature": "isp",
        "description": "A page of racks, each with its `location` (access point or building) and `room`, in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of racks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Rack"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 11,
                    "total": 11
                  },
                  "data": [
                    {
                      "id": "3e1a9d74-5c2f-4b80-9dac-9f8e7a6b5c4d",
                      "location": {
                        "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                        "type": "building",
                        "name": "Hub"
                      },
                      "room": {
                        "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                        "type": "room",
                        "name": "Comms room"
                      },
                      "rackid": 1,
                      "name": "Rack A",
                      "buildingid": 20,
                      "roomid": 1,
                      "createtime": "2022-06-01T10:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Racks"
        ],
        "summary": "New rack",
        "operationId": "create_racks",
        "description": "Adds a rack inside a building or access point (`location`: {id}), optionally in a `room` ({id}). Checked and saved as on screen, recorded as the token's account. Needs the **isp** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "location": {
                  "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9"
                },
                "room": {
                  "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c"
                },
                "name": "Rack B"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New rack",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Rack"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "3e1a9d74-5c2f-4b80-9dac-9f8e7a6b5c4d",
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "room": {
                      "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                      "type": "room",
                      "name": "Comms room"
                    },
                    "rackid": 1,
                    "name": "Rack A",
                    "buildingid": 20,
                    "roomid": 1,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/racks/{id}": {
      "get": {
        "tags": [
          "Racks"
        ],
        "summary": "Get rack",
        "operationId": "get_racks",
        "x-feature": "isp",
        "description": "One rack by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Rack",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Rack"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "3e1a9d74-5c2f-4b80-9dac-9f8e7a6b5c4d",
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "room": {
                      "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                      "type": "room",
                      "name": "Comms room"
                    },
                    "rackid": 1,
                    "name": "Rack A",
                    "buildingid": 20,
                    "roomid": 1,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Racks"
        ],
        "summary": "Update rack",
        "operationId": "update_racks",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: name, … (as the form offers them). Needs **isp**. Answers the rack as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Rack A"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rack; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Rack"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "3e1a9d74-5c2f-4b80-9dac-9f8e7a6b5c4d",
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "room": {
                      "id": "2d0f8c63-4b1e-4a7f-8c9b-8e7d6f5a4b3c",
                      "type": "room",
                      "name": "Comms room"
                    },
                    "rackid": 1,
                    "name": "Rack A",
                    "buildingid": 20,
                    "roomid": 1,
                    "createtime": "2022-06-01T10:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Racks"
        ],
        "summary": "Delete rack",
        "operationId": "delete_racks",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account).  Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete rack; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "3e1a9d74-5c2f-4b80-9dac-9f8e7a6b5c4d",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/workorders": {
      "get": {
        "tags": [
          "Work orders"
        ],
        "summary": "Get work orders",
        "operationId": "list_workorders",
        "x-feature": "work-orders",
        "description": "A page of work orders. `name` filters on `workorder`, in id order. Every row has `id` (its GUID), then the object's fields as stored.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of work orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkOrder"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 2,
                    "count": 20,
                    "total": 31
                  },
                  "data": [
                    {
                      "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                      "workorderid": 31,
                      "workorder": "WO-2026-031",
                      "initiator": "brenda",
                      "stage": "design",
                      "start_date": "2026-10-01",
                      "end_date": null,
                      "createtime": "2026-09-28T14:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Work orders"
        ],
        "summary": "New work order",
        "operationId": "create_workorders",
        "description": "Makes a work order named `name` (or the next default name, as Create New), then sets its other fields. Checked and saved as on screen, recorded as the token's account. Needs the **work-orders** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "WO-2026-032",
                "stage": "design"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New work order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkOrder"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                    "workorderid": 31,
                    "workorder": "WO-2026-031",
                    "initiator": "brenda",
                    "stage": "design",
                    "start_date": "2026-10-01",
                    "end_date": null,
                    "createtime": "2026-09-28T14:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/workorders/{id}": {
      "get": {
        "tags": [
          "Work orders"
        ],
        "summary": "Get work order",
        "operationId": "get_workorders",
        "x-feature": "work-orders",
        "description": "One work order by its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Work order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkOrder"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                    "workorderid": 31,
                    "workorder": "WO-2026-031",
                    "initiator": "brenda",
                    "stage": "design",
                    "start_date": "2026-10-01",
                    "end_date": null,
                    "createtime": "2026-09-28T14:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Work orders"
        ],
        "summary": "Update work order",
        "operationId": "update_workorders",
        "description": "Changes the fields given, as the app's own window saves them: only the fields the network's form offers, checked the same way, refused (409) while someone has it open for editing, recorded as the token's account. Fields: `name`, initiator, stage (its status), start_date, end_date, ea1 … ea36 (as its Attribute Editor offers them). Needs **work-orders**. Answers the work order as it is now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "WO-2026-031",
                "stage": "construction"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The work order; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/WorkOrder"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                    "workorderid": 31,
                    "workorder": "WO-2026-031",
                    "initiator": "brenda",
                    "stage": "design",
                    "start_date": "2026-10-01",
                    "end_date": null,
                    "createtime": "2026-09-28T14:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Work orders"
        ],
        "summary": "Delete work order",
        "operationId": "delete_workorders",
        "description": "Deletes it, as the app's own Delete does (a real delete, recorded as the token's account). The objects on it come off it and its priced tasks go; asks first (409) when it has any. Refused (409) while anything else still uses it, saying what. When deleting takes other things with it, the first call answers 409 `confirm_needed` saying what would go; send it again with `confirm=true`. Needs a **network-changes token**.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/confirm"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete work order; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/spans/{id}/strands": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get strands at cable span",
        "operationId": "spanStrands",
        "description": "A span's strands, by number.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of strands",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Strand"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 4,
                    "count": 20,
                    "total": 72
                  },
                  "data": [
                    {
                      "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                      "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "strandid": 35143683,
                      "x_table": "span",
                      "x_id": 10412,
                      "num": 3,
                      "color": "gr",
                      "bundle": "blue",
                      "status": null,
                      "scalefactor": 1,
                      "createtime": "2019-08-12T15:29:53",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}/strands/{num}": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get strand of a span",
        "operationId": "spanStrand",
        "description": "One strand by its span and number. This always names one strand, whatever its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/num"
          }
        ],
        "responses": {
          "200": {
            "description": "The strand",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Strand"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                    "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "strandid": 35143683,
                    "x_table": "span",
                    "x_id": 10412,
                    "num": 3,
                    "color": "gr",
                    "bundle": "blue",
                    "status": null,
                    "scalefactor": 1,
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Update strand of a span",
        "operationId": "updateSpanStrand",
        "description": "As Update strand, for the strand with that number in that span: always one strand, whatever its GUID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/num"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "status": "damaged"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The strand; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Strand"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                    "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "strandid": 35143683,
                    "x_table": "span",
                    "x_id": 10412,
                    "num": 3,
                    "color": "gr",
                    "bundle": "blue",
                    "status": null,
                    "scalefactor": 1,
                    "createtime": "2019-08-12T15:29:53",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}/strands/{num}/trace": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get route trace at strand of a span",
        "operationId": "spanStrandTrace",
        "description": "Today's path through the network from that strand, both ways, as Route Detail traces it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/num"
          }
        ],
        "responses": {
          "200": {
            "description": "The legs, in order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Trace"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "legs": [
                      {
                        "leg": "1 - 1",
                        "kind": "port",
                        "object": "1 - TP-30: 1",
                        "parent": "TP-30",
                        "location": "Hub",
                        "address": "Ring Rd, Kampala",
                        "status": "Used",
                        "id": "0f1c2d3e-4b5a-4c6d-8e7f-90a1b2c3d4e5",
                        "type": "port",
                        "port": 1,
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.2,
                        "cumulativeLoss": 0.2
                      },
                      {
                        "leg": "1 - 2",
                        "kind": "strand",
                        "object": "3 - blue/gr",
                        "parent": "10412 - ndejje lubuguumu",
                        "location": "",
                        "address": "",
                        "status": "",
                        "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "type": "strand",
                        "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "strand": 3,
                        "color": "blue/gr",
                        "end": false,
                        "distance": 340,
                        "total": 340,
                        "optical": 340,
                        "opticalTotal": 340,
                        "loss": 0.12,
                        "cumulativeLoss": 0.32
                      },
                      {
                        "leg": "1 - 3",
                        "kind": "splice",
                        "object": "",
                        "parent": "SP-1576",
                        "location": "A1576",
                        "address": "Ndejje Rd, Kampala",
                        "status": "",
                        "id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
                        "type": "enclosure",
                        "spliceType": "fusion",
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.1,
                        "cumulativeLoss": 0.42
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/routes/{id}/trace": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Get route trace",
        "operationId": "routeTrace",
        "description": "A saved route's legs, port to port, as Route Detail shows them.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "The legs, in order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Trace"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "legs": [
                      {
                        "leg": "1 - 1",
                        "kind": "port",
                        "object": "1 - TP-30: 1",
                        "parent": "TP-30",
                        "location": "Hub",
                        "address": "Ring Rd, Kampala",
                        "status": "Used",
                        "id": "0f1c2d3e-4b5a-4c6d-8e7f-90a1b2c3d4e5",
                        "type": "port",
                        "port": 1,
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.2,
                        "cumulativeLoss": 0.2
                      },
                      {
                        "leg": "1 - 2",
                        "kind": "strand",
                        "object": "3 - blue/gr",
                        "parent": "10412 - ndejje lubuguumu",
                        "location": "",
                        "address": "",
                        "status": "",
                        "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "type": "strand",
                        "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "strand": 3,
                        "color": "blue/gr",
                        "end": false,
                        "distance": 340,
                        "total": 340,
                        "optical": 340,
                        "opticalTotal": 340,
                        "loss": 0.12,
                        "cumulativeLoss": 0.32
                      },
                      {
                        "leg": "1 - 3",
                        "kind": "splice",
                        "object": "",
                        "parent": "SP-1576",
                        "location": "A1576",
                        "address": "Ndejje Rd, Kampala",
                        "status": "",
                        "id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
                        "type": "enclosure",
                        "spliceType": "fusion",
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.1,
                        "cumulativeLoss": 0.42
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/routes/{id}/faultlocation": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Get route fault location",
        "operationId": "faultLocation",
        "description": "Where a fault is, a distance along the saved route (map distance, as the Saved Route window's Find Fault measures it): the strand leg the distance falls on, how far into it, and the point. A distance past the end of the route answers 422.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "name": "distance",
            "in": "query",
            "required": true,
            "description": "How far along the route, in `units`",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "example": 1000
          },
          {
            "name": "units",
            "in": "query",
            "description": "m (default), km, ft or mi",
            "schema": {
              "type": "string",
              "enum": [
                "m",
                "km",
                "ft",
                "mi"
              ],
              "default": "m"
            }
          },
          {
            "$ref": "#/components/parameters/srid"
          }
        ],
        "responses": {
          "200": {
            "description": "The fault's place",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Fault"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "distance": {
                      "value": 1000,
                      "units": "m",
                      "metres": 1000
                    },
                    "routeLength": 10641,
                    "legIndex": 13,
                    "leg": {
                      "leg": "1 - 2",
                      "kind": "strand",
                      "object": "3 - blue/gr",
                      "parent": "10412 - ndejje lubuguumu",
                      "location": "",
                      "address": "",
                      "status": "",
                      "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                      "type": "strand",
                      "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "strand": 3,
                      "color": "blue/gr",
                      "end": false,
                      "distance": 340,
                      "total": 340,
                      "optical": 340,
                      "opticalTotal": 340,
                      "loss": 0.12,
                      "cumulativeLoss": 0.32
                    },
                    "intoLeg": 412.6,
                    "point": {
                      "type": "Point",
                      "coordinates": [
                        32.579071,
                        0.209497
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          }
        }
      },
      "post": {
        "tags": [
          "Saved routes"
        ],
        "summary": "New alarm from route fault location",
        "operationId": "alarmFromFault",
        "description": "Finds the fault as Get route fault location does and raises an alarm there: on this saved route, with this `distance` and `units` as fault_distance and fault_units, and the fault's point as its geometry and GPS fields. The body gives the alarm's other fields (not geometry or route). A distance past the end of the route answers 422 and raises nothing. The answer is the alarm, with `faultLocation`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "name": "distance",
            "in": "query",
            "required": true,
            "description": "How far along the route, in `units`",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "example": 1000
          },
          {
            "name": "units",
            "in": "query",
            "description": "m (default), km, ft or mi",
            "schema": {
              "type": "string",
              "enum": [
                "m",
                "km",
                "ft",
                "mi"
              ],
              "default": "m"
            }
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "severity": "High",
                "state": "New",
                "event": "No Signal",
                "referenceid": "OTDR-0042",
                "comments": "OTDR shot from Hub"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "The new alarm",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AlarmAtFault"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "d92648de-974b-4c47-b9aa-3c1246659719",
                    "geo": {
                      "type": "Point",
                      "coordinates": [
                        32.5794,
                        0.2121
                      ]
                    },
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo"
                    },
                    "alarmid": 1,
                    "severity": "Medium",
                    "state": "Acknowledged",
                    "event": "Offline",
                    "referenceid": "NOC-5512",
                    "comments": "",
                    "event_time": "2026-10-28T23:33:24",
                    "alarm_time": "2026-10-28T23:29:53",
                    "fault_type": "No Signal",
                    "fault_distance": 1000,
                    "fault_units": "m",
                    "gpslatitude": "0.209497",
                    "gpslongitude": "32.579071",
                    "faultLocation": {
                      "distance": {
                        "value": 1000,
                        "units": "m",
                        "metres": 1000
                      },
                      "routeLength": 10641,
                      "legIndex": 13,
                      "leg": {
                        "leg": "1 - 2",
                        "kind": "strand",
                        "object": "3 - blue/gr",
                        "parent": "10412 - ndejje lubuguumu",
                        "location": "",
                        "address": "",
                        "status": "",
                        "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "type": "strand",
                        "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "strand": 3,
                        "color": "blue/gr",
                        "end": false,
                        "distance": 340,
                        "total": 340,
                        "optical": 340,
                        "opticalTotal": 340,
                        "loss": 0.12,
                        "cumulativeLoss": 0.32
                      },
                      "intoLeg": 412.6,
                      "point": {
                        "type": "Point",
                        "coordinates": [
                          32.5794,
                          0.2121
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          }
        }
      }
    },
    "/api/v1/networks/{network}/strands/{id}/trace": {
      "get": {
        "tags": [
          "Strands"
        ],
        "summary": "Get route trace at strand",
        "operationId": "strandTrace",
        "description": "Today's path from a strand of a cable span, by the strand's GUID. A shared GUID answers 409: use Get route trace at strand of a span.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "The legs, in order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Trace"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "legs": [
                      {
                        "leg": "1 - 1",
                        "kind": "port",
                        "object": "1 - TP-30: 1",
                        "parent": "TP-30",
                        "location": "Hub",
                        "address": "Ring Rd, Kampala",
                        "status": "Used",
                        "id": "0f1c2d3e-4b5a-4c6d-8e7f-90a1b2c3d4e5",
                        "type": "port",
                        "port": 1,
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.2,
                        "cumulativeLoss": 0.2
                      },
                      {
                        "leg": "1 - 2",
                        "kind": "strand",
                        "object": "3 - blue/gr",
                        "parent": "10412 - ndejje lubuguumu",
                        "location": "",
                        "address": "",
                        "status": "",
                        "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "type": "strand",
                        "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "strand": 3,
                        "color": "blue/gr",
                        "end": false,
                        "distance": 340,
                        "total": 340,
                        "optical": 340,
                        "opticalTotal": 340,
                        "loss": 0.12,
                        "cumulativeLoss": 0.32
                      },
                      {
                        "leg": "1 - 3",
                        "kind": "splice",
                        "object": "",
                        "parent": "SP-1576",
                        "location": "A1576",
                        "address": "Ndejje Rd, Kampala",
                        "status": "",
                        "id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
                        "type": "enclosure",
                        "spliceType": "fusion",
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.1,
                        "cumulativeLoss": 0.42
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}/splicing": {
      "get": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Get splicing at enclosure",
        "operationId": "enclosureSplicing",
        "description": "The splices in an enclosure, as its Splice List shows them: each pair of strand ranges (`a`, `b`: the span or splitter, and strands `from`–`to`), splice type and tray; and the spans and splitters there.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "splicing at enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Splicing"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "splices": [
                      {
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "name": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "name": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "splice": 1001,
                        "type": "fusion",
                        "tray": "1",
                        "splitter": false
                      }
                    ],
                    "spans": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu",
                        "label": "10412 - ndejje lubuguumu",
                        "strands": 72
                      }
                    ],
                    "splitters": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}/devices": {
      "get": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Get devices at enclosure",
        "operationId": "enclosureDevices",
        "description": "The devices (splitters) in an enclosure, as Get device gives each.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "devices at enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Device"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": "d3f352bf-f572-e911-a975-d2718faeb054",
                      "enclosure": {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      },
                      "devicetype": {
                        "id": "5b8f0e2a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
                        "type": "devicetype",
                        "name": "PON Splitter 1x8"
                      },
                      "deviceid": 90,
                      "name": "Splitter 1x8",
                      "x_table": "enclosure",
                      "x_id": 373,
                      "createtime": "2019-06-03T12:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/ports": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get ports at termination point",
        "operationId": "terminationPointPorts",
        "description": "A termination point's ports, by number, as Get port gives each.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "ports at termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Port"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                      "owner": {
                        "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                        "type": "terminationpoint",
                        "name": "TP-Hub"
                      },
                      "patchedTo": null,
                      "portid": 61441,
                      "x_table": "fibermngr",
                      "x_id": 12,
                      "num": 1,
                      "label": "TP-Hub: 1",
                      "status": "Used",
                      "users": "Acme",
                      "createtime": "2018-01-15T09:00:00",
                      "updatetime": "2024-11-20T16:02:00"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Termination points"
        ],
        "summary": "Update ports in a batch",
        "operationId": "updatePorts",
        "x-feature": "ports",
        "description": "Port Batch Update: sets `fields` on each of `ports` (the term point's port GUIDs) in one save, and carries the fields named in `propagate` along each port's route (Port Propagation). Answers the term point's ports. Needs a **network-changes token**. Needs the **ports** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "ports": [
                  "0fab6712-7ed9-eb11-aa0b-a47e47036354"
                ],
                "fields": {
                  "status": "Reserved",
                  "users": "Acme"
                },
                "propagate": [
                  "users"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update ports in a batch; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Port"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": [
                    {
                      "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                      "owner": {
                        "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                        "type": "terminationpoint",
                        "name": "TP-Hub"
                      },
                      "patchedTo": null,
                      "portid": 61441,
                      "x_table": "fibermngr",
                      "x_id": 12,
                      "num": 1,
                      "label": "TP-Hub: 1",
                      "status": "Used",
                      "users": "Acme",
                      "createtime": "2018-01-15T09:00:00",
                      "updatetime": "2024-11-20T16:02:00"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/splicing": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get splicing at termination point",
        "operationId": "terminationPointSplicing",
        "description": "The splices in a termination point (as at an enclosure). Terminations are not splices: see Get terminations.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "splicing at termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Splicing"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "splices": [
                      {
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "name": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "name": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "splice": 1001,
                        "type": "fusion",
                        "tray": "1",
                        "splitter": false
                      }
                    ],
                    "spans": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu",
                        "label": "10412 - ndejje lubuguumu",
                        "strands": 72
                      }
                    ],
                    "splitters": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/terminations": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get terminations",
        "operationId": "terminations",
        "description": "The strands terminated on a termination point's ports, as the Termination Editor shows them: the port, and the span and strand number on it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "terminations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Termination"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "port": {
                        "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                        "type": "port",
                        "name": "TP-Hub: 1"
                      },
                      "num": 1,
                      "span": {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      },
                      "strand": 3,
                      "status": "Used"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Termination points"
        ],
        "summary": "Terminate",
        "operationId": "terminate",
        "x-feature": "terminating",
        "description": "Terminates a run of a span's strands on a run of the term point's ports, as the Termination Editor: `span` ({id}), `strandFrom`, `strandTo`, `portFrom` (`portTo` follows), and optionally `group`, `fiberFrom`, `connector`, `status`, `priority`, `users`, `comments`. Answers the terminations. Needs a **network-changes token**. Needs the **terminating** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "span": {
                  "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c"
                },
                "strandFrom": 1,
                "strandTo": 2,
                "portFrom": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Terminate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Termination"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": [
                    {
                      "port": {
                        "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                        "type": "port",
                        "name": "TP-Hub: 1"
                      },
                      "num": 1,
                      "span": {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      },
                      "strand": 1,
                      "status": "Used"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/patching": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get patching at termination point location",
        "operationId": "terminationPointPatching",
        "description": "The patching at the structure the termination point is in (see Get patching at building).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "patching at termination point location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Patching"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": [
                      {
                        "a": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1",
                          "num": 1,
                          "owner": {
                            "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                            "type": "terminationpoint",
                            "name": "TP-Hub"
                          }
                        },
                        "b": {
                          "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f",
                          "type": "port",
                          "name": "OLT-1: 3",
                          "num": 3,
                          "owner": {
                            "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                            "type": "equipment",
                            "name": "OLT-1"
                          }
                        },
                        "cord": {
                          "id": "7d4d5598-60ee-416c-9853-1fa6494b389f",
                          "label": "PC-1",
                          "length": 3,
                          "units": "m"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/services": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get termination point services",
        "operationId": "terminationPointServices",
        "description": "Each port's status and users, the saved route that starts at it (`route`), every saved route through it (`routes`), and the wavelengths entering there (`waveFilter`, from WaveView).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "termination point services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PortServices"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "ports": [
                      {
                        "port": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1"
                        },
                        "num": 1,
                        "status": "Used",
                        "users": "Acme",
                        "route": {
                          "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                          "type": "route",
                          "name": "Kajjansi <> Kigo"
                        },
                        "routes": [
                          {
                            "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                            "type": "route",
                            "name": "Kajjansi <> Kigo"
                          }
                        ],
                        "waveFilter": "1310,1550"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/equipment/{id}/ports": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Get ports at equipment",
        "operationId": "equipmentPorts",
        "description": "An equipment's ports, by number.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "ports at equipment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Port"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                      "owner": {
                        "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                        "type": "equipment",
                        "name": "OLT-1"
                      },
                      "patchedTo": null,
                      "portid": 61441,
                      "x_table": "equipment",
                      "x_id": 12,
                      "num": 1,
                      "label": "OLT-1: 1",
                      "status": "Used",
                      "users": "Acme",
                      "createtime": "2018-01-15T09:00:00",
                      "updatetime": "2024-11-20T16:02:00"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/equipment/{id}/patching": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Get patching at equipment location",
        "operationId": "equipmentPatching",
        "description": "The patching at the structure the equipment is in (see Get patching at building).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "patching at equipment location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Patching"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": [
                      {
                        "a": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1",
                          "num": 1,
                          "owner": {
                            "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                            "type": "terminationpoint",
                            "name": "TP-Hub"
                          }
                        },
                        "b": {
                          "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f",
                          "type": "port",
                          "name": "OLT-1: 3",
                          "num": 3,
                          "owner": {
                            "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                            "type": "equipment",
                            "name": "OLT-1"
                          }
                        },
                        "cord": {
                          "id": "7d4d5598-60ee-416c-9853-1fa6494b389f",
                          "label": "PC-1",
                          "length": 3,
                          "units": "m"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/equipment/{id}/services": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Get equipment services",
        "operationId": "equipmentServices",
        "description": "As termination point services, for an equipment's ports, and the equipment's customers.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "equipment services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/EquipmentServices"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "ports": [
                      {
                        "port": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1"
                        },
                        "num": 1,
                        "status": "Used",
                        "users": "Acme",
                        "route": {
                          "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                          "type": "route",
                          "name": "Kajjansi <> Kigo"
                        },
                        "routes": [
                          {
                            "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                            "type": "route",
                            "name": "Kajjansi <> Kigo"
                          }
                        ],
                        "waveFilter": null
                      }
                    ],
                    "customers": [
                      {
                        "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                        "type": "customer",
                        "name": "Acme Ltd"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/equipment/{id}/relations": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Get equipment relations",
        "operationId": "equipmentRelations",
        "description": "The customers related to an equipment.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "equipment relations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/EquipmentRelations"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "customers": [
                      {
                        "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                        "type": "customer",
                        "name": "Acme Ltd"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Equipment"
        ],
        "summary": "Update equipment relations",
        "operationId": "relateEquipment",
        "description": "Makes these customers the equipment's (a customer has at most one equipment, so each moves here). `customers` is a list of customer GUIDs.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "customers": [
                  "067ec1cc-e42a-4cdc-82e9-385a69ae65b1"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The relations now; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/EquipmentRelations"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "customers": [
                      {
                        "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                        "type": "customer",
                        "name": "Acme Ltd"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Equipment"
        ],
        "summary": "Delete equipment relations",
        "operationId": "unrelateEquipment",
        "description": "Takes these customers off the equipment; `customers` null (or left out) takes all of them off.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "customers": [
                  "067ec1cc-e42a-4cdc-82e9-385a69ae65b1"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The relations now; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/EquipmentRelations"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "customers": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ports/{id}/trace": {
      "get": {
        "tags": [
          "Ports"
        ],
        "summary": "Get route trace at port",
        "operationId": "portTrace",
        "description": "Today's path through the network from a port, as Route Detail traces it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "route trace at port",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Trace"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "legs": [
                      {
                        "leg": "1 - 1",
                        "kind": "port",
                        "object": "1 - TP-30: 1",
                        "parent": "TP-30",
                        "location": "Hub",
                        "address": "Ring Rd, Kampala",
                        "status": "Used",
                        "id": "0f1c2d3e-4b5a-4c6d-8e7f-90a1b2c3d4e5",
                        "type": "port",
                        "port": 1,
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.2,
                        "cumulativeLoss": 0.2
                      },
                      {
                        "leg": "1 - 2",
                        "kind": "strand",
                        "object": "3 - blue/gr",
                        "parent": "10412 - ndejje lubuguumu",
                        "location": "",
                        "address": "",
                        "status": "",
                        "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "type": "strand",
                        "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "strand": 3,
                        "color": "blue/gr",
                        "end": false,
                        "distance": 340,
                        "total": 340,
                        "optical": 340,
                        "opticalTotal": 340,
                        "loss": 0.12,
                        "cumulativeLoss": 0.32
                      },
                      {
                        "leg": "1 - 3",
                        "kind": "splice",
                        "object": "",
                        "parent": "SP-1576",
                        "location": "A1576",
                        "address": "Ndejje Rd, Kampala",
                        "status": "",
                        "id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
                        "type": "enclosure",
                        "spliceType": "fusion",
                        "end": false,
                        "distance": null,
                        "total": null,
                        "optical": null,
                        "opticalTotal": null,
                        "loss": 0.1,
                        "cumulativeLoss": 0.42
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/accesspoints/{id}/patching": {
      "get": {
        "tags": [
          "Access points"
        ],
        "summary": "Get patching at access point",
        "operationId": "accesspointsPatching",
        "description": "The patches between ports of the termination points and equipment in an access point, each once, as the Patch Editor shows them: both ports, the termination point or equipment each is on (`owner`), and the patch cord.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "patching at access point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Patching"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": [
                      {
                        "a": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1",
                          "num": 1,
                          "owner": {
                            "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                            "type": "terminationpoint",
                            "name": "TP-Hub"
                          }
                        },
                        "b": {
                          "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f",
                          "type": "port",
                          "name": "OLT-1: 3",
                          "num": 3,
                          "owner": {
                            "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                            "type": "equipment",
                            "name": "OLT-1"
                          }
                        },
                        "cord": {
                          "id": "7d4d5598-60ee-416c-9853-1fa6494b389f",
                          "label": "PC-1",
                          "length": 3,
                          "units": "m"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/buildings/{id}/patching": {
      "get": {
        "tags": [
          "Buildings"
        ],
        "summary": "Get patching at building",
        "operationId": "buildingsPatching",
        "description": "The patches between ports of the termination points and equipment in a building, each once, as the Patch Editor shows them: both ports, the termination point or equipment each is on (`owner`), and the patch cord.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "patching at building",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Patching"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": [
                      {
                        "a": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1",
                          "num": 1,
                          "owner": {
                            "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                            "type": "terminationpoint",
                            "name": "TP-Hub"
                          }
                        },
                        "b": {
                          "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f",
                          "type": "port",
                          "name": "OLT-1: 3",
                          "num": 3,
                          "owner": {
                            "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                            "type": "equipment",
                            "name": "OLT-1"
                          }
                        },
                        "cord": {
                          "id": "7d4d5598-60ee-416c-9853-1fa6494b389f",
                          "label": "PC-1",
                          "length": 3,
                          "units": "m"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/poles/{id}/patching": {
      "get": {
        "tags": [
          "Poles"
        ],
        "summary": "Get patching at pole",
        "operationId": "polesPatching",
        "description": "The patches between ports of the termination points and equipment in a pole, each once, as the Patch Editor shows them: both ports, the termination point or equipment each is on (`owner`), and the patch cord.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "patching at pole",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Patching"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": [
                      {
                        "a": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1",
                          "num": 1,
                          "owner": {
                            "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                            "type": "terminationpoint",
                            "name": "TP-Hub"
                          }
                        },
                        "b": {
                          "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f",
                          "type": "port",
                          "name": "OLT-1: 3",
                          "num": 3,
                          "owner": {
                            "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                            "type": "equipment",
                            "name": "OLT-1"
                          }
                        },
                        "cord": {
                          "id": "7d4d5598-60ee-416c-9853-1fa6494b389f",
                          "label": "PC-1",
                          "length": 3,
                          "units": "m"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}/services": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get cable span services",
        "operationId": "spanServices",
        "description": "A span's leased strand ranges, and each strand's status, lease, the saved route that starts at it, every saved route through it and the wavelengths a filter on it passes (`waveFilter`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "cable span services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SpanServices"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "leased": [
                      {
                        "status": "Leased",
                        "company": "Carrier X",
                        "from": 13,
                        "to": 24
                      }
                    ],
                    "strands": [
                      {
                        "strand": {
                          "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                          "type": "strand",
                          "name": "3 - blue/gr"
                        },
                        "num": 3,
                        "status": "Used",
                        "leased": null,
                        "route": null,
                        "routes": [
                          {
                            "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                            "type": "route",
                            "name": "Kajjansi <> Kigo"
                          }
                        ],
                        "waveFilter": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customers/{id}/relations": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customer relations",
        "operationId": "customerRelations",
        "description": "A customer's equipment and saved routes, as Relations shows them.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "customer relations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerRelations"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Customers"
        ],
        "summary": "Update customer relations",
        "operationId": "relateCustomer",
        "description": "Sets the customer's `equipment` ({id}) and relates it to `routes` (saved route GUIDs; one already related stays once), either or both, in one save.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "equipment": {
                  "id": "3005e625-9ec9-4372-acee-b75673c3585a"
                },
                "routes": [
                  "809612c6-2328-e811-a94c-bc9cef5a1839"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The relations now; or, with dryRun, what would have changed; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "status",
                            "data"
                          ],
                          "properties": {
                            "status": {
                              "$ref": "#/components/schemas/Status"
                            },
                            "data": {
                              "$ref": "#/components/schemas/CustomerRelations"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "$ref": "#/components/schemas/DryRunAnswer"
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Delete customer relations",
        "operationId": "unrelateCustomer",
        "description": "Clears the customer's `equipment` (given as null, or as the equipment it has) and unrelates `routes` (a list, or null for all of them).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "equipment": null,
                "routes": [
                  "809612c6-2328-e811-a94c-bc9cef5a1839"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The relations now; or, with dryRun, what would have changed; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "status",
                            "data"
                          ],
                          "properties": {
                            "status": {
                              "$ref": "#/components/schemas/Status"
                            },
                            "data": {
                              "$ref": "#/components/schemas/CustomerRelations"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "$ref": "#/components/schemas/DryRunAnswer"
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "equipment": null,
                    "routes": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customers/{id}/services": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customer services",
        "operationId": "customerServices",
        "description": "A customer's equipment and saved routes, each route with its status, priority and designation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "customer services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerServices"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo",
                        "status": "Used",
                        "priority": "High",
                        "designation": "backbone"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/alarms/{id}/services": {
      "get": {
        "tags": [
          "Alarms"
        ],
        "summary": "Get alarm services",
        "operationId": "alarmServices",
        "description": "What an alarm affects: its saved route (with status) and that route's customers.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "alarm services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AlarmServices"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "alarm": {
                      "id": "d92648de-974b-4c47-b9aa-3c1246659719",
                      "type": "alarm",
                      "name": null
                    },
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo",
                      "status": "Used",
                      "priority": "High",
                      "designation": "backbone"
                    },
                    "customers": [
                      {
                        "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                        "type": "customer",
                        "name": "Acme Ltd"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/devices/{id}/strands": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Get strands at device",
        "operationId": "deviceStrands",
        "description": "A device's strands (a splitter's fibres; 1 is the input), as Get strand gives each.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "strands at device",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Strand"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                      "span": null,
                      "strandid": 35143683,
                      "x_table": "device",
                      "x_id": 90,
                      "num": 1,
                      "color": "gr",
                      "bundle": "blue",
                      "status": null,
                      "scalefactor": 1,
                      "createtime": "2019-08-12T15:29:53",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/workorders/{id}/costs": {
      "get": {
        "tags": [
          "Work orders"
        ],
        "summary": "Get work order costs",
        "operationId": "workOrderCosts",
        "x-feature": "bom",
        "description": "A work order's costs, as its panel and the Bill of Materials show them: the totals (price list, objects, priced tasks, labour, material, total), each object on the work order, and each priced task with its object. Needs the **bom** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "work order costs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkOrderCosts"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "workorder": {
                      "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                      "type": "workorder",
                      "name": "WO-2026-031"
                    },
                    "totals": {
                      "pricelist": "Standard 2026",
                      "entities": 1,
                      "tasks": 1,
                      "labor": 120,
                      "material": 80.5,
                      "total": 200.5
                    },
                    "objects": [
                      {
                        "object": {
                          "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                          "type": "span",
                          "name": "ndejje lubuguumu"
                        },
                        "stage": "design",
                        "comments": "",
                        "quantity": 340,
                        "units": "m",
                        "installcompany": "",
                        "installdate": "",
                        "street": "----"
                      }
                    ],
                    "tasks": [
                      {
                        "object": {
                          "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                          "type": "span",
                          "name": "ndejje lubuguumu"
                        },
                        "category": "Cable",
                        "subcategory": "Aerial",
                        "code": "C-01",
                        "item": "C-01",
                        "taskname": "Lash cable",
                        "tasknote": "",
                        "taskunits": "m",
                        "quantity": 340,
                        "unitprice": 0.59,
                        "totalprice": 200.5,
                        "materialsoption": 1,
                        "materialsnote": ""
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/outages": {
      "get": {
        "tags": [
          "Outages"
        ],
        "summary": "Get outages",
        "operationId": "outages",
        "x-feature": "outages",
        "description": "Saved outages, as the Outage Finder lists them: open ones first, then the most recently changed. Each names its saved routes. Needs the **outages** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "q",
            "in": "query",
            "description": "Part of the ticket number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "`open` or `resolved`",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "resolved"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "outages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Outage"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 12,
                      "ticket": "INC-8812",
                      "routes": [
                        {
                          "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                          "type": "route",
                          "name": "Kajjansi <> Kigo"
                        }
                      ],
                      "notes": "Cut at km 3",
                      "status": "open",
                      "createdBy": "noc@example.com",
                      "createdAt": "2026-11-02T07:10:00Z",
                      "updatedBy": "noc@example.com",
                      "updatedAt": "2026-11-02T08:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Outages"
        ],
        "summary": "New outage",
        "operationId": "createOutage",
        "x-feature": "outages",
        "description": "Saves an outage, as the Outage Finder does: `ticket` (unique in the network), `routes` (saved route GUIDs), `notes`, `status` (`open` by default, or `resolved`). Needs the **outages** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "ticket": "INC-8813",
                "routes": [
                  "809612c6-2328-e811-a94c-bc9cef5a1839"
                ],
                "notes": "cut at km 3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New outage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Outage"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 12,
                    "ticket": "INC-8812",
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    ],
                    "notes": "Cut at km 3",
                    "status": "open",
                    "createdBy": "noc@example.com",
                    "createdAt": "2026-11-02T07:10:00Z",
                    "updatedBy": "noc@example.com",
                    "updatedAt": "2026-11-02T08:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/outages/{id}": {
      "get": {
        "tags": [
          "Outages"
        ],
        "summary": "Get outage",
        "operationId": "outage",
        "x-feature": "outages",
        "description": "One saved outage, by its number (`id`). Needs the **outages** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The outage's number",
            "schema": {
              "type": "integer"
            },
            "example": 12
          }
        ],
        "responses": {
          "200": {
            "description": "outage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Outage"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": 12,
                    "ticket": "INC-8812",
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    ],
                    "notes": "Cut at km 3",
                    "status": "open",
                    "createdBy": "noc@example.com",
                    "createdAt": "2026-11-02T07:10:00Z",
                    "updatedBy": "noc@example.com",
                    "updatedAt": "2026-11-02T08:00:00Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Outages"
        ],
        "summary": "Update outage",
        "operationId": "updateOutage",
        "x-feature": "outages",
        "description": "Changes any of an outage's `ticket`, `routes`, `notes`, `status`. Needs the **outages** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The outage's number",
            "schema": {
              "type": "integer"
            },
            "example": 12
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "status": "resolved"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update outage; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Outage"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": 12,
                    "ticket": "INC-8812",
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    ],
                    "notes": "Cut at km 3",
                    "status": "resolved",
                    "createdBy": "noc@example.com",
                    "createdAt": "2026-11-02T07:10:00Z",
                    "updatedBy": "noc@example.com",
                    "updatedAt": "2026-11-02T08:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Search the network",
        "operationId": "search",
        "x-feature": "global-search",
        "description": "Global Search: every object whose name, ids or notes match `q` (misspellings and short forms too), best first. Each match is the object (`{id, type, name}`) and where in its name `q` matched (`matched`: [start, end] character ranges). Needs the **global-search** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "q",
            "in": "query",
            "description": "What to look for",
            "schema": {
              "type": "string"
            },
            "required": true,
            "example": "A1576"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          }
        ],
        "responses": {
          "200": {
            "description": "Search the network",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SearchResult"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "total": 1,
                    "page": 1,
                    "size": 20,
                    "matches": [
                      {
                        "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                        "type": "accesspoint",
                        "name": "A1576",
                        "matched": [
                          [
                            0,
                            5
                          ]
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}/splicehistory": {
      "get": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Get splice history at enclosure",
        "operationId": "enclosuresSpliceHistory",
        "x-feature": "splice-history",
        "description": "The enclosure's Splice History: each saved copy of its splices, newest first, with who saved it and why. Needs the **splice-history** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "splice history at enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpliceHistory"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": "8a7b6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
                      "time": "2025-03-04T10:22:00",
                      "user": "solomon",
                      "comments": "before re-splice",
                      "snapshot": [
                        {
                          "a": {
                            "span": {
                              "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                              "type": "span",
                              "name": "ndejje lubuguumu"
                            },
                            "device": null,
                            "name": "ndejje lubuguumu",
                            "from": 1,
                            "to": 12
                          },
                          "b": {
                            "span": {
                              "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                              "type": "span",
                              "name": "A373<>A375"
                            },
                            "device": null,
                            "name": "A373<>A375",
                            "from": 1,
                            "to": 12
                          },
                          "type": "fusion"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/splicehistory": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get splice history at termination point",
        "operationId": "terminationpointsSpliceHistory",
        "x-feature": "splice-history",
        "description": "The termination point's Splice History: each saved copy of its splices, newest first, with who saved it and why. Needs the **splice-history** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "splice history at termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpliceHistory"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": "8a7b6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
                      "time": "2025-03-04T10:22:00",
                      "user": "solomon",
                      "comments": "before re-splice",
                      "snapshot": [
                        {
                          "a": {
                            "span": {
                              "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                              "type": "span",
                              "name": "ndejje lubuguumu"
                            },
                            "device": null,
                            "name": "ndejje lubuguumu",
                            "from": 1,
                            "to": 12
                          },
                          "b": {
                            "span": {
                              "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                              "type": "span",
                              "name": "A373<>A375"
                            },
                            "device": null,
                            "name": "A373<>A375",
                            "from": 1,
                            "to": 12
                          },
                          "type": "fusion"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/audit": {
      "get": {
        "tags": [
          "Networks"
        ],
        "summary": "Get write audit",
        "operationId": "audit",
        "description": "Every save made on this network through the app or this API, newest first: when it started and finished, who, what (`action`), whether it went in (`status`) and what it changed. Only administrators see this; a token always acts as one.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          }
        ],
        "responses": {
          "200": {
            "description": "write audit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditEntry"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 1,
                    "count": 1,
                    "total": 1
                  },
                  "data": [
                    {
                      "id": 9031,
                      "at": "2026-11-30T10:00:00Z",
                      "finishedAt": "2026-11-30T10:00:01Z",
                      "user": "brenda@example.com",
                      "action": "update access_point",
                      "status": "done",
                      "changes": {
                        "name": [
                          "A1575",
                          "A1576"
                        ]
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/locks": {
      "get": {
        "tags": [
          "Networks"
        ],
        "summary": "Get locks",
        "operationId": "locks",
        "x-feature": "db-locks",
        "description": "The objects held open for editing on this network (DB Locks), newest first: the object, its table, the kind of lock, who and since when. Needs the **db-locks** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          }
        ],
        "responses": {
          "200": {
            "description": "locks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Lock"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "object": {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      },
                      "table": "enclosure",
                      "lock": "edit",
                      "user": "solomon",
                      "since": "2026-11-30T09:12:00"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/reports/netstats": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get network statistics",
        "operationId": "netStats",
        "x-feature": "reports",
        "description": "How many of each kind of object the network has (the Reports page's Network Statistics). Needs the **reports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          }
        ],
        "responses": {
          "200": {
            "description": "network statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "count"
                        ],
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "type": "Access Points",
                      "count": 6180
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/reports/spansummary": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get span summary",
        "operationId": "spanSummary",
        "x-feature": "reports",
        "description": "Span Summary: each span's name, strands, placement, stage, length (metres) and owner, 50 a page, with every owner there is (`owners`). Needs the **reports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "minLength",
            "in": "query",
            "description": "Only spans at least this long (metres)",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Only this owner's spans",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page, from 1 (50 a page)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "span summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SpanSummary"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "total": 1,
                    "rows": [
                      {
                        "span": "ndejje lubuguumu",
                        "strands": 72,
                        "placement": "aerial",
                        "stage": "posted",
                        "length": 340,
                        "owner": "CSquared"
                      }
                    ],
                    "owners": [
                      "CSquared"
                    ],
                    "page": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/reports/routelengths": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get route lengths",
        "operationId": "routeLengths",
        "x-feature": "reports",
        "description": "Route Length: each saved route's length in metres, by glass (every strand leg), sheath (each span once) and pole (aerial), with its grouping fields. Needs the **reports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          }
        ],
        "responses": {
          "200": {
            "description": "route lengths",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RouteLength"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "market": "",
                      "ownership": "",
                      "region": "",
                      "group": "",
                      "designation": "backbone",
                      "placement": "aerial, underground",
                      "route": "Kajjansi <> Kigo",
                      "sheath": 10641,
                      "glass": 10641,
                      "pole": 3200,
                      "status": "Used"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/reports/runs": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get report runs",
        "operationId": "reportRuns",
        "x-feature": "reports",
        "description": "The kept runs of a Reports page report, newest first. Needs the **reports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Which report, as the Reports page names it (such as `spansummary`)",
            "schema": {
              "type": "string"
            },
            "required": true,
            "example": "spansummary"
          }
        ],
        "responses": {
          "200": {
            "description": "report runs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReportRunSummary"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 77,
                      "name": "Span Summary 2026-11-30",
                      "ranAt": "2026-11-30T10:00:00Z",
                      "ranBy": "brenda@example.com",
                      "durationMs": 5120
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Run report",
        "operationId": "runReport",
        "x-feature": "reports",
        "description": "Runs a Reports page report now and keeps it, as Run does: `kind` (`netstats`, `routelength` or `spansummary`), `groups` (Span Summary: status → Used / Avail / Other) and `settings` (Route Length: `units`, `buffer`, `slack`). Answers the kept run. Needs the **reports** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "kind": "spansummary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Run report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ReportRun"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 78,
                    "kind": "spansummary",
                    "name": "Span Summary 2026-12-04",
                    "ranAt": "2026-12-04T09:00:00Z",
                    "ranBy": "brenda@example.com",
                    "options": null,
                    "rows": [],
                    "durationMs": 5120
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/reports/runs/{id}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get report run",
        "operationId": "reportRun",
        "x-feature": "reports",
        "description": "One kept run: its options and its result (the report's own fields, as the Reports page shows them). Needs the **reports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The run's number",
            "schema": {
              "type": "integer"
            },
            "example": 77
          }
        ],
        "responses": {
          "200": {
            "description": "report run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ReportRun"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": 77,
                    "kind": "spansummary",
                    "name": "Span Summary 2026-11-30",
                    "ranAt": "2026-11-30T10:00:00Z",
                    "ranBy": "brenda@example.com",
                    "options": {
                      "groups": {}
                    },
                    "rows": [
                      {
                        "span": "ndejje lubuguumu",
                        "length": 340
                      }
                    ],
                    "durationMs": 5120
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}/tapers": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get taper reports of a span",
        "operationId": "spanTapers",
        "x-feature": "taper-report",
        "description": "A span's Taper Reports, newest first; `running` while one is still being made. Needs the **taper-report** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "taper reports of a span",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaperSummary"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                      "name": "ndejje taper",
                      "started": "2026-11-01T08:00:00",
                      "completed": "2026-11-01T08:02:00",
                      "status": "Done",
                      "running": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Run taper report",
        "operationId": "runTaper",
        "x-feature": "taper-report",
        "description": "Starts a Taper Report of the span's fibres `from` to `to`, as the Taper Report window does. A worker makes it: this answers 202 and the job; follow it with Get job, then read the report with Get taper report (the job's `id`). Needs the **taper-report** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "from": 1,
                "to": 12
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "202": {
            "description": "Run taper report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 202,
                    "message": "accepted"
                  },
                  "data": {
                    "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                    "kind": "taper",
                    "status": "running",
                    "message": "New",
                    "started": "2026-12-04T09:00:00",
                    "completed": null,
                    "result": {
                      "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "type": "span",
                      "name": "ndejje lubuguumu"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/v1/networks/{network}/tapers/{id}": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get taper report",
        "operationId": "taper",
        "x-feature": "taper-report",
        "description": "One Taper Report's rows: each strand (`num`) and where it goes (its far object, parent and location), its service and the saved route on it. Needs the **taper-report** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "taper report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaperRow"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "num": "3",
                      "object": "TP-Hub: 1",
                      "parent": "TP-Hub",
                      "location": "Hub",
                      "address": "Ring Rd",
                      "leg": "1",
                      "grp": "",
                      "label": "",
                      "status": "Used",
                      "priority": "High",
                      "users": "Acme",
                      "leased": null,
                      "strandStatus": null,
                      "route": {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/splicereport": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Get splice report",
        "operationId": "spliceReport",
        "x-feature": "splice-report",
        "description": "Splice Report: for each saved route given, its closures in route order. Needs the **splice-report** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "routes",
            "in": "query",
            "description": "Saved route GUIDs, one or more (`routes=…&routes=…`)",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": true,
            "example": "809612c6-2328-e811-a94c-bc9cef5a1839"
          }
        ],
        "responses": {
          "200": {
            "description": "splice report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "route",
                          "enclosures"
                        ],
                        "properties": {
                          "route": {
                            "$ref": "#/components/schemas/Ref"
                          },
                          "enclosures": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/Ref"
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "route": {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      },
                      "enclosures": [
                        {
                          "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                          "type": "enclosure",
                          "name": "SP-1576"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/routes/{id}/waves": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Get route wavelengths",
        "operationId": "routeWaves",
        "x-feature": "route-detail",
        "description": "WaveView for a saved route: the wavelengths entering at its start port (`start`, set in WaveView), and for each strand leg the wavelengths a filter on that strand passes (`waveFilter`; null: no filter, all pass). Needs the **route-detail** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "route wavelengths",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/RouteWaves"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo"
                    },
                    "start": "1310,1550",
                    "legs": [
                      {
                        "leg": "1 - 2",
                        "strand": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "span": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "waveFilter": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/integrity/runs": {
      "get": {
        "tags": [
          "Integrity"
        ],
        "summary": "Get integrity runs",
        "operationId": "integrityRuns",
        "x-feature": "integrity",
        "description": "The kept Integrity Check runs, newest first: how many tests ran, how many issues they found, and the issues by priority. Needs the **integrity** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          }
        ],
        "responses": {
          "200": {
            "description": "integrity runs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IntegrityRunSummary"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 41,
                      "name": "Integrity 2026-11-30",
                      "ranAt": "2026-11-30T02:00:00Z",
                      "ranBy": "brenda@example.com",
                      "durationMs": 60231,
                      "tests": 52,
                      "issues": 318,
                      "byPriority": {
                        "High": 12,
                        "Medium": 106,
                        "Low": 200
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/integrity/runs/{id}": {
      "get": {
        "tags": [
          "Integrity"
        ],
        "summary": "Get integrity run",
        "operationId": "integrityRun",
        "x-feature": "integrity",
        "description": "One Integrity Check run: each test with its status and how many it found (`tests`), and the issues. Needs the **integrity** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The run's number",
            "schema": {
              "type": "integer"
            },
            "example": 41
          }
        ],
        "responses": {
          "200": {
            "description": "integrity run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/IntegrityRun"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": 41,
                    "name": "Integrity 2026-11-30",
                    "ranAt": "2026-11-30T02:00:00Z",
                    "ranBy": "brenda@example.com",
                    "durationMs": 60231,
                    "tests": [
                      {
                        "id": 3,
                        "status": "done",
                        "count": 2,
                        "kept": 2,
                        "ms": 410,
                        "error": null
                      }
                    ],
                    "issues": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/accesspoints/{id}/files": {
      "get": {
        "tags": [
          "Access points"
        ],
        "summary": "Get files of access point",
        "operationId": "accesspointsFiles",
        "x-feature": "files",
        "description": "The files on an access point (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of access point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Access points"
        ],
        "summary": "Add file to access point",
        "operationId": "accesspointsAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to an access point, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to access point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/buildings/{id}/files": {
      "get": {
        "tags": [
          "Buildings"
        ],
        "summary": "Get files of building",
        "operationId": "buildingsFiles",
        "x-feature": "files",
        "description": "The files on a building (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of building",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Buildings"
        ],
        "summary": "Add file to building",
        "operationId": "buildingsAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a building, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to building",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/poles/{id}/files": {
      "get": {
        "tags": [
          "Poles"
        ],
        "summary": "Get files of pole",
        "operationId": "polesFiles",
        "x-feature": "files",
        "description": "The files on a pole (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of pole",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Poles"
        ],
        "summary": "Add file to pole",
        "operationId": "polesAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a pole, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to pole",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}/files": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get files of cable span",
        "operationId": "spansFiles",
        "x-feature": "files",
        "description": "The files on a cable span (its Files window), newest first (a span's are those on its cables). Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of cable span",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Add file to cable span",
        "operationId": "spansAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a cable span, as its Files window does (a span's go on its first cable). Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to cable span",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}/files": {
      "get": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Get files of enclosure",
        "operationId": "enclosuresFiles",
        "x-feature": "files",
        "description": "The files on an enclosure (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Add file to enclosure",
        "operationId": "enclosuresAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to an enclosure, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/files": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Get files of termination point",
        "operationId": "terminationpointsFiles",
        "x-feature": "files",
        "description": "The files on a termination point (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Termination points"
        ],
        "summary": "Add file to termination point",
        "operationId": "terminationpointsAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a termination point, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/equipment/{id}/files": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Get files of equipment",
        "operationId": "equipmentFiles",
        "x-feature": "files",
        "description": "The files on an equipment (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of equipment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Equipment"
        ],
        "summary": "Add file to equipment",
        "operationId": "equipmentAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to an equipment, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to equipment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ductbanks/{id}/files": {
      "get": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Get files of duct bank",
        "operationId": "ductbanksFiles",
        "x-feature": "files",
        "description": "The files on a duct bank (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of duct bank",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Add file to duct bank",
        "operationId": "ductbanksAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a duct bank, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to duct bank",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/slackloops/{id}/files": {
      "get": {
        "tags": [
          "Slack loops"
        ],
        "summary": "Get files of slack loop",
        "operationId": "slackloopsFiles",
        "x-feature": "files",
        "description": "The files on a slack loop (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of slack loop",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Slack loops"
        ],
        "summary": "Add file to slack loop",
        "operationId": "slackloopsAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a slack loop, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to slack loop",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customers/{id}/files": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get files of customer",
        "operationId": "customersFiles",
        "x-feature": "files",
        "description": "The files on a customer (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Add file to customer",
        "operationId": "customersAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a customer, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/routes/{id}/files": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Get files of saved route",
        "operationId": "routesFiles",
        "x-feature": "files",
        "description": "The files on a saved route (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of saved route",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Add file to saved route",
        "operationId": "routesAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a saved route, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to saved route",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/workorders/{id}/files": {
      "get": {
        "tags": [
          "Work orders"
        ],
        "summary": "Get files of work order",
        "operationId": "workordersFiles",
        "x-feature": "files",
        "description": "The files on a work order (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of work order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Work orders"
        ],
        "summary": "Add file to work order",
        "operationId": "workordersAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a work order, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to work order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/racks/{id}/files": {
      "get": {
        "tags": [
          "Racks"
        ],
        "summary": "Get files of rack",
        "operationId": "racksFiles",
        "x-feature": "files",
        "description": "The files on a rack (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of rack",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Racks"
        ],
        "summary": "Add file to rack",
        "operationId": "racksAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a rack, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to rack",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/rooms/{id}/files": {
      "get": {
        "tags": [
          "Rooms"
        ],
        "summary": "Get files of room",
        "operationId": "roomsFiles",
        "x-feature": "files",
        "description": "The files on a room (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of room",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Rooms"
        ],
        "summary": "Add file to room",
        "operationId": "roomsAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a room, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to room",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/floors/{id}/files": {
      "get": {
        "tags": [
          "Floors"
        ],
        "summary": "Get files of floor",
        "operationId": "floorsFiles",
        "x-feature": "files",
        "description": "The files on a floor (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of floor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Floors"
        ],
        "summary": "Add file to floor",
        "operationId": "floorsAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a floor, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to floor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/planlines/{id}/files": {
      "get": {
        "tags": [
          "Plan lines"
        ],
        "summary": "Get files of plan line",
        "operationId": "planlinesFiles",
        "x-feature": "files",
        "description": "The files on a plan line (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of plan line",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Plan lines"
        ],
        "summary": "Add file to plan line",
        "operationId": "planlinesAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a plan line, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to plan line",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/planpoints/{id}/files": {
      "get": {
        "tags": [
          "Plan points"
        ],
        "summary": "Get files of plan point",
        "operationId": "planpointsFiles",
        "x-feature": "files",
        "description": "The files on a plan point (its Files window), newest first. Download one with Get file. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "files of plan point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FileInfo"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "id": 503,
                      "name": "as-built.pdf",
                      "contentType": "application/pdf",
                      "size": 482113,
                      "addedAt": "2026-10-02T12:00:00Z",
                      "addedBy": "brenda@example.com"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Plan points"
        ],
        "summary": "Add file to plan point",
        "operationId": "planpointsAddFile",
        "x-feature": "files",
        "description": "Adds a file (multipart/form-data, field `file`) to a plan point, as its Files window does. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Add file to plan point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileInfo"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": 504,
                    "name": "as-built.pdf",
                    "contentType": "application/pdf",
                    "size": 482113,
                    "addedAt": "2026-12-04T09:00:00Z",
                    "addedBy": "brenda@example.com"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/files/{id}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get file",
        "operationId": "file",
        "x-feature": "files",
        "description": "One file's bytes, as stored, with its own content type and its name in `Content-Disposition`. Needs the **files** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The file's number, from Get files",
            "schema": {
              "type": "integer"
            },
            "example": 503
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete file",
        "operationId": "deleteFile",
        "x-feature": "files",
        "description": "Deletes a file from the object it is on. Needs the **files** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The file's number",
            "schema": {
              "type": "integer"
            },
            "example": 503
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete file; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": 503,
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ductbanks/{id}/crosssection": {
      "get": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Get duct bank cross section",
        "operationId": "crossSection",
        "x-feature": "duct-cross-section",
        "description": "A duct bank's ducts as its Cross Section Editor lists them: the bank itself (level 0, `duct` null), its superducts, the innerducts in each and their microducts. `duct` and `parent` are the ducts' numbers within this network; `spans` is how many cables are in a duct. Needs the **duct-cross-section** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "duct bank cross section",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Duct"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "duct": null,
                      "parent": null,
                      "level": 0,
                      "kind": "Duct Bank"
                    },
                    {
                      "duct": 311,
                      "parent": null,
                      "level": 1,
                      "kind": "Innerduct",
                      "name": "ID-1",
                      "color": "orange",
                      "diameter": 40,
                      "diameter_units": "mm",
                      "spans": 1
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Update duct bank cross section",
        "operationId": "saveCrossSection",
        "x-feature": "duct-cross-section",
        "description": "Saves the Cross Section Editor's changes: `changed` ducts (`{kind, duct, values}`: the fields to set) and `deleted` ones (`{kind, duct}`). Answers the cross section. Needs the **duct-cross-section** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "changed": [
                  {
                    "kind": "innerduct",
                    "duct": 311,
                    "values": {
                      "color": "blue"
                    }
                  }
                ],
                "deleted": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update duct bank cross section; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Duct"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": [
                    {
                      "duct": null,
                      "parent": null,
                      "level": 0,
                      "kind": "Duct Bank"
                    },
                    {
                      "duct": 311,
                      "parent": null,
                      "level": 1,
                      "kind": "Innerduct",
                      "name": "ID-1",
                      "color": "orange",
                      "spans": 0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/poles/{id}/attachments": {
      "get": {
        "tags": [
          "Poles"
        ],
        "summary": "Get pole attachments",
        "operationId": "poleAttachments",
        "x-feature": "span-tools",
        "description": "The cables on a pole (Pole Attachments): each span, its height, owner and comments. Needs the **span-tools** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "pole attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "span",
                          "height",
                          "owner",
                          "comments"
                        ],
                        "properties": {
                          "span": {
                            "$ref": "#/components/schemas/Ref"
                          },
                          "height": {},
                          "owner": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "comments": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "span": {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      },
                      "height": 6.5,
                      "owner": "CSquared",
                      "comments": ""
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}/poleattachments": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get pole attachments of a span",
        "operationId": "spanPoleAttachments",
        "x-feature": "span-tools",
        "description": "The poles a span is attached to, with each attachment's height, owner and comments. Needs the **span-tools** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "pole attachments of a span",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "pole",
                          "height",
                          "owner",
                          "comments"
                        ],
                        "properties": {
                          "pole": {
                            "$ref": "#/components/schemas/Ref"
                          },
                          "height": {},
                          "owner": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "comments": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "pole": {
                        "id": "aac62889-aa17-e811-a94c-bc9cef5a1839",
                        "type": "pole",
                        "name": "P-70"
                      },
                      "height": 6.5,
                      "owner": "CSquared",
                      "comments": ""
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Update pole attachments of a span",
        "operationId": "savePoleAttachments",
        "x-feature": "span-tools",
        "description": "Makes the span's pole attachments these (`attachments`: `{pole: {id}, height, owner, comments}` each), as the Pole Attachments window saves: one already on that pole is changed, one left out is removed. Needs the **span-tools** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "attachments": [
                  {
                    "pole": {
                      "id": "aac62889-aa17-e811-a94c-bc9cef5a1839"
                    },
                    "height": "6.5",
                    "owner": "CSquared",
                    "comments": ""
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update pole attachments of a span; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "pole",
                              "height",
                              "owner",
                              "comments"
                            ],
                            "properties": {
                              "pole": {
                                "$ref": "#/components/schemas/Ref"
                              },
                              "height": {},
                              "owner": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "comments": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": [
                    {
                      "pole": {
                        "id": "aac62889-aa17-e811-a94c-bc9cef5a1839",
                        "type": "pole",
                        "name": "P-70"
                      },
                      "height": "6.5",
                      "owner": "CSquared",
                      "comments": ""
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/{id}/leased": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Get leased fibre of a span",
        "operationId": "spanLeased",
        "x-feature": "span-tools",
        "description": "A span's leased strand ranges (the Leased Editor): status, company, strands `from`–`to`, how many, who it is leased to (`designated`) and comments. Needs the **span-tools** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "leased fibre of a span",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "status",
                          "company",
                          "from",
                          "to",
                          "total",
                          "designated",
                          "comments"
                        ],
                        "properties": {
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "company": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "from": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "to": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "total": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "designated": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "comments": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": [
                    {
                      "status": "Leased",
                      "company": "Carrier X",
                      "from": 13,
                      "to": 24,
                      "total": 12,
                      "designated": "Carrier X",
                      "comments": ""
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Update leased fibre of a span",
        "operationId": "saveLeased",
        "x-feature": "span-tools",
        "description": "Makes the span's leased ranges these (`leased`: `{status, company, from, to, total, designated, comments}` each), as the Leased Editor saves. Needs the **span-tools** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "leased": [
                  {
                    "status": "Leased",
                    "company": "Carrier X",
                    "from": 13,
                    "to": 24,
                    "designated": "Carrier X",
                    "comments": ""
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update leased fibre of a span; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "status",
                              "company",
                              "from",
                              "to",
                              "total",
                              "designated",
                              "comments"
                            ],
                            "properties": {
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "company": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "from": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "to": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "total": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "designated": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "comments": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": [
                    {
                      "status": "Leased",
                      "company": "Carrier X",
                      "from": 13,
                      "to": 24,
                      "total": 12,
                      "designated": "Carrier X",
                      "comments": ""
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/accesspoints/export": {
      "get": {
        "tags": [
          "Access points"
        ],
        "summary": "Export access points",
        "operationId": "export_accesspoints",
        "x-feature": "exports",
        "description": "Every one of the access points that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/buildings/export": {
      "get": {
        "tags": [
          "Buildings"
        ],
        "summary": "Export buildings",
        "operationId": "export_buildings",
        "x-feature": "exports",
        "description": "Every one of the buildings that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/poles/export": {
      "get": {
        "tags": [
          "Poles"
        ],
        "summary": "Export poles",
        "operationId": "export_poles",
        "x-feature": "exports",
        "description": "Every one of the poles that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/spans/export": {
      "get": {
        "tags": [
          "Cable spans"
        ],
        "summary": "Export cable spans",
        "operationId": "export_spans",
        "x-feature": "exports",
        "description": "Every one of the cable spans that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/routes/export": {
      "get": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Export saved routes",
        "operationId": "export_routes",
        "x-feature": "exports",
        "description": "Every one of the saved routes that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape (this kind has no shape of its own, so there are none), its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures/export": {
      "get": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Export enclosures",
        "operationId": "export_enclosures",
        "x-feature": "exports",
        "description": "Every one of the enclosures that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/terminationpoints/export": {
      "get": {
        "tags": [
          "Termination points"
        ],
        "summary": "Export termination points",
        "operationId": "export_terminationpoints",
        "x-feature": "exports",
        "description": "Every one of the termination points that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/equipment/export": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "summary": "Export equipment",
        "operationId": "export_equipment",
        "x-feature": "exports",
        "description": "Every one of the equipment that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape (this kind has no shape of its own, so there are none), its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ductbanks/export": {
      "get": {
        "tags": [
          "Duct banks"
        ],
        "summary": "Export duct banks",
        "operationId": "export_ductbanks",
        "x-feature": "exports",
        "description": "Every one of the duct banks that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/slackloops/export": {
      "get": {
        "tags": [
          "Slack loops"
        ],
        "summary": "Export slack loops",
        "operationId": "export_slackloops",
        "x-feature": "exports",
        "description": "Every one of the slack loops that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customers/export": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Export customers",
        "operationId": "export_customers",
        "x-feature": "exports",
        "description": "Every one of the customers that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape (this kind has no shape of its own, so there are none), its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/alarms/export": {
      "get": {
        "tags": [
          "Alarms"
        ],
        "summary": "Export alarms",
        "operationId": "export_alarms",
        "x-feature": "exports",
        "description": "Every one of the alarms that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/planlines/export": {
      "get": {
        "tags": [
          "Plan lines"
        ],
        "summary": "Export plan lines",
        "operationId": "export_planlines",
        "x-feature": "exports",
        "description": "Every one of the plan lines that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/planpoints/export": {
      "get": {
        "tags": [
          "Plan points"
        ],
        "summary": "Export plan points",
        "operationId": "export_planpoints",
        "x-feature": "exports",
        "description": "Every one of the plan points that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/polelines/export": {
      "get": {
        "tags": [
          "Pole lines"
        ],
        "summary": "Export pole lines",
        "operationId": "export_polelines",
        "x-feature": "exports",
        "description": "Every one of the pole lines that match the list's filters (up to 20,000) as one file. CSV: a column per field, a reference as its name and its GUID (`<field>_id`), `geo` as GeoJSON. KML / KMZ: a placemark per object with a shape, its fields as data. Needs the **exports** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` (default), `kml` or `kmz`",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "kml",
                "kmz"
              ],
              "default": "csv"
            }
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/vnd.google-earth.kmz": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/workorders/{id}/status": {
      "put": {
        "tags": [
          "Work orders"
        ],
        "summary": "Update work order status",
        "operationId": "workOrderStatus",
        "x-feature": "work-orders",
        "description": "Sets a work order's status (its `stage`), as its window does. Needs the **work-orders** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "status": "construction"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update work order status; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/WorkOrder"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                    "workorderid": 31,
                    "workorder": "WO-2026-031",
                    "initiator": "brenda",
                    "stage": "construction",
                    "start_date": "2026-10-01",
                    "end_date": null,
                    "createtime": "2026-09-28T14:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/workorders/{id}/objects": {
      "put": {
        "tags": [
          "Work orders"
        ],
        "summary": "Update work order objects",
        "operationId": "workOrderObjects",
        "x-feature": "work-orders",
        "description": "Puts objects on the work order (`add`) and takes them off (`remove`), each `{id, type}` (type as in answers: `span`, `enclosure`, `accesspoint`…), as the map's Add to Work Order and the window's ×. An object is on one work order at most. Answers the work order's costs. Needs the **work-orders** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "add": [
                  {
                    "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "type": "span"
                  }
                ],
                "remove": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update work order objects; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/WorkOrderCosts"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "workorder": {
                      "id": "4f2b0e85-6d3a-4c91-8ebd-0a9f8b7c6d5e",
                      "type": "workorder",
                      "name": "WO-2026-031"
                    },
                    "totals": {
                      "pricelist": null,
                      "entities": 1,
                      "tasks": 0,
                      "labor": 0,
                      "material": 0,
                      "total": 0
                    },
                    "objects": [],
                    "tasks": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/ductbanks/{id}/ducts": {
      "post": {
        "tags": [
          "Duct banks"
        ],
        "summary": "New duct",
        "operationId": "addDuct",
        "x-feature": "duct-cross-section",
        "description": "Adds a duct to a duct bank, as the Cross Section Editor's Add: `kind` (`superduct`, `innerduct` or `microduct`) and `parent` (the duct number it goes in: an innerduct's superduct, a microduct's innerduct). Answers the cross section. Needs the **duct-cross-section** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "kind": "innerduct",
                "parent": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "New duct",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Duct"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": [
                    {
                      "duct": null,
                      "parent": null,
                      "level": 0,
                      "kind": "Duct Bank"
                    },
                    {
                      "duct": 311,
                      "parent": null,
                      "level": 1,
                      "kind": "Innerduct",
                      "name": "ID-1",
                      "color": "orange",
                      "spans": 0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/jobs/{id}": {
      "get": {
        "tags": [
          "Networks"
        ],
        "summary": "Get job",
        "operationId": "job",
        "description": "A job a call started on a worker (a Taper Report): `running`, `done` or `failed`, its message, when it started and finished, and what it is about (`result`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The job's id, from the call that started it",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
          }
        ],
        "responses": {
          "200": {
            "description": "The job",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
                    "kind": "taper",
                    "status": "done",
                    "message": "Done",
                    "started": "2026-12-04T09:00:00",
                    "completed": "2026-12-04T09:02:00",
                    "result": {
                      "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                      "type": "span",
                      "name": "ndejje lubuguumu"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}/splices": {
      "post": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Splice at enclosure",
        "operationId": "enclosuresSplice",
        "x-feature": "splicing",
        "description": "Saves a splice, as the Splice Key Editor does: `a` and `b` each `{span: {id}} or {device: {id}}` (a splitter) with `from` and `to` (strand numbers), `type`, `tray`, and `replace` (the splice, by its number, this one takes the place of). Answers the splicing there. Needs a **network-changes token**. Needs the **splicing** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "a": {
                  "span": {
                    "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c"
                  },
                  "from": 1,
                  "to": 12
                },
                "b": {
                  "span": {
                    "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2"
                  },
                  "from": 1,
                  "to": 12
                },
                "type": "fusion",
                "tray": "1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Splice at enclosure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Splicing"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "splices": [
                      {
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "name": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "name": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "splice": 1001,
                        "type": "fusion",
                        "tray": "1",
                        "splitter": false
                      }
                    ],
                    "spans": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu",
                        "label": "10412 - ndejje lubuguumu",
                        "strands": 72
                      }
                    ],
                    "splitters": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}/splices/{splice}": {
      "delete": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Unsplice at enclosure",
        "operationId": "enclosuresUnsplice",
        "x-feature": "splicing",
        "description": "Deletes a splice (by its number, `splice` in Get splicing), as the Splice Key Editor's Delete. Answers the splicing there. Needs a **network-changes token**. Needs the **splicing** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "name": "splice",
            "in": "path",
            "required": true,
            "description": "The splice's number, from Get splicing",
            "schema": {
              "type": "integer"
            },
            "example": 1001
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Unsplice at enclosure; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Splicing"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "splices": [],
                    "spans": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu",
                        "label": "10412 - ndejje lubuguumu",
                        "strands": 72
                      }
                    ],
                    "splitters": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/splices": {
      "post": {
        "tags": [
          "Termination points"
        ],
        "summary": "Splice at termination point",
        "operationId": "terminationpointsSplice",
        "x-feature": "splicing",
        "description": "Saves a splice, as the Splice Key Editor does: `a` and `b` each `{span: {id}} or {device: {id}}` (a splitter) with `from` and `to` (strand numbers), `type`, `tray`, and `replace` (the splice, by its number, this one takes the place of). Answers the splicing there. Needs a **network-changes token**. Needs the **splicing** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "a": {
                  "span": {
                    "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c"
                  },
                  "from": 1,
                  "to": 12
                },
                "b": {
                  "span": {
                    "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2"
                  },
                  "from": 1,
                  "to": 12
                },
                "type": "fusion",
                "tray": "1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Splice at termination point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Splicing"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "splices": [
                      {
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "name": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "name": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "splice": 1001,
                        "type": "fusion",
                        "tray": "1",
                        "splitter": false
                      }
                    ],
                    "spans": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu",
                        "label": "10412 - ndejje lubuguumu",
                        "strands": 72
                      }
                    ],
                    "splitters": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/terminationpoints/{id}/splices/{splice}": {
      "delete": {
        "tags": [
          "Termination points"
        ],
        "summary": "Unsplice at termination point",
        "operationId": "terminationpointsUnsplice",
        "x-feature": "splicing",
        "description": "Deletes a splice (by its number, `splice` in Get splicing), as the Splice Key Editor's Delete. Answers the splicing there. Needs a **network-changes token**. Needs the **splicing** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "name": "splice",
            "in": "path",
            "required": true,
            "description": "The splice's number, from Get splicing",
            "schema": {
              "type": "integer"
            },
            "example": 1001
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Unsplice at termination point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Splicing"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "splices": [],
                    "spans": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu",
                        "label": "10412 - ndejje lubuguumu",
                        "strands": 72
                      }
                    ],
                    "splitters": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/enclosures/{id}/devices/{device}": {
      "delete": {
        "tags": [
          "Enclosures"
        ],
        "summary": "Remove splitter",
        "operationId": "removeSplitter",
        "x-feature": "splicing",
        "description": "Removes a splitter from the closure, with its fibres and splices, as Remove Splitter does. Answers the splicing there. Needs a **network-changes token**. Needs the **splicing** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "name": "device",
            "in": "path",
            "required": true,
            "description": "The splitter's GUID",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "d3f352bf-f572-e911-a975-d2718faeb054"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Remove splitter; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Splicing"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "splices": [
                      {
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "name": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "name": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "splice": 1001,
                        "type": "fusion",
                        "tray": "1",
                        "splitter": false
                      }
                    ],
                    "spans": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu",
                        "label": "10412 - ndejje lubuguumu",
                        "strands": 72
                      }
                    ],
                    "splitters": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/ports/{id}/termination": {
      "delete": {
        "tags": [
          "Ports"
        ],
        "summary": "Unterminate",
        "operationId": "unterminate",
        "x-feature": "terminating",
        "description": "Takes the strand off a term point's port, as Clear Termination. Answers the term point's terminations. Needs a **network-changes token**. Needs the **terminating** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Unterminate; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Termination"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": []
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/patches": {
      "post": {
        "tags": [
          "Ports"
        ],
        "summary": "Patch",
        "operationId": "patch",
        "x-feature": "terminating",
        "description": "Patches two ports (of term points or equipment), as the Patch Editor: `a` and `b` ({id}), with the cord's `label`, `length`, `units`. Answers the patching at a's structure. Needs a **network-changes token**. Needs the **terminating** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "a": {
                  "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354"
                },
                "b": {
                  "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f"
                },
                "label": "PC-1",
                "length": 3,
                "units": "m"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Patch",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Patching"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": [
                      {
                        "a": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1",
                          "num": 1,
                          "owner": {
                            "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                            "type": "terminationpoint",
                            "name": "TP-Hub"
                          }
                        },
                        "b": {
                          "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f",
                          "type": "port",
                          "name": "OLT-1: 3",
                          "num": 3,
                          "owner": {
                            "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                            "type": "equipment",
                            "name": "OLT-1"
                          }
                        },
                        "cord": {
                          "id": "7d4d5598-60ee-416c-9853-1fa6494b389f",
                          "label": "PC-1",
                          "length": 3,
                          "units": "m"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/ports/{id}/patch": {
      "put": {
        "tags": [
          "Ports"
        ],
        "summary": "Update patch cord",
        "operationId": "updatePatch",
        "x-feature": "terminating",
        "description": "Changes the patch cord on the port (`label`, `length`, `units`), as Update Patch. Needs a **network-changes token**. Needs the **terminating** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "label": "PC-1",
                "length": 5,
                "units": "m"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update patch cord; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Patching"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": [
                      {
                        "a": {
                          "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                          "type": "port",
                          "name": "TP-Hub: 1",
                          "num": 1,
                          "owner": {
                            "id": "16a11020-0147-e711-9acd-782bcb19c20c",
                            "type": "terminationpoint",
                            "name": "TP-Hub"
                          }
                        },
                        "b": {
                          "id": "5c2d1e0f-3a4b-4c5d-9e8f-7a6b5c4d3e2f",
                          "type": "port",
                          "name": "OLT-1: 3",
                          "num": 3,
                          "owner": {
                            "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                            "type": "equipment",
                            "name": "OLT-1"
                          }
                        },
                        "cord": {
                          "id": "7d4d5598-60ee-416c-9853-1fa6494b389f",
                          "label": "PC-1",
                          "length": 3,
                          "units": "m"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      },
      "delete": {
        "tags": [
          "Ports"
        ],
        "summary": "Unpatch",
        "operationId": "unpatch",
        "x-feature": "terminating",
        "description": "Removes the port's patch, as Unpatch. Answers the patching there. Needs a **network-changes token**. Needs the **terminating** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Unpatch; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Patching"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "location": {
                      "id": "7e753ab3-8e12-e811-a94b-8dfa32b171d9",
                      "type": "building",
                      "name": "Hub"
                    },
                    "patches": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/ports/{id}/propagate": {
      "post": {
        "tags": [
          "Ports"
        ],
        "summary": "Propagate port fields",
        "operationId": "propagate",
        "x-feature": "ports",
        "description": "Carries the port's values of `fields` to the other ports of its route, as Port Propagation. Answers how many ports took them. Needs a **network-changes token**. Needs the **ports** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "fields": [
                  "users",
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Propagate port fields; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "port",
                            "propagated"
                          ],
                          "properties": {
                            "port": {
                              "$ref": "#/components/schemas/Ref"
                            },
                            "propagated": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "port": {
                      "id": "0fab6712-7ed9-eb11-aa0b-a47e47036354",
                      "type": "port",
                      "name": "TP-Hub: 1"
                    },
                    "propagated": 3
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/routes/{id}/calibration/preview": {
      "post": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Preview optical distance",
        "operationId": "calibrationPreview",
        "x-feature": "optical-calibration",
        "description": "What setting the optical distance at a point of the route would do (Adjust Optical Distance), changing nothing: `leg` (as the trace names it), `value` (metres), `even` (spread evenly). The strands' new scale factors and the points' new distances. Needs the **optical-calibration** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "leg": "1 - 3",
                "value": 430,
                "even": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preview optical distance; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Calibration"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "leg": "1 - 3",
                    "label": "SP-1576",
                    "current": 412.6,
                    "proposed": 430,
                    "from": 0,
                    "to": 1000,
                    "before": 1,
                    "after": 1.04,
                    "even": false,
                    "evenBefore": null,
                    "evenAfter": null,
                    "points": [
                      {
                        "leg": "1 - 3",
                        "label": "SP-1576",
                        "old": 412.6,
                        "new": 430,
                        "fixed": true,
                        "edited": true
                      }
                    ],
                    "sharedRoutes": [],
                    "strands": [
                      {
                        "leg": "1 - 2",
                        "span": "10412 - ndejje lubuguumu",
                        "strand": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "map": 340,
                        "oldScale": 1,
                        "newScale": 1.04,
                        "oldOptical": 340,
                        "newOptical": 354
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/routes/{id}/calibration": {
      "post": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Adjust optical distance",
        "operationId": "calibrate",
        "x-feature": "optical-calibration",
        "description": "Sets it, as Adjust Optical Distance: the route's strands get their new scale factors (the same fibre on other routes changes there too: `sharedRoutes`). Needs a **network-changes token**. Needs the **optical-calibration** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "leg": "1 - 3",
                "value": 430,
                "even": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Adjust optical distance; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Calibration"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "leg": "1 - 3",
                    "label": "SP-1576",
                    "current": 412.6,
                    "proposed": 430,
                    "from": 0,
                    "to": 1000,
                    "before": 1,
                    "after": 1.04,
                    "even": false,
                    "evenBefore": null,
                    "evenAfter": null,
                    "points": [
                      {
                        "leg": "1 - 3",
                        "label": "SP-1576",
                        "old": 412.6,
                        "new": 430,
                        "fixed": true,
                        "edited": true
                      }
                    ],
                    "sharedRoutes": [],
                    "strands": [
                      {
                        "leg": "1 - 2",
                        "span": "10412 - ndejje lubuguumu",
                        "strand": "42e4971c-7ae5-e711-a948-b4ff98b39f8b",
                        "map": 340,
                        "oldScale": 1,
                        "newScale": 1.04,
                        "oldOptical": 340,
                        "newOptical": 354
                      }
                    ],
                    "calibration": 7
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      },
      "delete": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Clear optical distance points",
        "operationId": "calibrationClear",
        "x-feature": "optical-calibration",
        "description": "Clears the route's set points (the scale factors stay as they are). Needs a **network-changes token**. Needs the **optical-calibration** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Clear optical distance points; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "route",
                            "cleared"
                          ],
                          "properties": {
                            "route": {
                              "$ref": "#/components/schemas/Ref"
                            },
                            "cleared": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo"
                    },
                    "cleared": 2
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/routes/{id}/calibration/undo": {
      "post": {
        "tags": [
          "Saved routes"
        ],
        "summary": "Undo optical distance",
        "operationId": "calibrationUndo",
        "x-feature": "optical-calibration",
        "description": "Undoes the route's last adjustment. Needs a **network-changes token**. Needs the **optical-calibration** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Undo optical distance; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "route",
                            "undone",
                            "strands"
                          ],
                          "properties": {
                            "route": {
                              "$ref": "#/components/schemas/Ref"
                            },
                            "undone": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "strands": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "route": {
                      "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                      "type": "route",
                      "name": "Kajjansi <> Kigo"
                    },
                    "undone": 7,
                    "strands": 12
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/autosplice/plans": {
      "post": {
        "tags": [
          "Auto Splice"
        ],
        "summary": "Plan Auto Splice (beta)",
        "operationId": "planAutoSplice",
        "x-feature": "auto-splice",
        "description": "**Beta**: its specification is still open and may change. Asks Auto Splice for a proposal: the intent as the Auto Splice window sends it (`start`, `end`, `via`, `avoid`, `restrictions`, `splitters`, `options`, the Start and End connections…), with every object named `type/<GUID>` (such as `splice-point/<GUID>`, `cable-span/<GUID>`). A worker plans it: this answers 202 and the job; read the proposal with Get Auto Splice plan once the job is done. Planning changes nothing. Needs the **auto-splice** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "start": "splice-point/d0301ab2-0347-e711-9acd-782bcb19c20c",
                "end": "term-point/16a11020-0147-e711-9acd-782bcb19c20c",
                "via": [],
                "avoid": [],
                "startConnection": {
                  "kind": "splice",
                  "at": "splice-point/d0301ab2-0347-e711-9acd-782bcb19c20c",
                  "a": {
                    "owner": "span/c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                    "from": 1,
                    "to": 1
                  },
                  "b": {
                    "owner": "span/e367f55a-86ee-4c70-acd1-b1fc830447a2",
                    "from": 1,
                    "to": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "202": {
            "description": "Plan Auto Splice (beta)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 202,
                    "message": "accepted"
                  },
                  "data": {
                    "id": "0b6a3f62-6e0e-4c5a-9a55-3b7d3f0f9c11",
                    "kind": "autosplice",
                    "status": "running",
                    "state": "queued",
                    "message": "Waiting to plan",
                    "started": null,
                    "completed": null,
                    "result": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-beta": true
      }
    },
    "/api/v1/networks/{network}/autosplice/plans/{id}": {
      "get": {
        "tags": [
          "Auto Splice"
        ],
        "summary": "Get Auto Splice plan (beta)",
        "operationId": "autoSplicePlan",
        "x-feature": "auto-splice",
        "x-beta": true,
        "description": "**Beta**: its specification is still open and may change. The proposal as the Auto Splice window shows it, with objects named `type/<GUID>`: its `status` (queued, planning, ready, blocked, failed, stale, committing, committed, cancelled), `planHash` (give it to Approve) and `canApprove`. Needs the **auto-splice** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The plan's id (its job's id)",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0b6a3f62-6e0e-4c5a-9a55-3b7d3f0f9c11"
          }
        ],
        "responses": {
          "200": {
            "description": "The proposal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AutoSplicePlan"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "planId": "0b6a3f62-6e0e-4c5a-9a55-3b7d3f0f9c11",
                    "status": "ready",
                    "planHash": "9f2c…",
                    "canApprove": true,
                    "request": {
                      "start": "splice-point/d0301ab2-0347-e711-9acd-782bcb19c20c",
                      "end": "term-point/16a11020-0147-e711-9acd-782bcb19c20c",
                      "via": [],
                      "avoid": [],
                      "startConnection": {
                        "kind": "splice",
                        "at": "splice-point/d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "a": {
                          "owner": "span/c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                          "from": 1,
                          "to": 1
                        },
                        "b": {
                          "owner": "span/e367f55a-86ee-4c70-acd1-b1fc830447a2",
                          "from": 1,
                          "to": 1
                        }
                      }
                    },
                    "routes": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Auto Splice"
        ],
        "summary": "Cancel Auto Splice plan (beta)",
        "operationId": "cancelAutoSplice",
        "x-feature": "auto-splice",
        "description": "**Beta**: its specification is still open and may change. Cancels a proposal (not one being saved). Needs the **auto-splice** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The plan's id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0b6a3f62-6e0e-4c5a-9a55-3b7d3f0f9c11"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Cancel Auto Splice plan (beta); or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "cancelled"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "cancelled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "0b6a3f62-6e0e-4c5a-9a55-3b7d3f0f9c11",
                    "cancelled": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-beta": true
      }
    },
    "/api/v1/networks/{network}/autosplice/plans/{id}/approve": {
      "post": {
        "tags": [
          "Auto Splice"
        ],
        "summary": "Approve Auto Splice plan (beta)",
        "operationId": "approveAutoSplice",
        "x-feature": "auto-splice",
        "description": "**Beta**: its specification is still open and may change. Saves the proposal you reviewed (`planHash`, and `route`: which of its routes), as Approve does. A large one is saved by a worker: follow its `status`. Needs a **network-changes token**. Needs the **auto-splice** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The plan's id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0b6a3f62-6e0e-4c5a-9a55-3b7d3f0f9c11"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "planHash": "9f2c…",
                "route": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Approve Auto Splice plan (beta); or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/AutoSplicePlan"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "planId": "0b6a3f62-6e0e-4c5a-9a55-3b7d3f0f9c11",
                    "status": "committed",
                    "planHash": "9f2c…",
                    "canApprove": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true,
        "x-beta": true
      }
    },
    "/api/v1/networks/{network}/accesspoints/{id}/upgrade": {
      "get": {
        "tags": [
          "Access points"
        ],
        "summary": "Get upgrade of access point",
        "operationId": "accesspointsUpgrade",
        "x-feature": "upgrade",
        "description": "Upgrade, as its window: before a capture, each saved-route fibre through the access point (status null); after it, each captured fibre as it stands now: `connected`, `splice` (to make, in `closure`), `release` (an old splice left over from the change, by its number), `blocked` (`reason`) or `splitter` (by hand). Needs the **upgrade** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "The upgrade",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Upgrade"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "structure": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "capturedAt": "2026-12-04T08:00:00Z",
                    "closures": [
                      {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      }
                    ],
                    "ties": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      }
                    ],
                    "items": [
                      {
                        "status": "splice",
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "label": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "label": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "routes": [
                          {
                            "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                            "type": "route",
                            "name": "Kajjansi <> Kigo"
                          }
                        ],
                        "closure": {
                          "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                          "type": "enclosure",
                          "name": "SP-1576"
                        },
                        "splice": null,
                        "reason": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Access points"
        ],
        "summary": "Discard upgrade of access point",
        "operationId": "accesspointsUpgradeDiscard",
        "x-feature": "upgrade",
        "description": "Discards the capture. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Discard upgrade of access point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/accesspoints/{id}/upgrade/capture": {
      "post": {
        "tags": [
          "Access points"
        ],
        "summary": "Capture upgrade of access point",
        "operationId": "accesspointsUpgradeCapture",
        "x-feature": "upgrade",
        "description": "Notes where every saved-route fibre goes through the access point, before it is changed (replacing an earlier capture), as Capture. Kept for the token's account, as the window keeps it. Changes nothing in the network. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Capture upgrade of access point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Upgrade"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "structure": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "capturedAt": "2026-12-04T08:00:00Z",
                    "closures": [
                      {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      }
                    ],
                    "ties": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      }
                    ],
                    "items": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/accesspoints/{id}/upgrade/apply": {
      "post": {
        "tags": [
          "Access points"
        ],
        "summary": "Apply upgrade of access point",
        "operationId": "accesspointsUpgradeApply",
        "x-feature": "upgrade",
        "description": "Apply, as the window: removes the old splices left over (every `release` row but those whose splice is in `keep`), saves each `splice` range (type Splice, a save each), then updates the saved routes on the splices saved. Needs a **network-changes token**. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "keep": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Apply upgrade of access point; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/UpgradeApplied"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "removed": 2,
                    "saved": 1,
                    "failed": [],
                    "routesUpdated": 1,
                    "routesFailed": 0,
                    "upgrade": {
                      "structure": {
                        "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                        "type": "accesspoint",
                        "name": "A1576"
                      },
                      "capturedAt": "2026-12-04T08:00:00Z",
                      "closures": [
                        {
                          "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                          "type": "enclosure",
                          "name": "SP-1576"
                        }
                      ],
                      "ties": [
                        {
                          "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                          "type": "span",
                          "name": "ndejje lubuguumu"
                        }
                      ],
                      "items": [
                        {
                          "status": "connected",
                          "a": {
                            "span": {
                              "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                              "type": "span",
                              "name": "ndejje lubuguumu"
                            },
                            "device": null,
                            "label": "10412 - ndejje lubuguumu",
                            "from": 1,
                            "to": 12
                          },
                          "b": {
                            "span": {
                              "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                              "type": "span",
                              "name": "A373<>A375"
                            },
                            "device": null,
                            "label": "475 - A373<>A375",
                            "from": 1,
                            "to": 12
                          },
                          "routes": [
                            {
                              "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                              "type": "route",
                              "name": "Kajjansi <> Kigo"
                            }
                          ],
                          "closure": null,
                          "splice": null,
                          "reason": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/buildings/{id}/upgrade": {
      "get": {
        "tags": [
          "Buildings"
        ],
        "summary": "Get upgrade of building",
        "operationId": "buildingsUpgrade",
        "x-feature": "upgrade",
        "description": "Upgrade, as its window: before a capture, each saved-route fibre through the building (status null); after it, each captured fibre as it stands now: `connected`, `splice` (to make, in `closure`), `release` (an old splice left over from the change, by its number), `blocked` (`reason`) or `splitter` (by hand). Needs the **upgrade** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "The upgrade",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Upgrade"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "structure": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "capturedAt": "2026-12-04T08:00:00Z",
                    "closures": [
                      {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      }
                    ],
                    "ties": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      }
                    ],
                    "items": [
                      {
                        "status": "splice",
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "label": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "label": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "routes": [
                          {
                            "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                            "type": "route",
                            "name": "Kajjansi <> Kigo"
                          }
                        ],
                        "closure": {
                          "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                          "type": "enclosure",
                          "name": "SP-1576"
                        },
                        "splice": null,
                        "reason": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Buildings"
        ],
        "summary": "Discard upgrade of building",
        "operationId": "buildingsUpgradeDiscard",
        "x-feature": "upgrade",
        "description": "Discards the capture. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Discard upgrade of building; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/buildings/{id}/upgrade/capture": {
      "post": {
        "tags": [
          "Buildings"
        ],
        "summary": "Capture upgrade of building",
        "operationId": "buildingsUpgradeCapture",
        "x-feature": "upgrade",
        "description": "Notes where every saved-route fibre goes through the building, before it is changed (replacing an earlier capture), as Capture. Kept for the token's account, as the window keeps it. Changes nothing in the network. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Capture upgrade of building",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Upgrade"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "structure": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "capturedAt": "2026-12-04T08:00:00Z",
                    "closures": [
                      {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      }
                    ],
                    "ties": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      }
                    ],
                    "items": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/buildings/{id}/upgrade/apply": {
      "post": {
        "tags": [
          "Buildings"
        ],
        "summary": "Apply upgrade of building",
        "operationId": "buildingsUpgradeApply",
        "x-feature": "upgrade",
        "description": "Apply, as the window: removes the old splices left over (every `release` row but those whose splice is in `keep`), saves each `splice` range (type Splice, a save each), then updates the saved routes on the splices saved. Needs a **network-changes token**. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "keep": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Apply upgrade of building; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/UpgradeApplied"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "removed": 2,
                    "saved": 1,
                    "failed": [],
                    "routesUpdated": 1,
                    "routesFailed": 0,
                    "upgrade": {
                      "structure": {
                        "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                        "type": "accesspoint",
                        "name": "A1576"
                      },
                      "capturedAt": "2026-12-04T08:00:00Z",
                      "closures": [
                        {
                          "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                          "type": "enclosure",
                          "name": "SP-1576"
                        }
                      ],
                      "ties": [
                        {
                          "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                          "type": "span",
                          "name": "ndejje lubuguumu"
                        }
                      ],
                      "items": [
                        {
                          "status": "connected",
                          "a": {
                            "span": {
                              "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                              "type": "span",
                              "name": "ndejje lubuguumu"
                            },
                            "device": null,
                            "label": "10412 - ndejje lubuguumu",
                            "from": 1,
                            "to": 12
                          },
                          "b": {
                            "span": {
                              "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                              "type": "span",
                              "name": "A373<>A375"
                            },
                            "device": null,
                            "label": "475 - A373<>A375",
                            "from": 1,
                            "to": 12
                          },
                          "routes": [
                            {
                              "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                              "type": "route",
                              "name": "Kajjansi <> Kigo"
                            }
                          ],
                          "closure": null,
                          "splice": null,
                          "reason": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/poles/{id}/upgrade": {
      "get": {
        "tags": [
          "Poles"
        ],
        "summary": "Get upgrade of pole",
        "operationId": "polesUpgrade",
        "x-feature": "upgrade",
        "description": "Upgrade, as its window: before a capture, each saved-route fibre through the pole (status null); after it, each captured fibre as it stands now: `connected`, `splice` (to make, in `closure`), `release` (an old splice left over from the change, by its number), `blocked` (`reason`) or `splitter` (by hand). Needs the **upgrade** feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "The upgrade",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Upgrade"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "structure": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "capturedAt": "2026-12-04T08:00:00Z",
                    "closures": [
                      {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      }
                    ],
                    "ties": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      }
                    ],
                    "items": [
                      {
                        "status": "splice",
                        "a": {
                          "span": {
                            "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                            "type": "span",
                            "name": "ndejje lubuguumu"
                          },
                          "device": null,
                          "label": "10412 - ndejje lubuguumu",
                          "from": 1,
                          "to": 12
                        },
                        "b": {
                          "span": {
                            "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                            "type": "span",
                            "name": "A373<>A375"
                          },
                          "device": null,
                          "label": "475 - A373<>A375",
                          "from": 1,
                          "to": 12
                        },
                        "routes": [
                          {
                            "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                            "type": "route",
                            "name": "Kajjansi <> Kigo"
                          }
                        ],
                        "closure": {
                          "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                          "type": "enclosure",
                          "name": "SP-1576"
                        },
                        "splice": null,
                        "reason": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Poles"
        ],
        "summary": "Discard upgrade of pole",
        "operationId": "polesUpgradeDiscard",
        "x-feature": "upgrade",
        "description": "Discards the capture. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Discard upgrade of pole; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "type": "object",
                          "required": [
                            "id",
                            "deleted"
                          ],
                          "properties": {
                            "id": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            },
                            "deleted": {
                              "type": "boolean",
                              "const": true
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/poles/{id}/upgrade/capture": {
      "post": {
        "tags": [
          "Poles"
        ],
        "summary": "Capture upgrade of pole",
        "operationId": "polesUpgradeCapture",
        "x-feature": "upgrade",
        "description": "Notes where every saved-route fibre goes through the pole, before it is changed (replacing an earlier capture), as Capture. Kept for the token's account, as the window keeps it. Changes nothing in the network. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunAnswer"
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "Capture upgrade of pole",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Upgrade"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "structure": {
                      "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                      "type": "accesspoint",
                      "name": "A1576"
                    },
                    "capturedAt": "2026-12-04T08:00:00Z",
                    "closures": [
                      {
                        "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                        "type": "enclosure",
                        "name": "SP-1576"
                      }
                    ],
                    "ties": [
                      {
                        "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                        "type": "span",
                        "name": "ndejje lubuguumu"
                      }
                    ],
                    "items": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/poles/{id}/upgrade/apply": {
      "post": {
        "tags": [
          "Poles"
        ],
        "summary": "Apply upgrade of pole",
        "operationId": "polesUpgradeApply",
        "x-feature": "upgrade",
        "description": "Apply, as the window: removes the old splices left over (every `release` row but those whose splice is in `keep`), saves each `splice` range (type Splice, a save each), then updates the saved routes on the splices saved. Needs a **network-changes token**. Needs the **upgrade** feature in full use.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "keep": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Apply upgrade of pole; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "$ref": "#/components/schemas/Status"
                        },
                        "data": {
                          "$ref": "#/components/schemas/UpgradeApplied"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "removed": 2,
                    "saved": 1,
                    "failed": [],
                    "routesUpdated": 1,
                    "routesFailed": 0,
                    "upgrade": {
                      "structure": {
                        "id": "6024e1c8-fdea-e711-a949-eb6b215db87c",
                        "type": "accesspoint",
                        "name": "A1576"
                      },
                      "capturedAt": "2026-12-04T08:00:00Z",
                      "closures": [
                        {
                          "id": "d0301ab2-0347-e711-9acd-782bcb19c20c",
                          "type": "enclosure",
                          "name": "SP-1576"
                        }
                      ],
                      "ties": [
                        {
                          "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                          "type": "span",
                          "name": "ndejje lubuguumu"
                        }
                      ],
                      "items": [
                        {
                          "status": "connected",
                          "a": {
                            "span": {
                              "id": "c6724000-23ef-4c21-a082-c6d2e8f2e46c",
                              "type": "span",
                              "name": "ndejje lubuguumu"
                            },
                            "device": null,
                            "label": "10412 - ndejje lubuguumu",
                            "from": 1,
                            "to": 12
                          },
                          "b": {
                            "span": {
                              "id": "e367f55a-86ee-4c70-acd1-b1fc830447a2",
                              "type": "span",
                              "name": "A373<>A375"
                            },
                            "device": null,
                            "label": "475 - A373<>A375",
                            "from": 1,
                            "to": 12
                          },
                          "routes": [
                            {
                              "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                              "type": "route",
                              "name": "Kajjansi <> Kigo"
                            }
                          ],
                          "closure": null,
                          "splice": null,
                          "reason": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-needs-change-token": true
      }
    },
    "/api/v1/networks/{network}/customer": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customers (/customer)",
        "operationId": "list_customers_singular",
        "description": "The same as GET /customers, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "$ref": "#/components/parameters/name"
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/startCreateTime"
          },
          {
            "$ref": "#/components/parameters/endCreateTime"
          },
          {
            "$ref": "#/components/parameters/startUpdateTime"
          },
          {
            "$ref": "#/components/parameters/endUpdateTime"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "paging",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "paging": {
                      "$ref": "#/components/schemas/Paging"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "paging": {
                    "page": 1,
                    "size": 20,
                    "last_page": 3,
                    "count": 20,
                    "total": 51
                  },
                  "data": [
                    {
                      "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                      "equipment": {
                        "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                        "type": "equipment",
                        "name": "OLT-1"
                      },
                      "customerid": 80,
                      "customer": "Acme Ltd",
                      "contact": "J. Okello",
                      "phone": "+256 700 000000",
                      "equipmentid": 5,
                      "createtime": "2023-05-02T09:00:00",
                      "updatetime": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "New customer (/customer)",
        "operationId": "create_customers_singular",
        "description": "The same as POST /customers, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Acme Ltd",
                "contact": "J. Okello",
                "equipment": {
                  "id": "3005e625-9ec9-4372-acee-b75673c3585a"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dry run: checked, nothing saved; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "dry run: checked, nothing saved"
                  },
                  "data": {
                    "dryRun": true,
                    "saves": [
                      {
                        "action": "new splice-point",
                        "changes": [
                          {
                            "table": "enclosure",
                            "id": 1544,
                            "before": null,
                            "after": {
                              "name": "SP-1577"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "201": {
            "description": "The new customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 201,
                    "message": "created"
                  },
                  "data": {
                    "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "customerid": 80,
                    "customer": "Acme Ltd",
                    "contact": "J. Okello",
                    "phone": "+256 700 000000",
                    "equipmentid": 5,
                    "createtime": "2023-05-02T09:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customer/{id}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customer (/customer)",
        "operationId": "get_customers_singular",
        "description": "The same as GET /customers/{id}, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "customerid": 80,
                    "customer": "Acme Ltd",
                    "contact": "J. Okello",
                    "phone": "+256 700 000000",
                    "equipmentid": 5,
                    "createtime": "2023-05-02T09:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Customers"
        ],
        "summary": "Update customer (/customer)",
        "operationId": "update_customers_singular",
        "description": "The same as PUT /customers/{id}, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "name": "Acme Ltd",
                "phone": "+256 700 000000",
                "equipment": {
                  "id": "3005e625-9ec9-4372-acee-b75673c3585a"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The customer; or, with dryRun, what would have changed; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "status",
                            "data"
                          ],
                          "properties": {
                            "status": {
                              "$ref": "#/components/schemas/Status"
                            },
                            "data": {
                              "$ref": "#/components/schemas/Customer"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "$ref": "#/components/schemas/DryRunAnswer"
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "id": "067ec1cc-e42a-4cdc-82e9-385a69ae65b1",
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "customerid": 80,
                    "customer": "Acme Ltd",
                    "contact": "J. Okello",
                    "phone": "+256 700 000000",
                    "equipmentid": 5,
                    "createtime": "2023-05-02T09:00:00",
                    "updatetime": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customer/{id}/relations": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customer relations (/customer)",
        "operationId": "customerRelations_singular",
        "description": "The same as GET /customers/{id}/relations, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "customer relations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerRelations"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Customers"
        ],
        "summary": "Update customer relations (/customer)",
        "operationId": "relateCustomer_singular",
        "description": "The same as PUT /customers/{id}/relations, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "equipment": {
                  "id": "3005e625-9ec9-4372-acee-b75673c3585a"
                },
                "routes": [
                  "809612c6-2328-e811-a94c-bc9cef5a1839"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The relations now; or, with dryRun, what would have changed; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "status",
                            "data"
                          ],
                          "properties": {
                            "status": {
                              "$ref": "#/components/schemas/Status"
                            },
                            "data": {
                              "$ref": "#/components/schemas/CustomerRelations"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "$ref": "#/components/schemas/DryRunAnswer"
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "updated"
                  },
                  "data": {
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Delete customer relations (/customer)",
        "operationId": "unrelateCustomer_singular",
        "description": "The same as DELETE /customers/{id}/relations, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "equipment": null,
                "routes": [
                  "809612c6-2328-e811-a94c-bc9cef5a1839"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The relations now; or, with dryRun, what would have changed; or, with dryRun, what would have changed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "status",
                            "data"
                          ],
                          "properties": {
                            "status": {
                              "$ref": "#/components/schemas/Status"
                            },
                            "data": {
                              "$ref": "#/components/schemas/CustomerRelations"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "$ref": "#/components/schemas/DryRunAnswer"
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/DryRunAnswer"
                    }
                  ]
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "deleted"
                  },
                  "data": {
                    "equipment": null,
                    "routes": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/api/v1/networks/{network}/customer/{id}/services": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Get customer services (/customer)",
        "operationId": "customerServices_singular",
        "description": "The same as GET /customers/{id}/services, at the singular path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/network"
          },
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "customer services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "data"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomerServices"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "status": {
                    "code": 200,
                    "message": "ok"
                  },
                  "data": {
                    "equipment": {
                      "id": "3005e625-9ec9-4372-acee-b75673c3585a",
                      "type": "equipment",
                      "name": "OLT-1"
                    },
                    "routes": [
                      {
                        "id": "809612c6-2328-e811-a94c-bc9cef5a1839",
                        "type": "route",
                        "name": "Kajjansi <> Kigo",
                        "status": "Used",
                        "priority": "High",
                        "designation": "backbone"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "The access token from /api/v1/token"
      }
    },
    "parameters": {
      "network": {
        "name": "network",
        "in": "path",
        "required": true,
        "description": "A network id, from Get networks",
        "schema": {
          "type": "string"
        },
        "example": "f2f91656-607b-4854-880e-79054a68ee9c"
      },
      "id": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The object's GUID (its `id`)",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "c6724000-23ef-4c21-a082-c6d2e8f2e46c"
      },
      "num": {
        "name": "num",
        "in": "path",
        "required": true,
        "description": "The strand's number in its span",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 3
      },
      "page": {
        "name": "page",
        "in": "query",
        "description": "The page to get, from 1",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "size": {
        "name": "size",
        "in": "query",
        "description": "Rows a page, at most 50",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50,
          "default": 20
        }
      },
      "name": {
        "name": "name",
        "in": "query",
        "description": "Filter by name, ignoring case",
        "schema": {
          "type": "string"
        }
      },
      "filter": {
        "name": "filter",
        "in": "query",
        "description": "How `name` must match: `contains` (default), `exact`, `startsWith` or `endsWith`",
        "schema": {
          "type": "string",
          "enum": [
            "contains",
            "exact",
            "startsWith",
            "endsWith"
          ],
          "default": "contains"
        }
      },
      "startCreateTime": {
        "name": "startCreateTime",
        "in": "query",
        "description": "Made at or after this time (ISO 8601)",
        "schema": {
          "type": "string"
        },
        "example": "2021-05-01T16:20:00Z"
      },
      "endCreateTime": {
        "name": "endCreateTime",
        "in": "query",
        "description": "Made at or before this time (ISO 8601)",
        "schema": {
          "type": "string"
        },
        "example": "2021-05-30T23:59:00Z"
      },
      "startUpdateTime": {
        "name": "startUpdateTime",
        "in": "query",
        "description": "Changed at or after this time (ISO 8601)",
        "schema": {
          "type": "string"
        },
        "example": "2021-05-01T16:20:00Z"
      },
      "endUpdateTime": {
        "name": "endUpdateTime",
        "in": "query",
        "description": "Changed at or before this time (ISO 8601)",
        "schema": {
          "type": "string"
        },
        "example": "2021-05-30T23:59:00Z"
      },
      "confirm": {
        "name": "confirm",
        "in": "query",
        "description": "true: delete it with what it takes with it (after a 409 confirm_needed said what that is)",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "dryRun": {
        "name": "dryRun",
        "in": "query",
        "description": "true: make every check and save as for real, then keep nothing; the answer says what each save would have changed",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "srid": {
        "name": "srid",
        "in": "query",
        "description": "Coordinate system of `geo` (EPSG code)",
        "schema": {
          "type": "integer",
          "default": 4326
        }
      }
    },
    "responses": {
      "E400": {
        "description": "A parameter is wrong (the message says which)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "A parameter is wrong (the message says which)",
              "code": "bad_request"
            }
          }
        }
      },
      "E401": {
        "description": "No access token, or it has run out: get a new one",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "No access token, or it has run out: get a new one",
              "code": "unauthenticated"
            }
          }
        }
      },
      "E403": {
        "description": "Not allowed: the add-on is off or not in full use, the token's account may not use the API, it may only read this network, or (needs_change_token) the call takes a network-changes token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Not allowed: the add-on is off or not in full use, the token's account may not use the API, it may only read this network, or (needs_change_token) the call takes a network-changes token",
              "code": "forbidden"
            }
          }
        }
      },
      "E404": {
        "description": "No such network or object (or not one the token may see)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "No such network or object (or not one the token may see)",
              "code": "not_found"
            }
          }
        }
      },
      "E409": {
        "description": "Someone has the object open for editing (the message says who), it changed under the save, (strands) more than one strand has this GUID: use its span and number, or (confirm_needed) a delete takes other things with it: the message says what, send it again with confirm=true",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Someone has the object open for editing (the message says who), it changed under the save, (strands) more than one strand has this GUID: use its span and number, or (confirm_needed) a delete takes other things with it: the message says what, send it again with confirm=true",
              "code": "locked"
            }
          }
        }
      },
      "E422": {
        "description": "The distance is past the end of the route",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "The distance is past the end of the route",
              "code": "beyond_route"
            }
          }
        }
      },
      "E429": {
        "description": "The server is busy with other work of this kind: try again in a few minutes",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "The server is busy with other work of this kind: try again in a few minutes",
              "code": "taper_busy"
            }
          }
        }
      }
    },
    "schemas": {
      "Status": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "example": 200
          },
          "message": {
            "type": "string",
            "example": "ok"
          }
        },
        "additionalProperties": false
      },
      "Paging": {
        "type": "object",
        "required": [
          "page",
          "size",
          "last_page",
          "count",
          "total"
        ],
        "properties": {
          "page": {
            "type": "integer"
          },
          "size": {
            "type": "integer"
          },
          "last_page": {
            "type": "integer"
          },
          "count": {
            "type": "integer",
            "description": "Rows on this page"
          },
          "total": {
            "type": "integer",
            "description": "Rows in all pages"
          }
        },
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "What went wrong, for a person"
          },
          "code": {
            "type": "string",
            "description": "For a program"
          }
        }
      },
      "Token": {
        "type": "object",
        "required": [
          "accessToken",
          "expiresIn"
        ],
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "expiresIn": {
            "type": "integer",
            "description": "Seconds"
          }
        },
        "additionalProperties": false
      },
      "Network": {
        "type": "object",
        "required": [
          "network",
          "name",
          "designation",
          "version",
          "srid",
          "center"
        ],
        "properties": {
          "network": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "designation": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "srid": {
            "type": "integer"
          },
          "center": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "lat",
              "lng"
            ],
            "properties": {
              "lat": {
                "type": "number"
              },
              "lng": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "Ref": {
        "type": [
          "object",
          "null"
        ],
        "required": [
          "id",
          "type",
          "name"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "description": "Another object: its GUID, kind and name"
      },
      "AccessPoint": {
        "type": "object",
        "description": "An access point and its fields as stored",
        "required": [
          "id",
          "geo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          }
        },
        "additionalProperties": true
      },
      "Building": {
        "type": "object",
        "description": "A building and its fields as stored",
        "required": [
          "id",
          "geo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          }
        },
        "additionalProperties": true
      },
      "Pole": {
        "type": "object",
        "description": "A pole and its fields as stored",
        "required": [
          "id",
          "geo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          }
        },
        "additionalProperties": true
      },
      "Span": {
        "type": "object",
        "description": "A cable span and its fields as stored; geo is its cables",
        "required": [
          "id",
          "geo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          }
        },
        "additionalProperties": true
      },
      "Route": {
        "type": "object",
        "description": "A saved route and its fields as stored",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          }
        },
        "additionalProperties": true
      },
      "Strand": {
        "type": "object",
        "description": "A strand and its fields as stored; span is its span's GUID (null for a device's fibre)",
        "required": [
          "id",
          "span"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "span": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "additionalProperties": true
      },
      "Enclosure": {
        "type": "object",
        "description": "An enclosure and its fields as stored",
        "required": [
          "id",
          "geo",
          "location",
          "enclosuretype"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          },
          "location": {
            "$ref": "#/components/schemas/Ref"
          },
          "enclosuretype": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "TerminationPoint": {
        "type": "object",
        "description": "A termination point and its fields as stored",
        "required": [
          "id",
          "geo",
          "location",
          "fibermngrtype"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          },
          "location": {
            "$ref": "#/components/schemas/Ref"
          },
          "fibermngrtype": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "Equipment": {
        "type": "object",
        "description": "An equipment and its fields as stored",
        "required": [
          "id",
          "location",
          "equipmenttype"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "location": {
            "$ref": "#/components/schemas/Ref"
          },
          "equipmenttype": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "Port": {
        "type": "object",
        "description": "A port and its fields as stored",
        "required": [
          "id",
          "owner",
          "patchedTo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "owner": {
            "$ref": "#/components/schemas/Ref"
          },
          "patchedTo": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "DuctBank": {
        "type": "object",
        "description": "A duct bank and its fields as stored",
        "required": [
          "id",
          "geo",
          "start_location",
          "end_location"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          },
          "start_location": {
            "$ref": "#/components/schemas/Ref"
          },
          "end_location": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "SlackLoop": {
        "type": "object",
        "description": "A slack loop and its fields as stored",
        "required": [
          "id",
          "geo",
          "location",
          "span"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          },
          "location": {
            "$ref": "#/components/schemas/Ref"
          },
          "span": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "Customer": {
        "type": "object",
        "description": "A customer and its fields as stored",
        "required": [
          "id",
          "equipment"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "equipment": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "Device": {
        "type": "object",
        "description": "A device and its fields as stored",
        "required": [
          "id",
          "enclosure",
          "devicetype"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "enclosure": {
            "$ref": "#/components/schemas/Ref"
          },
          "devicetype": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "Alarm": {
        "type": "object",
        "description": "An alarm and its fields as stored",
        "required": [
          "id",
          "geo",
          "route"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          },
          "route": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "PlanLine": {
        "type": "object",
        "description": "A plan line and its fields as stored",
        "required": [
          "id",
          "geo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          }
        },
        "additionalProperties": true
      },
      "PlanPoint": {
        "type": "object",
        "description": "A plan point and its fields as stored",
        "required": [
          "id",
          "geo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          }
        },
        "additionalProperties": true
      },
      "PoleLine": {
        "type": "object",
        "description": "A pole line and its fields as stored",
        "required": [
          "id",
          "geo"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          }
        },
        "additionalProperties": true
      },
      "Floor": {
        "type": "object",
        "description": "A floor and its fields as stored",
        "required": [
          "id",
          "building"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "building": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "Room": {
        "type": "object",
        "description": "A room and its fields as stored; onFloor is the floor it is on (floor, a text it also stores)",
        "required": [
          "id",
          "building",
          "onFloor"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "building": {
            "$ref": "#/components/schemas/Ref"
          },
          "onFloor": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "Rack": {
        "type": "object",
        "description": "A rack and its fields as stored; location is the access point or building it stands in",
        "required": [
          "id",
          "location",
          "room"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "location": {
            "$ref": "#/components/schemas/Ref"
          },
          "room": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": true
      },
      "WorkOrder": {
        "type": "object",
        "description": "A work order and its fields as stored",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          }
        },
        "additionalProperties": true
      },
      "AlarmAtFault": {
        "type": "object",
        "description": "The new alarm, and where the fault was found",
        "required": [
          "id",
          "geo",
          "route",
          "faultLocation"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Its GUID"
          },
          "geo": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON"
          },
          "route": {
            "$ref": "#/components/schemas/Ref"
          },
          "faultLocation": {
            "$ref": "#/components/schemas/Fault"
          }
        },
        "additionalProperties": true
      },
      "Leg": {
        "type": "object",
        "required": [
          "leg",
          "kind",
          "object",
          "parent",
          "location",
          "address",
          "status",
          "id",
          "type",
          "end",
          "distance",
          "total",
          "optical",
          "opticalTotal",
          "loss",
          "cumulativeLoss"
        ],
        "properties": {
          "leg": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "port",
              "strand",
              "splice"
            ]
          },
          "object": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "span": {
            "type": [
              "string",
              "null"
            ],
            "description": "Strand legs: the span's GUID"
          },
          "strand": {
            "type": [
              "integer",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ]
          },
          "spliceType": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "GUID of the port, strand, closure or term point"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "port",
              "strand",
              "enclosure",
              "terminationpoint",
              null
            ]
          },
          "end": {
            "type": "boolean"
          },
          "distance": {
            "type": [
              "number",
              "null"
            ],
            "description": "Metres"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Running total, metres"
          },
          "optical": {
            "type": [
              "number",
              "null"
            ]
          },
          "opticalTotal": {
            "type": [
              "number",
              "null"
            ]
          },
          "loss": {
            "type": [
              "number",
              "null"
            ],
            "description": "dB"
          },
          "cumulativeLoss": {
            "type": [
              "number",
              "null"
            ],
            "description": "dB"
          }
        },
        "additionalProperties": false
      },
      "Trace": {
        "type": "object",
        "required": [
          "legs"
        ],
        "properties": {
          "legs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Leg"
            }
          }
        },
        "additionalProperties": false
      },
      "Fault": {
        "type": "object",
        "required": [
          "distance",
          "routeLength",
          "legIndex",
          "leg",
          "intoLeg",
          "point"
        ],
        "properties": {
          "distance": {
            "type": "object",
            "required": [
              "value",
              "units",
              "metres"
            ],
            "properties": {
              "value": {
                "type": "number"
              },
              "units": {
                "type": "string"
              },
              "metres": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "routeLength": {
            "type": "number"
          },
          "legIndex": {
            "type": "integer"
          },
          "leg": {
            "$ref": "#/components/schemas/Leg"
          },
          "intoLeg": {
            "type": "number",
            "description": "Metres into that leg"
          },
          "point": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON Point"
          }
        },
        "additionalProperties": false
      },
      "SpliceEnd": {
        "type": "object",
        "required": [
          "span",
          "device",
          "name",
          "from",
          "to"
        ],
        "properties": {
          "span": {
            "$ref": "#/components/schemas/Ref"
          },
          "device": {
            "$ref": "#/components/schemas/Ref"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": [
              "integer",
              "null"
            ]
          },
          "to": {
            "type": [
              "integer",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "Splicing": {
        "type": "object",
        "required": [
          "splices",
          "spans",
          "splitters"
        ],
        "properties": {
          "splices": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "a",
                "b",
                "splice",
                "type",
                "tray",
                "splitter"
              ],
              "properties": {
                "a": {
                  "$ref": "#/components/schemas/SpliceEnd"
                },
                "b": {
                  "$ref": "#/components/schemas/SpliceEnd"
                },
                "splice": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Its number in this network: unsplice by it"
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tray": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "splitter": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "spans": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "type",
                "name",
                "label",
                "strands"
              ],
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "type": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "strands": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "splitters": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "type",
                "name",
                "label",
                "outputs"
              ],
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "type": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "outputs": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "fibres": {}
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "Termination": {
        "type": "object",
        "required": [
          "port",
          "num",
          "span",
          "strand",
          "status"
        ],
        "properties": {
          "port": {
            "$ref": "#/components/schemas/Ref"
          },
          "num": {
            "type": [
              "integer",
              "null"
            ]
          },
          "span": {
            "$ref": "#/components/schemas/Ref"
          },
          "strand": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "PortService": {
        "type": "object",
        "required": [
          "port",
          "num",
          "status",
          "users",
          "route",
          "routes",
          "waveFilter"
        ],
        "properties": {
          "port": {
            "$ref": "#/components/schemas/Ref"
          },
          "num": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "users": {
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "$ref": "#/components/schemas/Ref"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          },
          "waveFilter": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "PortServices": {
        "type": "object",
        "required": [
          "ports"
        ],
        "properties": {
          "ports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortService"
            }
          }
        },
        "additionalProperties": false
      },
      "EquipmentServices": {
        "type": "object",
        "required": [
          "ports",
          "customers"
        ],
        "properties": {
          "ports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortService"
            }
          },
          "customers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          }
        },
        "additionalProperties": false
      },
      "SpanServices": {
        "type": "object",
        "required": [
          "leased",
          "strands"
        ],
        "properties": {
          "leased": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "status",
                "company",
                "from",
                "to"
              ],
              "properties": {
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "to": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "strands": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "strand",
                "num",
                "status",
                "leased",
                "route",
                "routes",
                "waveFilter"
              ],
              "properties": {
                "strand": {
                  "$ref": "#/components/schemas/Ref"
                },
                "num": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "leased": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "route": {
                  "$ref": "#/components/schemas/Ref"
                },
                "routes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Ref"
                  }
                },
                "waveFilter": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "PatchEnd": {
        "type": "object",
        "required": [
          "id",
          "type",
          "name",
          "num",
          "owner"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "num": {
            "type": [
              "integer",
              "null"
            ]
          },
          "owner": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": false
      },
      "Patching": {
        "type": "object",
        "required": [
          "location",
          "patches"
        ],
        "properties": {
          "location": {
            "$ref": "#/components/schemas/Ref"
          },
          "patches": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "a",
                "b",
                "cord"
              ],
              "properties": {
                "a": {
                  "$ref": "#/components/schemas/PatchEnd"
                },
                "b": {
                  "$ref": "#/components/schemas/PatchEnd"
                },
                "cord": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "required": [
                    "id",
                    "label",
                    "length",
                    "units"
                  ],
                  "properties": {
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "length": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "units": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "RouteService": {
        "type": "object",
        "required": [
          "id",
          "type",
          "name",
          "status",
          "priority",
          "designation"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "designation": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "EquipmentRelations": {
        "type": "object",
        "required": [
          "customers"
        ],
        "properties": {
          "customers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          }
        },
        "additionalProperties": false
      },
      "CustomerRelations": {
        "type": "object",
        "required": [
          "equipment",
          "routes"
        ],
        "properties": {
          "equipment": {
            "$ref": "#/components/schemas/Ref"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          }
        },
        "additionalProperties": false
      },
      "CustomerServices": {
        "type": "object",
        "required": [
          "equipment",
          "routes"
        ],
        "properties": {
          "equipment": {
            "$ref": "#/components/schemas/Ref"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteService"
            }
          }
        },
        "additionalProperties": false
      },
      "WorkOrderCosts": {
        "type": "object",
        "required": [
          "workorder",
          "totals",
          "objects",
          "tasks"
        ],
        "properties": {
          "workorder": {
            "$ref": "#/components/schemas/Ref"
          },
          "totals": {
            "type": "object",
            "required": [
              "pricelist",
              "entities",
              "tasks",
              "labor",
              "material",
              "total"
            ],
            "properties": {
              "pricelist": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entities": {
                "type": "integer"
              },
              "tasks": {
                "type": "integer"
              },
              "labor": {
                "type": "number"
              },
              "material": {
                "type": "number"
              },
              "total": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "objects": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "object",
                "stage",
                "comments",
                "quantity",
                "units",
                "installcompany",
                "installdate",
                "street"
              ],
              "properties": {
                "object": {
                  "$ref": "#/components/schemas/Ref"
                },
                "stage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comments": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "units": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "installcompany": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "installdate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "street": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "object",
                "category",
                "subcategory",
                "code",
                "item",
                "taskname",
                "tasknote",
                "taskunits",
                "quantity",
                "unitprice",
                "totalprice",
                "materialsoption",
                "materialsnote"
              ],
              "properties": {
                "object": {
                  "$ref": "#/components/schemas/Ref"
                },
                "category": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "subcategory": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "item": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "taskname": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tasknote": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "taskunits": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "unitprice": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "totalprice": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "materialsoption": {},
                "materialsnote": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "Outage": {
        "type": "object",
        "required": [
          "id",
          "ticket",
          "routes",
          "notes",
          "status",
          "createdBy",
          "createdAt",
          "updatedBy",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "ticket": {
            "type": "string"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SearchResult": {
        "type": "object",
        "required": [
          "total",
          "page",
          "size",
          "matches"
        ],
        "properties": {
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "size": {
            "type": "integer"
          },
          "matches": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "type",
                "name",
                "matched"
              ],
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "type": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "matched": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "SpliceHistory": {
        "type": "object",
        "required": [
          "id",
          "time",
          "user",
          "comments",
          "snapshot"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "time": {
            "type": [
              "string",
              "null"
            ]
          },
          "user": {
            "type": [
              "string",
              "null"
            ]
          },
          "comments": {
            "type": [
              "string",
              "null"
            ]
          },
          "snapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "a",
                "b",
                "type"
              ],
              "properties": {
                "a": {
                  "$ref": "#/components/schemas/SpliceEnd"
                },
                "b": {
                  "$ref": "#/components/schemas/SpliceEnd"
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "AuditEntry": {
        "type": "object",
        "required": [
          "id",
          "at",
          "finishedAt",
          "user",
          "action",
          "status",
          "changes"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "at": {
            "type": "string"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "user": {
            "type": [
              "string",
              "null"
            ]
          },
          "action": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "changes": {
            "description": "What the save changed, as recorded (JSON)"
          }
        },
        "additionalProperties": false
      },
      "Lock": {
        "type": "object",
        "required": [
          "object",
          "table",
          "lock",
          "user",
          "since"
        ],
        "properties": {
          "object": {
            "$ref": "#/components/schemas/Ref"
          },
          "table": {
            "type": [
              "string",
              "null"
            ]
          },
          "lock": {
            "type": [
              "string",
              "null"
            ]
          },
          "user": {
            "type": [
              "string",
              "null"
            ]
          },
          "since": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "SpanSummary": {
        "type": "object",
        "required": [
          "total",
          "rows",
          "owners",
          "page"
        ],
        "properties": {
          "total": {
            "type": "integer"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "span",
                "strands",
                "placement",
                "stage",
                "length",
                "owner"
              ],
              "properties": {
                "span": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "strands": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "placement": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "length": {
                  "type": "number"
                },
                "owner": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "owners": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "page": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "RouteLength": {
        "type": "object",
        "required": [
          "market",
          "ownership",
          "region",
          "group",
          "designation",
          "placement",
          "route",
          "sheath",
          "glass",
          "pole",
          "status"
        ],
        "properties": {
          "market": {
            "type": [
              "string",
              "null"
            ]
          },
          "ownership": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "group": {
            "type": [
              "string",
              "null"
            ]
          },
          "designation": {
            "type": [
              "string",
              "null"
            ]
          },
          "placement": {
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "type": [
              "string",
              "null"
            ]
          },
          "sheath": {
            "type": "number"
          },
          "glass": {
            "type": "number"
          },
          "pole": {
            "type": "number"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ReportRunSummary": {
        "type": "object",
        "required": [
          "id",
          "name",
          "ranAt",
          "ranBy",
          "durationMs"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "ranAt": {
            "type": "string"
          },
          "ranBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationMs": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ReportRun": {
        "type": "object",
        "description": "A kept run: these fields, then the report's own result fields",
        "required": [
          "id",
          "kind",
          "name",
          "ranAt",
          "ranBy",
          "options",
          "durationMs"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "ranAt": {
            "type": "string"
          },
          "ranBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "options": {
            "type": [
              "object",
              "null"
            ]
          },
          "durationMs": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "TaperSummary": {
        "type": "object",
        "required": [
          "id",
          "name",
          "started",
          "completed",
          "status",
          "running"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "started": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "running": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TaperRow": {
        "type": "object",
        "required": [
          "num",
          "object",
          "parent",
          "location",
          "address",
          "leg",
          "grp",
          "label",
          "status",
          "priority",
          "users",
          "leased",
          "strandStatus",
          "route"
        ],
        "properties": {
          "num": {
            "type": [
              "string",
              "null"
            ]
          },
          "object": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "leg": {
            "type": [
              "string",
              "null"
            ]
          },
          "grp": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "users": {
            "type": [
              "string",
              "null"
            ]
          },
          "leased": {
            "type": [
              "string",
              "null"
            ]
          },
          "strandStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": false
      },
      "RouteWaves": {
        "type": "object",
        "required": [
          "route",
          "start",
          "legs"
        ],
        "properties": {
          "route": {
            "$ref": "#/components/schemas/Ref"
          },
          "start": {
            "type": [
              "string",
              "null"
            ]
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "leg",
                "strand",
                "span",
                "waveFilter"
              ],
              "properties": {
                "leg": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "strand": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "span": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "waveFilter": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "IntegrityRunSummary": {
        "type": "object",
        "required": [
          "id",
          "name",
          "ranAt",
          "ranBy",
          "durationMs",
          "tests",
          "issues",
          "byPriority"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "ranAt": {
            "type": "string"
          },
          "ranBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationMs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tests": {
            "type": "integer"
          },
          "issues": {
            "type": "integer"
          },
          "byPriority": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        },
        "additionalProperties": false
      },
      "IntegrityRun": {
        "type": "object",
        "description": "A kept run: these fields, its tests and its issues",
        "required": [
          "id",
          "name",
          "ranAt",
          "ranBy",
          "durationMs",
          "tests"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "ranAt": {
            "type": "string"
          },
          "ranBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationMs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tests": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "status",
                "count"
              ],
              "properties": {
                "id": {
                  "type": "integer"
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "additionalProperties": true
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "FileInfo": {
        "type": "object",
        "required": [
          "id",
          "name",
          "contentType",
          "size",
          "addedAt",
          "addedBy"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contentType": {
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "type": "integer"
          },
          "addedAt": {
            "type": "string"
          },
          "addedBy": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "Duct": {
        "type": "object",
        "description": "A duct: these fields, then those it has of name, owner, lessee, diameter, diameter_units, gauge, material, color, used, comments, typ, spans",
        "required": [
          "duct",
          "parent",
          "level",
          "kind"
        ],
        "properties": {
          "duct": {
            "type": [
              "integer",
              "null"
            ]
          },
          "parent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "level": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "Duct Bank",
              "Superduct",
              "Innerduct",
              "Microduct"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "owner": {
            "type": [
              "string",
              "null"
            ]
          },
          "lessee": {
            "type": [
              "string",
              "null"
            ]
          },
          "diameter": {},
          "diameter_units": {
            "type": [
              "string",
              "null"
            ]
          },
          "gauge": {
            "type": [
              "string",
              "null"
            ]
          },
          "material": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "used": {},
          "comments": {
            "type": [
              "string",
              "null"
            ]
          },
          "typ": {
            "type": [
              "string",
              "null"
            ]
          },
          "spans": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "DryRunAnswer": {
        "type": "object",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "data": {
            "type": "object",
            "required": [
              "dryRun",
              "saves"
            ],
            "properties": {
              "dryRun": {
                "type": "boolean"
              },
              "saves": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "action",
                    "changes"
                  ],
                  "properties": {
                    "action": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "changes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "table",
                          "id",
                          "before",
                          "after"
                        ],
                        "properties": {
                          "table": {
                            "type": "string"
                          },
                          "id": {},
                          "before": {},
                          "after": {}
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "status",
          "state",
          "message",
          "started",
          "completed",
          "result"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "taper",
              "autosplice"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "done",
              "failed"
            ]
          },
          "state": {
            "type": "string",
            "description": "The kind's own state (an Auto Splice plan's status)"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "started": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed": {
            "type": [
              "string",
              "null"
            ]
          },
          "result": {
            "$ref": "#/components/schemas/Ref"
          }
        },
        "additionalProperties": false
      },
      "Calibration": {
        "type": "object",
        "required": [
          "leg",
          "label",
          "current",
          "proposed",
          "from",
          "to",
          "before",
          "after",
          "even",
          "evenBefore",
          "evenAfter",
          "points",
          "sharedRoutes",
          "strands"
        ],
        "properties": {
          "leg": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "current": {
            "type": [
              "number",
              "null"
            ]
          },
          "proposed": {
            "type": [
              "number",
              "null"
            ]
          },
          "from": {
            "type": [
              "number",
              "null"
            ]
          },
          "to": {
            "type": [
              "number",
              "null"
            ]
          },
          "before": {},
          "after": {},
          "even": {
            "type": "boolean"
          },
          "evenBefore": {},
          "evenAfter": {},
          "points": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "leg",
                "label",
                "old",
                "new",
                "fixed",
                "edited"
              ],
              "properties": {
                "leg": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "old": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "new": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "fixed": {
                  "type": "boolean"
                },
                "edited": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "sharedRoutes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "strands": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "leg",
                "span",
                "strand",
                "map",
                "oldScale",
                "newScale",
                "oldOptical",
                "newOptical"
              ],
              "properties": {
                "leg": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "span": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "strand": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "map": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "oldScale": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "newScale": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "oldOptical": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "newOptical": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "calibration": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The adjustment's number (Apply only)"
          }
        },
        "additionalProperties": false
      },
      "AutoSplicePlan": {
        "type": "object",
        "description": "Beta: the proposal as the Auto Splice window shows it, objects as type/<GUID>",
        "required": [
          "planId",
          "status"
        ],
        "properties": {
          "planId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "planHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "canApprove": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "UpgradeEnd": {
        "type": "object",
        "required": [
          "span",
          "device",
          "label",
          "from",
          "to"
        ],
        "properties": {
          "span": {
            "$ref": "#/components/schemas/Ref"
          },
          "device": {
            "$ref": "#/components/schemas/Ref"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": [
              "integer",
              "null"
            ]
          },
          "to": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "Upgrade": {
        "type": "object",
        "required": [
          "structure",
          "capturedAt",
          "closures",
          "ties",
          "items"
        ],
        "properties": {
          "structure": {
            "$ref": "#/components/schemas/Ref"
          },
          "capturedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "closures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          },
          "ties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "status",
                "a",
                "b",
                "routes",
                "closure",
                "splice",
                "reason"
              ],
              "properties": {
                "status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "connected",
                    "splice",
                    "release",
                    "blocked",
                    "splitter",
                    null
                  ]
                },
                "a": {
                  "$ref": "#/components/schemas/UpgradeEnd"
                },
                "b": {
                  "$ref": "#/components/schemas/UpgradeEnd"
                },
                "routes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Ref"
                  }
                },
                "closure": {
                  "$ref": "#/components/schemas/Ref"
                },
                "splice": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "UpgradeApplied": {
        "type": "object",
        "required": [
          "removed",
          "saved",
          "failed",
          "routesUpdated",
          "routesFailed",
          "upgrade"
        ],
        "properties": {
          "removed": {
            "type": "integer"
          },
          "saved": {
            "type": "integer"
          },
          "failed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "routesUpdated": {
            "type": "integer"
          },
          "routesFailed": {
            "type": "integer"
          },
          "upgrade": {
            "$ref": "#/components/schemas/Upgrade"
          }
        },
        "additionalProperties": false
      },
      "AlarmServices": {
        "type": "object",
        "required": [
          "alarm",
          "route",
          "customers"
        ],
        "properties": {
          "alarm": {
            "$ref": "#/components/schemas/Ref"
          },
          "route": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RouteService"
              },
              {
                "type": "null"
              }
            ]
          },
          "customers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ref"
            }
          }
        },
        "additionalProperties": false
      }
    }
  }
}
