• ¶

    Echo example

    This example illustrates how to use the Unitag Engine API to display all available runtime data (try it here).

  • ¶

    The raw JSON document can be found here.

    {
  • ¶

    Define the URL that will be used to access this operation. The resulting URL has the following form: http://e.unitag.io/r/{YOUR PATH HERE}.

        "url": "{YOUR PATH HERE}",
  • ¶

    Mark this operation as published. This is needed to make it publicly available.

        "state": "PUBLISHED",
  • ¶

    Define the default entry point of this operation.

        "index": {
  • ¶

    Define a fake data connector, named foo.

            "input": {
                "foo": "This is the result of a fake connector"
            },
  • ¶

    Define a fake data action, named bar.

            "trigger": {
                "data": {
                    "output": "bar",
                    "value": "This is the result of a fake action"
                }
            },
  • ¶

    Send a JSON response containing all available runtime data.

            "response": {
                "body": {
                    "env": "<((env))>",
                    "ctx": "<((ctx))>",
                    "params": "<((params))>",
                    "io": "<((io))>",
                    "out": "<((out))>"
                }
            }
        }
    }