...
- The base URI for the Web API, such as httpshttp://eg.com/resources/.
- The Internet media type of the data supported by the Web API. This is often JSON but can be any other valid Internet media type provided that it is a valid hypertext standard.
- The set of operations supported by the Web API using HTTP methods (e.g., GET, PUT, POST, or DELETE).
- The API must be hypertext driven.
...
Resource | GET | PUT | POST | DELETE |
---|---|---|---|---|
Collection URI such as http://eg.com/resources/ | List the URIs and perhaps other details of the collection's members. | Replace the entire collection with another collection. | Create a new entry in the collection. The new entry's URI is assigned automatically and is usually returned by the operation. | Delete the entire collection. |
Element URI such as httpshttp://eg.com/resources/item7 | Retrieve a representation of the addressed member of the collection, expressed in an appropriate Internet media type. | Replace the addressed member of the collection, or if it doesn't exist, create it. | Not generally used. Treat the addressed member as a collection in its own right and create a new entry in it. | Delete the addressed member of the collection. |
...