Skip to content

Instantly share code, notes, and snippets.

@bithavoc
Last active December 10, 2015 23:08
Show Gist options
  • Save bithavoc/4507666 to your computer and use it in GitHub Desktop.
Save bithavoc/4507666 to your computer and use it in GitHub Desktop.
Creating and Executing Fauna Commands
echo "Updating Command Definition"
curl https://rest.fauna.org/v0/commands/reply_message -X PUT -u AQAAS6hRHMAAAABB9FVmsAAAXH9CRKgC6N801bp80lKB1g: -d '{ "comment": "Reply a Message", "actions":[{"method":"POST", "path":"/v0/instances", "body":{ "class":"message", "data":{ "body":"$body" } } }]}'
echo "Invoking Command (now using a user Token)"
curl https://rest.fauna.org/v0/commands/reply_message -X POST -u AQIAT9qymjAAAABJd3D_AAAAAEH0VWawAAABAEbK2k9gAABuUBqDLSjdEsmvUUWrxE_zAAAAAAAAAA: -d '{ "body": "My message" }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment