Close a Change Request
Closes a Change Request or a list of specified Change Requests by setting their status to "Close"
Table of Contents
Details
Closes a Change Request or a list of specified Change Requests by setting their status to "Close".
Request
URL
POST https://{server_name}/m42Services/api/change/close
Headers
For a list of available HTTP request headers see Web Services: REST API integration.
POST body
| Element | Description | Type | Required |
|---|---|---|---|
| Change request related elements | |||
| ObjectIds | Array of GUIDs of the Change Request(s) to be closed. | Array of GUIDs | Required |
| Comments | HTML formatted text for the Change Request solution. | string | Required |
| Reason |
specifies a reason for the closed Change Request. Possible reason values and meaning:
|
integer | Optional |
| RetireAnnouncement |
|
boolean | Optional |
| ServicesAvailability |
specifies affected service availability for the closed Change Request. Possible reason values and meaning:
|
integer | Optional |
| AssetsAvailability |
specifies affected asset availability for the closed Change Request. 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 Change Request. All available knowledge base article GUIDs can be retrieved by get a list of fragments method from SVMKBArticleClassBase fragment, ArticleID element. |
GUID | Optional |
| Change Request-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 Change Request via email. Specify GUIDs of the users who are to receive a one-time email notification about the closed Change Request(s). All available user GUIDs can be retrieved by get a list of fragments method from SPSUserClassBasefragment. |
array of GUIDs | Optional |
| SendMailToRelatedResponsibleUsers |
|
boolean | Optional |
| Related Tasks and Approvals properties | |||
| ApprovalsClosingReason |
specifies a reason for closing the related to the Change Request Approval. Possible reason values and meaning:
|
integer | Optional |
| TasksClosingReason |
specifies a reason for closing the related to the Change Request Task. Possible reason values and meaning:
|
integer | Optional |
| InformApprovalsDecisionMakers |
|
boolean | Optional |
| InformTasksResponsibles |
|
boolean | Optional |
| Related Problems properties | |||
| CloseRelatedProblems |
The rest of the enumerated Problem-related properties are applied only when CloseRelatedProblems=true. |
boolean | Optional |
| ProblemsCategory |
All available category GUIDs can be retrieved by get a list of fragments method from SPSScCategoryClassBase fragment, ID element. |
GUID | Optional |
| ProblemsClosingReason |
specifies a reason for the closed Problem. Possible reason values and meaning:
|
integer | Optional |
| ProblemsErrorType |
specify an error type of the closed Problem. Possible error type values and meaning:
|
integer | Optional |
| ProblemsAssetsAvailability |
specifies affected asset availability for the closed Problem. Possible reason values and meaning:
|
integer | Optional |
| ProblemsServicesAvailability |
specifies affected service availability for the closed Incident. Possible reason values and meaning:
|
integer | Optional |
| SendMailToProblemsUsers |
|
boolean | Optional |
| Related Incidents properties | |||
| CloseRelatedIncidents |
The rest of the enumerated Incident-related properties are applied only when CloseRelatedIncident=true |
boolean | Optional |
| IncidentsCategory |
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:
|
integer | Optional |
| IncidentsErrorType |
specify an error type of the related closed Incident. Possible error type values and meaning:
|
integer | Optional |
| IncidentsAssetsAvailability |
specifies affected asset availability for the closed Incident. Possible reason values and meaning:
|
integer | Optional |
| IncidentsServicesAvailability |
specifies affected service availability for the closed Incident. Possible reason values and meaning:
|
integer | Optional |
| SendMailToIncidentsUsers |
|
boolean | Optional |
Sample Request
POST https://{server_domain}/m42Services/api/change/close
Authorization: Bearer YWsamplezhZARaccessGDuctoken2sYW1
Content-Type: application/json;charset=UTF-8
{
"ObjectIds":[
"0dd1548e-bbec-c1b5-7d27-08d6a253fcc4"
],
"Comments": "<p>Change Request solution text<p>",
"Reason": 402,
"RetireAnnouncement": false,
"ServicesAvailability": 10,
"AssetsAvailability": 20,
"CategoryId": "85-458F-40BD-AEB0-E97B08B933B5",
"KBArticle": "0dd1548e-bbec-c1b5-7d27-08d6a253fcc4",
"SendMailToUsers": true,
"SendMailToInitiator": false,
"NotifyResponsible": true,
"InformFurtherUsers": [
"938a1d78-bde2-4270-9892-402889a263f4",
"1fef1b0e-4296-4e43-b403-4d2e2c5fab7a"
],
"SendMailToRelatedResponsibleUsers": true,
"ApprovalsClosingReason": 10000,
"TaskClosingReason": 10011,
"InformApprovalsDecisionMakers": true,
"InformTaskResponsibles": false,
"CloseRelatedProblems": true,
"ProblemsCategory": "d06df4fa-5f1d-4e7a-96dc-6f0354e4004b",
"ProblemsClosingReason": 402,
"ProblemsErrorType": 3,
"ProblemsAssetsAvailability": 10,
"ProblemsServicesAvailability": 20,
"SendMailToProblemsUsers": false,
"CloseRelatedIncidents": true,
"IncidentsCategory": "223ba512-90a8-48ae-83ce-dca2183dbaf7",
"IncidentsClosingReason": 406,
"IncidentsErrorType": 5,
"IncidentsAssetsAvailability": 10,
"IncidentsServicesAvailability": 10,
"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 isno 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 |
|