JSON Request to update incident

Hi Gents,

I need to know the request body which I can use to update incident using REST

Below one is the SOAP which being used for the same

<soapenv:Envelope xmlns:soapenv="">schemas.xmlsoap.org/.../" xmlns:ns="">http://schemas.hp.com/SM/7" xmlns:com="">schemas.hp.com/.../Common" xmlns:xmime="">www.w3.org/.../xmlmime">
<soapenv:Header/>
<soapenv:Body>
<ns:UpdateIncidentAUTINRequest attachmentInfo="" attachmentData="" ignoreEmptyElements="true" updateconstraint="-1">
<ns:model query="">
<ns:keys query="" updatecounter="">
<ns:IncidentID type="String" mandatory="" readonly="">IM4357394</ns:IncidentID>
</ns:keys>
<ns:instance query="" uniquequery="" recordid="" updatecounter="">
<ns:IncidentID type="String" mandatory="" readonly=""></ns:IncidentID>
<ns:ClosureCode type="String" mandatory="" readonly="">Resolved Successfully</ns:ClosureCode>
<ns:Solution type="Array">
<ns:Solution type="String" mandatory="" readonly="">This is solution line 1</ns:Solution>
<ns:Solution type="String" mandatory="" readonly="">This is solution line 2</ns:Solution>
</ns:Solution>
<ns:Update type="Array">
<ns:Update type="String" mandatory="" readonly=""></ns:Update>
</ns:Update>
<ns:AUTINIncidentID type="String" mandatory="" readonly=""></ns:AUTINIncidentID>
<ns:Status type="String" mandatory="" readonly=""></ns:Status>
<ns:ExpectedResolutionTime type="DateTime" mandatory="" readonly=""></ns:ExpectedResolutionTime>
<ns:attachments>
<com:attachment xmime:contentType="application/" href="" contentId="" action="" name="" type="" len="" charset="" upload.by="" upload.date="" attachmentType="">cid:1702968749506</com:attachment>
</ns:attachments>
</ns:instance>
<ns:messages>
<com:message type="String" mandatory="" readonly="" severity="" module=""></com:message>
</ns:messages>
</ns:model>
</ns:UpdateIncidentAUTINRequest>
</soapenv:Body>
</soapenv:Envelope>

Please your support

  • 0

    Dears, what I need is just to know what is the JSON request which I can use to update an incident and submit the ClosureCode and the Solution

    When I use SOAP I can do this like below

    But right now in this integration I can't use SOAP, so I need to know how to achieve the same using REST

  • Verified Answer

    +1 in reply to 

    Hi Mohammed Abdullah,

    in my SM9.80 I do not have a closure code field in probsummary. But you might try this JSON Body format : 

    POST http://<ip>:<service port>/SM/9/rest/incidents/<IMnumber>/action/update

    for example

    POST 111.22.33.44:13080/.../update 

    Body:

    {
    "Incident": {
    "resolution": [
    "This is solution line 1",
    "This is solution line 2"
    ],
    "ClosureCode": "Resolved Successfully"
    }
    }

    Best regards,

    Heike

    Heike Ulshoefer
    Lead Premium Support Engineer
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • Suggested Answer

    0 in reply to 

    Hi Heike Ulshoefer,

    Thank you very much for your reply, I have tried it and it is working 

    Regards…

    Mohammed

  • 0 in reply to 

    Hi Mohammed,

    sounds good. 

    Could you please click on "More" - "Verify Answer" to mark my answer with the POST as verified answer ? 

    On top right of this discussion forum there is the information:

    If an answer to your question is correct, click on "Verify Answer" under the "More" button. The answer will now appear with a checkmark. Please be sure to always mark answers that resolve your issue as verified. Your fellow Community members will appreciate it! 

    Best regards,

    Heike

    Heike Ulshoefer
    Lead Premium Support Engineer
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button