Sample Restful Web Services

Restful Web Service For List Of Presidents

Technology used in creating this web service:

  • Visual Studio 2017
  • C#
  • Web API - Restful service restricted to return data. Does not allow updating. This restriction was necessary to protect the database table content.
  • SQL Server 2014
  • Entity Framework 6
Test Number

1

Type Of Data Returned

List of U.S. Presidents from first to 45th

How To Test

The easiest way to obtain the presidential list without writing a program is to simply use a web browser of your choice and entering the following URL into your browser or clicking the link:
http://robertmarquez.com/restservices/api/presidents

Test Number

2

Type Of Data Returned

A single U.S. President matching the number of the president in office you specify.

How To Test

Append the number of the U.S. President you want to view as the last parameter after the word "presidents". Note the below example where the 16th president is retrieved by appending the numbe 16 at the end of the url preceded by a forward slash:
http://robertmarquez.com/restservices/api/presidents/16