Best practice for uploading HTML + Images to Knowledge Article using REST API?

EdLtu5
Tera Contributor

Hi all,

 

Looking for best advice!

 

Example:

I have directory that contains 1 HTML file - a.html and 2 image files - button1.png, button2.png;

a.html - contains text and pointers to image files (button1.png, button2.png) in between text body;

 

Task:

I need to upload HTML with images as Knowledge Article via REST API. So that Knowledge Article would represent HTML file same as I view it on my local dir via browser.

 

Problems/Obstacles:

Using REST API Explorer I can create Knowledge Article in my Knowledge Base. I can send text, but images in the text are still a big mystery for me.

 

Anybody knows best practice to achieve this?

 

My current thinking (probably wrong):

1. I think I need to upload images first to ServiceNow (don't know how);

2. In HTML file tweak image pointers in my local dir to use new image paths in ServiceNow?

3. Push via API that tweaked HTML so then images will be represented from SN source?

 

Any type of useful tips will be appreciated!!

 

 

 

 

0 REPLIES 0