Useful real-world APIs to test against

In order for me to firm up my understanding of API testing I’m looking at testing against some real-world API’s. For understanding, I’m going to be writing my API tests in C#, ideally utilising RestSharp

I was just after some advise from people as to some API’s which would be good to test against for training purposes, as hopefully some of these have been utilised in the past by people. I’m looking to cover off different types of authentication, parameters and headers being passed across, sending different types of requests(GET, PUT, POST etc) and in turn analysing responses(be it in XML or JSON format)

1 Like

Hi @tilston1001

I have created an API that meets your requirements that can be found here: https://restful-booker.herokuapp.com The API has documentation around for GET, PUT, POST, DELETE and PATCH requests and they support either XML or JSON. There is also different types of authentication, both Basic and token based for you try out.

Additionally, I have a repository that contains different language flavours of an automated API checking framework to try out. You can find a C# flavour which @g33klady contributed that shows how to build API checks and organise your requests and payloads. Feel free to check it out: https://github.com/mwinteringham/api-framework

Let me know how you get on,
Mark

4 Likes

Thanks for the shout out :smiley: I have some other examples (along with workshops on using C# to test APIs) in Github (for instance, https://github.com/g33klady/TodoApiSample/tree/RestSharp) and can help out if you have questions on the C# side

2 Likes

Hi Mark, sorry where I am fairly new to API testing I’m having difficulty working out exactly the steps I need to take in order to get things up and running. I’ve got as far as cloning the resful-booker API locally, but I’m unsure after that what steps I need to take to:
a) get the API up and running
b) write some tests in c# against the API

Many thanks

Andy

Thank you Hilary, I’ll have a look through these. Really appreciate your help!

Todd Motto`s list is pretty extensive: https://github.com/toddmotto/public-apis

2 Likes

Hi Andrew, the API is permanently hosted at the following: https://restful-booker.herokuapp.com/ - so you can do a GET for example on ‘https://restful-booker.herokuapp.com/booking’ using Postman.

It’s a really great resource for learning API testing. If you’ve never used Postman before then you can tie in @mwinteringham’s restful-booker API and Danny Dainton’s Postman GitHub repo here: https://github.com/DannyDainton/All-Things-Postman

Personally I would start with testing APIs using Postman before writing a testing framework in C#.

1 Like

Hi Ali, thanks for the response on this, much apprceciated

1 Like

Kudos @mwinteringham for creating such a great resource in the restful-booker.

Was a very helpful example API for helping to teach testers in my organisation about getting started with API testing.

1 Like

There’s also a few in the API section of this article if you haven’t seen it already :slight_smile:

1 Like

Hi @tilston1001

It is the very early days on this, and these are certainly not ‘real-world’ APIs, but I have been working on some API testing challenges. I’ve been trying to find APIs to learn testing on and I’ve found that there are plenty available for testing GET calls, but not much for POST/PUT/DELETE, so I decided to see if I could put together something that would be helpful for other testers.

My current work on this can be found on github (https://github.com/djwester/api-testing-challenges). So far there are only two challenges (and they are pretty rough at this point), but if you are interested in trying them out feel free to do so. Let me know if they are helpful!

2 Likes

HI Dave, this is great thank you. I’ll clone this repo locally and have a look through it!

Hi Mark,

Does https://automationintesting.online/#/ now replace the restful booker in this post?

Thanks,

Duncs

cc @tilston1001

Hi,

No they serve slightly different purposes @duncan.nisbet. AiT online is designed to work with different tools and testing approaches, where as restful booker is purely API focused.

Thanks
Mark

Excellent, thanks for the prompt response Mark :slight_smile: