AnsweredAssumed Answered

Accessing samanage using curl

Question asked by on Aug 17, 2017
Latest reply on Aug 17, 2017 by



I managed to get a TOKEN, list all incidents, create one, list details of said incident and even attach a file... but wait, to access the incident... I needed the incident ID; and to get that I needed to go to the web interface, which in a curl script isn't an option. So ... assuming I create an incident with ..


curl -H "X-Samanage-Authorization: Bearer TOKEN" -d '<incident><name>Incident Title</name><priority>High</priority><requester><email></email></requester><description>Incident description</description><category><name>Human Resources</name></category><due_at>Dec 11, 2017</due_at><assignee><email></email></assignee></incident>' -H 'Accept: application/vnd.samanage.v2.1+xml' -H 'Content-Type:text/xml' -X POST


How do I get the incident ID that this action assigned to this POST? using a command line, obviously not the web interface!