def index(): """ Show Distill version information, connection status, and all registered applications. .. code-block:: bash $ curl -XGET https://localhost:8090 { "author" : "Michelle Beard", "email" : "*****@*****.**", "name": "Distill", "status" : true, "version" : "1.0", "applications" : { "xdata_v3" : { testing: 205, parsed: 500, }, "test_app" : { logs: 500, parsed: 100, } } } :return: Distill's status information as JSON blob """ return jsonify(name="Distill", version="1.0 alpha", author="Michelle Beard", email="*****@*****.**", status=Brew.get_status(), applications=Brew.get_applications())
def index(): """ Show Distill version information, connection status, and all registered applications. .. code-block:: bash $ curl -XGET http://localhost:8090 { "name": "Distill", "version" : "0.1.0", "status" : true, "applications" : { "xdata_v3" : { testing: 205, parsed: 500, }, "test_app" : { logs: 500, parsed: 100, } } } :return: Distill's status information """ return jsonify(name="Distill", version=__version__, status=Brew.get_status(), applications=Brew.get_applications())
def update (app_id): """ Renames a specific application .. code-block:: bash $ curl -XPOST https://localhost:8090/update/xdata_v3?name="xdata_v4" :param app_id: Application name :return: Boolean response message as JSON blob """ return Brew.update (app_id)
def create (app_id): """ Registers an application in Distill. .. code-block:: bash $ curl -XPOST https://localhost:8090/xdata_v3 :param app_id: Application name :return: Newly created application's status as JSON blob """ return Brew.create (app_id)
def delete (app_id): """ Deletes an application permentantly from Distill .. code-block:: bash $ curl -XDELETE https://localhost:8090/xdata_v3 :param app_id: Application name :return: Boolean response message as JSON blob """ return Brew.delete (app_id)
def update(app_id): """ Renames a specific application .. code-block:: bash $ curl -XPOST https://localhost:8090/update/xdata_v3?name="xdata_v4" :param app_id: Application name :return: Boolean response message as JSON blob """ return Brew.update(app_id)
def create(app_id): """ Registers an application in Distill. .. code-block:: bash $ curl -XPOST https://localhost:8090/xdata_v3 :param app_id: Application name :return: Newly created application's status as JSON blob """ return Brew.create(app_id)
def delete(app_id): """ Deletes an application permentantly from Distill .. code-block:: bash $ curl -XDELETE https://localhost:8090/xdata_v3 :param app_id: Application name :return: Boolean response message as JSON blob """ return Brew.delete(app_id)
def create(app_id): """ Register an application. @todo Need to include UserALE.js mapping information in a general sense. .. code-block:: bash $ curl -XPOST http://localhost:8090/create/xdata_v3 :param app_id: Application name :return: Newly created application's status """ return jsonify(Brew.create(app_id))
def delete(app_id): """ Deletes an application permentantly from Distill .. code-block:: bash $ curl -XDELETE http://localhost:8090/xdata_v3 :param app_id: Application name :return: Boolean response message """ res = Brew.delete(app_id) jsonify(status="Deleted index %s" % app_id)
def status (app_id, app_type): """ Presents meta information about an registered application, including field names and document types. .. code-block:: bash $ curl -XGET https://localhost:8090/status/xdata_v3 { "application": "xdata_v3", "health": "green", "num_docs": "433", "status": "open" } :param app_id: Application name :return: Registered applications meta data as JSON blob """ return Brew.read (app_id, app_type=app_type)
def status(app_id, app_type): """ Presents meta information about an registered application, including field names and document types. .. code-block:: bash $ curl -XGET https://localhost:8090/status/xdata_v3 { "application": "xdata_v3", "health": "green", "num_docs": "433", "status": "open" } :param app_id: Application name :return: Registered applications meta data as JSON blob """ return Brew.read(app_id, app_type=app_type)
def index (): """ Show Distill version information, connection status, and all registered applications. .. code-block:: bash $ curl -XGET https://localhost:8090 { "author" : "Michelle Beard", "email" : "*****@*****.**", "name": "Distill", "status" : true, "version" : "1.0", "applications" : { "xdata_v3" : { testing: 205, parsed: 500, }, "test_app" : { logs: 500, parsed: 100, } } } :return: Distill's status information as JSON blob """ return jsonify (name="Distill", version="1.0 alpha", author="Michelle Beard", email="*****@*****.**", status=Brew.get_status (), applications=Brew.get_applications ())