Documentation is now available for the Fall 2020 Update release!

Create incident

This endpoint is used to create an incident.

Leave Feedback

URL

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

Sample URLs

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

Parameters

FieldData TypeDescription
subjectStringTicket subject.
descriptionStringTicket description.
attachmentsObjects(Optional) Attach files related to the incident.
Convert attachment files to byte stream with base64-encoded. File size is limited to 50 MB.
requesterString(Optional) User who requests the incident.
assignedUserString(Optional) User to whom the incident is assigned.
assignedGroupString(Optional) User group to which the incident is assigned.
resourcesString(Optional)
categoryString(Optional) Add the incident under a category. Use the get categories to retrieve the list of categories.
businessImpactString(Optional) Effect the incident has on the business. See get business impacts to view the list of business impacts.
urgencyStringUrgency is defined as how soon the incident should be resolved. See get urgencies to view the list of urgencies under a client.
priorityString(Optional) Ticket priority with supported priority values: Low, Normal, High, Urgent, and Very Low.
subcategoryInteger(Optional) Add the incident under a sub-category. Use get categories to retrieve the list of sub-categories.
dueDateString(Optional) Due date to resolve the incident.
Example: 2016-03-26T06:43:00+0000
changeRequest/problemString(Optional) Attach a problem or change request related to the incident. Only a single change request or problem can be attached to an incident.
parentIdString(Optional) Attach incident. Provide the incident ID as an attachment.
toEmailString(Optional) Email address of the user. An email notification is sent to the user.
ccString(Optional) Cc email.
alertIdString(Optional) This field is required for creating an incident from an alert.Provide the alert ID.
extTicketIdString(Optional) Attach third-party ticket ID.
customFieldsString(Optional) User-defined fields. User can create additional fields to attach more information related to the incident. Create custom field and use the get custom fields to retrieve the list of customized fields.
attachedRequestsString(Optional) Attach service requests to an incident. Use the search service requests to retrieve list of service requests in a client.
knowledgeArticleIdsInteger(Optional) Attach knowledge base articles related to an incident for further reference. To retrieve a knowledge base article ID:
  1. Log into OpsRamp.
  2. Click Knowledge Base.
  3. Select the required article and then copy the article ID.
  4. Provide the article ID in "knowledgeArticleIds" field.
    Example: "knowledgeArticleIds": 23, 65.

Date format is yyyy-MM-ddTHH:mm:ssZ (GMT).

Below are the steps to attach a business impact and urgency to an incident.

Step 1: Create the business impact and urgency from OpsRamp.

Instructions to create business impact:

  1. Login to OpsRamp.
  2. Click Setup.
  3. On the left-hand side panel click Service Desk.
  4. Click Business Impacts, select the client, and select the business impact status.
  5. Click Add, provide name and description. Click Create.

Instructions to create Urgency:

  1. Click Setup.
  2. On the left-hand side panel and click Service Desk.
  3. Click Urgencies, select the client and then select the urgency status.
  4. Click Add, provide the name and description and then click Create.

Step 2: Use Get Business Impacts and Get Urgencies to fetch the business impacts and urgencies created.

Step 3: Provide the IDs in the request payload.

Sample request

{
	"subject": "Issue with LAN in West-CA office",
	"description": "Network appears to be down. Unable to access internet and key applications.",
	"priority": "High",
	"ticketArisedTime": "2016-02-26T06:43:00+0000",
	"parentId": "INC0000001029",
	"dueDate": "2016-03-26T06:43:00+0000",
	"extTicketId": "000042526342",
	"alertId": 0,
	"cc": "support@domain.com,networkissues@domain.com",
	"toEmail": "userA@domain.com, ronald.rivers@gmail.com",
	"category": {
		"id": "24"
	},
	"subCategory": {
		"id": "25"
	},
	"requester": {
		"id": "USR0000002146",
		"loginName": "FSSL-API-Lab-User-1"
	},
	"assignedUser": {
		"id": "USR0000002147",
		"loginName": "FSSL-API-Lab-User-2"
	},
	"assigneeGroup": {
		"name": "API-Lab-Group-1"
	},
	"resources": [{
		"id": "481af404-33a6-4d61-af77-c483ca6641fa"
	}, {
		"id": "SGP-7adf3762-f310-4c14-9ecd-443eb7c6c208"
	}, {
		"id": "DGP-8d44a504-fd4b-4a78-ba34-2dfdf3ffb85e"
	}],
	"customFields": [{
		"id": "UDF0000003790",
		"name": "drop_down_api_lab_3790",
		"value": "2"
	}, {
		"id": "UDF0000003791",
		"name": "text_api_lab_3791",
		"value": "request custom field - text"
	}, {
		"id": "UDF0000003810",
		"name": "numeric_3810",
		"value": "10"
	}, {
		"id": "UDF0000003792",
		"name": "multi_line_text_api_lab_3792",
		"value": "Third party ticket"
	}, {
		"id": "UDF0000003794",
		"name": "checkbox_api_lab_3794",
		"value": "1"
	}, {
		"id": "UDF0000003795",
		"name": "date_ap_lab_3795",
		"value": "2016-02-26T00:00:00+0000"
	}, {
		"id": "UDF0000003796",
		"name": "datetime_api_lab_3796",
		"value": "2016-02-26T12:13:00+0000"
	}],
	"changeRequest": {
		"id": "CHG0000001028"
	},
	"problem": {
		"id": "PRB0000001112"
	},
	"businessImpact": {
		"id": "10"
	},
	"urgency": {
		"id": "25"
	},
	"attachments": [{
		"name": "2.txt",
		"file": "U2FtcGxlIFRleHQgZmlsZS0gdGVzdGluZyB3aXRoIGF0dGFjaG1lbnQ="
	}, {
		"name": "1.txt",
		"file": "U2FtcGxlIFRleHQgZmlsZS0gdGVzdGluZyB3aXRoIGF0dGFjaG1lbnQ="
	}],
	"attachedRequests": [{
			"id": "SRQ0000001388"
		},
		{
			"id": "SRQ0000001391"
		},
		{
			"id": "SRQ0000001394"
		},
		{
			"id": "SRQ0000001397"
		}
	],
	"knowledgeArticleIds": [
		25, 16
	]

}

Sample response

{
	"id": "INC0000001114",
	"subject": "Issue with LAN in West-CA office",
	"description": "Network appears to be down. Unable to access internet and key applications.",
	"status": "New",
	"oldStatus": "New",
	"priority": "High",
	"oldPriority": "Low",
	"requester": {
		"id": "USR0000002146",
		"loginName": "FSSL-API-Lab-User-1",
		"lastName": "API-Lab",
		"firstName": "FSSL",
		"email": "john.smith@domain.com"
	},
	"assignedUser": {
		"id": "USR0000002147",
		"loginName": "FSSL-API-Lab-User-2",
		"lastName": "API-Lab-2",
		"firstName": "FSSL",
		"email": "will.smith@domain.com",
		"phoneNumber": "406-654-1234"
	},
	"assigneeGroup": {
		"id": 17,
		"name": "API-Lab-Group-1",
		"userCount": 2
	},
	"resources": [{
		"id": "481af404-33a6-4d61-af77-c483ca6641fa",
		"name": "VTHLPT1000",
		"type": "DEVICE"
	}, {
		"id": "SGP-7adf3762-f310-4c14-9ecd-443eb7c6c208",
		"name": "VTH-SERVICES",
		"type": "SERVICE"
	}, {
		"id": "DGP-8d44a504-fd4b-4a78-ba34-2dfdf3ffb85e",
		"name": "VTH-ADMIN-DEVS",
		"type": "DEVICE_GROUP"
	}],
	"extTicketId": "000042526342",
	"customFields": [{
		"id": "UDF0000003808",
		"classCode": "INCIDENT",
		"displayLabel": "text field",
		"name": "text_field_3808",
		"fieldType": "TYPE_TEXT",
		"mandatory": false,
		"editable": true,
		"description": "All partners",
		"value": "available",
		"defaultValue": ""
	}, {
		"id": "UDF0000003810",
		"classCode": "INCIDENT",
		"displayLabel": "numeric",
		"name": "numeric_3810",
		"fieldType": "TYPE_NUMBER",
		"mandatory": false,
		"editable": true,
		"description": "Testing numeric",
		"value": "120",
		"defaultValue": ""
	}, {
		"id": "UDF0000003790",
		"classCode": "INCIDENT",
		"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": "UDF0000003792",
		"classCode": "INCIDENT",
		"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",
		"value": "text",
		"defaultValue": "multi \nline \ntext"
	}, {
		"id": "UDF0000003794",
		"classCode": "INCIDENT",
		"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"
		}],
		"value": "1",
		"defaultValue": "0",
		"selectedOption": {
			"label": "yes",
			"value": "1"
		}
	}, {
		"id": "UDF0000003795",
		"classCode": "INCIDENT",
		"displayLabel": "Date-ap-lab",
		"name": "date_ap_lab_3795",
		"fieldType": "TYPE_DATE",
		"mandatory": false,
		"editable": true,
		"description": "test case for date field",
		"value": "2016-02-26T00:00:00+0000",
		"defaultValue": "2016-02-26T00:00:00+0000"
	}, {
		"id": "UDF0000003796",
		"classCode": "INCIDENT",
		"displayLabel": "dateTime-api-lab",
		"name": "datetime_api_lab_3796",
		"fieldType": "TYPE_DATETIME",
		"mandatory": false,
		"editable": true,
		"description": "test case for Date and time",
		"value": "2016-02-26T12:13:00+0000",
		"defaultValue": "2016-02-26T12:13:00+0000"
	}],
	"dueDate": "2016-03-26T12:13:00+0000",
	"cc": "support@domain.com,networkissues@domain.com",
	"ticketArisedTime": "2016-02-26T12:13:00+0000",
	"createdUser": {
		"id": "USR0000002095",
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John.Smith",
		"email": "john.smith@domain.com"
	},
	"alertIds": [],
	"toEmail": "support@domain.com, opsrampnetworkissues@domain.com",
	"createdDate": "2016-03-29T12:20:15+0000",
	"serviceRestoreDate": "2016-03-26T12:13:00+0000",
	"allowedStatus": [{
		"id": "2",
		"name": "Open",
		"reasonsEnabled": true,
		"reasonsDefined": true
	}, {
		"id": "3",
		"name": "Pending",
		"reasonsEnabled": true,
		"reasonsDefined": false
	}, {
		"id": "4",
		"name": "Resolved",
		"reasonsEnabled": true,
		"reasonsDefined": false
	}, {
		"id": "5",
		"name": "Closed",
		"reasonsEnabled": true,
		"reasonsDefined": false
	}, {
		"id": "6",
		"name": "On Hold",
		"reasonsEnabled": true,
		"reasonsDefined": true
	}],
	"client": {
		"id": 7,
		"uniqueId": "client_7",
		"name": "API Lab",
		"activated": true,
		"updatedTime": "",
		"createdTime": "2012-10-09T11:49:34+0000"
	},
	"updatedDate": "2016-03-29T12:20:16+0000",
	"priorityUpdatedBy": {
		"id": "USR0000002146",
		"loginName": "FSSL-API-Lab-User-1",
		"lastName": "API-Lab",
		"firstName": "FSSL",
		"email": "john.smith@domain.com"
	},
	"priorityUpdatedDate": "2016-03-29T12:20:15+0000",
	"statusUpdatedBy": {
		"id": "USR0000002146",
		"loginName": "FSSL-API-Lab-User-1",
		"lastName": "API-Lab",
		"firstName": "FSSL",
		"email": "john.smith@domain.com"
	},
	"statusUpdatedDate": "2016-03-29T12:20:15+0000",
	"slaDetails": {
		"resolutionTime": 0,
		"responseTime": 0,
		"responseBreach": false,
		"resolutionBreach": false,
		"responseBreachDate": "",
		"resolutionBreachDate": ""
	},
	"source": "INTEGRATION",
	"sourceEntityType": "INCIDENT",
	"sourceEntityTypeId": "000042526342",
	"statusFlow": [{
		"status": "New",
		"createdDate": "2016-07-25T12:42:19+0000",
		"updatedBy": {
			"loginName": "John.Smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@domain.com"
		}
	}],
	"businessImpact": {
		"id": 10,
		"name": "Impact 2",
		"description": "Impact level 2"
	},
	"urgency": {
		"id": 25,
		"name": "Urgency 1",
		"description": "Urgency level 1"
	},
	"attachedRequests": [{
			"id": "SRQ0000001388"
		},
		{
			"id": "SRQ0000001391"
		},
		{
			"id": "SRQ0000001394"
		},
		{
			"id": "SRQ0000001397"
		}
	],
	"knowledgeArticleIds": [
		25, 16
	],
	"attachedArticles": [{
			"id": 25,
			"subject": "Network Troubleshooting"
		},
		{
			"id": 16,
			"subject": "LAN Settings"
		}
	]
}