This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How to specify commenter when adding a comment to an incident?

Hi all, I have been trying to figure out how to add a comment (which I can do) to an incident with specifying the commenter, using the API. Whenever I add a comment to an incident, it defaults to my own system account in solar winds service desk.

On my own research, I saw this thread: https://thwack.solarwinds.com/product-forums/solarwinds-service-desk-swsd/f/forum/89784/add-comment-to-incident-via-api-in-powershell-getting-400-error. I thought this to be the solution but that did not seem to work.

I saw the documentation for this field user_id but using that field throws an error. 

Any idea? 

Parents
  • Hi , I can confirm the "user_id" field does work. However it only works for users, not groups or queues. This makes since because Groups/Queues can't comment through the Web GUI.

    I was able to successfully send a json payload like this:

    {
    	"comment": {
    		"body": "Test from API: Should say from user@example.com",
    		"is_private": false,
    		"user_id": 12345
    	}
    }

    Note: The user_id value is accepted as an Integer or a String.

    This also works, although it's been removed from the documentation so I wouldn't expect it to continue to be supported:

    {
    	"comment": {
    		"body": "Test from API: Should say from user@example.com",
    		"commenter": "user@example.com",
    		"is_private": false
    	}
    }

    If that isn't working for you for some reason, let me know. If you share the payload you're sending, I'd be happy to take a look.

  • I got it working. I had a lingering comma at the end. I removed that and it started to work. Thank you!

    {
        "comment": {
            "body": "Failed to register event, incident ID#: 93779332. Exception: 111.", 
            "is_private": false,
            "commenter": "test@domain.com", 
        }
    }

Reply
  • I got it working. I had a lingering comma at the end. I removed that and it started to work. Thank you!

    {
        "comment": {
            "body": "Failed to register event, incident ID#: 93779332. Exception: 111.", 
            "is_private": false,
            "commenter": "test@domain.com", 
        }
    }

Children
No Data