Home
Generalidades Collapse menú
    Manejo de Categorías

    Lista de categorías

    Detalles de la petición

    • Uri: /api/v9/item/{itemType}/services/{serviceId}/categories?dataType={dataType}&parentId= {parentId}

    • Tipo: GET

    • Encabezados requeridos: content-type: application/json
      X-Authorization: Bearer {token}

    Parámetros

    Nombre Tipo de dato Obligatorio Descripción
    itemType Texto Si Identificador del tipo de ítem
    serviceId Texto Si Identificador del servicio
    dataType Texto No Tipo de datos a listar - All = 0, - Child = 1,- Parent = 2 Si no se envía se tomará por defecto listar los padres.
    parentId Número No Identificador del padre.

    Cuerpo de la petición

    N/A

    Ejemplos URI:

    • 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

    Respuesta

    **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
    
    }
    

    Listado de padres:

    {
    
          "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
    
    }
    

    Parámetros Response

    Nombre Tipo de dato Descripción
    content Lista Listado de objetos encontrados
    totalItems Número Número total de registros encontrados

    Mensajes de error

    Código Estado HTTP Mensaje de error
    400 BadRequest Is null\r\nNombre del parámetro: ItemType
    400 BadRequest Is null\r\nNombre del parámetro: parentId
    400 BadRequest Is null\r\nNombre del parámetro: serviceId
    500 InternalServerError FailureGetCategoriesByService