Vine REST
Vine REST is a RESTful application program interface (API) that uses HTTP requests (GET, PUT, POST and DELETE) to query a vine database. It is based on representational state transfer (REST) technology, which is often used in web services development.
Vine REST was originally built using ODATA protocol and still inherits a lot from it.
Summary of REST Operations and Used HTTP Methods
The REST Service accepts data to store/update values via standard HTTP protocol. Object fields should be passed as regular HTTP parameters (POST or GET).
Different operation on the same resource should use the same URL and different HTTP methods (e.g., GET, PUT, POST, or DELETE).
Resource | GET | PUT | POST | DELETE |
Collection URL, such as | retrieves the collection's members. |
| Creates a new entry in the collection. The new entry's ID is assigned automatically and is returned by the operation. |
|
Element URL, such as | Retrieves a representation of the addressed member of the collection. | Replaces the addressed member of the collection. |
| Deletes the addressed member of the collection. |
Individual fields, such as | Retrieves a representation of particular field | Replaces the value of the particular field. |
|
|
Formatting results
The result format is specified in the header of request. For example:
GET /VY_EVENT Accept: application/json - JSON OData format
GET /VY_EVENT Accept: application/atom+xml - Atom OData format
But please note, that OData has 2 types of data representation - object and collection. Currently, the Rest service supports only collection representation. Even if a single object requested, the service will return a collection with one element.
Date Format
ISO 8601 is used for formatting dates.
Comments
0 comments
Please sign in to leave a comment.