Case Management
This section describes the operations related to case handling (creation, editing, querying).
Case Creation
Petition Details
- URI: api/v8.6/item/add/{itemType}
- Type: POST
-
Required headings:
- content-type: application/json
- Authorization: TOKEN
Parameters:
Name | Data type | Obligatory | Description |
---|---|---|---|
AuthorId | Number | Yes | ID of the user who will be registered as the author of the case. |
CategoryId | Number | Yes | Id of the category associated with the case. |
CustomerId | Number | No | Id of the client to whom the case will be registered. It is only required if the type of case is different from problem. |
CompanyId | Number | No | Id of the company to which the case will be registered. |
ResponsibleId | Number | No | ID of the user responsible for the case |
Description | Text | Yes | Description of the case. |
GroupId | Number | Yes | ID of the specialist group in charge of managing the case. |
ServiceId | Number | Yes | Id of the service related to the case. |
Subject | Text | No | Subject of the case |
SlaId | Number | Yes | SLA ID related to the case. |
ProjectId | Number | Yes | The ID of the project in which the case will be created. |
itemType | Number | Yes | Type of case to be created. The options are: 1. Incident 2. Problem 3. Change 4. Service Requirement |
RegistryTypeId | Number | Yes | Id of the means by which the case is registered. |
CiId | Number | No | ID of the CI associated with the case. It is only required if the type of case is problem. |
Body of the petition
The request consists of a field-value json array with possible parameters as required. Example:
[
{"Field":"AuthorId","Value":3913},
{"Field":"CategoryId","Value":2499},
{"Field":"CustomerId","Value":8},
{"Field":"Description","Value":"Item description"},
{"Field":"GroupId","Value":33},
{"Field":"ProjectId","Value":2},
{"Field":"RegistryTypeId","Value":6},
{"Field":"ServiceId","Value":2418},
{"Field":"Sunbject","Value":"Item subject"},
{"Field":"SlaId","Value":2454},
{"Field":"UrgencyId","Value":3}
]
Answer
As an answer, a json object is obtained, with the following information:
[
{
"Field": "itemId",
"Value": "4158"
},
{
"Field": "qs",
"Value": "?64B24DED26791E23A72364E9AF0E0430E93E2CF2F6D66AA4CB23CAAF7D8F"
},
{
"Field": "composedItemId", "Value": "IM-55175-2-19537"
},
{
"Field": "isClosed",
"Value": "False"
},
{
"Field": "result",
"Value": "True"
}
]
Error messages
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | InvalidCaseData |
400 | BadRequest | InvalidAuthorId |
400 | BadRequest | InvalidCategory |
400 | BadRequest | InvalidCompany |
400 | BadRequest | InvalidDescription |
400 | BadRequest | InvalidGroup |
400 | BadRequest | InvalidItemType |
400 | BadRequest | InvalidStateConfiguraton |
400 | BadRequest | InvalidRegistryType |
400 | BadRequest | InvalidService |
400 | BadRequest | InvalidSla |
400 | BadRequest | InvalidUrgencyId |
400 | BadRequest | InvalidSessionId |
401 | Unauthorized | UnauthorizedIncidentCreation |
401 | Unauthorized | UnauthorizedChangeCreation |
401 | Unauthorized | UnauthorizedProblemCreation |
401 | Unauthorized | UnauthorizedServiceCallCreation |
500 | InternalServerError | FailureAddItem |