URL

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

Sample URLs

To update a category for partners:

https://{api-url}/api/v2/tenants/msp_3/serviceRequests/categories/SCAT-35543b8a-b710-4cef-b5bd-9b167fd2d0a5

To update a category for clients:

https://{api-url}/api/v2/tenants/client_4/serviceRequests/categories/SCAT-35543b8a-b710-4cef-b5bd-9b167fd2d0a5

In this API, the following actions can be performed on a category:

  • Rename a category
  • Assign child categories to a parent category
  • Change the status of a parent category to a child category

A child category cannot be changed to a parent category using this API.

Do the following to change the status:

  1. Log into OpsRamp.
  2. On the left-hand side panel. Select Service Desk and then Categories.
  3. Select entity select Change from the drop-down.
  4. Click on the category name to view the category page.
  5. Click Edit, select category type Parent, and then click Update.
  6. The category is now updated as a parent category.

Parameters

FieldData TypeDescription
nameString(Optional) Category name.
parentCategoryStringParent category details. This field is required while assigning a child category to a parent category.

Status code

200 OK

Sample request

{
	"name": "Version Updates",
	"parentCategory": {
		"uniqueId": "SCAT-2b53c303-9374-4df1-848a-664d0d65235d",
		"name": "Software"
	}
}

Sample response

{
	"uniqueId": "SCAT-35543b8a-b710-4cef-b5bd-9b167fd2d0a5",
	"name": "Version Updates",
	"parentCategory": {
		"uniqueId": "SCAT-2b53c303-9374-4df1-848a-664d0d65235d",
		"name": "Sample Category"
	},
	"createdBy": {
		"id": "USR0000000047",
		"loginName": "John_Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@myorganization.com",
		"phoneNumber": ""
	},
	"updatedBy": {
		"id": "USR0000000047",
		"loginName": "John_Smith",
		"lastName": "Smith",
		"firstName": "John",
		"email": "john.smith@myorganization.com"
	},
	"createdDate": "2018-02-09T07:03:34+0000",
	"updatedDate": "2018-02-12T10:18:54+0000"
}