From d2ce48ecb828172fb2b558e092a1e0e1cbcecb24 Mon Sep 17 00:00:00 2001 From: Piotr Date: Thu, 9 May 2024 13:45:14 +0200 Subject: [PATCH] Add usage examples to README Added examples showing how to use the service using curl. The examples include both direct JSON input and the use of a JSON file. --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index 61e7ea6..deb47b2 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,40 @@ make docker-rebuild ## Usage +```shell +curl -X POST localhost:5000/execute -H "Content-Type: application/json" -d '{ + "Parameters": { + "console.text": "hallo word" + }, + "Tasks": [ + { + "Sequence": 1, + "Name": "log", + "Action": "console" + } + ] +}' +``` + +or +```shell + +echo '{ + "Parameters": { + "console.text": "hallo word" + }, + "Tasks": [ + { + "Sequence": 1, + "Name": "log", + "Action": "console" + } + ] +}' > request.json + +curl -X POST localhost:5000/execute -H "Content-Type: application/json" -d @request.json +``` + ## Actions