Incident Delay Attribution Experience API icon

Incident Delay Attribution Experience API

(0 reviews)
This API provides a web socket based streaming interface for incident and delay attribution data.

home

Overview

This API implements a message streaming interface to provide access to Network Rail’s Incident and Delay Attribution data feed over a Web Socket connection to third parties. As of now it streams following three type of messages:

  1. Incident Messages
  2. Alert Messages
  3. Attribution Messages

The service provides two endpoints; one for a primary feed and another for a secondary feed to be used only if the primary feed is unavailable or non-responsive. It is the API consumers responsibility to switch between primary and secondary feeds.

High Level Diagram

resources/image-0ad4e529-9a1e-4f8c-a263-1c653a328900.png

Steps to Receive Incident & Delay Attribution Messages

Follow below listed steps to open Web Socket and start receiving messages.

1. Request access to Incident Delay Attribution Experience API by contacting us at API Integration Services.
2. Request an access token over HTTP by using the Client ID and Secret provided by Network Rail. Refer to the Environment page to find the Access Token endpoints for the primary and secondary instances of this API.

resources/image-be8fa19e-ab36-4293-a099-521d57d4d7f8.png

3. Open the web socket connection by passing the access token received in above step as a bearer token in an 'Authorization' Web Socket header. Refer to the Environment page to find the Web Socket endpoints for the primary and secondary instances of this API.

resources/image-b7bc4a76-8cf4-4718-8712-d285812fa881.png

resources/Publish-93953902-2a70-4200-ba17-25f8042241dc.jpg

4. Once the Web Socket connection is established messages should start to appear immediately.

Note - Refer Usage page for the points to be taken into account while implementing socket connection.

Sample Messages

Incident Message

{
"sequenceId": 55555,
"IncidentMsg": {
    "IncidentNumber": "67608720230721",
        "Type": "A",
        "Status": "O",
        "Location": "07101",
        "EndLocation": "08105",
        "StartDateTime": "20230721123200",
        "EndDateTime": "20230721210600",
        "CloseDateTime": "99999999999999",
        "ReasonCode": "TO",
        "TrainNumber": "1K25",
        "TrainID": "1K25      ",
        "ResponsibleMgr": "THA1",
        "EquipmentFaultNo": "        ",
        "DescriptionShort": "1K25 2 LOST LHW KWN",
        "LocationShort": "LHW KWN",
        "AttributionStatus": "WAITING ",
        "MergedIncident": "              ",
        "Desc": "*** 21/07/23 13:07 #QLP0070 *** CREATED \n1K25 2 LOST LHW KWN \nSUMMARY: 1K25 2 LOST LHW KWN \nCCF / TSID CHECKED (SIGNALS / INTERACTIONS):Y NO CONFLICTS/R\nESTRICTIONS \nSIGNALLER ASKED / REPORTS (All controlling boxes as below):Y\n CLEAR SIGNALS NOTHING REPORTED \nBOX: WSSC TIME: 1303 \nINVESTIGATION MADE INTO ISSUE POTENTIALLY AFFECTING SERVICE \n(e.g. Reference to CCIL/FMS ) Y -NOTHING LOGGED     \nESR/TSR CHECKED FOR SECTION / ADJOINING SECTIONS: Y NO ISSUE\nS - ALL APPLICABLE RESTRICTIONS ACCOUNTED FOR \nKNOWN SRT ISSUE / OPERATING RESTRICTIONS CHECKED:Y NO OUTSTA\nNDING ISSUES \nRUNNING BOOKED LINE: Y \nUNIT CLASS / LENGTH: 380110 380017 \nADDITIONAL OBSERVATIONS: \n"
    }

}

Alert Message

{
    "sequenceId": 55558,
    "AlertMsg": {
        "AlertNumber": "00284091",
        "Type": "A",
        "MsgType": "1",
        "DateTime": "2307211307",
        "Location": "65630",
        "EndLocation": "66502",
        "TrainNumber": "1V08",
        "TrainID": "551V08MI21",
        "OrigTrainID": "551V08MI21",
        "Delay": "002",
        "UnexplainedDelay": "002",
        "UnattributedDelay": "002",
        "ReasonCode": "",
        "Equipment": "",
        "LocationShort": "",
        "RespTrainNumber": "",
        "RespTrainID": "",
        "ReasonText": "",
        "DelayText": ""
    }
}

Attribution Message

{
    "sequenceId": 55556,
    "AttributionMsg": {
        "AlertNumber": "00255705",
        "Type": "A",
        "MsgType": "2",
        "TrainNumber": "2O96",
        "TrainID": "362O96MK21",
        "IncidentNumber": "675570230721",
        "AttributedDelay": "005",
        "ReasonCode": "YB",
        "RespTrainNumber": "1F52",
        "RespTrainID": "651F52MH21",
        "OrigTrainID": "362O96MK21",
        "LocationShort": "",
        "DelayText": ""
    }
}

Reviews