Integrations and APIs for Service

Get Involved. Join the Conversation.


    Sean O'Connor
    Assistance with Taleo Business Edition REST API - RESUME...
    Topic posted September 4, 2019 by Sean O'Connor, tagged REST 
    34 Views, 1 Comment
    Assistance with Taleo Business Edition REST API - RESUME Attachment
    Taleo Business Edition REST API - RESUME Attachment

    Hello Oracle User Community -


    Regarding the Taleo Business Edition REST API documented here:


    In particular, we're having issues using the RESUME Attachment end point.


    As outlined in the above documentation:


    Update a candidate resume

    POST /candidate/{id}/resume

    The update will replace the old attachment with the new attachment and description. Using “multipart/form-data” POST request.

    Optional request parameter: description If the request parameter description is not sent, the attachment entity description field will use the file name as the description.


    http method POST

    Header must include: {:file=>#,:multipart=true}

    For additional information about multipart/form-data, refer to mutilpart/form-data specification (

    Example header for posting a Word attachment or resume:

    {:file =>“/local/path/zip/resume.doc”, ‘rb’), :content_type => “application/msword”, :multipart => true}, {:cookies => {:authToken => “webapi26117672355175654454”}})


    We are having difficulty with the specification above for the headers. 


    Does anyone have a working client program that can be shared to assist us in determining the proper header configuration?  Doesn't matter what language or platform, we can decipher it from any example code.


    Here is an example of how we are currently constructing the client in Java.  This request is currently returning a 200 response (success) but the resume is not showing up on the candidate profile;  additionally, there is no additional json payload from the endpoint to help detail the call.  Thank you for any insights, sample code or ideas.


       public static void postResume(String authToken) throws IOException {

        // Connect to the web server endpoint

        URL serverUrl = new URL("<candidateid>/resume");

        HttpURLConnection urlConnection = (HttpURLConnection) serverUrl.openConnection();


        String boundaryString = "*****" + Long.toString(System.currentTimeMillis()) + "*****";

        String fileUrl = "C:/_resume/resumeTest.docx";

        File resume = new File(fileUrl);


        // Indicate that we want to write to the HTTP request body



        urlConnection.addRequestProperty("Content-Type", utf8("multipart/form-data; boundary=" + boundaryString));  

        urlConnection.addRequestProperty("File", utf8(fileUrl + ", content_type=application/msword, multipart=true"));

        urlConnection.addRequestProperty("Cookie", utf8(authToken));





        OutputStream outputStreamToRequestBody = urlConnection.getOutputStream();

        BufferedWriter httpRequestBodyWriter = new BufferedWriter(new OutputStreamWriter(outputStreamToRequestBody));


        httpRequestBodyWriter.write(utf8("\n\n--" + boundaryString + "\n"));


        // Write the actual file contents

        FileInputStream inputStreamToLogFile = new FileInputStream(resume);


        int bytesRead;

        byte[] dataBuffer = new byte[1024];

        while((bytesRead = != -1) {

            outputStreamToRequestBody.write(dataBuffer, 0, bytesRead);





        // Mark the end of the multipart http request

        httpRequestBodyWriter.write(utf8("\n--" + boundaryString + "--\n"));



        // Close the streams




        // Read response from web server, which will trigger the multipart HTTP request to be sent.


        BufferedReader httpResponseReader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));

        String lineRead;

        while((lineRead = httpResponseReader.readLine()) != null) {







    • Sean O'Connor

      Based on some research, it appears the request payload must be formatted in JSON.

      The Header section seems pretty straight forward and can be coded as:  

      String header = "{\"file\": \"" + fileUrl + "\", \"content_type\": \"application/msword\",  \"multipart\": \"true\", \"cookies\": {\"authToken\": \"" + authTokenValue + "\"}}";

      My question is how should the binary file attachment content be formatted in JSON?  Is there a "fileData" attribute that goes along in the header or seperately?