Skip to main content
Matrix42 Self-Service Help Center

Close a Problem

Details

Closes a Problem or a list of specified Problems by setting their status to "Close". 

Request

URL 

POST https://{server_name}/m42Services/api/problem/close

Headers 

For a list of available HTTP request headers see Web Services: REST API integration.

POST body

Element Description Type Required
Problem related elements
ObjectIds

Array of GUIDs of the Problems to be closed.

Array of GUIDs Required
Comments HTML formatted text for the Problem solution. string Required
RetireAnnouncement
  • true: terminates the displaying of the announcement that had been created due to the current problem(s);
  • false: related to the problem(s) announcements are displayed until their visibility period expires (default).
boolean Optional
Reason

specifies a reason for the closed Problem. 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 Problem.  Possible error type values and meaning:

  • 0: Unknown;
  • 1: User (default) ;
  • 2: Hardware;
  • 3: Software;
  • 4: Driver;
  • 5: Permissions.
integer Optional
ServicesAvailability

specifies affected service availability for the closed Problem. 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 Problem. 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 a problem 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
Problem-related user e-mail notification properties
SendMailToUsers
  • Not specified:  inherits the current value  of the Problem;
  • True: send an email to the user(s) who were added to the Problem as related or attached users;
  • False: disable email notification;
boolean Optional
SendMailToInitiator
  • Not specified:  inherits the current value  of the Problem;
  • True:  send an email to the user who is assigned as an initiator of the Problem (do not confuse with the Problem creator);
  • False: disable email notification;
boolean Optional
NotifyResponsible
  • Not specified:  inherits the current value  of the Problem;
  • True: send an email to the user who is set as Responsible for the Problem;
  • False: disable email notification;
boolean Optional
InformFurtherUsers

users that should be additionally notified of the closed Problem via email.

Specify GUIDs of the users who are to receive a one-time email notification about the closed Problem(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 Problem;
  • True:  Inform responsible users of the related tickets about the closing of the current Problem. Related tasks and any other types of related activities are added via ticket "Tickets" menu;
  • False: disable email notification.
boolean Optional
Related Incidents properties
CloseRelatedIncidents
  • true: close related Incidents when closing the Problem-related Incident.

The rest of the enumerated Incident related properties are applied only when CloseRelatedIncidents=true.

  • false: do not change the status of other Incident-related Incidents (default).
boolean Optional
IncidentsCategory
  • not specified: inherits  the current value from the Incident;
  • 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
IncidentsClosingReason

specifies a reason for the related closed Incident. 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
IncidentsErrorType

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

  • 0: Unknown;
  • 1: User (default) ;
  • 2: Hardware;
  • 3: Software;
  • 4: Driver;
  • 5: Permissions.
integer Optional
IncidentsAffectedAsset

GUID of an actually affected by the Incident 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
IncidentsAffectedService

GUID of an actually affected by the Incident 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
IncidentsAssetsAvailability

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

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

IncidentsServicesAvailability

specifies affected service availability for the closed Incident. Possible reason values and meaning:

  • 0: Unknown (default);
  • 10: Available;
  • 20: Partially Available;
  • 30: Unavailable (Planned);
  • 40: Unavailable (Unplanned).
integer Optional
IncidentsCausedByTickets specify GUIDs of the Problem(s), Task(s) or Change(s) that caused the current Incident. array of GUIDs Optional
SendMailToIncidentsUsers
  • Not specified:  inherits the current value  of the Incident;
  • True: send an email to the user(s) who were added to the Incident as related or attached users;
  • False: disable email notification;
boolean Optional

Sample Request 

POST https://{server_name}/m42Services/api/problem/close

Authorization: Bearer YWsamplezhZARaccessGDuctoken2sYW1

Content-Type: application/json;charset=UTF-8

{  
   "ObjectIds":[  
      "0dd1548e-bbec-c1b5-7d27-08d6a253fcc4",
      "be1410b9-f190-c582-1045-08d6b11ef5b2"
   ],
   "Comments": "<p>Problem solution text<p>",
   "RetireAnnouncement": true,
   "Reason": 402,
   "ErrorType": 2,
   "ServicesAvailability": 10,
   "AssetsAvailability": 20,
   "CategoryId": "85-458F-40BD-AEB0-E97B08B933B5",
   "KBArticle": "0dd1548e-bbec-c1b5-7d27-08d6a253fcc4",
   "SendMailToUsers": true,
   "SendMailToInitiator": true,
   "NotifyResponsible": true,
   "InformFurtherUsers": [ "938a1d78-bde2-4270-9892-402889a263f4" ],
   "SendMailToRelatedResponsibleUsers": true,
   "CloseRelatedIncidents": true,
   "IncidentsCategory": "e348aad8-ccf3-4242-aa98-3c57459af0fc",
   "IncidentsClosingReason": 403,
   "IncidentsErrorType": 3,
   "IncidentsAffectedAsset": "cf4c201e-ce44-48a2-a7fc-e69a524ba632",
   "IncidentsAffectedService": "226fb06f-9594-46f3-b77f-2d53824f2dde",
   "IncidentsAssetsAvailability": 10,
   "IncidentsServicesAvailability": 10,
   "IncidentsCausedByTickets": [
     "164df040-a9ef-4faf-87c0-c5847f32c2e8",
     "26929929-5786-4e12-bbfa-f8872246e90c"
    ],
   "SendMailToIncidentsUsers": true
  }

Response 

The server does not return any response.

Status codes and errors 

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 problem has already been closed;
  • Object reference not set to an instance of an object: specified Object ID was not found.
 
 
  • Was this article helpful?