-
Notifications
You must be signed in to change notification settings - Fork 10
REST API
All REST API is located in api module and should be changed separately and with backward compatibility.
Without SSO configured Genesis use form-based (for browser usage) authorization and basic (for direct REST usage) authorization without challenge.
Settings and build information
System and project roles management
[Template repository configuration(since Genesis 1.3)](https://github.com/griddynamics/OpenGenesis/wiki/REST:-Template-Repository-Configuration-per-project(since-Genesis-1.3\))
There is a common result object returning for most changing (POST and PUT) operations.
Example of successful response:
{
"isSuccess": true,
"isNotFound": false,
"serviceErrors":{},
"variablesErrors":{},
"compoundServiceErrors":[],
"compoundVariablesErrors":[],
}
Example of errorneous response:
{
"isSuccess": false,
"isNotFound": false,
"serviceErrors" : {"fieldName": "Error message"},
"variablesErrors" : {"fieldName": "Error message"},
"compoundServiceErrors" : ["Error message1", "Error message2"],
"compoundVariableErrors" : ["Error message1", "Error message2"]
}
Fields description:
Field name | Type | Description |
---|---|---|
isSuccess | Boolean | Overall operation result |
isNotFound | Boolean | Object that was requested or involved in operation is not found |
serviceErrors | Map of field name / error message | Dictionary of service errors mapped to field names. Service error means that field value is valid but cannot be used in operation due to more complex requirements |
variablesErrors | Map of field name / error message | Dictionary of service errors mapped to field names or variable errors. This map mostly contains validation errors |
compoundServiceErrors | Array of error messages | List of errors that mostly due to combination of field values (possibly valid by themselves) |
compoundVariableErrors | Array of error messages | List of errors that caused by invalid combination of field values |
OpenGenesis tries to support hypermedia where it's possible. It means,
most of REST GET requests include links
array to point user to
directions he/she can visit from current point. Structure of link
element (links
consists of many link
) described in table below:
Field | Description |
---|---|
href | URL that link point to |
rel |
One of following values:
|
Collections links that point to top-level resources may not include
full list of methods allowed. In this case user should execute GET
for them to look at everything he is allowed to do at this resource.