List of categories
Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: /api/v9/item/{itemType}/services/{serviceId}/categories?dataType={dataType}&parentId= {parentId}
- Type: GET
-
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/{itemType}/services/{serviceId}/categories?dataType={dataType}&parentId= {parentId}
Parameters
Name | Data type | Obligatory | Description |
---|---|---|---|
itemType | Text | Yes | Item Type Identifier |
serviceId | Text | Yes | Service Identifier |
Datatype | Text | No | Type of data to list - All = 0, - Child = 1,- Parent = 2 If it is not sent, the parents will be listed by default. |
parentId | Number | No | Parent ID. |
Body of the petition
N/A
URI examples:
- api/v9/item/incidents/services/2418/categories
- api/v9/item/incidents/services/2418/categories?dataType=all
- api/v9/item/incidents/services/2418/categories?dataType=parent
- api/v9/item/incidents/services/2418/categories?dataType=child&parentId=2
Answer
**Listado de todos**
{
"content": [
{
"childrenCount": 3,
"hasChild": true,
"hierarchy": "Aranda Asset Management Server.Aranda Asset Management Server", "hint": null,
"id": 2,
"imageIndex": 0,
"name": "Aranda Asset Management Server",
"parentId": null
},
{
"childrenCount": 0,
"hasChild": false,
"hierarchy": "Aranda Asset Management Server.remote setup",
"hint": null,
"id": 24,
"imageIndex": 0,
"name": "remote setup",
"parentId": 2
}
],
"totalItems": 2
}
***Listado de hijos:***
{
"content": [
{
"childrenCount": 0,
"hasChild": false,
"hierarchy": "Aranda Asset Management Server.remote setup", "hint": null,
"id": 24,
"imageIndex": 0,
"name": "remote setup",
"parentId": 2
},
{
"childrenCount": 0,
"hasChild": false,
"hierarchy": "Aranda Asset Management ServerAranda Asset Management Server.dghfghfdh",
"hint": null,
"id": 5561,
"imageIndex": 0,
"name": "dghfghfdh",
"parentId": 2
},
{
"childrenCount": 0,
"hasChild": false,
"hierarchy": "Aranda Asset Management ServerAranda Asset Management Server.bbbbb", "hint": null,
"id": 6616,
"imageIndex": 0,
"name": "bbbbb",
"parentId": 2
}
],
"totalItems": 3
}
List of parents:
{
"content": [
{
"childrenCount": 3,
"hasChild": true,
"hierarchy": "Aranda Asset Management Server.Aranda Asset Management Server", "hint": null,
"id": 2,
"imageIndex": 0,
"name": "Aranda Asset Management Server",
"parentId": null
},
{
"childrenCount": 0,
"hasChild": false,
"hierarchy": "Aranda DBImport.Aranda DBImport",
"hint": null,
"id": 130,
"imageIndex": 0,
"name": "Aranda DBImport1",
"parentId": null
},
{
"childrenCount": 0,
"hasChild": false,
"hierarchy": "Aranda 360 - Incidente.Aranda 360 - Incidente", "hint": null,
"id": 2338,
"imageIndex": 0,
"name": "Aranda 360 - Incidente",
"parentId": null
}
],
"totalItems": 3
}
Response Parameters
Name | Data type | Description |
---|---|---|
content | List | List of found objects |
totalItems | Number | Total number of records found |
Error messages
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | Is null\r\nParameter Name: ItemType |
400 | BadRequest | Is null\r\nParameter name: parentId |
400 | BadRequest | Is null\r\nParameter name: serviceId |
500 | InternalServerError | FailureGetCategoriesByService |