Difference between revisions of "REST API"
(basic structure) |
|||
Line 1: | Line 1: | ||
The Directed Edge [[Wikipedia:REST|REST]] API is a fairly simple way of modeling a collection of items and the relationships between them. These relationships are used as the basis for finding similar items or delivering personalized recommendations to a user. Information is encoded using our [[XML Format]] using notions from the [[API Concepts]]. | The Directed Edge [[Wikipedia:REST|REST]] API is a fairly simple way of modeling a collection of items and the relationships between them. These relationships are used as the basis for finding similar items or delivering personalized recommendations to a user. Information is encoded using our [[XML Format]] using notions from the [[API Concepts]]. | ||
− | REST APIs allow for using the [[Wikipedia:Hypertext Transfer Protocol#Request_methods|HTTP methods]] GET, PUT, POST and DELETE on various resources. | + | REST APIs allow for using the [[Wikipedia:Hypertext Transfer Protocol#Request_methods|HTTP methods]] GET, PUT, POST and DELETE on various resources. Resources are just normal URLs organized hierarchically. In our case there is the database, items and things you can do with items (query, update, etc.). |
Let's have a look at an example URL: | Let's have a look at an example URL: | ||
Line 7: | Line 7: | ||
<nowiki>https://username:password@webservices.directededge.com/api/v1/wikipedia/</nowiki> | <nowiki>https://username:password@webservices.directededge.com/api/v1/wikipedia/</nowiki> | ||
− | This is the URL for the wikipedia database. Many of the elements are constant — notably the host name, and the | + | This is the URL for the wikipedia database. Many of the elements are constant — notably the host name, and the "api/v1" sections. We'll break down the other resources and the methods allowed on them in the following sections. |
== HTTP and HTTPS == | == HTTP and HTTPS == |
Revision as of 02:46, 23 May 2009
The Directed Edge REST API is a fairly simple way of modeling a collection of items and the relationships between them. These relationships are used as the basis for finding similar items or delivering personalized recommendations to a user. Information is encoded using our XML Format using notions from the API Concepts.
REST APIs allow for using the HTTP methods GET, PUT, POST and DELETE on various resources. Resources are just normal URLs organized hierarchically. In our case there is the database, items and things you can do with items (query, update, etc.).
Let's have a look at an example URL:
https://username:password@webservices.directededge.com/api/v1/wikipedia/
This is the URL for the wikipedia database. Many of the elements are constant — notably the host name, and the "api/v1" sections. We'll break down the other resources and the methods allowed on them in the following sections.