How to add incident comments from different users via REST api

Halyna
Giga Contributor

Hi, all
I'm trying to add multiple comments one by one using Table API: 

/api/now/table/incident/{incident_id}

body: {"comments":"single comment"}

The problem is that all the comments are added for admin user. If there is a way to specify a user for incident comment?

Thank you, regards, Halyna

1 ACCEPTED SOLUTION

Sebastiaan de V
Kilo Guru

Comments are added as the user that connects via the REST API. I you use "admin" for each REST API call, it will always be "admin". If possible you should use the correct user. As an alternative, you can add the user to the comment text, but it will still show "admin" as the user who added the comment.

Since you are using the direct table API, there is no intermediate transformation step where you would be able to handle this.

View solution in original post

5 REPLIES 5

Thank you, Sebastiaan

Regards, Halyna