Skip to main content
Matrix42 Self-Service Help Center

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}/m24Services/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:

  • 401:  Expiration Date Reached;
  • 402: Solved;
  • 403: Workaround;
  • 404: Rejected;
  • 405: Not Reproductible;
  • 406: Duplicate;
  • 407: Other;
  • 408: Direclty Solved (default);
  • 409: Obsolete;
  • 410: RFC Created;
  • 411: Retracted;
  • 412: Aborted;
  • 413: Known Error.
integer Optional
ErrorType

specify an error type of the closed ticket.  Possible error type values and meaning:

  • 0: Unknown;
  • 1: User (default) ;
  • 2: Hardware;
  • 3: Software;
  • 4: Driver;
  • 5: Permissions.
integer Optional
RetireAnnouncement
  • true: terminates the displaying of the announcement that had been created due to the current ticket(s);
  • false: related to the ticket(s) announcements are displayed until their visibility period expires  (default).
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:

  • 0: Unknown (default)
  • 10: Available;
  • 20: Partially Available;
  • 30: Unavailable (Planned);
  • 40: Unavailable (Unplanned).
integer Optional
AssetsAvailability

specifies affected asset availability for the closed ticket. Possible reason values and meaning:

  • 0: Unknown (default)
  • 10: Available;
  • 20: Partially Available;
  • 30: Unavailable (Planned);
  • 40: Unavailable (Unplanned).
integer Optional
CategoryId
  • not specified: inherits  the current value from the Problem;
  • GUID of an incident category classification 

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
  • true: default value. Along with the currently closed ticket also closes related Incidents;
  • false: closes only specified tickets by their ID, relations stay intact.
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
  • Not specified:  inherits the current value  of the task;
  • True: send an email to the user(s) who were added to the task as related or attached users
  • False: disable email notification;
boolean Optional
SendMailToInitiator
  • Not specified:  inherits the current value  of the ticket;
  • True:  send an email to the user who is assigned as an initiator of the ticket(do not confuse with the ticket creator);
  • False: disable email notification;
boolean Optional
NotifyResponsible
  • Not specified:  inherits the current value  of the ticket;
  • True: send an email to the user who is set as Responsible for the ticket;
  • False: disable email notification;
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
  • Not specified:  inherits the current value  of the task;
  • True:  Inform responsible users of the related tickets about the closing of the current ticket. Related tasks and any other types of related activities are added via ticket "Topics" menu;
  • False: disable email notification.
boolean Optional

Sample Request

POST https://{server_name}/m24Services/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
  • Close operation failed as the ticket has already been closed;
  • Object reference not set to an instance of an object: specified Object ID was not found.
 

 

  • Was this article helpful?