Skip to content

Commit

Permalink
APM-348 Fix auth call
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurence Smith committed Feb 24, 2020
1 parent b98b0ff commit 6df5bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/deploy_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6df5bed

Please sign in to comment.