Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: /api/v9/item/{id}/type/{itemType}/relations/list?repository={repository}
- 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/{id}/type/{itemType}/relations/list?repository={repository}
Parameters
Name | Data type | Obligatory | Description |
---|---|---|---|
Id | Number | Yes | Case identifier. |
itemType | Text | Yes | Case Type |
relatedItemType | Text | Yes | Type of case to be related. When NOT submitted, all types of cases related to an item will be listed. |
repository | Text | Yes | Indicates whether they are open - closed Values:- Opened = 1, - Closed = 2, - All = 3 If it does not go by default, Opened will be assigned. |
relationTypeId | Number | No | Relationship type identifier, when not sent all relationship types will be listed. |
isReverse | Boolean | No | For the only relationship that YES it is obligatory for the relationship that would be made between cases.- true = Parent Listing - false = list of children |
Language | Text | Yes | System Language - Esp = 0, - Ing = 1, - By = 2, - Pt = 3 |
isClosed | Boolean | Yes | It indicates whether the case for which the relationships are being sought is open or closed. |
Body of the petition
Cases related to all types of cases
- api/v9/item/17828/type/1/relations/list?repository=&language=0
- api/v9/item/17828/type/incidents/relations/list?repository=&language=esp
- Body:
{
` `“isClosed”:false }
- **Casos con tipos de casos y tipo de relación**
- *Incidents:*
- *Problem:*
- *Change:*
- *Release:*
- *ServiceCall:*
- *Maintenance:*
- api/v9/item/17828/type/1/relations/list?repository=&language=0
- api/v9/item/17828/type/incidents/relations/list?repository=&language=e sp
- Body:
*{*
*"isReverse":false,*
*"relatedItemType":2,*
*"relationTypeId":6,*
` `*"isClosed":false*
*}*
- **Casos con tipos de casos SIN tipo de relación.**
- *Incidents:*
- *Problem:*
- *Change:*
- *Release:*
- *ServiceCall:*
- *Maintenance:*
- api/v9/item/18261/type/1/relations/list?repository=3&language=0
- api/v9/item/18261/type/incidents/relations/list?repository=&language=esp
- Body:
*{*
*"isReverse":false,*
*"relatedItemType":3,*
` `*"isClosed":false*
*}*
- **Casos con solo el tipo de caso relacionado.**
- *Incidents:*
- *Problem:*
- *Change:*
- *Release:*
- *ServiceCall:*
- *Maintenance:*
- api/v9/item/18261/type/1/relations/list?repository=3&language=0
- api/v9/item/18261/type/incidents/relations/list?repository=&language=esp
- Body:
{
"relatedItemType":3,
` `"isClosed":false
}
- **Casos relacionados con:**
- Ci:
- Packages:
- Tipo de relación
- api/v9/item/17828/type/1/relations/list?repository=&language=0
- api/v9/item/17828/type/incidents/relations/list?repository=&lang uage=0
- Body :
{
"relatedItemType":21,
` `"relationTypeId":40,
` `"isClosed":false
}
- Todos los tipos de relación
- api/v9/item/17828/type/1/relations/list?repository=&language=0
- api/v9/item/17828/type/incidents/relations/list?repository=&lang uage=0
- Body :
{
"relatedItemType":21,
` `"isClosed":false
}
- Article:
- Tipo de relación
- api/v9/item/17828/type/1/relations/list?repository=&language=0
- api/v9/item/17828/type/incidents/relations/list?repository=&lang uage=0
- Body :
{
"relatedItemType":7,
"relationTypeId":36,
` `"isClosed":false
}
- Todos los tipos de relación
- api/v9/item/17828/type/1/relations/list?repository=&language=0
- api/v9/item/17828/type/incidents/relations/list?repository=&lang uage=0
- Body :
{
"relatedItemType":7,
` `"isClosed":false
}
Respuesta
{
"content": [
{
"assetTag": null,
"authorId": null,
"backgroundColorRgb": null,
"brandName": null,
"categoryId": null,
"categoryName": null,
"checkOutDate": null,
"closedDate": null,
"companyId": null,
"companyName": null,
"content": "",
"created": null,
"createdDate": null,
"description": "APROVALS",
"groupId": null,
"id": 1698,
"idByProject": null,
"identifier": "APROVALS",
"interfaceId": null,
"ispublic": false,
"itemType": 7,
"itemTypeName": "Artículo",
"keyWords": "",
"lastModified": 1504708702607, "modifierUserId": null,
"name": null,
"openedDate": 1493661749783,
"parentId": 0,
"published": 0,
"ratingTotal": 0,
"relationTypeId": 36,
"relationTypeIsReverse": false,
"relationTypeName": "Soluciona", "responsibleId": null,
"responsibleName": null, "serial": null,
"serviceId": null,
"serviceName": null,
"stateColor": "21.94.214", "stateId": 1866,
"stateName": "Nuevo",
"subject": null,
"title": "APROVALS",
"totalHit": null,
"type": null,
"typeId": 1091,
"typeName": "FAQ"
` }
],
` `"totalItems": 1
}
Response Parameters:
Name | Data type | Description |
---|---|---|
content | List | List of objects found in the search. |
totalItems | Number | Total number of objects found |
##Mensajes of error
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | \r\nParameter Name: Id |
400 | BadRequest | \r\nParameter Name: ItemType |
400 | BadRequest | InvalidProjectId |
400 | BadRequest | InvalidRelations |
400 | BadRequest | IsClosedIsRequired |
400 | BadRequest | IsReverseIsRequired |
400 | BadRequest | RelatedItemTypeIsRequired |
400 | BadRequest | RequestNeedsSomeArguments |
403 | Forbidden | DoNotHavePermissionForThisAction |
500 | InternalServerError | FailureGetRelations |