URL

POST https://{api-url}/api/v2/tenants/{tenantId}/changeRequests/{changeRequestId}/close

Sample URLs

https://{api-url}/api/v2/tenants/client_8/changeRequests/CHG0000000222/close

Parameters

FieldData TypeDescription
reasonStringReason for closing the change request. This is mandatory only if the option Enable reasons to change status Close is enabled for change request in service desk settings (example steps below).
notesStringAdditional information to add to a change request.

Follow the steps before closing a change request:

Step 1: Check the status flow transition for Closed.

  1. Login to OpsRamp.
  2. Click Setup.
  3. On the left-hand side panel, click Service Desk.
  4. In Configuration, click Status Flows.
  5. Check the status flow for the entity Change Request.
  6. Check the transition of the status Closed. If Closed is available this indicates the change request can be closed; otherwise, the change request cannot be closed.

Step 2: Provide the reason for changing the status.

  1. Click Setup.
  2. On the left-hand side panel, click Service Desk.
  3. In Configuration, click Status Change Reasons and then click Add.
  4. Select the scope, client, request type and entity status as Closed, provide the reason and then click Submit.

Step 3: Enable the option to provide reason for closing a change request.

This is normally an optional step. However, this step is required to provide a reason for closing the change request.

  1. Click Setup.
  2. On the left-hand side panel, click Service Desk.
  3. In Configuration, click Settings.
  4. Select client and then click Customize.
  5. In Incident Request section, select option Enable reasons to change status Close and then click Save.

Status code

200 OK

Sample request

{
	"reason": "Request is implemented",
	"notes": "Demo note on change request"
}

Sample response

{
	"id": "CHG0000000222",
	"subject": "Increase bandwidth of internet",
	"description": "Internet very slow in SJ office, and servers not accessible",
	"status": "Closed",
	"oldStatus": "Open",
	"priority": "High",
	"oldPriority": "Normal",
	"notes": "Demo note on change request",
	"closedSummary": "closed summary",
	"requester": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "sample@opsramp.com"
	},
	"assignedUser": {
		"id": "USR0000000013",
		"loginName": "brocadePAdmin@opsramp.com",
		"lastName": "Inc PAdmin",
		"firstName": "Brocade",
		"email": "sample@opsramp.com",
		"phoneNumber": "8096250653"
	},
	"assigneeGroup": {
		"id": 5,
		"name": "Brocade Inc Users",
		"description": "Brocade Partner Users"
	},
	"resources": [{
			"id": "ad0a218d-7512-435c-9b58-614470ee8658",
			"name": "WORK-PC",
			"type": "DEVICE"
		},
		{
			"id": "SGP-c2af3866-fc89-47dd-b83f-bcc8df0b2a0a",
			"name": "VTH Services",
			"type": "SERVICE"
		},
		{
			"id": "DGP-420a80f4-5fba-46d5-a1c1-20e2df4a326a",
			"name": "HYD",
			"type": "DEVICE_GROUP"
		}
	],
	"customFields": [{
			"id": "UDF0000003808",
			"classCode": "CHANGE",
			"displayLabel": "text field",
			"name": "text_field_3808",
			"fieldType": "TYPE_TEXT",
			"mandatory": false,
			"editable": true,
			"description": "all partners",
			"defaultValue": ""
		},
		{
			"id": "UDF0000003809",
			"classCode": "CHANGE",
			"displayLabel": "drop down",
			"name": "drop_down_3809",
			"fieldType": "TYPE_DROPDOWN",
			"mandatory": false,
			"editable": true,
			"description": "testing all partners",
			"options": [{
					"label": "one",
					"value": "1"
				},
				{
					"label": "two",
					"value": "2"
				}
			],
			"defaultValue": ""
		},
		{
			"id": "UDF0000003810",
			"classCode": "CHANGE",
			"displayLabel": "numeric",
			"name": "numeric_3810",
			"fieldType": "TYPE_NUMBER",
			"mandatory": false,
			"editable": true,
			"description": "testing numeric",
			"defaultValue": ""
		},
		{
			"id": "UDF0000003790",
			"classCode": "CHANGE",
			"displayLabel": "drop-down-api-lab",
			"name": "drop_down_api_lab_3790",
			"fieldType": "TYPE_DROPDOWN",
			"mandatory": false,
			"editable": true,
			"description": "Test case",
			"options": [{
					"label": "first",
					"value": "1"
				},
				{
					"label": "second",
					"value": "2"
				}
			],
			"value": "1",
			"defaultValue": "",
			"selectedOption": {
				"label": "first",
				"value": "1"
			}
		},
		{
			"id": "UDF0000003791",
			"classCode": "CHANGE",
			"displayLabel": "text-api-lab",
			"name": "text_api_lab_3791",
			"fieldType": "TYPE_TEXT",
			"mandatory": false,
			"editable": true,
			"description": "test case for text field",
			"value": "request custom field - text-updated",
			"defaultValue": "Test Text"
		},
		{
			"id": "UDF0000003792",
			"classCode": "CHANGE",
			"displayLabel": "multi line text-api-lab",
			"name": "multi_line_text_api_lab_3792",
			"fieldType": "TYPE_TEXTAREA",
			"mandatory": false,
			"editable": true,
			"description": "test case for multi line text",
			"defaultValue": "multi \nline \ntext"
		},
		{
			"id": "UDF0000003793",
			"classCode": "CHANGE",
			"displayLabel": "Numeric-api-lab",
			"name": "numeric_api_lab_3793",
			"fieldType": "TYPE_NUMBER",
			"mandatory": false,
			"editable": true,
			"description": "numeric test case",
			"defaultValue": "1"
		},
		{
			"id": "UDF0000003794",
			"classCode": "CHANGE",
			"displayLabel": "checkbox-api-lab",
			"name": "checkbox_api_lab_3794",
			"fieldType": "TYPE_CHECKBOX",
			"mandatory": false,
			"editable": true,
			"description": "test case for check box",
			"options": [{
				"label": "yes",
				"value": "1"
			}],
			"defaultValue": "0"
		},
		{
			"id": "UDF0000003795",
			"classCode": "CHANGE",
			"displayLabel": "Date-ap-lab",
			"name": "date_ap_lab_3795",
			"fieldType": "TYPE_DATE",
			"mandatory": false,
			"editable": true,
			"description": "test case for date field",
			"defaultValue": "2016-02-26T12:13:00+0000"
		},
		{
			"id": "UDF0000003796",
			"classCode": "CHANGE",
			"displayLabel": "dateTime-api-lab",
			"name": "datetime_api_lab_3796",
			"fieldType": "TYPE_DATETIME",
			"mandatory": false,
			"editable": true,
			"description": "test case for Date and time",
			"defaultValue": "2016-02-26T12:13:00+0000"
		}
	],
	"cc": "sample@opsramp.com",
	"ticketArisedTime": "",
	"createdUser": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "sample@opsramp.com"
	},
	"reason": "CR Close",
	"category": {
		"id": 6,
		"name": "Request Level"
	},
	"alertIds": [],
	"reOpenCount": 0,
	"createdDate": "2016-07-26T20:13:45+0530",
	"suspendEndDate": "2016-08-23T03:57:00+0530",
	"allowedStatus": [],
	"client": {
		"id": 8,
		"uniqueId": "client_8",
		"name": "Brocade Lab",
		"activated": true
	},
	"subCategory": {
		"id": 8,
		"name": "Low"
	},
	"updatedDate": "2016-11-25T09:48:42+0530",
	"priorityUpdatedBy": {
		"loginName": "john.smith",
		"lastName": "smith",
		"firstName": "john",
		"email": "sample@opsramp.com",
		"phoneNumber": "9985597783"
	},
	"priorityUpdatedDate": "2016-08-12T06:56:51+0530",
	"statusUpdatedBy": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "sample@opsramp.com"
	},
	"statusUpdatedDate": "2016-11-25T09:48:42+0530",
	"resolvedDate": "2016-08-12T06:57:46+0530",
	"closedDate": "2016-11-25T09:48:42+0530",
	"slaDetails": {
		"resolutionTime": 1440930,
		"responseTime": 1440840,
		"responseBreach": false,
		"resolutionBreach": false,
		"responseBreachDate": "",
		"resolutionBreachDate": ""
	},
	"source": "INTEGRATION",
	"statusFlow": [{
			"status": "New",
			"timeSpent": 1440729,
			"createdDate": "2016-07-26T20:13:45+0530",
			"updatedBy": {
				"loginName": "ops_admin_user",
				"lastName": " ",
				"firstName": "Ops Admin",
				"email": "sample@opsramp.com"
			}
		},
		{
			"status": "Open",
			"timeSpent": 96,
			"reason": "CR Open",
			"createdDate": "2016-08-12T12:25:54+0530",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Pending",
			"timeSpent": 5,
			"reason": "CR Pending",
			"createdDate": "2016-08-12T12:27:30+0530",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Open",
			"timeSpent": 11,
			"reason": "CR Open",
			"createdDate": "2016-08-12T12:27:35+0530",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Resolved",
			"timeSpent": 12,
			"reason": "CR Resolved",
			"createdDate": "2016-08-12T12:27:46+0530",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "On Hold",
			"timeSpent": 9062350,
			"reason": "CR Onhold",
			"createdDate": "2016-08-12T12:27:58+0530",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Open",
			"timeSpent": 94,
			"reason": "CR Open",
			"notes": "Resolved",
			"createdDate": "2016-11-25T09:47:08+0530",
			"updatedBy": {
				"id": "USR0000000018",
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SP",
				"email": "sample@opsramp.com"
			}
		},
		{
			"status": "Closed",
			"reason": "Request is implemented",
			"notes": "Demo note on change request",
			"createdDate": "2016-11-25T09:48:42+0530",
			"updatedBy": {
				"loginName": "ops_admin_user",
				"lastName": " ",
				"firstName": "Ops Admin",
				"email": "sample@opsramp.com"
			}
		}
	]
}