Get Involved. Join the Conversation.


    Gabriel G Huo
    Is integration able to read a picture provided with URL and...
    Topic posted October 18, 2019 by Gabriel G HuoBronze Medal: 1,250+ Points, tagged Integration, PaaS, REST, SOAP, Web Services 
    65 Views, 8 Comments
    Is integration able to read a picture provided with URL and consume it as BASE64?

    We have a source system which offers a REST service, returning some picture as URL, we want integration to read the picture and upload the picture into ERP Cloud. Is that viable?






    • Hemanth Lakkaraju

      Do you mean the rest service response is just a URL (as text) and you need to make a call to the URL to download the picture?

      • Gabriel G Huo

        I am calling the REST service, it returns some information, along with an attachment(as url), i need to map the information as well as downloading the attachment and send it to ERP Cloud attachment. 

        The rest response is something like below.


        "number": "PO-17-1990-00001",
          "origin_code": "OC-abc123",
          "origin_data": "OD-2398273424",
          "origin_id": 459247544,
          "payment_terms": "Net 30",
          "payments_issued": [
              "id": 1551516,
              "amount": "1000000.0",
              "check_number": "ABC93759372",
              "created_at": "2015-07-14T22:03:27Z",
              "date": "2015-07-15",
              "draw_request_number": 5,
              "invoice_number": "Invoice 123",
              "notes": "January Payment",
              "payment_number": 5,
              "attachments": [
                  "id": 5324,
                  "url": "",
                  "filename": "january_receipt_copy.jpg"
              "origin_id": "abc-123",
              "origin_data": "XYZ-0012"




        • Hemanth Lakkaraju

          Take a look at this.

          • Gabriel G Huo

            Don't quite get this..without download and reading files, how are we mapping the url file as reference and pass to downstream operations that uses file reference?

            • Hemanth Lakkaraju

              Let's say you create a REST connection with base URL - and then make a REST call to you get a json response as below


              The next step is to

              If the baseURL is same in original rest endpoint URL and imageURL

              Option#1 - create another invoke with resourceURI as templateParam {imagePath} and map the substring extract from imageURL element above and then create response as raw format to get the content into ICS.

              If the baseURL is different for original rest endpoint URL and imageURL

              Option#2 - create another invoke same as above rest call but with response as raw format and during mapping Override the endpointURI from imageURL in above response.

        • Kanchankumar Khedkar

          Can you please check if you can invoke the url mentioned in attachments from POSTMAN or SOAPUI as REST Service. Some of these URLs are actually a rest services endpoints which you can just pass some parameters and download it. In case you are able to invoke the endpoint from POSTMAN / SOAPUI. You can create an REST connection to this service. The output can be taken as attachment and you can pass the file reference in you next service to upload it in another service. 

          • Gabriel G Huo

            If i put the the url in IE, it will actually show the PDF, it's something just like below


            Even suppose that can be created as a REST connection, i am not following how we can do that from integration development perspective, because it's transactional data, say Invoice, we can't create a connection every time the integration fetched one Invoice, or you are saying we there is a way to maintain a dummy service and update it's url every time?

            • Pradosh Prusty

              How are the links generated ? For a GET service , if the BASE URL is :  and next is the query path , then your query path ({filename} is dynamic and you can pass it in REST adapter .

              Example :{filename}.

              Filename , you can get it for each invoice and then pass it to the REST adapter .

              Let me know if you still have any question .