Close an Incident or a Service request
Details
Sets status "Close" for a single or many:
- Incidents;
- Service requests.
Enumerated instances are further referred to as "Ticket".
Request
URL
POST https://{server_name}/m42Services/api/ticket/close
Headers
For a list of available HTTP request headers see Web Services: REST API integration.
POST body
Element | Description | Type | Required |
---|---|---|---|
ObjectIds |
Array of GUIDs of the tickets to be closed. |
array of GUIDs | Required |
Comments | HTML formatted text for the task solution. | string | Required |
Reason |
specifies a reason for the closed ticket. Possible reason values and meaning:
|
integer | Optional |
ErrorType |
specify an error type of the closed ticket. Possible error type values and meaning:
|
integer | Optional |
RetireAnnouncement |
|
boolean | Optional |
AffectedAsset |
GUID of an actually affected asset or a physically available device currently represented in the system and added via Assets application. All available asset GUIDs can be retrieved by get a list of fragments method from SPSAssetClassBase fragment, ID element. |
GUID | Optional |
AffectedService |
GUID of an actually affected service currently available in the system, added via Service Catalog application and represented for the end-users of the Self Service Portal. All available service GUIDs can be retrieved by get a list of fragments method from SPSArticleClassBase fragment, ID element. |
GUID | Optional |
ServicesAvailability |
specifies affected service availability for the closed ticket. Possible reason values and meaning:
|
integer | Optional |
AssetsAvailability |
specifies affected asset availability for the closed ticket. Possible reason values and meaning:
|
integer | Optional |
CategoryId |
All available category GUIDs can be retrieved by get a list of fragments method from SPSScCategoryClassBase fragment, ID element. |
GUID | Optional |
KBArticle |
GUID identifier of the existing knowledge base article that should be related to the closed Problem. All available knowledge base article GUIDs can be retrieved by get a list of fragments method from SVMKBArticleClassBase fragment, ArticleID element. |
GUID | Optional |
CloseRelatedIncidents |
|
boolean | Optional |
CausedByTickets | specify GUIDs of the Problem(s), Task(s) or Change(s) that caused the current ticket to create a relation. | array of GUIDs | Optional |
Ticket-related user e-mail notification properties |
|||
SendMailToUsers |
|
boolean | Optional |
SendMailToInitiator |
|
boolean | Optional |
NotifyResponsible |
|
boolean | Optional |
InformFurtherUsers |
users that should be additionally notified of the closed ticket via email. Specify GUIDs of the users who are to receive a one-time email notification about the closed ticket(s). All available user GUIDs can be retrieved by get a list of fragments method from SPSUserClassBasefragment. |
array of GUIDs | Optional |
SendMailToRelatedResponsibleUsers |
|
boolean | Optional |
Sample Request
POST https://{server_name}/m42Services/api/ticket/close
Authorization: Bearer YWsamplezhZARaccessGDuctoken2sYW1
Content-Type: application/json;charset=UTF-8
{
"ObjectIds":[
"0dd1548e-bbec-c1b5-7d27-08d6a253fcc4"
],
"Comments":"<p>Solution text<p>",
"Reason":409,
"ErrorType":5,
"RetireAnnouncement": false,
"AffectedAsset":"0dd1548e-bbec-c1b5-7d27-08d6a253fcc4",
"AffectedService":"76c6451a-f527-c43b-ba5b-08d6a617ddd1",
"ServicesAvailability":20,
"AssetsAvailability":10,
"CategoryId":"D0F04F85-458F-40BD-AEB0-E97B08B933B5",
"KBArticle":"0dd1548e-bbec-c1b5-7d27-08d6a253fcc4",
"CloseRelatedIncidents": true,
"CausedByTickets": [
"26194236-6ade-c1f9-adbb-08d6a608d38d",
"091aafc2-e9ac-ce8f-ad44-08d6a2f5b11b"
],
"SendMailToUsers":true,
"SendMailToInitiator":true,
"NotifyResponsible":true,
"InformFurtherUsers":[
"938a1d78-bde2-4270-9892-402889a263f3"
],
"SendMailToRelatedResponsibleUsers":true
}
Response
The server does not return any response.
Status Codes and Errors
The following table lists the returned HTTP status codes.
Code | Message |
---|---|
204 No content | indicates that the server has successfully fulfilled the request and that there is no content to send in the response payload body. |
400 Bad Request | specifies missing required parameters and arguments of the body message. |
500 Internal server error |
|