Last active
October 12, 2016 14:23
-
-
Save nk773/febb753b87db00c628f1dbc0e86de6c6 to your computer and use it in GitHub Desktop.
Calling Azure ML web service from Linux command line using curl
This file contains 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JSON file sample should be the body for input parameters - for example - JSON file for sample 5 experiment will be something like attached file