URL
POST https://{api-url}/api/v2/tenants/{tenantId}/changeRequests/categories/{uniqueId}
Provide the unique ID of the category you would like to update. Use the get categories API to retrieve the list of categories of the change request entity type.
Sample URLs
To update a category for partners:
https://{api-url}/api/v2/tenants/msp_3/changeRequests/categories/SCAT-b6470d44-c1c9-46be-9901-3711039f8e5d
To update a category for clients:
https://{api-url}/api/v2/tenants/client_4/changeRequests/categories/SCAT-b6470d44-c1c9-46be-9901-3711039f8e5d
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:
- Log into OpsRamp.
- On the left-hand side panel. Select Service Desk and then Categories.
- Select entity select Change from the drop-down.
- Click on the category name to view the category page.
- Click Edit, select category type Parent, and then click Update.
- The category is now updated as a parent category.
Parameters
Field | Data Type | Description |
---|---|---|
name | String | (Optional) Category name. |
parentCategory | String | Parent category details. This field is required while assigning a child category to a parent category. |
Status code
200 OK
Sample request
{
"name": "Internal Audit",
"parentCategory": {
"uniqueId": "SCAT-7c602980-b15d-4b50-8088-23d49307fb02",
"name": "Internal Support"
}
}
Sample response
{
"uniqueId": "SCAT-b6470d44-c1c9-46be-9901-3711039f8e5d",
"name": "Internal Audit",
"parentCategory": {
"uniqueId": "SCAT-7c602980-b15d-4b50-8088-23d49307fb02",
"name": "Internal Support"
},
"createdBy": {
"id": "USR0001202764",
"loginName": "James_Blake",
"lastName": "Blake",
"firstName": "James",
"email": "james.blake@myorganization.com",
"phoneNumber": ""
},
"updatedBy": {
"id": "USR0001202764",
"loginName": "James_Blake",
"lastName": "Blake",
"firstName": "James",
"email": "james.blake@myorganization.com"
},
"createdDate": "2018-02-09T09:47:11+0000",
"updatedDate": "2018-02-12T11:16:44+0000"
}