Do you want to make your own API and start providing web services to other sites..?
Well, this section is for you
First question that arises in one's mind i.e. need of web services API. Well, web services API provides service seekers to integrate seamlessly into your website to acquire services. To do so, there is no need to change any code irrespective of technology, operating system or programming model. Service providers can sell this API to service seekers at a certain price or even free of cost depending upon industry domain and business strategy. Also, you can have an affiliate sort of program run through this. e.g. you have a shopping portal and want a API developed for others to integrated in their website. By doing so, the same number of products will be displayed in other website in customized manner but originally data is extracted from your website. For every sale of products, you need to pay that affiliate a commission as per agreed. So, in this way, it helps even to promote your services on more than one server.
Looking at Figure A, Point 1 indicates the data exchange requirement between service provider and service seeker. Both service provider and service seeker are at different geographical locations working under different programming platforms. Now, service provider hires a software company to create an API so that they can sell that API or provide at no cost to their service seekers.
Basic principles for enabling web services
The below mentioned principles will ensure that data will be available to users without concerning to how data will be used or what sort of end web application is?
- Every data record and collection is a resource
- Every resource should have a URI
- Cool URI’s don’t change
- Data queries on existing resources should be done with a GET
- Use POST to create new resources
- Preserve the structure of data until the last possible moment (i.e. return XML)
- Make XML Schemas available online for your XML
- Make data available in multiple flavors
- Use Metadata (RDF) for XML
- Document your service API using WSDL, WRDL, or some other standard
- Advertise the presence of the data using WSIL
- Adhere to data standards such as RSS where available
- Use HTTP authentication as much as possible