Open API Data Catalogue

Transcription

Open API Data CatalogueVersion date:2018-07-11Information & Information TechnologyOpen API Data Catalogue1 Page

Open API Data CatalogueVersion date:2018-07-11Table of Contents1 Introduction . 6-71.1 Open API Data Catalogue Overview . 61.2 The Key Elements . 6-72 Data Catalogue .8-912.1 Common Data Elements . 8-92.2 Stop Service . 9-222.2.1 StopNextService . 10-132.2.2 StopDetails . 13-162.2.2.1 StopDetails - Facility. 16-172.2.2.2 StopDetails - Parking . 17-182.2.2.3 StopDetails - Place . 18-192.2.2.4 StopDetails - Stops . 192.2.3 StopDestinations . 19-202.2.3.1 StopDestinations - Line . 202.2.4 StopAll . 20-222.3 ServiceUpdate . 22-432.3.1 ServiceAlertAll . 22-242.3.1.1 ServiceAlertAll - Line . 24-252.3.1.2 ServiceAlertAll - Stops . 252.3.1.3 ServiceAlertAll - Trips . 25-262.3.2 InformationAlertAll . 26-272.3.2.1 InformationAlertAll - Line . 27-282.3.2.2 InformationAlertAll - Stops . 282.3.2.3 InformationAlertAll - Trips . 282.3.3 MarketingAlertAll . 29-302 Page

Open API Data CatalogueVersion date:2018-07-112.3.3.1 MarketingAlertAll - Line . 302.3.3.2 MarketingAlertAll - Stops. 312.3.3.3 MarketingAlertAll - Trip . 312.3.4 UnionDepartureAll . 31-332.3.4.1 UnionDepartureAll - Stops . 332.3.5 ServiceGuarantee. 33-342.3.6 ExceptionTrain . 34-352.3.6.1 ExceptionTrain - Stops . 35-372.3.7 ExceptionBus . 37-382.3.7.1 ExceptionBus - Stops . 38-402.3.8 ExceptionAll . 40-412.3.8.1 ExceptionAll - Stops . 41-432.4 ServiceatGlance . 43-492.4.1 ServiceatGlance – BusAll (Trips) . 43-462.4.2 ServiceatGlance – TrainAll (Trips) . 46-492.5 Schedule . 49-742.5.1 ScheduleJourney . 502.5.1.1 ScheduleJourney - Journey . 50-512.5.1.2 ScheduleJourney - Services . 51-532.5.1.3 ScheduleJourney - Trips . 532.5.1.4 ScheduleJourney - Stops . 53-552.5.1.5 ScheduleJourney - Transfers . 55-562.5.1.6 ScheduleJourney - TransferLinks . 56-572.5.2 ScehduleJourneyToStopCode . 572.5.2.1 ScehduleJourneyToStopCode (SchJourneys) . 57-582.5.2.2 ScehduleJourneyToStopCode (Services). 58-602.5.2.3 ScehduleJourneyToStopCode (Trips) . 603 Page

Open API Data CatalogueVersion date:2018-07-112.5.2.4 ScehduleJourneyToStopCode (Stops) . 61-622.5.2.5 ScehduleJourneyToStopCode (Transfers) . 62-632.5.2.6 ScehduleJourneyToStopCode (TransferLinks) . 63-642.5.3 ScheduleLine . 64-662.5.3.2 ScheduleLine - Trip . 652.5.2.2 ScheduleLine - Stops . 65-662.5.4 ScheduleLineAll . 66-672.5.4.1 ScheduleLine - Variant . 67-682.5.5 ScheduleLineStop . 68-692.5.5.1 ScheduleLineStop - Stop . 69-702.5.6 ScheduleTrip . 70-722.5.6.1 ScheduleTrip – Stops . 722.5.6.2 ScheduleTrip – ArrivalTime . 72-732.5.6.3 ScheduleTrip – DepartureTime . 73-742.5.6.4 ScheduleTrip- Track . 742.6 FaresService . 74-762.6.1 FaresCategory . 74-752.6.1.1 FareCategory -Ticket . 752.6.1.2 FareCategory -Fare . 75-762.7 GTFS Feeds . 76-912.7.1 The Header . 77-782.7.2 GTFS Entity . 78-792.7.3 GTFS VehiclePosition. 79-802.7.3.1 GTFS Vehicle - Trip . 80-812.7.3.2 GTFS Vehicle - Vehicle. 81-822.7.3.3 GTFS Vehicle - Position . 82-832.7.4 GTFS TripUpdate . 834 Page

Open API Data CatalogueVersion date:2018-07-112.7.4.1 GTFS TripUpdate - Trip . 83-842.7.4.2 GTFS TripUpdate - Vehicle . 84-852.7.4.3 GTFS TripUpdate – Stop Time Update . 85-862.7.4.3.1 GTFS TripUpdate – Stop Time Update (Departure) . 86-872.7.5 GTFS Alerts . 87-882.7.5.1 GTFS Alerts - Entity . 87-882.7.5.2 GTFS Alerts - ActivePeriod . 88-892.7.5.3 GTFS Alerts - InformedEntity . 89-902.7.5.4 GTFS Alerts – Url/Translation. 902.7.5.5 GTFS Alerts – HeaderText/Translation. 90-912.7.5.6 GTFS Alerts – DescriptionText/Translation . 915 Page

Open API Data CatalogueVersion date:2018-07-111 Introduction1.1 Open API Data Catalogue OverviewThis document provides a central descriptions of business data such as a standards definition ofdata elements, their meanings and allowable values for the Open API attributes. The contentsare divided into the following topics, and access key will be required and this will determinewhich topic is accessible. Stop ServiceServiceataGlanceServiceUpdateScheduleFares ServiceGTFS Feeds (VehiclePosition, TripUpdate and Service Alerts)1.2 The Key ElementsThis document provides information about each attribute, which can also referred to as fields.An attribute is a place in the database that holds information.Below are the most common elements included in this document:#Element NameDescription1Attribute NameThis indicate a unique identifier of an attribute2DescriptionThis gives a short description of an attribute3Data TypeThis defines what type of data is allowed or the storageformat that can contain a specific type or range of values foran attribute4Required Field?This indicates whether information is mandatory in anattribute, or is optional6 Page

Open API Data CatalogueVersion date:2018-07-115Maximum LengthThis specifies the maximum length (in characracter) of a textarea for an attribute6NotesAdditional information about an attribute7 Page

Version date:2018-07-11Open API Data Catalogue2 Data Catalogue2.1 Common Data ElementsDescriptionThis section identify and define a set of common data elements that are generalizable acrossthe Open API service calls. This is a standard information that is returned by each service call,and its necessary to ensure that data are defined in the same way, use the same standards, anduse the same terminology. Each service call returns a set of common data elements in theMetadata structure illustrated below.AttributeNameDescriptionData TypeMaximumLengthRequired Field?(Mandatory /Optional)This indicatethe date andtime theinformationwas returned.datetimeErrorCodeThis is anidentifier forthe errormessage.varchar10MandatoryThe error codesare described inthe tablebelow.Error MessageThis indicatethe text of theerror message.varchar50MandatoryThe errormessages aredescribed in thetable belowTimeStampMandatoryNotesFor example:YYYY-MM-DDhh:mm:ss8 Page

Open API Data CatalogueVersion date:2018-07-11The table below gives information about error codes and error messages.CodeMessageDescription200OKNo error204No ContentNo data was found.400Bad requestThe server cannot process the request due to a malformed clientrequest.401UnauthorizedKey was missing or incorrect.403ForbiddenKey does not have access to the topic.404Not foundThe URI is invalid or the resource does not exist.410GoneThe API version no longer exists. Use the current version.429Too ManyRequestsThe request cannot be served because key's use limit has beenreached500Internal ServerErrorThere is an issue. Please post on the developers forums so theissue can be resolved.503ServiceUnavailableOpen data servers are down or overloaded with requests. Tryagain later.504Gateway timeoutA server did not respond. Try again later.2.2 Stop ServiceDescriptionStops are locations where we have scheduled service and this return predictions for all lines fora set stop. This contains the following functions:9 Page

Open API Data Catalogue Version nationStopAll2.2.1 StopNextServiceDescriptionNext Service is the lines (rail lines and bus routes) that feed the stop. This service givepredictions for all lines that feed a certain bus or train stopParameter List: StopCode – the stop for which the line predictions are requiredReturns Value: Bus or train lines / routes that feed the given stopAttribute (Mandatory /Optional)NotesStopCodeAssigned uniquecode identifying thestationvarchar10MandatoryFor example:00129LineCodeA two charactercorridor code (rail)or two digit routenumber (bus) forthe linevarchar10MandatoryFor example:21LineNameThe name of the linefor the rail corridoror bus route.varchar100OptionalExample:“Milton TrainBus Service”10 P a g e

Open API Data CatalogueServiceTypeA code indicating ifit is a train or buschar1Version date:2018-07-11MandatoryPossible value:T trainB busDirectionCodeThe line code for thetrain line or busroute.varchar10MandatoryDirectionNameThe Direction codeand the finaldestination station.varchar100OptionalTripOrderThe sequential orderof the Trip.intTripNumberUnique alphanumeric trip codewhich links trip to ascheduleVarcharUpdateTimeThe lastmodification to thedate and timestampfor a trip.datetimeWhen it is abus routevariance it isthe Line Codeappended witha letter; e.g.21NExample:21N – MiltonGOOptional50Example: dThh:mm:ss.nnn2018-06-2810:06:36StatusA code to describethe delay status ofvarchar10OptionalS – StoppedM – Moving11 P a g e

Open API Data CatalogueVersion date:2018-07-11the Trip:LatitudeLongitudeScheduled DepartureTimeThe vehicle's currentlatitude coordinate;with the Longitude,this gives thevehicle's locationnumericThe vehicle's currentlongitudecoordinate; with theLatitude, this givesthe vehicle'slocationnumericRecorded scheduleddate and time ofdeparture.datetimeOptionalFor example:43.5692670OptionalFor example:-79.6688830OptionalDisplay 00)ComputedDepartureTimeDepartureStatusThe last computeddeparture date andtime considering anydelays.datetimeA code to describethe delay status ofthe stop’s departurecharOptionalDisplay 00)1OptionalPossible Valuesand meanings:E – Estimated12 P a g e

Version date:2018-07-11Open API Data Cataloguetime:C – CancelledA – ActualScheduledPlatformThe scheduledplatform for a train.varchar5OptionalFor UnionStation it is aplatform, vs. atrack for Linestations.ActualPlatformThe actual platformfor a train.varchar5OptionalIt is onlypopulatedwhen theArrivalStatus,orDepartureStatus, indicatesthat it is actual(A).2.2.2 StopDetailsDescriptionThe stop details service displays information regarding location details, its facilities and parkinglots for a given stop code.Parameter List: StopCode – the stop requiring the details of a locationReturns Value: The location, its facilities and parking lots for a given stop code.Attribute (Mandatory/ Optional)Notes13 P a g e

Version date:2018-07-11Open API Data CatalogueZoneCodeThe fare zone rStreet number ofthe stationMain intersectionaddress close tothe stationvarchar10Optionalvarchar255OptionalCity the station islocatedName of thestreet the stationis locatedA unique codeidentifying theStationThe name of thestationFrenchtranslation of thename of thestationThis to indicate ifit is a bus station(true) or not(false)This to indicate ifit is a trainstation (true) ornot (false)This indicate thefacilitycorrespond tothe geographiccoordinatelongitude and inconjuction withthe eadowval StopNameStopNameFrIsBusIsTrainLongitudeExample: farezone forMeadowvaleGO station is:22Example: 6845Example:Millcreek Driveand k DrivebitMandatoryExample: truefor bus stationbitMandatoryExample: truefor train stationvarchar50OptionalExample:-79.75451714 P a g e

Version date:2018-07-11Open API Data CatalogueLatitudeDrivingDirectionsDriving icketSalesFrwhich representthe location ofthe facilityThis indicate thefacilitycorrespond tothe geographiccoordinatelatitude and inconjuction withthe longitudewhich representthe location ofthe facilityThis is adescription ofthe drivingdirections to thelocationThis gives theFrenchtranslation of thedriving directionsto the locationThis is adescription ofthe boardinginformation atthe locationFrenchtranslation of thedescription ofthe boardinginformation atthe locationA description ofticket sales at thelocationFrenchtranslation of theticket sales at r255Optionalnvarchar255OptionalExample:43.59749915 P a g e

Open API Data CatalogueVersion date:2018-07-11location.2.2.2.1 StopDetails – FacilityDescriptionThis is a collection of facilities associated with the locationAttributeNameCodeDescriptionThis is a codethat describe atype of facilityavailable at alocation.Data TypeMaximumLengthRequiredField?(Mandatory /Optional)Notesvarchar10MandatoryFacility codesand meanings:1. ABM –Automatic bankteller machine2. BR - Bicyclerack3. DCA – Debitcards accepted4. EV – Elevators5. NEWS –Newspaper box6. PP – Payphones7. PW – Publicwashroom8. SB – Stationbuilding9. TAXI – Taxistand10. TVM – Ticketvending machine11. RK –Refreshmentkiosk12. WR – Waitingroom13. WAT –16 P a g e

Version date:2018-07-11Open API Data CatalogueWheelchairaccessible trainserviceDescriptionDescriptionFrThis gives thedescription of thefacility asidentified by itscodeFrenchtranslation of thefacility asidentified by :Code - DCADescription:Debit cardsaccepted2.2.2.2 StopDetails – ParkingDescriptionThis is the parking lot at a ptionData TypeMaximumLengthRequired Field?(Mandatory /Optional)This is the name ofthe parking lotassociated with thestationFrench translation ofthe name of theparking lotassociated with thestationThis give thenumber (#) ofparking spots in theparking lotsThis is gives adescription of arNotesOptional100OptionalThe descriptionof the parking lot17 P a g e

Version date:2018-07-11Open API Data Catalogueparking lot.can either be oneof the followingor both: Regular Structure2.2.2.3 StopDetails – PlaceDescriptionThis is a geographical area that include additional stops for the riptionData TypeMaximumLengthRequired Field?(Mandatory /OptionalNotesThis is a uniquealphanumeric codeidentifying theplaceThis is the name ofthe placevarchar50MandatoryFor example:medvisvarchar255OptionalThis indicate theplace correspondto the geographiccoordinatelongitude and inconjuction with thelatitude whichrepresent thelocation of theplaceThis indicate theplace correspondto the geographiccoordinate latiudeand in conjuctionwith the longitudedecimalOptionalThe name of theplace will bebased on GTFSvalues. Forexample:Meadowvale GOExample: 79.7628632decimalOptionalExample:-43.686908718 P a g e

Version date:2018-07-11Open API Data CatalogueRadiuswhich representthe location of theplaceThis Specifies aradius in metersthat whencombined with acenterpoint definesthe area of thesearch ( coverageinformation isprovided)IntOptionalThe minimumvalue is 0, thedefault valueand maximumare not limited.2.2.2.4 StopDetails – StopDescriptionThis is the additional stops that are part of the placeAttributeNameCodeNameDescriptionData TypeMaximumLengthRequired Field?(Mandatory /OptionalNotesThis is a uniquealphanumeric codeidentifying thestationThis is the name ofthe stationvarchar50MandatoryFor example: MEvarchar255OptionalExample:Meadowvale GO2.2.3 StopDestinationsDescriptionThis gives information of all destinations from the origin stop at a specified time to the finaldestination stop.Parameter List: StopCode - the stop requiring the details of a location FromTime - time of the day (e.g 0800 means 8.00 am)ToTime – time of the day (e.g 1300 means 1 :00 pm)Returns Value: Returns information for the requested stop destinations.19 P a g e

Version date:2018-07-11Open API Data CatalogueAttributeNameCodeNameDescriptionData TypeMaximumLengthA unique codeidentifying the StationThis is a name of thestationvarchar50Required alNotesFor example:00129Meadowvale GO2.2.3.1 StopDestinations – LineDescriptionThis provide information about the line and the final destination of the tripDescriptionData TypeMaximumLengthAssigned uniqueline code for rail ortwo digits busroute number forthe lineThis is the line orroute number andfinal destinationnameThis indicatesdirection of travelfor the tripThis is the name ofthe finaldestination.varchar10Required nalchar1Mandatory255OptionalAttribute sFor example:21For example : EFor example:USBT2.2.4 StopAllDescriptionStop All allows user to retrieve information regarding stop locations and the description ofthese stops.20 P a g e

Open API Data CatalogueVersion date:2018-07-11Parameter List: N/AReturns Value: Station codes, associated names and stops types. It excludes the following: BW: Bus Way Point.GR: Bus Garage.WP: Way Point (Evaluation point in between stops to determine schedule performance).YD: Train YardData TypeMaximumLengthCode used toidentify a stationStation namevarchar50Required toryLocationTypeDescription of theStop Typevarchar255MandatoryPublicStopID6 digits uniqueidentification50Mandatory forBusAttribute NameLocation CodeLocationNameDescriptionvarcharNotesFor example:00001For example:Newmarket GOBus TerminalPossible values:BS: Bus StopBT: Bus TerminalCL: Carpool LotGT: GO TerminalPK: Park & RidePR: GO Park &RideST: Train StationTA: Ticket AgencyTB: Train & BusStationTS: Ticket Agency& StopTT: Ticket Agency& TerminalOnly thedescriptive nameof the Stop Typewill be returnedand not theinternal code.Every GO busstop has a unique21 P a g e

Open API Data Cataloguenumber used toidentify GO busstop. This is also tohelp set bus stopdeparture time.Version date:2018-07-11numberidentification.This gives theability to specifythe bus stopnumber in orderto get next busarrival time forthe requestedbus stop. Railstations areexcluded.2.3 Service UpdateDescriptionService Update returns all messages for the specified message class by data. This includes thefollowing functions: ServiceAlertAll InformationAlertAll MarketingAlertAll UnionDeparturesAll ServiceGuarantee ExceptionTrain ExceptionBus ExceptionAllService Alerts, Information Alert and Maeketing Alert these are sourced from CustomerCommunication Management System (CCMS) for the web channel and returns the same datastructure for the Message Class and this only describe once.2.3.1 ServiceAlertAllDescriptionServiceAlertAll displays service alert by date.22 P a g e

Open API Data CatalogueVersion date:2018-07-11Parameter List: N/AReturns Value: A collection of current Service Alert Messages from the branch and theirassociated entities where the Message.messageClass “SRVALERT”Attribute ateTimeDescriptionThis is a uniquealphanumericstringidentifier for amessageThis indicatethe servicecategoryassociated withthe messageThis indicatesthesubcategory ofthe servicecategoryassociated withthe messageThis is a coderelated to anyperviousmessage – ifanyThis indicatesthe status ofthe messageThis indicatesthe date andtime when themessage wasinitially postedData TypeMaximunLengthvarchar50Required Field?(Mandatory /Optional)MandatoryNotesvarchar100OptionalFor example:Service Disruptionvarchar100OptionalFor example:Train lvarchar50OptionalFor example:M0000163040Possibel values:INIT – InitialCORR – CorrectedFINAL – FinalUPD - UpdatedDisplay format: yyyymmddThh:mm:ss.nnnexample:2018-06-02 09:03:4523 P a g e

Open API Data CatalogueSubjectEnglishSubjectFrenchThis is Englishsubject textdisplayThis is Frenchsubject textdisplayVersion date:2018-07-11varchar255OptionalFor example:Georgetown FarmersMarketvarchar255OptionalFor example:Marché desagriculteurs deGeorgetownFor example:Effective everySaturday from June2nd to October13th, 2018: Theannual GeorgetownFarmers Marketwill operate from8:00 a.m. to 12:30p.m.For example:MARCHÉ DESAGRICULTEURS DEGEORGETOWN:effectif à partir dusamedi 2 juin etjusqu’au 13octobre 2018: lemarché annuel desagriculteurs deGeorgetown setiendra de 8:00 à12:30BodyEnglishThis is Englishbody textdisplayvarcharMAXOptionalBodyFrenchThis is Frenchbody textdisplayvarcharMAXOptional2.3.1.1 ServiceAlertAll – LineDescriptionThis is collection of the affected lines associated with the messageMaximRequired Field?Notes24 P a g e

Version date:2018-07-11Open API Data CatalogueAttributeNameCodeDescriptionThis indicates theunique identifierfor the lineDataTypevarcharumLength10(Mandatory /Optional)MandatoryFor example:Code DescriptionLWLakeshore WestLELakeshore EastGTKitchenerSTSouffvilleRHRichmond HillBIBarrieMIMilton2.3.1.2 ServiceAlertAll – StopsDescriptionThis is the affected stops associated with the messageAttribute NameNameCodeDescriptionDataTypevarcharThis is assignedstop / stationnameThis indicatesvarcharunique identifierfor the stopswhere amessage isdispalyedMaximumLength255Required Field?(Mandatory /Optional)Mandatory50MandatoryNotesFor example: MR2.3.1.3 ServiceAlertAll –TripsDescriptionThis is the affected trips associated with the messageAttribute NameDescriptionDataMaximumLengthRequired Field?(Mandatory /Notes25 P a g e

Open API Data CatalogueNumberThis a uniquealphanumerictrip code.Typevarchar50Optional)MandatoryVersion date:2018-07-11For example:8062.3.2 InformationAlertAllDescriptionThis function returns the current messages for the Information Alert message class by dateParameter List: N/AReturns Value: A collection of current Information Messages for the branch and their associatedentities where the Message.messageClass “INFALERT”Attribute is is a uniquealphanumericstringidentifier for amessageThis indicatethe servicecategoryassociated withthe messageThis indicatesthesubcategory ofthe servicecategoryassociated withthe messageThis is a coderelated to anyperviousmessage – ifData TypeMaximunLengthvarchar50Required Field?(Mandatory /Optional)MandatoryNotesvarchar100OptionalFor example:Service Disruptionvarchar100OptionalFor example:Train ServiceSuspensionvarchar50OptionalFor example:M0000109461For example:M000012672126 P a g e

Open API Data CatalogueanyThis indicatesthe status ofthe messageStatusvarchar10OptionalPostedDateTimeThis indicatesthe date andtime when themessage wasinitially postedvarchar50OptionalSubjectEnglishThis is Englishsubject textdisplayThis is Frenchsubject textdisplayThis is Englishbody textdisplayThis is Frenchbody EnglishBodyFrenchVersion date:2018-07-11Possibel valuesare:INIT – InitialCORR – CorrectedFINAL – FinalUPD - UpdatedDisplay format: 02.3.2.1 InformationAlertAll – LineDescriptionThis is collection of the affected lines associated with the messageAttributeNameCodeDescriptionThis indicates theunique identifierfor the lineDataTypevarcharMaximumLength10Required Field?(Mandatory /Optional)MandatoryNotesFor example:Code DescriptionLWLakeshore WestLELakeshore East27 P a g e

Version date

Open API Data Catalogue Version date: 2018-07-11 6 Page 1 Introduction 1.1 Open API Data Catalogue Overview This document provides a central descriptions of business data such as a standards definition of data elements, their meanings and allowable values for the Open API attributes. The contents