From 6df5bed654f9838cbbdfa6596ccec1ad7d597c96 Mon Sep 17 00:00:00 2001 From: Laurence Smith Date: Mon, 24 Feb 2020 14:41:53 +0000 Subject: [PATCH] APM-348 Fix auth call --- scripts/deploy_spec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"