Deletes a file and a temporary file, if it is a temporary the itemId parameter is sent with zero value.
Petition Details
- URI: api/v8.6/attachment/delete
- Type: POST
-
Required headings:
- content-type: application/json
- Authorization: TOKEN
Parameters:
Name | Data type | Obligatory | Description |
---|---|---|---|
UserId | Number | Yes | User ID |
ItemId | Number | Yes | Case ID |
ItemType | Number | Yes | Case Type 1 = Incident 2 = Problem 3 = Change 4 = ServiceCall |
Filename | Text | Yes | File Name |
Body of the petition
Example:
[
{"Field":"itemId","Value":55884},
{"Field":"itemType","Value":4},
{"Field":"userId","Value":471},
{"Field":"fileName","Value":"Captura.PNG"}
]
Answer
The service will return a Boolean indicating whether the operation could be performed:
Error messages
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | FailureDeleteFile |
400 | BadRequest | InvalidItemId |
400 | BadRequest | InvalidItemType |
400 | BadRequest | InvalidFileName |
400 | BadRequest | FailureDeletingFile |
404 | NotFound | NonExistentFile |
500 | InternalServerError | FailureDeleteFile |