fibercrypto / fibercrypto/skyxcommons
IsAlive API endpoint
- Dominant language
- No language data
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
[GET] /api/isalive
Should return some general service info. Used to check if the service is running. Response:
```js
{
// Name of the service
“name”: “string”,
// Version of the service
“version”: “string”,
// ENV_INFO environment variable value
“env”: “string”,
// Flag, which indicates if the service is built
// in the debug configuration or not
“isDebug”: boolean
}
```
Python implementation
```py
@api.route('/isalive', methods=['GET'])
def isalive():
"""
Return some general service info. Used to check if service is running
"""
version = get_version()
if "error" in version:
return make_response(
jsonify(build_error(version["error"])),
version["status"]
)
result = {
"name": app.config['SKYCOIN_FIBER_NAME'],
"version": version,
"env": app.config["ENVIRONMENT"],
"isDebug": app.config["DEBUG"],
"contractVersion": app.config['SWAGGER_API_VERSION']
}
return jsonify(result)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.