This operation creates a case and when it is created, it saves the attachments, both of the case, and of its additional fields; After saving them, delete the files from the temporary folder created for this purpose.
Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: api/v9/item
- Type: POST
-
Required headings:
- content-type: application/json
- X-Authorization: Bearer {token}
URL Description
- {host}: It represents the domain of the environment in which the API is located.
- ASMSAPI/: Fixed API prefix.
- URI: Specific endpoint for the request.
⚐ EXAMPLE URL:
https://{host}/ASMSAPI/api/v9/item
Parameters:
| Name | Data type | Obligatory | Description |
|---|---|---|---|
| applicantId | Int | No | Case requester identifier. |
| authorId | Int | No | Identifier of the perpetrator of the case. |
| categoryId | Int | Yes | Case category identifier. |
| cause | String | No | Description of the root cause of the problem, applicable only when the item type (itemType) is 2, indicating that it is a problem. |
| CiId | Int | No | Configuration item (CI) identifier. |
| ciName | String | No | Name of the configuration item (CI). |
| companyId | Int | No | Company identifier. |
| consoleType | String | Yes | The type of console used to create the case (Specialist= 1, Client = 2, Administrator= 3, CMDB=4). |
| customerId | Int | No | Customer ID. |
| Description | String | No | Case description, may include HTML content. |
| groupId | Int | No | Identifier of the specialist group associated with the case. |
| impactId | Int | No | Impact identifier. |
| itemType | Int | Yes | Case Type: 1. Incident 2. Problem 3. Change 4. Service Requirement 13. Release |
| itemVersion | Int | No | Version of the case. |
| locationId | Int | No | Location identifier. |
| modelId | Int | Yes | Operating model identifier. |
| priorityId | Int | No | Priority identifier. |
| projectId | Int | Yes | Project ID. |
| providerId | Int | No | Supplier identifier. |
| reasonId | Int | No | Identifier of the reason. |
| registryTypeId | Int | No | Type of case record. |
| responsibleId | Int | No | Identifier of the person responsible for the case. |
| serviceId | Int | Yes | Service identifier. |
| stateId | Int | Yes | Initial case status identifier. |
| subject | String | No | Subject of the case. |
| urgencyId | Int | No | Urgency identifier |
| listAdditionalField | Array | Yes | List of additional fields in the case. If the case to be created does not require additional fields, place the array empty. Ex. “listAdditionalField”: [] |
| TempItemId | Int | No | Temporary identifier of the item. this must be negative. Example: -1 |
Body of the petition
{
"categoryId": 1110,
"cause": "",
"ciId": 6955,
"ciName": "HIS ISIS PRODUCCIÓN",
"companyId": 35,
"consoleType": 1,
"correctActions": null,
"currentTime": 0,
"customerId": 19994,
"applicantId": 19994,
"description": "prueba",
"foregroundColorRgb": "255.255.255",
"followUpActions": null,
"hasMoreInformation": false,
"hasPendingSurvey": false,
"estimatedCost": 0,
"realCost": 0,
"recomendations": null,
"impactId": 3,
"incorrectActions": null,
"instance": 1782334251107,
"isFeeAvailable": true,
"itemType": 4,
"itemVersion": 3,
"knownError": null,
"majorProblem": null,
"modelId": 26,
"unitId": null,
"priorityReason": null,
"projectId": 2,
"providerId": null,
"reasonId": 340,
"registryTypeId": 11,
"groupId": 17,
"serviceId": 16,
"stateId": 204,
"subject": "CANCELAR - PRUEBA",
"surveyToken": null,
"thirdParty": null,
"transformed": false,
"listAdditionalField": [
{
"boolValue": null,
"catalogId": null,
"dataSourceId": null,
"dateValue": null,
"description": "[ES] Numero Celular",
"enable": true,
"fieldId": 455,
"fieldType": 1,
"fieldTypeName": "shortext",
"floatValue": null,
"identifier": null,
"inputStream": null,
"intValue": null,
"itemId": null,
"mandatory": true,
"name": "[ES] Numero Celular",
"order": null,
"projectId": null,
"stringValue": "123456",
"type": null,
"url": null,
"visible": true
},
{
"boolValue": null,
"catalogId": null,
"dataSourceId": null,
"dateValue": null,
"description": "[ES] Ubicación Exacta (Piso y Area)",
"enable": true,
"fieldId": 457,
"fieldType": 1,
"fieldTypeName": "shortext",
"floatValue": null,
"identifier": null,
"inputStream": null,
"intValue": null,
"itemId": null,
"mandatory": true,
"name": "[ES] Ubicación Exacta (Piso y Area)",
"order": null,
"projectId": null,
"stringValue": "Bogota",
"type": null,
"url": null,
"visible": true
},
{
"boolValue": null,
"catalogId": null,
"dataSourceId": null,
"dateValue": null,
"description": "[ES] Jefe de Area",
"enable": true,
"fieldId": 459,
"fieldType": 1,
"fieldTypeName": "shortext",
"floatValue": null,
"identifier": null,
"inputStream": null,
"intValue": null,
"itemId": null,
"mandatory": true,
"name": "[ES] Jefe de Area",
"order": null,
"projectId": 2,
"stringValue": "Cesar Munevar",
"type": null,
"url": null,
"visible": true
}
],
"authorId": 19994,
"tempItemId": -3
}
Answer
{
"id": 84486,
"idByProject": "RF-84486-19-407613" }
Response Parameters:
| Name | Data type | Description |
|---|---|---|
| Id | Int | Case ID |
| idByProject | String | Case identifier by project |
Error messages
| Code | HTTP status | Error Message |
|---|---|---|
| 400 | BadRequest | \r\nParameter Name: ConsoleType |
| 400 | BadRequest | \r\nParameter Name: ItemType |
| 400 | BadRequest | \r\nParameter Name: ListAdditionalField |
| 400 | BadRequest | \r\nParameter Name: TempItemId |
| 400 | BadRequest | InvalidItemType |
| 400 | BadRequest | ModelIdIsEmpty |
| 400 | BadRequest | RequestNeedsSomeArguments |
| 400 | BadRequest | StateIdIsEmpty |
| 403 | Forbidden | DoNotHavePermissionForThisAction |
| 500 | InternalServerError | FailureAddItem |