Representational State Transfer¶
To communicate with DATAGERRY a REST interface is provided.
This is subdivided into the areas data management
and configuration
.
Allowed methods¶
HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Although they can also be nouns, these request methods are sometimes referred as HTTP verbs.
GET
- Requests using GET should only retrieve data.POST
- The POST method is used to submit new data to the specified resourcePUT
- The PUT method updates all current data of the target resource with the request payload.DELETE
- The DELETE method deletes the specified data.
Permalink structure¶
The permalinks serve as a unique identification of a certain method to a URL. This structure should be maintained when creating new routes. In principle, the structure of the modules is always applied. This means that only the basic routes provide all data. If specific selections are made, these are defined in the subroutes. If possible, parameterization should be avoided.
Note
This routes should always work with and without ending slash!
1. GET¶
Route |
Description |
Options |
Example |
---|---|---|---|
|
Default route should give all data |
http://localhost/<module>/ |
|
|
Specific object from this module |
public id: generic public id identifier |
http://localhost/<module>/1 |
2. POST¶
Route |
Description |
Options |
Example |
---|---|---|---|
|
Insert specific write of data |
object data |
http://localhost/<module>/ |
|
Insert many objects |
http://localhost/<module>/many/ |
3. PUT¶
Route |
Description |
Options |
Example |
---|---|---|---|
|
Bulk update of data |
data list with id |
http://localhost/<module>/ |
|
same as root route |
data list with id |
http://localhost/<module>/many/ |
|
Update a specific object from this module |
public id: generic public id identifier |
http://localhost/<module>/1 |
4. DELETE¶
Route |
Description |
Options |
Example |
---|---|---|---|
|
Bulk delete of data |
data list with id |
http://localhost/<module>/ |
|
same as root route |
data list with id |
http://localhost/<module>/many/ |
|
delete a specific object from this module |
public id: generic public id identifier |
http://localhost/<module>/1 |