Knowledge Management

Get Involved. Join the Conversation.

Topic

    Aditya varma
    How to add attachment to an Article using REST API?
    Topic posted October 21, 2019 by Aditya varmaRed Ribbon: 250+ Points, tagged Knowledge Foundation 
    30 Views, 2 Comments
    Title:
    How to add attachment to an Article using REST API?
    Summary:
    How to add attachment to an Article using REST API?
    Content:

    Hi,

     

    We are trying to attach a file using REST API to an Article but we are unable to. Could you please share your thoughts on How to add an attachment using REST API.

     

    URL:https://docs.oracle.com/en/cloud/saas/engagement/19c/faoka/op-km-api-v1-content-post.html

     

    We have tried using the payload which is present in the above link, but it didn't work. Please share your thoughts here.

     

    Thanks,

    Aditya varma

    Comment

     

    • Rasheed Ahamed

      You can convert the data into base64 and send in the request like this.

      {
      "answerType": {
          "id": 1
          },
      "language": {
          "id": 1
          },
      "solution": "The FishPhone is water resistant to 10 meters, or 33 feet.",
      "fileAttachments": [
          {
            "fileName": " SampleFileAttachment.txt ",
            "data": " c2FtcGxlIGNvbnRlbnQgZm9yIGZpbGUgYXR0YWNobWVudA=="
          }
        ],
      "summary": "How deep can I get my FishPhone?"
      }

       

       

    • Aditya varma

      Hi,

      We are actually looking the knowledge articles in the Oracle Engagment Cloud.

       

      Thanks,

      Aditya