1 Reply Latest reply on Jan 20, 2020 9:45 PM by Sorabh Agarwal

    Service Connector Question

    Ilya Soyfer New Member

      Hello,

       

      I am trying to create a CAI Service Connector to a third party RESTful API.

       

      In essence, this would be a Post operation which uploads an object to a destination. The object that needs to be sent in the body would be a deeply nested JSON. I initially began attempting to create a SWAGGER file definition. Is this the correct approach?

       

      I soon began to realize another dilemma. This API call requires a Bearer accessToken to be provided, and since the token expires, it means we have to get a new token each time before the call. The way we are able to do this in Python, is we first make an API call to get the token, and then we pass the temporary token along, when making the POST "object" api call.

       

      How can I replicate this functionality in CAI?

       

      Thank you,

      Ilya

        • 1. Re: Service Connector Question
          Sorabh Agarwal Support Moderators

          Hi Ilya,

          You will need to use the process to perform orchestration and passing the temporary token alongwith to make object API call.

           

          Here is what you should do.

           

          1. Create a Service Connectors which provides 2 operations. and publish.

          • Getting the bearer token
          • Calling object API

          2. Create an App Connection for this Service Connector and publish

          3. Create a Process that uses this connection. First gets the bearer token (using Service step to bearer token operation) and then use it to make call to object API (using Service Step to object API operation)

           

          Thanks,

          Sorabh Agarwal

          Informatica Cloud Product Management