Update service request

This endpoint is used to update a service request.

Leave Feedback

URL

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

Sample URLs

https://{api-url}/api/v2/tenants/client_7/serviceRequests/SRQ0000001113

Parameters

All parameters are optional:

FieldData TypeDescription
resourcesStringResources on which the service request is created.
priorityStringTicket priority.
Supported Values: Low, Normal, High, Urgent, and Very High
statusStringStatus of a service request. Follow the steps to update status:
  1. Use the get service request to check status flow transitions of a service request.
    • The status flows are defined in the field allowedStatus.
      Example: "name": Open"
    • Option to provide reasons to change the status is enabled.
      "reasonsEnabled" : "true" indicates, reason is mandatory while changing the status."reasonsEnabled" : "false" indicates reason is optional.
  2. If status change reasons are defined, use the get status change reasons to retrieve the list of reasons. Provide the reasons configured in status "Update".
reasonStringReason to edit the fields.
ccStringCc email.
suspendEndDateStringOn Hold date. This field is mandatory only if the option Make On Hold date as mandatory when status moves to On Hold is enabled in service desk settings.
assignedUserStringUser to whom the ticket is assigned.
assigneeGroupStringUser group to which the ticket is assigned.
requesterStringUser who initiates the service request.
extTicketIdStringAttach third-party ticket ID.
toEmailStringEmail address of the user for sending notifications.
customFieldsStringUser-defined fields to include additional service request information. Use the get custom fields to retrieve the list of custom fields.
categoryIntegerCategory of the service request. Use the get categories to retrieve the list of categories.
subCategoryIntegerSub-category of the service request. Use the get categories to retrieve the list of sub-categories.
responseStringRelevant information of the ticket can be included in response.
Example: file attachments, external ID, tags
attachedRequestsStringAttach incidents to a service request. Use Search Incidents API to retrieve the list of incidents.
Example: "id": "INC0000000104"
knowledgeArticleIdsIntegerAttach knowledge base articles related to a service request for further reference. To fetch 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).

Sample request

{
	"priority": "High",
	"status": "Open",
	"reason": "Global open reason",
	"notes": "Request Processing",
	"location": "Testing@testLocation",
	"cc": "testUser@gmail.com, tester@gmail.com",
	"tags": "API, Problem",
	"category": {
		"id": "22"
	},
	"subCategory": {
		"id": "23"
	},
	"requester": {
		"id": "USR0000002147",
		"loginName": "FSSL-API-Lab-User-2"
	},
	"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": "UDF0000003797",
			"name": "api_lab_drop_down_3797",
			"value": "1"
		},
		{
			"id": "UDF0000003798",
			"name": "api_lab_text_3798",
			"value": "testing text field"
		},
		{
			"id": "UDF0000003801",
			"name": "api_lab_checkbox_3801",
			"value": "1"
		},
		{
			"id": "UDF0000003802",
			"name": "api_lab_date_3802",
			"value": "2016-03-28T10:10:00+0000"
		}
	],
	"response": {
		"description": "Adding Attachments to Service Request",
		"internal": "false",
		"creator": {
			"id": "USR0000002146",
			"loginName": "FSSL-API-Lab-User-1"
		},
		"tags": "API, ServiceRequest",
		"attachments": [{
				"name": "2.txt",
				"file": "U2FtcGxlIFRleHQgZmlsZS0gdGVzdGluZyB3aXRoIGF0dGFjaG1lbnQ="
			},
			{
				"name": "1.txt",
				"file": "U2FtcGxlIFRleHQgZmlsZS0gdGVzdGluZyB3aXRoIGF0dGFjaG1lbnQ="
			}
		]
	},
	"attachedRequests": [{
			"id": "INC0000001370"
		},
		{
			"id": "INC0000001371"
		},
		{
			"id": "INC0000001368"
		}
	],
	"knowledgeArticleIds": [25, 16]
}

Sample response

{
	"id": "SRQ0000001113",
	"subject": "Renewal of Windows License",
	"description": "Windows license is expiring soon, need to renew the license.",
	"status": "Open",
	"oldStatus": "New",
	"priority": "High",
	"oldPriority": "Low",
	"requester": {
		"id": "USR0000002147",
		"loginName": "FSSL-API-Lab-User-2",
		"lastName": "API-Lab-2",
		"firstName": "FSSL",
		"email": "tester3@gmail.com"
	},
	"assignedUser": {
		"id": "USR0000002147",
		"loginName": "FSSL-API-Lab-User-2",
		"lastName": "API-Lab-2",
		"firstName": "FSSL",
		"email": "tester3@gmail.com",
		"phoneNumber": "9876543219"
	},
	"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": "VNXC0090344",
	"cc": "testUser@gmail.com, tester@gmail.com",
	"ticketArisedTime": "",
	"createdUser": {
		"id": "USR0000002095",
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@gmail.com"
	},
	"reason": "Global Open Reason",
	"alertIds": [],
	"createdDate": "2016-03-29T11:32:08+0000",
	"allowedStatus": [{
			"id": "3",
			"name": "Pending",
			"reasonsEnabled": true,
			"reasonsDefined": false
		},
		{
			"id": "4",
			"name": "Resolved",
			"reasonsEnabled": true,
			"reasonsDefined": false
		},
		{
			"id": "5",
			"name": "Closed",
			"reasonsEnabled": true,
			"reasonsDefined": true
		},
		{
			"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-29T11:37:58+0000",
	"priorityUpdatedBy": {
		"id": "USR0000002095",
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@gmail.com"
	},
	"priorityUpdatedDate": "2016-03-29T11:37:58+0000",
	"statusUpdatedBy": {
		"id": "USR0000002095",
		"loginName": "John.Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@gmail.com"
	},
	"statusUpdatedDate": "2016-03-29T11:37:58+0000",
	"slaDetails": {
		"resolutionTime": 0,
		"responseTime": 350,
		"responseBreach": false,
		"resolutionBreach": false,
		"responseBreachDate": "",
		"resolutionBreachDate": ""
	},
	"source": "INTEGRATION",
	"serviceCatalogItemId": "0",
	"statusFlow": [{
			"status": "New",
			"timeSpent": 1492634,
			"createdDate": "2016-07-25T12:42:19+0000",
			"updatedBy": {
				"loginName": "System.User",
				"lastName": "system",
				"firstName": "user",
				"email": "sample_1@gmail.com"
			}
		},
		{
			"status": "Open",
			"reason": "Started Working",
			"createdDate": "2016-08-11T19:19:51+0000",
			"updatedBy": {
				"loginName": "john.smith",
				"lastName": "smith",
				"firstName": "john",
				"email": "sample@gmail.com",
				"phoneNumber": "9985597783"
			}
		}
	],
	"attachedRequests": [{
			"id": "INC0000001370"
		},
		{
			"id": "INC0000001371"
		},
		{
			"id": "INC0000001368"
		}
	],
	"knowledgeArticleIds": [
		25, 16
	],
	"attachedArticles": [{
			"id": 25,
			"subject": "Frequently Asked Questions on Windows License"
		},
		{
			"id": 16,
			"subject": "Updated Windows Version"
		}
	]
}