Run our API examples with Postman

On the development team we constantly test our own API, a task that can become very repetitive. As the Unified API is a REST API, this involves constructing, editing and sending URLs, then examining the JSON responses.

This is possible using just a browser, but can become very tedious and fiddly. There are tools available to help with this and we’ve found they give a massive boost to productivity for this kind of work.

The TfL Unified API in Postman, searching for nearby cycle docking stations.

One tool we use is Postman which streamlines the basics of working with APIs, and adds powerful features for testing, repeatability, and automation. We use it to run tests against our endpoints, and to mock up then flesh out new data feeds.

We are releasing a tidied-up version of our internal tests and sample queries, designed to sit alongside our documentation, so that developers can try out our API even faster than before and bring features to customers more quickly and accurately.

You can use the Run in Postman button to open our API in Postman, or browse our collection online if you don’t yet have Postman installed.

The app_id and app_key parameters are blanked out in the example, so you will be using the anonymous developer account by default, which has very strict usage quotas. Add your own keys to the Postman environment to use your own quota, you can sign up for a TfL Developer account here.

If there are tools you’ve found useful when using our API, or would like us to consider for integration then let us know in the comments.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *