17 lines
530 B
Bash
Executable File
17 lines
530 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get an auth token fron http://mydata.local:8003/api/token and use it to submit benchmarks.
|
|
# You only can get a token if you have a valid login session in your browser
|
|
# run it as follows `example.sh path-to-benchmark your-token`
|
|
|
|
JSON_FNAME="$1"; shift
|
|
AUTH_TOKEN="$1"; shift
|
|
|
|
curl_opts=(
|
|
-H "Content-Type: application/json"
|
|
-H "Accept: application/json"
|
|
-H "Authorization: Bearer $AUTH_TOKEN"
|
|
--data-binary "@${JSON_FNAME}"
|
|
)
|
|
curl "${curl_opts[@]}" "$@" http://mydata.local:8003/benchmarks/submit
|