diff --git a/scripts/deploy_spec.sh b/scripts/deploy_spec.sh index 1153aaec6..a1c3d28dd 100755 --- a/scripts/deploy_spec.sh +++ b/scripts/deploy_spec.sh @@ -4,7 +4,7 @@ set -euo pipefail # Deploy OAS Specification to Apigee -curl --fail -H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" -H "Accept: application/json;charset=utf-8" -H "Authorization: Basic ZWRnZWNsaTplZGdlY2xpc2VjcmV0" -X POST https://login.apigee.com/oauth/token -d "username='$APIGEE_USERNAME'&password='$APIGEE_PASSWORD'&grant_type=password" | jq -r .access_token > /tmp/access_token +curl --fail -H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" -H "Accept: application/json;charset=utf-8" -H "Authorization: Basic ZWRnZWNsaTplZGdlY2xpc2VjcmV0" -X POST https://login.apigee.com/oauth/token -d "username=$APIGEE_USERNAME&password=$APIGEE_PASSWORD&grant_type=password" | jq -r .access_token > /tmp/access_token APIGEE_ACCESS_TOKEN=$(cat /tmp/access_token) curl --fail -X PUT "https://apigee.com/dapi/api/organizations/emea-demo8/specs/doc/$APIGEE_SPEC_ID/content" -H "Authorization: Bearer $APIGEE_ACCESS_TOKEN" -H 'Content-Type: text/plain' --data '@dist/patient-demographics-service-api.json' curl --fail -X PUT "https://apigee.com/portals/api/sites/emea-demo8-nhsdportal/apidocs/$APIGEE_PORTAL_API_ID/snapshot" -H "Authorization: Bearer $APIGEE_ACCESS_TOKEN"