API v1 Reference¶
OE Python Template Example v1.0.0¶
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Terms of service Email: Helmut Hoffer von Ankershoffen Web: Helmut Hoffer von Ankershoffen
system¶
health_endpoint_healthz_get¶
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/healthz', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json'
};
fetch('/healthz',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /healthz
Health Endpoint
Determine aggregate health of the system.
The health is aggregated from all modules making up this system including external dependencies.
The response is to be interpreted as follows:
The status can be either UP or DOWN.
If the service is healthy, the status will be UP.
If the service is unhealthy, the status will be DOWN and a reason will be provided.
The response will have a 200 OK status code if the service is healthy, and a 503 Service Unavailable status code if the service is unhealthy.
Args: service (Service): The service instance. response (Response): The FastAPI response object.
Returns: Health: The health of the system.
Example responses
200 Response
{
"components": {
"property1": {
"components": {},
"reason": "string",
"status": "UP"
},
"property2": {
"components": {},
"reason": "string",
"status": "UP"
}
},
"reason": "string",
"status": "UP"
}
Responses¶
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful Response |
Health |
This operation does not require authentication
health_endpoint_system_health_get¶
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/system/health', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json'
};
fetch('/system/health',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /system/health
Health Endpoint
Determine aggregate health of the system.
The health is aggregated from all modules making up this system including external dependencies.
The response is to be interpreted as follows:
The status can be either UP or DOWN.
If the service is healthy, the status will be UP.
If the service is unhealthy, the status will be DOWN and a reason will be provided.
The response will have a 200 OK status code if the service is healthy, and a 503 Service Unavailable status code if the service is unhealthy.
Args: service (Service): The service instance. response (Response): The FastAPI response object.
Returns: Health: The health of the system.
Example responses
200 Response
{
"components": {
"property1": {
"components": {},
"reason": "string",
"status": "UP"
},
"property2": {
"components": {},
"reason": "string",
"status": "UP"
}
},
"reason": "string",
"status": "UP"
}
Responses¶
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful Response |
Health |
This operation does not require authentication
info_endpoint_system_info_get¶
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/system/info', params={
'token': 'string'
}, headers = headers)
print(r.json())
const headers = {
'Accept':'application/json'
};
fetch('/system/info?token=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /system/info
Info Endpoint
Determine aggregate info of the system.
The info is aggregated from all modules making up this system.
If the token does not match the setting, a 403 Forbidden status code is returned.
Args: service (Service): The service instance. response (Response): The FastAPI response object. token (str): Token to present.
Returns: dict: The aggregate info of the system.
Parameters¶
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
token |
query |
string |
true |
none |
Example responses
200 Response
{}
Responses¶
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful Response |
Inline |
|
422 |
Validation Error |
HTTPValidationError |
Response Schema¶
Status Code 200
Response Info Endpoint System Info Get
This operation does not require authentication
hello¶
echo_hello_echo__text__get¶
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/hello/echo/{text}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json'
};
fetch('/hello/echo/{text}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /hello/echo/{text}
Echo
Echo back the provided text.
Args: text (str): The text to echo.
Returns: Echo: The echo.
Raises: 422 Unprocessable Entity: If text is not provided or empty.
Parameters¶
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
text |
path |
string |
true |
none |
Example responses
200 Response
{
"text": "HELLO, WORLD!"
}
Responses¶
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful Response |
Echo |
|
422 |
Validation Error |
HTTPValidationError |
This operation does not require authentication
hello_world_hello_world_get¶
Code samples
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/hello/world', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json'
};
fetch('/hello/world',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /hello/world
Hello World
Return a hello world message.
Returns: _HelloWorldResponse: A response containing the hello world message.
Example responses
200 Response
{
"message": "Hello, world!"
}
Responses¶
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful Response |
_HelloWorldResponse |
This operation does not require authentication
Schemas¶
Echo¶
{
"text": "HELLO, WORLD!"
}
Echo
Properties¶
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
text |
string |
true |
none |
The echo |
HTTPValidationError¶
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
HTTPValidationError
Properties¶
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
detail |
[ValidationError] |
false |
none |
none |
Health¶
{
"components": {
"property1": {
"components": {},
"reason": "string",
"status": "UP"
},
"property2": {
"components": {},
"reason": "string",
"status": "UP"
}
},
"reason": "string",
"status": "UP"
}
Health
Properties¶
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
components |
object |
false |
none |
none |
» additionalProperties |
Health |
false |
none |
Represents the health status of a service with optional components and failure reasons.- A health object can have child components, i.e. health forms a tree.- Any node in the tree can set itself to DOWN. In this case the node is required to set the reason attribute. If reason is not set when DOWN, automatic model validation of the tree will fail.- DOWN’ness is propagated to parent health objects. I.e. the health of a parent node is automatically set to DOWN if any of its child components are DOWN. The child components leading to this will be listed in the reason.- The root of the health tree is computed in the system module. The health of other modules is automatically picked up by the system module. |
reason |
any |
false |
none |
none |
anyOf
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» anonymous |
string |
false |
none |
none |
or
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» anonymous |
null |
false |
none |
none |
continued
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
status |
_HealthStatus |
true |
none |
none |
ValidationError¶
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
ValidationError
Properties¶
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
loc |
[anyOf] |
true |
none |
none |
anyOf
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» anonymous |
string |
false |
none |
none |
or
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» anonymous |
integer |
false |
none |
none |
continued
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
msg |
string |
true |
none |
none |
type |
string |
true |
none |
none |
_HealthStatus¶
"UP"
_HealthStatus
Properties¶
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
_HealthStatus |
string |
false |
none |
none |
Enumerated Values¶
Property |
Value |
|---|---|
_HealthStatus |
UP |
_HealthStatus |
DOWN |
_HelloWorldResponse¶
{
"message": "Hello, world!"
}
_HelloWorldResponse
Properties¶
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
message |
string |
true |
none |
The hello world message |