Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Panel
borderColor#ccffcc
bgColor#ccffcc
borderWidth2px
borderStylesolid
Best practice example

Here is an example based on http://handler usage.

1. Open the Provisioning section and start creating a handler.

    1. Specify the name, type, and status.
    2. In the Event field, select the Clients Create event from the drop-down list.
    3. In the Task field, indicate http:// type and determine the port and method, for example: 120.0.0.1:5000/api.
    4. Click Apply.

Find an example of the http:// handler below:

Code Block
languagepy
from flask import Flask, request
import json
app = Flask(__name__)
@app.route("/api", methods=['GET', 'POST'])
def api():
    data = json.loads(request.data)
    return json.dumps(data)
if __name__ == "__main__":
    app.run()



...