Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
DATE_STR=$(date "+%Y%m%d%H%M%S")
DATE_HEADER="Date: $(date "+%a, %d %b %Y %T %Z")"
RESULTS_URL=$(curl "https://$$API_KEY" | jq -r ".resultsUrl")
PUT_URL=$(echo $RESULTS_URL | sed "s/\_\_random\_\_/$DATE_STR/g")
echo "Testing PUT to:" $PUT_URL
PUT_RESULTS=$(curl -i --verbose --request PUT --url "$PUT_URL" --header "$DATE_HEADER" --header 'x-ms-blob-type: BlockBlob' --header 'x-ms-version: 2015-02-21' --form 'image=""')

This comment has been minimized.

Copy link

@SophieDePaula SophieDePaula commented Mar 10, 2020

Instructions for Mac OS / Unix systems

  1. Download the script above.
  2. Give execute permission to script (chmod 777
  3. Download and install jq ( This is a JSON parser for API Requests.
  4. Run script in a Terminal / bash shell with Applitools subdomain (i.e. mycompanyeyes) and working API Execute Key (same key that runs tests)
    e.g. ./ mycompanyeyes APPLITOOLS_API_KEY
  5. If the final output responds with a 201, then no additional whitelisting is necessary.
  6. If the final output responds with a 4XX error, you will need to whitelist the domain after the printed line "Testing PUT to:”
    e.g. Testing PUT to:
    means you need to whitelist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment