Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Are all web API's restfull or those which implements API using HTTP Verbs(GET,POST,PUT)
are called REST full API.

IF a web api satisfy all the other REST constarints but has'nt implemented methods using the HTTP Verbs(GET,POST,PUT). Will this be called a Restfull api.

Should I create a interface so that all my api controllers will have same action methods.

What I have tried:

I am trying to create a new web api. I have experince in creating web services and WCF services.
Now trying to create a web api. So from design point a restfull api should only expose the HTTP Verbs(GET,POST,PUT) methods.
Posted
Updated 8-Jul-17 7:46am
Comments
Dave Kreskowiak 7-Jul-17 8:47am    
In my humble opinion, you're over thinking this and going about it backwards.

What are the business rules of the data you're dealing with? That's where you start and that's what's going to dictate what your controllers are going to expose.
sreesankar89 11-Jul-17 5:07am    
Yes you are right ,I am overthinking this!
So shall I create a web api with methods relating to my bussiness needs and then say that this is a restful api. There are different ways of doing thing. I am trying to understand and doing it correctly.

1 solution

REST is a methodology for going about implementing an API. Web API is designed to be a RESTful framework but it is up to you to implement it that way. You could go about implementing web api in a non-restful manner and still have it meet your needs.

But you are correct, one of the criteria of being RESTful is to implement HTTP verbs which is what web api allows you to do very easily.

I would suggest you read up more on what REST is and not over complicate the issue. Web API is fully capable of creating a RESTful API but once you grasp the concepts of REST itself, then you'll be able to create the API in that manner.

What is REST?[^]

Representational state transfer - Wikipedia[^]

http - What exactly is RESTful programming? - Stack Overflow[^]

Do you know what a REST API is? — SitePoint[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900