Get incident work notes from API

evyatar
Giga Contributor

Hi,

I want to get the incident work notes from api, I have been added some work notes as follow:

find_real_file.png

And trying to get the ticket from api (GET request to https://XXXX.service-now.com/api/now/table/incident/SYSID)

And the "work_note" is empty, so how can I got the work notes lists?

And how can I create from API work notes and related it to exist incident?

Thanks!

7 REPLIES 7

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

The task work_notes field is of type Journal Entry which means the actual values are not stored in the task table.   You won't be able to access them via the incident table API.   Instead you could create a scripted REST API and can call the API to get the journal entries:


http://wiki.servicenow.com/index.php?title=Using_Journal_Fields#Getting_the_Contents_of_a_Journal_Fi...


Hi, Thanks you.


Can I create work notes from API?


Absolutely as long as the user you are logging in via API has the ITIL role or one that grants write permission to the work_notes field.


Can you help me please how to create a new work note and relate it to exist incident?