Skip to content

Instantly share code, notes, and snippets.

@nk773
Last active October 12, 2016 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nk773/febb753b87db00c628f1dbc0e86de6c6 to your computer and use it in GitHub Desktop.
Save nk773/febb753b87db00c628f1dbc0e86de6c6 to your computer and use it in GitHub Desktop.
Calling Azure ML web service from Linux command line using curl
#!/bin/bash
if [ $# -lt 3 ]
then
echo "Number of arguments doesn't have required mandatory parameters"
echo "azureml_rrs <PathToRRSjsonFile> <API key> <RRS URL>"
echo "Path to RRS json file $1"
echo "API Key $2"
echo "RRS URL $3"
echo "Total Arguments $#"
else
curl -v -H "Content-Type: application/json" -H "Accept: text/json" -H "Accept-Charset:UTF-8" -H "Authorization: Bearer $2" -X POST -d "@$1" $3
fi
@nk773
Copy link
Author

nk773 commented Sep 7, 2016

JSON file sample should be the body for input parameters - for example - JSON file for sample 5 experiment will be something like attached file

rrsjsoncapture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment