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
Field | Data Type | Description |
---|---|---|
reason | String | Reason 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). |
notes | String | Additional information to add to an incident. |
Follow the steps before closing an incident:
Step 1: Check the status flow transition for Closed.
- Login to OpsRamp.
- Click Setup.
- On the left-hand side panel, click Service Desk.
- In Configuration, click Status Flows.
- Check the status flow for the entity Incidents.
- 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.
- Click Setup.
- On the left-hand side panel, click Service Desk.
- In Configuration, click Status Change Reasons and then click Add.
- 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.
- Click Setup.
- On the left-hand side panel, click Service Desk.
- In Configuration, click Settings.
- Select client and then click Customize.
- In Incident Request section, select option Enable reasons to change status Close and then click Save.
Notes
- Use the get incident API to check if status Closed and reasons to provide for Close are enabled. If under the field allowedStatus if name: Closed and reasonsEnabled: true, this indicates reasons should be provided for closing an incident.
- Use the get status change reasons API to provide the reasons to Close. The reasons configured in status: Closed are accepted, but a new provided reason would result in an error.
- Date format must be yyyy-MM-ddTHH:mm:ssZ (GMT).
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"
}
}
]
}