• Home
  • About
  • Job Profile
  • Portfolio
  • Training
Blue Orange Green Pink Purple

Archive for the ‘Web Services’ Category

You can use the search form below to go through the content and find a specific post or page:

Oct 07

RESTful API – The HTTPish …

Many newer application programmers are realizing the need to open their core functionality to a greater audience. Providing easy, unfettered access to your core API can help get your platform accepted, and allows for mashups and easy integration with other systems.

rest_API

→ REST is the underlying architectural principle of the web and depends on HTTP headers for direction.
→ HTTP is oriented around verbs and resources. GET, POST(most commonly used)
→ To modify and remove, PUT and DELETE used respectively.

Basic Authentication level:  Security and data binding is the most pririty when you are creating APIs. Here are some basic points needed to be check:

→ SSL support, https
→ Check the request type, request source, browser, device
→ It may have a key/device id to check that the request made from a registered device

Followings are the example API URI,

URL        | HTTP Method | Operation

/api/user/3  | GET          | Returns a JSON object containing some information for a user
/api/add     | POST         | Adds new user data to be stored in server
 

API request and response : To get a detailed information about a specific user, followings are the example request and response in JSON format to be parsed and used.

Request

GET /user/3
Accept: application/json

Response

200 OK
Content-Type: application/json

{
"user": {
"id": 3,
"name": "Jack",
"country": "Austria",
}
}

Saif The Green

  • View Saif's profile on LinkedIn
  • Recent Posts
    • RESTful API – The HTTPish …
    • SUSE – another user-friendly desktop Linux distributions
    • SEO meta techniques for a wordpress blog
    • Set favicon in cross browser and more…
    • WordPress custom URL rewrites and tips
  • Archives
    • October 2016
    • August 2016
    • August 2014
    • July 2014
    • April 2014
    • June 2013
    • April 2013
    • March 2013
  • Categories
    • CodeIgniter
    • Javascript
    • Linux
    • MySQL
    • opencart
    • php
    • SEO
    • Software Development
    • Web Development
    • Web Services
    • Wordpress
  • Meta
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Archives
    • October 2016
    • August 2016
    • August 2014
    • July 2014
    • April 2014
    • June 2013
    • April 2013
    • March 2013
  • Search







Saif The Green is proudly powered by WordPress
Entries (RSS) and Comments (RSS).