6 Connectivity
Marek Isalski edited this page 1 year ago

Headers

X-Api-Key: d588a0d0-ed0a-4d2d-b6d8-c3bf6fbe7f20
Accept: application/json

Availability Check

GET https://api.faelix.net/connectivity/xdsl/address/search/?postcode=M219WR

{
  "addresses": [
    {
      "address": "13, Peveril Crescent",
      "district": "MR",
      "easting": "381233",
      "gold": true,
      "northing": "394561",
      "parent_uprn": null,
      "reference": "A00011178054",
      "uprn": "77079066"
    },
    {
      /* and more of the same */
    }
  ],
  "query": {
    "postcode": "M21 9WR"
  }
}

GET https://api.faelix.net/connectivity/xdsl/address/service/availability/?reference=A00034156395&district=MR

```json
{
  "address": {
    "district": "MR",
    "gold": true,
    "parent_uprn": null,
    "reference": "A00034156395",
    "uprn": null
  },
  "line": {                                             /* and then similar to below */
     /* ... */
  }
}

GET https://api.faelix.net/connectivity/xdsl/line/service/availability/?cli=01618629595

{
  "address": null,
  "line": {                                             /* information about line(s) available */
    "ADSL2+": {
      "exchangeStatusDescription": "Live",
      "mdfSiteId": "MRCHO",
      "mdfSiteName": "CHORLTON",
      "rag": "Green",
      "ragDescription": "Green; very likely service can be provided with an anticipated speed of 17Mbit/s",
      "reasonCodeDescription": "BT Wholesale copper broadband is already enabled on this line",
      "speed": "17Mbit/s",
      "speedMinThreshold": "7Mbit/s",
      "speedMinThresholdValue": 7000.0,
      "speedRangeMax": "19.5Mbit/s",
      "speedRangeMaxValue": 19500.0,
      "speedRangeMin": "10Mbit/s",
      "speedRangeMinValue": 10000.0,
      "speedValue": 17000.0
    },
    "AnnexM": {
      "downloadSpeed": "17Mbit/s",
      "downloadSpeedValue": 17000.0,
      "maxSpeed": "19.5Mbit/s",
      "maxSpeedValue": 19500.0,
      "mdfSiteId": "MRCHO",
      "mdfSiteName": "CHORLTON",
      "minSpeed": "10Mbit/s",
      "minSpeedValue": 10000.0,
      "rag": "Green",
      "ragDescription": "Green; very likely service can be provided with an anticipated speed of 17Mbit/s",
      "uploadSpeed": "1.5Mbit/s",
      "uploadSpeedValue": 1500.0
    },
    "Copper": {
      "btOpenreachPostCode": "M21 9WR",
      "btWholesalePostCode": "M21 9WR",
      "cpName": "BT WHOLESALE",
      "lineLength": "770 (Calculated Length)",
      "pcpId": "42",
      "spName": "WBMC ICUK COMPUTING SERVICES LIMITED WBC"
    },
    "FTTC": {
      "availabilityDescription": null,
      "bandwidthMeasure": null,
      "fttcExchangeCode": null,
      "fttcExchangeName": null,
      "fttcUnAvailableMessage": "FTTC unavailable",
      "mdfSiteId": null,
      "mdfSiteName": null,
      "provisioningType": "Unknown",
      "rag": "Unknown",
      "ragDescription": null,
      "rangeADownstreamBottomSpeed": null,
      "rangeADownstreamBottomSpeedValue": null,
      "rangeADownstreamTopSpeed": null,
      "rangeADownstreamTopSpeedValue": null,
      "rangeAUpstreamBottomSpeed": null,
      "rangeAUpstreamBottomSpeedValue": null,
      "rangeAUpstreamTopSpeed": null,
      "rangeAUpstreamTopSpeedValue": null,
      "rangeBDownstreamBottomSpeed": null,
      "rangeBDownstreamBottomSpeedValue": null,
      "rangeBDownstreamTopSpeed": null,
      "rangeBDownstreamTopSpeedValue": null,
      "rangeBUpstreamBottomSpeed": null,
      "rangeBUpstreamBottomSpeedValue": null,
      "rangeBUpstreamTopSpeed": null,
      "rangeBUpstreamTopSpeedValue": null,
      "readyDate": null
    },
    "FTTP": {
      "exchangeStatusDescription": null,
      "fttpExchangeCode": null,
      "fttpExchangeName": null,
      "fttpUnAvailableMessage": "FTTP unavailable",
      "maxDownstreamSpeed": null,
      "maxDownstreamSpeedValue": null,
      "maxUpstreamSpeed": null,
      "maxUpstreamSpeedValue": null,
      "ontInstallLeadTime": null,
      "premiseType": 0,
      "rag": "Unknown",
      "ragDescription": null,
      "readyDate": null,
      "reasonCodeDescription": null
    },
    "Gfast": {
      "availabilityDescription": null,
      "bandwidthMeasure": null,
      "gFastUnAvailableMessage": "GFast unavailable",
      "gfastExchangeCode": null,
      "gfastExchangeName": null,
      "mdfSiteId": null,
      "mdfSiteName": null,
      "provisioningType": "Unknown",
      "rag": "Unknown",
      "ragDescription": null,
      "rangeADownstreamBottomSpeed": null,
      "rangeADownstreamBottomSpeedValue": null,
      "rangeADownstreamTopSpeed": null,
      "rangeADownstreamTopSpeedValue": null,
      "rangeAUpstreamBottomSpeed": null,
      "rangeAUpstreamBottomSpeedValue": null,
      "rangeAUpstreamTopSpeed": null,
      "rangeAUpstreamTopSpeedValue": null,
      "rangeBDownstreamBottomSpeed": null,
      "rangeBDownstreamBottomSpeedValue": null,
      "rangeBDownstreamTopSpeed": null,
      "rangeBDownstreamTopSpeedValue": null,
      "rangeBUpstreamBottomSpeed": null,
      "rangeBUpstreamBottomSpeedValue": null,
      "rangeBUpstreamTopSpeed": null,
      "rangeBUpstreamTopSpeedValue": null,
      "readyDate": null,
      "reasonCodeDescription": null
    },
    "SOGEA": {
      "availabilityDescription": null,
      "bandwidthMeasure": null,
      "exchangeCode": null,
      "exchangeName": null,
      "mdfSiteId": null,
      "mdfSiteName": null,
      "provisioningType": "Unknown",
      "rag": "Unknown",
      "ragDescription": null,
      "rangeADownstreamBottomSpeed": null,
      "rangeADownstreamBottomSpeedValue": null,
      "rangeADownstreamTopSpeed": null,
      "rangeADownstreamTopSpeedValue": null,
      "rangeAUpstreamBottomSpeed": null,
      "rangeAUpstreamBottomSpeedValue": null,
      "rangeAUpstreamTopSpeed": null,
      "rangeAUpstreamTopSpeedValue": null,
      "rangeBDownstreamBottomSpeed": null,
      "rangeBDownstreamBottomSpeedValue": null,
      "rangeBDownstreamTopSpeed": null,
      "rangeBDownstreamTopSpeedValue": null,
      "rangeBUpstreamBottomSpeed": null,
      "rangeBUpstreamBottomSpeedValue": null,
      "rangeBUpstreamTopSpeed": null,
      "rangeBUpstreamTopSpeedValue": null,
      "readyDate": null,
      "unAvailableMessage": "SOGEA Unavailable"
    }
  },
  "lines": {
    "C000003101007": {                                  /* line ID */
      "last2digits": "95",
      "line": "WorkingLine",
      "number": null,                                   /* will probably be null */
      "service": "PSTN Single Line"                     /* standard line */
    },
    "MRAAACQQFJ": {
      "last2digits": null,
      "line": "WorkingLine",
      "number": null,
      "service": "SMPF"                                 /* shared metallic path, e.g. TalkTalk LLU */
    }
  },
  "messages": [                                         /* might have list of strings detailing problems */
  ],
  "onts": {
    "ONT0012345678": {                                  /* ONT reference number */
      "location": {
        "floor": null,
        "position": null,
        "room": null
      },
      "ports": {
        "1": {
          "data": true,
          "status": "Spare"
        },
        "2": {
          "data": true,
          "status": "Working"
        },
        "3": {
          "data": true,
          "status": "Working"
        },
        "4": {
          "data": true,
          "status": "Spare"
        }
      },
      "serial": "XXXXXXXXXXXXXXXX"                      /* should appear on the actual ONT */
    }
  },
  "provisioning": "Migration",
  "query": {
    "cli": "01618629595"
  },
  "reference": "bf862de7-1c91-49e8-a619-baf2301dce1a",
  "services": {                                         /* THIS IS WHAT YOU WANT! */
    "ADSL2+": {                                         /* broadband service type */
      "ADSL2PLUS": {                                    /* product code */
        "appointment": "NotRequired",                   /* might also be Optional or Required */
        "care": [                                       /* care level options available */
          "Standard",
          "Enhanced",
          "Critical"
        ],
        "contact": "NotRequired",                       /* might also be Optional or Required */
        "description": null,
        "earliest": "2023-03-21T00:00:00+00:00",
        "install": 40.0,                                /* wholesale cost for new install, excluding VAT (and WLR) */
        "market": "B",
        "migrate": 16.5,                                /* wholesale cost for migration, excluding VAT */
        "monthly": 7.5,                                 /* wholesale monthly charge, excluding VAT */
        "name": "ADSL2+",                               /* customer-facing name of product */
        "network": "Zen",
        "orderable": true,                              /* is this available? */
        "priority": [                                   /* traffic weighting options available */
          "Standard"
        ],
        "provisioning": "Migration",
        "status": null,                                 /* additional information about status of orderability */
        "term": 12                                      /* number of months minimum term */
      },
      "earliest": "2023-03-20T00:00:00+00:00",
      "market": "B",
      "network": "Zen",
      "orderable": true,
      "status": null
    }
  }
}

Testing Lines

GET https://api.faelix.net/connectivity/xdsl/test/zen/ZW01234567XX/available

Returns a dict mapping test types to information about the tests. Will only return tests available for that type of line.

{
  "adsl-xdsl-service-test": { "description": "ADSL Service Test" },
  "adsl-copper-service-test": { "description": "Copper Service Test" },
  "adsl-copper-line-test": { "description": "Copper Line Test" },
  "sogea-service-test": { "description": "SOGEA Service Test" },
  "fttc-service-test": { "description": "FTTC Service Test" },
  "gfast-service-test": { "description": "GFast Service Test" },
  "fttp-service-test": { "description": "FTTP Service Test" }
}

POST https://api.faelix.net/connectivity/xdsl/test/zen/ZW01234567XX/test/xxxx-service-test

Starts a test, and returns a redirect (via Location: header) where you can then GET the results.

Location: https://api.faelix.net/connectivity/xdsl/test/zen/ZW01234567XX/test/xxxx-service-test/result/beeb411e-d15b-43db-810c-b850fa123253

{
  "id": "beeb411e-d15b-43db-810c-b850fa123253"
}

GET https://api.faelix.net/connectivity/xdsl/test/zen/ZW01234567XX/test/xxxx-service-test/result/beeb411e-d15b-43db-810c-b850fa123253

Returns a blob of raw JSON test results. Will be different for different test types. Not a valid result (yet) if the dataFrom key has no value associated.

We set two additional keys to make interpreting simpler: failure (true or false) and suspicious (true or false).

{
  "dataFrom": "2023-10-05T22:38:01Z",
  "errorMessage": null,
  "failure": false,
  "suspicious": false,
  "lineHistory": {
    "downstreamRate": {
      "avg": 79.9,
      "max": 79.9,
      "min": 79.9
    },
    "retrains": {
      "avg": 0.0,
      "max": 0.0,
      "min": 0.0
    },
    "upstreamRate": {
      "avg": 20.0,
      "max": 20.0,
      "min": 20.0
    },
    "uptime": {
      "avg": 900.0,
      "max": 900.0,
      "min": 900.0
    }
  },
  "lineTest": {
    "bridgeTap": 0,
    "crossTalk": 0,
    "faceplate": "Not Detected",
    "homeWiringProblem": 2,
    "mainFaultLocation": 1,
    "ntE5c": "Not Detected",
    "ntePowerStatus": 1,
    "radioFrequencyIngress": 0,
    "repetitiveElectricalImpulseNoise": 0,
    "testOutcome": 1,
    "testOutcomeDescription": "GEA service test completed and no fault found .",
    "voiceReinjection": "Not Detected"
  },
  "profileData": {
    "currentPolicy": 3,
    "dateOfLastProfileChange": null,
    "profileDownstream": "0.128M-80M Downstream, Retransmission Low",
    "profileUpstream": "0.128M-20M Upstream, Error Protection Off"
  },
  "state": 20,
  "type": "sogea-service-test",
  "uuid": "beeb411e-d15b-43db-810c-b850fa123253",
  "xDslStatusCheck": {
    "currentSyncTime": null,
    "estimatedSpeedAtProvisioningDownstream": null,
    "estimatedSpeedAtProvisioningUpstream": null,
    "orderedProductDownstream": 80.0,
    "orderedProductUpstream": 20.0,
    "retrainsDetected": 2,
    "syncSpeedDownstream": 79.9,
    "syncSpeedUpstream": 20.0,
    "syncStatus": 1,
    "unavailableSecondsLast15Minutes": 0.0,
    "unavailableSecondsLast15MinutesStartDate": "2023-10-05T21:15:45"
  }
}