The new foler includes a README file (please, update it when adding new scripts), common scripts (base64.sh and rest-common-env.sh), two scripts (post-criterions-types.sh and get-criterion-types.sh) for importing/exporting criterion types, and a sample file (criterion-types-sample.xml) with criterion types to be imported.
21 lines
508 B
Bash
Executable file
21 lines
508 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. ./rest-common-env.sh
|
|
|
|
printf "Login name: "
|
|
read loginName
|
|
printf "Password: "
|
|
read password
|
|
|
|
if [ "$1" = "--prod" ]; then
|
|
baseServiceURL=$PRODUCTION_BASE_SERVICE_URL
|
|
certificate=$PRODUCTION_CERTIFICATE
|
|
else
|
|
baseServiceURL=$DEVELOPMENT_BASE_SERVICE_URL
|
|
certificate=$DEVELOPMENT_CERTIFICATE
|
|
fi
|
|
|
|
authorization=`./base64.sh $loginName:$password`
|
|
|
|
curl -sv -X GET $certificate --header "Authorization: Basic $authorization" \
|
|
$baseServiceURL/criteriontypes | tidy -xml -i -q -utf8
|