Rest API and CRUD API Presented By :- - Anuj Patel - Bhumi Patel - Dharanee Patel - Kalpit Shah - Umang Suthar https://htree.plus
What is API? https://htree.plus
Types of API - Web service APIs ● SOAP ● REST - Functions or routines in an OS - Object remoting APIs ● .NET ● CORBA - Library-based APIs - Class-based APIs (object oriented) ● Java API https://htree.plus
What is RESTful API? https://htree.plus REpresentational State Transfer
What is Resource and Resource Methods? https://htree.plus
- Client-Server Architecture Separation of concerns. (UI - Data Storage) - Statelessness In Real Life :- Where does Kalpit live? What is his age? In REST :- Where does Kalpit live? What is Kalpit’s age? REST Architectural Constraints https://htree.plus
- Cacheability Well-managed caching partially or completely eliminates some client-server interactions, further improving scalability and performance. REST Architectural Constraints (Cont..) https://htree.plus
- Uniform interface ● Identification of Resources https://api.example.com/customers/12 ● Resource Representations ● Self-Descriptive Messages Content-Type: application/json ● HATEOAS (Hypermedia As The Engine Of Application State) REST Architectural Constraints (Cont..) https://htree.plus
- Layered system - Code on demand (optional) REST Architectural Constraints (Cont..) https://htree.plus
CRUD and REST CREATE READ UPDATE https://htree.plus DELETE POST GET PUT DELETE Operations HTTP Methods
- users - POST request - users/1 - GET request - users/1 - DELETE request - users/1 - PUT request APIs Example https://htree.plus - users/create- POST request - users/1/show- GET request - users/1/delete - POST request - users/1/edit- POST request Normal CRUD API RESTful CRUD API
URL Design Principle - Use nouns and NOT the verbs - API should be /products NOT /getAllProducts - Use Plurals - API should be /products NOT /product - Versioning - API should be /v1/products or /v2/products - Use Pagination - /products?page=1 - Use Lowercases - API should be /products NOT /Products
Untold Story of REST https://htree.plus GET /users { "parameter1": "value1", "parameter2": "value2", "parameter3": "value3", "parameter4": "value4" } POST /users/searches OR POST /filters/users
References - https://www.codecademy.com/articles/what-is-crud - https://restfulapi.net/http-methods/ - https://www.freelancinggig.com/blog/2018/04/24/rest-vs-crud-need-know/ - https://stoplight.io/blog/crud-api-design/ - https://softwareengineering.stackexchange.com/questions/120716/difference-between-rest-and-crud - https://www.kennethlange.com/what-are-restful-web-services/ - https://restfulapi.net/rest-architectural-constraints/ - https://medium.com/future-vision/the-principles-of-rest-6b00deac91b3 - https://en.wikipedia.org/wiki/Representational_state_transfer - https://gist.github.com/alexserver/2fcc26f7e1ebcfc9f6d8 - https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-1-introduction-b4a072f8740f - https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-2-rest-constraints-129a4b69a582 - https://www.mulesoft.com/resources/api/what-is-an-api - https://ffeathers.wordpress.com/2014/02/16/api-types/ - https://www.redhat.com/en/topics/api/what-are-application-programming-interfaces - https://hackernoon.com/restful-api-design-step-by-step-guide-2f2c9f9fcdbf - https://docs.microsoft.com/en-us/azure/architecture/best-practices/api-design https://htree.plus
Thank You Any Questions ? https://htree.plus

Rest api and-crud-api

  • 1.
    Rest API andCRUD API Presented By :- - Anuj Patel - Bhumi Patel - Dharanee Patel - Kalpit Shah - Umang Suthar https://htree.plus
  • 2.
  • 3.
    Types of API -Web service APIs ● SOAP ● REST - Functions or routines in an OS - Object remoting APIs ● .NET ● CORBA - Library-based APIs - Class-based APIs (object oriented) ● Java API https://htree.plus
  • 4.
    What is RESTfulAPI? https://htree.plus REpresentational State Transfer
  • 5.
    What is Resourceand Resource Methods? https://htree.plus
  • 6.
    - Client-Server Architecture Separationof concerns. (UI - Data Storage) - Statelessness In Real Life :- Where does Kalpit live? What is his age? In REST :- Where does Kalpit live? What is Kalpit’s age? REST Architectural Constraints https://htree.plus
  • 7.
    - Cacheability Well-managed cachingpartially or completely eliminates some client-server interactions, further improving scalability and performance. REST Architectural Constraints (Cont..) https://htree.plus
  • 8.
    - Uniform interface ●Identification of Resources https://api.example.com/customers/12 ● Resource Representations ● Self-Descriptive Messages Content-Type: application/json ● HATEOAS (Hypermedia As The Engine Of Application State) REST Architectural Constraints (Cont..) https://htree.plus
  • 9.
    - Layered system -Code on demand (optional) REST Architectural Constraints (Cont..) https://htree.plus
  • 10.
  • 11.
    - users -POST request - users/1 - GET request - users/1 - DELETE request - users/1 - PUT request APIs Example https://htree.plus - users/create- POST request - users/1/show- GET request - users/1/delete - POST request - users/1/edit- POST request Normal CRUD API RESTful CRUD API
  • 12.
    URL Design Principle -Use nouns and NOT the verbs - API should be /products NOT /getAllProducts - Use Plurals - API should be /products NOT /product - Versioning - API should be /v1/products or /v2/products - Use Pagination - /products?page=1 - Use Lowercases - API should be /products NOT /Products
  • 13.
    Untold Story ofREST https://htree.plus GET /users { "parameter1": "value1", "parameter2": "value2", "parameter3": "value3", "parameter4": "value4" } POST /users/searches OR POST /filters/users
  • 14.
    References - https://www.codecademy.com/articles/what-is-crud - https://restfulapi.net/http-methods/ -https://www.freelancinggig.com/blog/2018/04/24/rest-vs-crud-need-know/ - https://stoplight.io/blog/crud-api-design/ - https://softwareengineering.stackexchange.com/questions/120716/difference-between-rest-and-crud - https://www.kennethlange.com/what-are-restful-web-services/ - https://restfulapi.net/rest-architectural-constraints/ - https://medium.com/future-vision/the-principles-of-rest-6b00deac91b3 - https://en.wikipedia.org/wiki/Representational_state_transfer - https://gist.github.com/alexserver/2fcc26f7e1ebcfc9f6d8 - https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-1-introduction-b4a072f8740f - https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-2-rest-constraints-129a4b69a582 - https://www.mulesoft.com/resources/api/what-is-an-api - https://ffeathers.wordpress.com/2014/02/16/api-types/ - https://www.redhat.com/en/topics/api/what-are-application-programming-interfaces - https://hackernoon.com/restful-api-design-step-by-step-guide-2f2c9f9fcdbf - https://docs.microsoft.com/en-us/azure/architecture/best-practices/api-design https://htree.plus
  • 15.
    Thank You Any Questions? https://htree.plus