Last active
December 10, 2015 23:08
-
-
Save bithavoc/4507666 to your computer and use it in GitHub Desktop.
Creating and Executing Fauna Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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