Requested resources are unavailable

We are working on project, on Nodejs(decoding lib:‘gtfs-realtime-bindings’) where we need to access the below listed API(s):

  1. https://api.transport.nsw.gov.au/v1/gtfs/alerts/buses
  2. https://api.transport.nsw.gov.au/v1/gtfs/schedule/buses
  3. https://api.transport.nsw.gov.au/v1/gtfs/vehiclepos/buses
  4. https://api.transport.nsw.gov.au/v1/gtfs/realtime/sydneytrains
  5. https://api.transport.nsw.gov.au/v1/publictransport/timetables/complete/gtfs
  6. https://api.transport.nsw.gov.au/v1/publictransport/timetables/complete/transxchange

However we are unable to get required data from

  1. https://api.transport.nsw.gov.au/v1/gtfs/alerts/buses’(Screenshot Attached Below)
  2. https://api.transport.nsw.gov.au/v1/gtfs/schedule/buses

We received proper decoded data
3) ‘https://api.transport.nsw.gov.au/v1/gtfs/vehiclepos/buses
4) ‘https://api.transport.nsw.gov.au/v1/gtfs/realtime/sydneytrains

We received data from API however while decoding, we are getting Error(decoding lib:‘gtfs-realtime-bindings’)
5) ‘https://api.transport.nsw.gov.au/v1/publictransport/timetables/complete/gtfs
6) ‘https://api.transport.nsw.gov.au/v1/publictransport/timetables/complete/transxchange

Unavailable Resource:

Hi @dhamu143, I’m Alex the new Community Manager. Please find the answers to your queries below:

1) Service alerts are available for Sydney Trains only. All other service alerts can be found via a third party feed which is generated from the Transportnsw.info site. Please refer to the “Service Alerts” section on our troubleshooting page https://opendata.transport.nsw.gov.au/site/en_us/gs-troubleshooting.html

2) Bus schedules are not provided as real time data but are provided as separate file bundles. Have a look at the following forum post for the latest file http://opendata.transport.nsw.gov.au/forum/t/gtfs-bundle-for-type-schedule-is-not-available-for-agency-buses/65/38

3 & 4: As expected.

5 & 6: Hopefully some of the other devs can help you out with this since we only provide support on data issues or the data itself.

Hope this answers your questions.

Thanks.

2 Likes

@alejandro.felman Thanks for responding.

1 Like

Hey dhamu143,

I believe those two end points return ZIP files containing files in the corresponding formats (GTFS and TransXchange). You shouldn’t need to do any GTFS-R decoding with protoc. Only the gtfs/vehiclepos and gtfs/realtime endpoints are encoded in GTFS-R protocol buffers.

If you’re trying to match the data you get from the vehiclepos and realtime endpoints, you’ll need to use the GTFS-R specific GTFS static schedule at https://api.transport.nsw.gov.au/v1/gtfs/schedule/%mode in order to correctly match things like trip_id. Note this is a ZIP format since the files are in GTFS static format.

Cheers,
Ken

2 Likes

@jxeeno Thanks for the response

I have requested for data @ https://api.transport.nsw.gov.au/v1/publictransport/timetables/complete/transxchange
The response I received is like below:
<Buffer 50 4b 03 04 14 00 00 00 08 00 13 99 0f 49 e6 98 d3 60 d2 0d 00 00 0a 99 00 00 17 00 00 00 31 2f 6e 73 77 5f 31 2d 32 32 33 2d 5f 2d 73 6a 32 2d 31 2e ... >

How can I predict the data type(if it’s buffer or ZIP file)?

@dhamu143 What language are you using? Typically speaking, Buffers (or an Array Buffer) is simply a way to express generic binary data.

If you’re able to – write this buffer array directly into a file, say transxchange.zip. You should then be able to decompress the file using a simple unzip transxchange.zip command (assuming you’re using a Unix-based system).

2 Likes

I am using nodejs.

Your solution worked.
Thanks

1 Like