# Here are some examples ## Check that token is valid ```bash curl -X POST \ -H "Authorization: Bearer YOUR_APP_KEY_CONTENTS" \ localhost:8076/challenge ``` ## Queue an execution of a script In this example, we pass `fetch.js` and `url.js` to demonstrate it all links up. ```bash curl -H 'content-type: multipart/form-data' \ -H "Authorization: Bearer YOUR_APP_KEY_CONTENTS" \ -F 'metadata={"name": "fetch","lang": "js","entrypoint":"fetch.js"};type=application/json' \ -F 'parameters={"args": ["a", "b"]};type=application/json' \ -F file1=@fetch.js \ -F file2=@url.js \ localhost:8076/execute ``` here, create an incident using incident api: ```bash curl -H 'content-type: multipart/form-data' \ -H "Authorization: Bearer YOUR_APP_KEY_CONTENTS" \ -F 'metadata={"name": "incident","lang": "js","entrypoint":"incident.js"};type=application/json' \ -F 'parameters={"args": []};type=application/json' \ -F file1=@incident.js \ localhost:8076/execute ``` ### Running directly without web runner: from the root, you can invoke examples directly on the runtime: ``` wasmedge --dir .:example --dir modules:languages/js/modules languages/js/qjs.wasm incident.js ``` note that the "js" file at the end is unqualified because it's in the container.