API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  Sending PDF File through REST Request Node in ACE12

    Posted Mon October 06, 2025 07:02 AM

    Hi All

    I am trying to send a pdf file through REST Request however the file sent to the destination is broken and invalid. I have the below header values and esql code for MIME. Can some one please let me know what is missing?

    SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/pdf';
    SET OutputRoot.Properties.ContentType = 'multipart/form-data; boundary=' || myBoundary; (myBoundary is UUID value)
    SET OutputRoot.HTTPRequestHeader."Content-Disposition" = 'attachment; filename=' || InputRoot.MQRFH2.usr.fromFile;



    CREATE FIELD OutputRoot.MIME TYPE Name;
    DECLARE M REFERENCE TO OutputRoot.MIME;
    CREATE LASTCHILD OF M TYPE Name NAME 'Parts';
    CREATE LASTCHILD OF M.Parts TYPE Name NAME 'Part';
    DECLARE P1 REFERENCE TO M.Parts.Part[1];
    CREATE FIELD P1."Content-Disposition" TYPE NameValue VALUE 'form-data; name="attachment"; filename=' || InputRoot.MQRFH2.usr.fromFile;
    CREATE FIELD P1."Content-Type" TYPE NameValue VALUE 'application/pdf';
    CREATE FIELD P1."Content-Id"   TYPE NameValue VALUE 'p1';
    CREATE LASTCHILD OF P1 TYPE Name NAME 'Data';
    CREATE LASTCHILD OF P1.Data DOMAIN('BLOB') VALUE InputRoot.BLOB.BLOB;

    The swagger file has below for the request body

    "requestBody": {
              "content": {
                "application/pdf": {
                  "schema": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }


    ------------------------------
    Naveena Velusamy
    ------------------------------


  • 2.  RE: Sending PDF File through REST Request Node in ACE12

    Posted Tue October 07, 2025 01:51 AM

    I think you might have more luck asking ACE questions in the AppConnect community rather than the APIConnect one? :-)



    ------------------------------
    Chris Dudley
    ------------------------------



  • 3.  RE: Sending PDF File through REST Request Node in ACE12

    Posted Thu October 23, 2025 04:35 AM

    Hi Naveena, I have to side with Chris

    Please repost this in the ACE community: https://community.ibm.com/community/user/groups/community-home/digestviewer?communitykey=77544459-9fda-40da-ae0b-fc8c76f0ce18

    That beeing said, I have setup mime emails with attachments by ussing multipart messages. But let's continue this in the proper community



    ------------------------------
    Regards
    Matthias Blomme
    Integration Specialist
    Integration Designers
    Turnhout
    ------------------------------