About Me

My photo
PLANO, Texas, United States

Thursday, September 17, 2020

REST API

What is REST (Representational State Transfer) API?

  • Force.com REST API lets you integrate with the force.com applications using simple HTTP methods.
  • The beauty of RESTful service is that it's very lightweight and easy to use as compared to SOAP-based services.











What are the Characteristics of the REST API?
  • Leverage HTTP- Users the existing feature of HTTP such as HTTP Caching and authentication, Native HTTP Method (GET, POST, PUT, Delete, PATCH)  therefore it makes integration with mobile devices and tablet simple
  •  Stateless- Each request from client to the server must contain all the information necessary to understand the request, and not use any stored context on the server.
  • Support XML and JSON format

What does an HTTP Request consist of?

HTTP Request consist:

  1. Request header
  2. Named URI
  3. Request Entity
  4. HTTP Method

How is Name URI (Uniform Resource Identifier) constructed?

The URI is composed of:

  • The root URL specifying
    • The instance of company org
    • The desired API Version
  • A resource path 






What different HTTP methods are available?

  • GET        - Retrieve data
  • POST     - Create record
  • DELETE - Delete record
  • PUT       - Upsert record

How can the data format be specified?

JSON is the default data exchange format

  • To modify the format: 
    • Use the HTTTP accept header to specify json or xml
    • Append .json or .xml to the URI
                

How is HTTP used to make a REST-based API Call?























To know about other integration API at a glance, pls Click here

No comments:

Post a Comment