Close incident

This endpoint is used to close an incident.

Leave Feedback

URL

POST https://{api-url}/api/v2/tenants/{tenantId}/incidents/{incidentId}/close

Sample URLs

https://{api-url}/api/v2/tenants/client_7/incidents/INC0000001030/close

Parameters

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

Follow the steps before closing an incident:

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 Incidents.
  6. Check the transition of the status Closed. If Closed is available this indicates the incident can be closed; otherwise, the incident 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 an incident.

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

  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": "Remote consoles issue solved",
	"notes": "Able to launch remote consoles on Windows devices"
}

Sample response

{
	"id": "INC0000000247",
	"subject": "Remote console issue on Windows devices",
	"description": "Not able to launch consoles on Windows devices in SJ center",
	"status": "Closed",
	"oldStatus": "Pending",
	"priority": "Normal",
	"oldPriority": "Low",
	"notes": "closed summary",
	"closedSummary": "closed summary",
	"requester": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "sample@opsramp.com"
	},
	"assignedUser": {
		"id": "USR0000000011",
		"loginName": "brocadeInc@opsramp.com",
		"lastName": "Inc Admin",
		"firstName": "Brocade",
		"email": "sample@opsramp.com",
		"phoneNumber": "8096250653"
	},
	"assigneeGroup": {
		"id": 5,
		"name": "Brocade Inc Users",
		"description": "Brocade Partner Users"
	},
	"resources": [{
			"id": "ee7e0a88-8d0a-4db7-8bcf-2b3f85fd3011",
			"name": "HYDLPT177",
			"type": "DEVICE"
		},
		{
			"id": "SGP-c2af3866-fc89-47dd-b83f-bcc8df0b2a0a",
			"name": "VTH Services",
			"type": "SERVICE"
		}
	],
	"extTicketId": "000042526342",
	"customFields": [{
			"id": "UDF0000003778",
			"classCode": "INCIDENT",
			"displayLabel": "for service provider",
			"name": "for_service_provider_3778",
			"fieldType": "TYPE_TEXT",
			"mandatory": false,
			"editable": true,
			"description": "all clients and all partners"
		},
		{
			"id": "UDF0000003779",
			"classCode": "INCIDENT",
			"displayLabel": "for service prov 2",
			"name": "for_service_prov_2_3779",
			"fieldType": "TYPE_CHECKBOX",
			"mandatory": false,
			"editable": true,
			"description": "all partners and clients",
			"options": [{
				"label": "yes",
				"value": "1"
			}]
		},
		{
			"id": "UDF0000003780",
			"classCode": "INCIDENT",
			"displayLabel": "for service pro 3",
			"name": "for_service_pro_3_3780",
			"fieldType": "TYPE_TEXT",
			"mandatory": false,
			"editable": true,
			"description": "service provider"
		}
	],
	"dueDate": "2016-11-29T08:06:00+0000",
	"ticketArisedTime": "",
	"cc": "sample@opsramp.com",
	"createdUser": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "sample@opsramp.com"
	},
	"reason": "closed",
	"category": {
		"id": 1,
		"name": "Urgency"
	},
	"alertIds": [],
	"toEmail": "sam@opsramp.com",
	"reOpenCount": 0,
	"createdDate": "2016-08-10T16:46:24+0000",
	"serviceRestoreDate": "2016-11-29T08:06:00+0000",
	"allowedStatus": [],
	"client": {
		"id": 8,
		"uniqueId": "client_8",
		"name": "Brocade Lab",
		"activated": true
	},
	"subCategory": {
		"id": 4,
		"name": "P1"
	},
	"sourcePolicyType": "INTEGRATION",
	"updatedDate": "2016-11-25T08:11:12+0000",
	"priorityUpdatedBy": {
		"id": "USR0000000018",
		"loginName": "superadmin",
		"lastName": "Admin",
		"firstName": "SP",
		"email": "sample@opsramp.com"
	},
	"priorityUpdatedDate": "2016-11-25T08:08:16+0000",
	"statusUpdatedBy": {
		"loginName": "ops_admin_user",
		"lastName": " ",
		"firstName": "Ops Admin",
		"email": "sample@opsramp.com"
	},
	"statusUpdatedDate": "2016-11-25T08:11:12+0000",
	"closedDate": "2016-11-25T08:11:12+0000",
	"slaDetails": {
		"slaPolicy": {
			"id": 6,
			"name": "P4_INCIDENT_SLA",
			"timezone": {
				"id": "12",
				"name": "GMT",
				"label": "Greenwich Mean Time",
				"code": "GMT"
			},
			"businessSchedule": {
				"startTime": "10:00:00",
				"endTime": "20:00:00",
				"sunday": false,
				"monday": true,
				"tuesday": true,
				"wednesday": true,
				"thursday": true,
				"friday": true,
				"saturday": false
			}
		},
		"resolutionTime": 2747615,
		"responseTime": 1847615,
		"responseBreach": false,
		"resolutionBreach": true,
		"responseBreachDate": "2016-08-10T12:16:24+0000",
		"resolutionBreachDate": "2016-08-10T13:16:24+0000"
	},
	"source": "INTEGRATION",
	"sourceEntityType": "INCIDENT",
	"statusFlow": [{
			"status": "New",
			"timeSpent": 6153310,
			"createdDate": "2016-08-10T16:46:25+0000",
			"updatedBy": {
				"loginName": "ops_admin_user",
				"lastName": " ",
				"firstName": "Ops Admin",
				"email": "sample@opsramp.com"
			}
		},
		{
			"status": "Pending",
			"timeSpent": 19,
			"reason": "Waiting for customer inputs",
			"createdDate": "2016-10-20T22:01:35+0000",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Open",
			"timeSpent": 233,
			"reason": "Started working on Incident",
			"createdDate": "2016-10-20T22:01:54+0000",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Pending",
			"timeSpent": 47,
			"reason": "Waiting for customer inputs",
			"createdDate": "2016-10-20T22:05:47+0000",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Open",
			"timeSpent": 3060102,
			"reason": "Started working on Incident",
			"createdDate": "2016-10-20T22:06:34+0000",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@opsramp.com",
				"phoneNumber": "9985597783"
			}
		},
		{
			"status": "Pending",
			"timeSpent": 176,
			"reason": "Waiting for customer inputs",
			"createdDate": "2016-11-25T08:08:16+0000",
			"updatedBy": {
				"id": "USR0000000018",
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SP",
				"email": "sample@opsramp.com"
			}
		},
		{
			"status": "Closed",
			"reason": "Issue is fixed",
			"notes": "closed summary",
			"createdDate": "2016-11-25T08:11:12+0000",
			"updatedBy": {
				"loginName": "ops_admin_user",
				"lastName": " ",
				"firstName": "Ops Admin",
				"email": "sample@opsramp.com"
			}
		}
	]
}