|
 Navigation: Categories » Internet » apis and web feeds
Go to Page# 1
Advantages and Disadvantages of SSL ~ API related (04/30/2012) ...
No client identification — Using an SSL
Additional client-side requirements — Handling SSL from the client side isn't always trivial, and languages may require additional extensions installed (which may or may not be available in a shared host environment).
SSL is an excellent layer to add to any API. It provides security for the request and response payloads, as well as provides some assurance for the client application as to the identity of the server. It is easily combined with either HTTP authentication or message-based authentication. Some care, however, should be taken not to use SSL unnecessarily, because it has additional requirements for the client application that not all developers may be able to meet, and it places additional CPU load on both sides as messages are encrypted and decrypted....
REST API vs SOAP API technology (04/27/2012) ... I would generally suggest the latter; it's inline with the specification and it allows you to make changes later without affecting the external interfaces developers use.
Consider allowing developers to use a web interface to make requests against the API. This can be of great use when attempting to diagnose a problem; developers will be able to quickly determine if the problem is the request or their code. The more tools you can provide to developers in terms of diagnostics, the easier it will be to develop for your site.
SOAP APIs
When the SOAP request comes in, it should first be checked to ensure that it conforms to the format specified by your WSDL document....
How to implement the SOAP technology (04/25/2012) ...
Manual Generation
Generating SOAP requests manually isn't too different from generating REST requests. The process of generating the request and actually transmitting it is split into two separate functions, for demonstrating purposes.
For generating the request itself, I have chosen to use a pregenerated string, and merely populate the required values at runtime. There are more complex options (such as creating the document within SimpleXML, or creating it from scratch each run), but they aren't really required:
functioncreateRequest($devkey, $action, $type, $keyword)
{
$request = "<?xmlversion=\"1.0\" encoding=\" UTF-8\" standalone=\"no\"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=\"http://schemas....
Advantages and Disadvantages of Open API (04/22/2012) ...
No encryption — All requests and responses are visible to anyone between the requesting server and the API server.
Can't contact developers — Because anyone anywhere can access the API without any prior registration, you are left without any method of directly engaging developers using the API. You may want to contact developers in situations where their application is being abusive, when changes are being made to the API that will affect their application, or to seek suggestions on how to improve the API itself.
Abuse — Unfortunately today, systems with little or no security or authentication make prime targets for abuse by some less ethical elements out there. Even if you feel that the risk is minimal, you may end up surprised at what others can take advantage of....
Common API Performance Techniques (09/05/2010) ...
Caching Data
Often both websites and APIs request data from the database each and every time a request is made, even though the data used to populate the response changes rarely. This, combined with the database normalization techniques taught since the beginning of time, means that each of those requests is likely making at least one query joining results from multiple tables, possibly multiple queries. If your data isn't changing that often, consider caching the response.
For example, take the fictional Bob's Video website. Every time someone either views detailed information about a movie on his website or requests it through his API, his server runs three queries: one query that finds the movie's full title, plot line, and rating, another query that runs a joined query to retrieve detailed information on each of the cast members, and a final query to determine the film's rental status....
Introduction to Web APIs ~ REST vs SOAP (08/30/2010) ... Amazon, for example (offering both REST and SOAP interfaces), has 85 percent of its requests occur over REST.
Service definition — SOAP services are defined by Web Services Description Language (WSDL) files, which contain all the information required to make a request. In fact, generic SOAP clients are available that will allow you to make any request provided by a service given nothing but the address of the WSDL file. There is no equivalent for REST services.
Encapsulation — SOAP requests are encapsulated within an XML envelope....
What are Feeds ~ RSS and ATOM Feed Specifications (08/27/2010) ... It was originally developed by Netscape to give content providers an easy way to have their information plugged into their My Netscape portal (a user-configurable homepage that contains news sources selected by the user). Further versions were developed by others until the 2.0 specification was released and declared to be the final version in the series. Most sites using RSS either provide a feed in 0.91 or 2....
Important Considerations When Using Feeds (08/22/2010) ... Without any filtering on your site, an attacker could place JavaScript code into a feed you consume, which would then be presented to your users. This JavaScript code would then be executed by your users, where it could send cookie data (such as user information) to remote sites, or even rewrite portions of your pages to accomplish even more nefarious deeds.
Finally, it is likely that the feeds you consume will be stored in a database; just because you expect (or feed specifications require) that certain characters will be escaped, it isn't always the case. SQL Injection attacks can occur in this manner, so ensure all data entered into your database is escaped properly.
Legal Concerns
The existence of a feed does not give one free reign to use it at will....
Advantages and Disadvantages of Client Side Certificates (08/22/2010) ...
Client-side certificates are as good as it gets in terms of API security; both the server and client are assured of the other's identity. Just like using an SSL endpoint, client-side certificates stack well with either HTTP authentication or message-based authentication. As with all forms of security, this increased level of security comes with a price: additional CPU load for both the client and the server, and the elimination of several useful client-side tools for interacting with the API......
How to implement the REST technology (08/18/2010) ... Conceptually the function that will generate the request is pretty basic. First, all the request parameters are prepared to ensure proper transmission. Next, the URL for the endpoint is generated, then parsed and broken up into its component parts. Finally, the request itself is sent using sockets:
functioncallAPI($endpoint, $devkey, $action, $type, $keyword)
{
$action = urlencode($action);
$type = urlencode($type);
$keyword = urlencode($keyword);
Three of the passed parameters are URL encoded. This is necessary to ensure they are passed properly over the URL....
Why Do You Need to Produce Feeds (08/15/2010) ...com/). Finally, popular news sites (Google News, for example) compile the feeds of various news outlets to provide a single source of current news.
By simply updating a corporate news/public relations page to provide a web feed, a company suddenly finds new outlets for its information, and by adding feeds to your own pages, you can make it easy and convenient for your audience to keep up to date with your content.
Considerations When Producing a Feed
Once you discover how easy it is to produce a web feed and how easy the plethora of feed readers out there makes it for your users to consume your feed, you may have some inner drive to produce feeds for everything. Don't....
How REST Works (08/15/2010) ...
Parameters — Several parameters will need to be included with the request to provide the requested action with some context (for example, the desired action might be a search; the parameters might be a type, and the keywords values of book and style).
With those elements in mind, you can create a theoretical request:
http://library.example.com/api.php?devkey=123&action=search&type=book&keyword=style
Here a request is sent to the endpoint http://library....
How SOAP Works (08/12/2010) ...0" encoding=" UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www....
Developing a Datafeed Strategy (03/21/2007) ...
Procedure
When holding your datafeed party, here are some steps you need to take:
1. Identify datafeed opportunities by researching on the Web.
2. Determine the relevancy of the target website to what you are selling. For instance, if you sell perfume, a website that features a product comparison directory for scuba diving products may not be the best place for your merchandise, even if the datafeed is free....
Go to Page# 1
|
|
|
How SOAP Works - A SOAP request will involve creating and populating a request envelope, which contains all the required information (as specified by the WSDL document), transmitting that envelope to the API server (more...)
Why Do You Need to Produce Feeds - Feeds have several advantages, primarily related to consumption, over traditional HTML formats. Many desktop applications are devoted to reading feeds at regular intervals, and many of the new batc (more...)
How REST Works - Generally speaking, a REST request will involve sending a request to a special URL (similar to what you would see after filling out a form using the GET method), then receiving an XML document cont (more...)
How to implement the REST technology - There are two sides to this tale, the first is how to generate legitimate REST requests, and the second is how to handle the responses correctly.
Generating Requests
When i (more...)
Important Considerations When Using Feeds - XML feeds provide a great resource of information, but their use is not without its own special considerations. Security and legal concerns go hand in hand whether you are producing or consuming (more...)
What are Feeds ~ RSS and ATOM Feed Specifications - You can think of feeds as small modules of information that can be plugged into existing websites, consumed by clients on their desktop, or consumed by aggregators to be presented by users with oth (more...)
Introduction to Web APIs ~ REST vs SOAP - When interacting with web services, generally the choice of which method to use will be made for you. The majority of services operate in either REST or SOAP, not both (Amazon is a notable exceptio (more...)
Common API Performance Techniques -
Websites are designed to be accessed by individuals, and as such tend to rely on the relatively slow speed of the user to avoid any performance bottlenecks. This technique fails miserably wi (more...)
Advantages and Disadvantages of Open API - Under an open API, absolutely no security or authentication methods are used. A query is received from the wild, and the system makes its best effort to respond to it appropriately. This has severa (more...)
How to implement the SOAP technology - Like REST, implementing SOAP involves both generating requests and then handling the response. Whereas handling the SOAP response is similar to the REST result, generating the SOAP request is quite (more...)
REST API vs SOAP API technology - The two primary architectures for APIs are REST and SOAP. When creating your API, you really have three options: REST, SOAP, or both. REST APIs are known for being easy and quick to develop for, bu (more...)
|
|
|