Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

SC-googleapis - how to Service callout to googleapis

Hi,

I would like to create a working service callout to the service below - the URL is correct.

I fail with the following error message:

 

 

{
    "fault": {
        "faultstring": "Execution of ServiceCallout SC-googleapis failed. Reason: ResponseCode 401 is treated as error",
        "detail": {
            "errorcode": "steps.servicecallout.ExecutionFailed"
        }
    }
}

 

 

 

 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout continueOnError="false" enabled="true" name="SC-googleapis">
  <DisplayName>SC-googleapis</DisplayName>
  <Properties/>
  <Request clearPayload="true" variable="myRequest">
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <Set>
      <Verb>GET</Verb>
      <Headers>
        <Header name="Accept">application/json</Header>
      </Headers>
    </Set>
  </Request>
  <Response>calloutResponse</Response>
  <HTTPTargetConnection>
    <Properties/>
    <URL>https://apigee.googleapis.com/v1/organizations/{organization.name}/environments/{environment.name}/deployments</URL>
  </HTTPTargetConnection>
</ServiceCallout>

 

 

I'm new to apigee and would need very detailed help 🙂 

Can someone explain to me how to achieve this ?

Thank you

0 2 129
2 REPLIES 2