Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsAlive API endpoint #2

Open
mauricio1802 opened this issue Feb 22, 2019 · 0 comments
Open

IsAlive API endpoint #2

mauricio1802 opened this issue Feb 22, 2019 · 0 comments
Assignees

Comments

@mauricio1802
Copy link

mauricio1802 commented Feb 22, 2019

Original Issue: fibercrypto/skyxcommons#4
[GET] /api/isalive

Should return some general service info. Used to check if the service is running. Response:

{
// 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

@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)
@mauricio1802 mauricio1802 self-assigned this Feb 22, 2019
@stdevMac stdevMac added this to the Add openapi Spec milestone Feb 22, 2019
@cbermudez97 cbermudez97 changed the title IsAlive API endpint IsAlive API endpoint Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants