diff --git a/README.md b/README.md index 743df63..e9d19ef 100644 --- a/README.md +++ b/README.md @@ -145,3 +145,15 @@ lein test Run workflows on the web server, passing `data`, `flux`, and `fix` as GET-Parameter: [http://localhost:3000/process?data='1'{'a': '5', 'z': 10}&flux=as-lines|decode-formeta|fix|encode-formeta(style="multiline")&fix=map(a,b) map(_else)](http://localhost:3000/process?data=%271%27{%27a%27:%20%275%27,%20%27z%27:%2010}&flux=as-lines|decode-formeta|fix|encode-formeta(style=%22multiline%22)&fix=map(a,c)%20map(_else)) + +## Use Metafacture Playground API + +Beside using the Metafacture Playground webapplication it's possible to access workflow results via API. + +## API +Beside the web application the Metafacture Playground provides a HTTP REST API to process workflows.To process a workflow you need to provide the workflow information as JSON parameters in your POST request. + +``` +curl -X POST https://test.metafacture.org/playground/process -H 'Content-Type: application/json' -d '{"data":"1{a: Faust, b {n: Goethe, v: JW}, c: Weimar}\n2{a: Räuber, b {n: Schiller, v: F}, c: Weimar}","flux":"inputFile\n|open-file\n|as-lines\n|decode-formeta\n|fix(transformationFile)\n|encode-xml(rootTag=\"collection\")\n|print\n;","transformation":"move_field(_id, id)\nmove_field(a, title)\npaste(author, b.v, b.n, \"~aus\", c)\nretain(id, title, + author)\n"}' +``` \ No newline at end of file