Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: api/v9/ci/{id}/{relatedItemType}/{relatedItemId}/relation?isReverse={isReverse}&relationTypeId={relationTypeId}
- Type: DELETE
-
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/ci/{id}/{relatedItemType}/{relatedItemId}/relation?isReverse={isReverse}&relationTypeId={relationTypeId}
Parameters:
Name | Data type | Obligatory | Description |
---|---|---|---|
Id | Number | Yes | Identifier of the CI. |
itemType | Text | Yes | Type of item. |
relatedItemType | Text | Yes | Type of item to be related (Incidents, Problem, Change, Release, ServiceCall, Task, Maintenance, Ci, Packages, Contract, Invoice, OtherDocument, Article.) |
relatedItemId | Number | Yes | Identifier of the item to be related. |
relationTypeId | Number | Yes | Identifier of the type of relationship. |
typeIsReverse | Bool | Yes | Identifier to determine if the main IC with whom the relationship is established is a parent or a child. |
Examples of uri
Delete CI relationships with:
-
Cis
- api/v9/ci/147/ci/1035/relation?isReverse=true&relationTypeId=139
-
Articles
- api/v9/ci/147/article/58/relation?isReverse=true&relationTypeId=137
Body of the petition
N/A
Answer
The service returns a Json with the following information:
{ “result”: true }
Response Parameters:
Name | Data type | Description |
---|---|---|
result | Boolean | Indicates whether the operation was successful |
Error messages
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | \r\nParameter Name: Id |
400 | BadRequest | \r\nParameter Name: ItemType |
400 | BadRequest | \r\nParameter Name: RelatedItemId |
400 | BadRequest | \r\nParameter Name: RelatedItemtype |
400 | BadRequest | RequestNeedsSomeArguments |
403 | Forbidden | DoNotHavePermissionForThisAction |
500 | InternalServerError | FailureDeleteRelatedItem |