GET actrealtime/detour?rt={rt}&rtdir={rtdir}&callback={callback}
Use the getdetours request to retrieve a list of active detours in the system. Detours are considered “active” if they are currently affecting the current service day, even if the start time has not yet been reached or the end time has already passed. If a detour is canceled or expired, it will still appear in this result.This is to handle cases where a vehicle is still running a canceled or expired detour and the developer wishes to alert users that the detour is technically still in effect. If the client application is to support detours, it is recommended that detours are requested frequently in case a new version is added or a detour is canceled.If a current detour or new version is added(or removed), the client should consider requesting new stop and pattern data for the given route/direction combination in case data has been changed by the detour.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
rt |
route designator(optional),Alphanumeric Alphanumeric designator of the route (ex. “20” or “X20”) for which a list of detours is to be returned |
string |
None. |
rtdir |
route direction (optional), Direction of travel of the route specified in the rt parameter. The rt parameter is required when using the rtdir parameter. This needs to match the direction id seen in the getdirections call. |
string |
None. |
callback | string |
None. |
Body Parameters
None.
Response Information
Resource Description
A well-formed XML or JSON document will be returned as a response
RequestResponseOfDetourRequestResponseName | Description | Type | Additional information |
---|---|---|---|
bustime-response | DetourRequestResponse |
None. |
Response Formats
application/json, text/json
{ "bustime-response": { "dtrs": [ { "id": "sample string 1", "ver": "sample string 2", "st": "sample string 3", "desc": "sample string 4", "rtdirs": [ { "rt": "sample string 1", "dir": "sample string 2" }, { "rt": "sample string 1", "dir": "sample string 2" } ], "startdt": "sample string 5", "enddt": "sample string 6" }, { "id": "sample string 1", "ver": "sample string 2", "st": "sample string 3", "desc": "sample string 4", "rtdirs": [ { "rt": "sample string 1", "dir": "sample string 2" }, { "rt": "sample string 1", "dir": "sample string 2" } ], "startdt": "sample string 5", "enddt": "sample string 6" } ], "error": [ {}, {} ] } }
text/html
{"bustime-response":{"dtrs":[{"id":"sample string 1","ver":"sample string 2","st":"sample string 3","desc":"sample string 4","rtdirs":[{"rt":"sample string 1","dir":"sample string 2"},{"rt":"sample string 1","dir":"sample string 2"}],"startdt":"sample string 5","enddt":"sample string 6"},{"id":"sample string 1","ver":"sample string 2","st":"sample string 3","desc":"sample string 4","rtdirs":[{"rt":"sample string 1","dir":"sample string 2"},{"rt":"sample string 1","dir":"sample string 2"}],"startdt":"sample string 5","enddt":"sample string 6"}],"error":[{},{}]}}
application/xml, text/xml
<RequestResponseOfDetourRequestResponseV_SDPij9I xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ACTransit.Transit.Domain.Models"> <Response> <Error xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:anyType /> <d3p1:anyType /> </Error> <Detours> <DetourRequestResponse.Detour> <Desc>sample string 4</Desc> <Enddt>sample string 6</Enddt> <Id>sample string 1</Id> <RtDirs> <DetourRequestResponse.Detour.RtDir> <Dir>sample string 2</Dir> <Rt>sample string 1</Rt> </DetourRequestResponse.Detour.RtDir> <DetourRequestResponse.Detour.RtDir> <Dir>sample string 2</Dir> <Rt>sample string 1</Rt> </DetourRequestResponse.Detour.RtDir> </RtDirs> <St>sample string 3</St> <Startdt>sample string 5</Startdt> <Ver>sample string 2</Ver> </DetourRequestResponse.Detour> <DetourRequestResponse.Detour> <Desc>sample string 4</Desc> <Enddt>sample string 6</Enddt> <Id>sample string 1</Id> <RtDirs> <DetourRequestResponse.Detour.RtDir> <Dir>sample string 2</Dir> <Rt>sample string 1</Rt> </DetourRequestResponse.Detour.RtDir> <DetourRequestResponse.Detour.RtDir> <Dir>sample string 2</Dir> <Rt>sample string 1</Rt> </DetourRequestResponse.Detour.RtDir> </RtDirs> <St>sample string 3</St> <Startdt>sample string 5</Startdt> <Ver>sample string 2</Ver> </DetourRequestResponse.Detour> </Detours> </Response> </RequestResponseOfDetourRequestResponseV_SDPij9I>