Listado de Activos

Este endpoint obtiene el listado de los activos

HTTP Request

GET https://admin.cmmshere.com/api/v1/assets

Parámetros de consulta

Estos parámetros son opcionales y utilizados para filtrar e interactuar con la información obtenida. Los parámetros de filtrado (si se utilizan) se usan para buscar resultados que contengan dicho texto.

ParámetroTipoDefaultDescripción
codIntNo definidoCódigo del activo
nameStringNo definidoNombre del activo
client_idIntNo definidoID del cliente al que esta asociado el activo
offsetIntNo definidoOffset para paginación
limitIntNo definidoLimite para paginación
orderByArray["created_at", "desc"]Ordenamiento. El primer valor es el campo y el segundo la dirección ASC o DESC

Ejemplo de petición

curl --location --request GET 'https://admin.cmmshere.com/api/v1/assets' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 804|fCkDcz43egLAubMzPinRCIVUIjPUsGkvbVJ864IP' \
--header 'Cookie: XSRF-TOKEN=eyJpdiI6IkFPYmJPb2FiWE1CaFNySHhuMHlRQUE9PSIsInZhbHVlIjoibjIyTFRSdTlLbFlhYkhzTkE3ckpqQm92aUw1OG1ka3pvODllZU1YMmFjT0EwdGZZQ0NpYTk5S0ZCb0tkK2xWWnVKcjhGcVVVWko0RzVtcnlJa0JnL3NLUlE3QW5vRHN4TWVkUzlYc2VaREdtbDZBVk55cUFXSnRqTEhMeGJ1NTAiLCJtYWMiOiJlY2RmNDA0MWIzOTUwNjg2MmM0ZmYxY2EzZDY1YjJkYmNlNzAzNmQ4ZmU0OWQ1YjdkOTc1MWUwNDY4NjhlM2U4In0%3D; laravel_session=eyJpdiI6IjFYcFpaUTFveW1BOVJtTmQxTGFSQUE9PSIsInZhbHVlIjoibW9wZHdaN2NvS2RtRUJZanUyUVRscFJITGpSbG1rRkN5emFTVy94bWR6dVFwYTRHSXg5SGJvN3FtMEVwbHFmVmU5TURVazdxemtrdlJWQmlUWit0YVQ2VXdta2dmR1U2R0FlKy9VYkxzaXQ2bmV4bGhDb3ZWQzVtMmRpdmFMNjAiLCJtYWMiOiJkYzhhMzMyYTQ5M2ZmOGU5MGFiNmE3MzFmYWE3M2Y2YWQ4ZWRjNTZjNWJiNGNiMmVmYWQzZTMzOWJkNWMwMDcxIn0%3D' \
--data '{
    "client_id" : 79,
    "offset" : 0,
    "limit" : 5,
    "orderBy" : ["id", "desc"]
}'

La petición de arriba devuelve un JSON estructurado de la siguiente manera

{
    "success": true,
    "code": 200,
    "results": [
        {
            "id": 3021,
            "cod": "AS001624-13",
            "creator_id": 21,
            "client_id": 79,
            "category_id": 67,
            "sublocation_id": 2183,
            "name": "BLI N° 13 ATP - BANCO N° 2 RED A",
            "city_id": "45",
            "info_general": {
                "n_s": {
                    "id": "n_s",
                    "orden": 1,
                    "valor": "SC2021091787",
                    "mostrar": "N/S",
                    "mostrarDataTable": "1"
                },
                "direccion_modbus": {
                    "id": "direccion_modbus",
                    "orden": 2,
                    "valor": 13,
                    "mostrar": "Direccion Modbus",
                    "mostrarDataTable": "1"
                }
            },
            "observations": null,
            "unique_field": "SC2021091787",
            "status": "1",
            "geolocation": null,
            "warranty": null,
            "created_at": "2023-09-02T01:46:59.000000Z"
        },
        {
            "id": 3020,
            "cod": "AS001624-12",
            "creator_id": 21,
            "client_id": 79,
            "category_id": 67,
            "sublocation_id": 2183,
            "name": "BLI N° 12 ATP - BANCO N° 2 RED A",
            "city_id": "45",
            "info_general": {
                "n_s": {
                    "id": "n_s",
                    "orden": 1,
                    "valor": "SC2021091780",
                    "mostrar": "N/S",
                    "mostrarDataTable": "1"
                },
                "direccion_modbus": {
                    "id": "direccion_modbus",
                    "orden": 2,
                    "valor": 12,
                    "mostrar": "Direccion Modbus",
                    "mostrarDataTable": "1"
                }
            },
            "observations": null,
            "unique_field": "SC2021091780",
            "status": "1",
            "geolocation": null,
            "warranty": null,
            "created_at": "2023-09-02T01:46:59.000000Z"
        },
        {
            "id": 3019,
            "cod": "AS001624-11",
            "creator_id": 21,
            "client_id": 79,
            "category_id": 67,
            "sublocation_id": 2183,
            "name": "BLI N° 11 ATP - BANCO N° 2 RED A",
            "city_id": "45",
            "info_general": {
                "n_s": {
                    "id": "n_s",
                    "orden": 1,
                    "valor": "SC2021091807",
                    "mostrar": "N/S",
                    "mostrarDataTable": "1"
                },
                "direccion_modbus": {
                    "id": "direccion_modbus",
                    "orden": 2,
                    "valor": 11,
                    "mostrar": "Direccion Modbus",
                    "mostrarDataTable": "1"
                }
            },
            "observations": null,
            "unique_field": "SC2021091807",
            "status": "1",
            "geolocation": null,
            "warranty": null,
            "created_at": "2023-09-02T01:46:59.000000Z"
        },
        {
            "id": 3018,
            "cod": "AS001624-10",
            "creator_id": 21,
            "client_id": 79,
            "category_id": 67,
            "sublocation_id": 2183,
            "name": "BLI N° 10 ATP - BANCO N° 2 RED A",
            "city_id": "45",
            "info_general": {
                "n_s": {
                    "id": "n_s",
                    "orden": 1,
                    "valor": "SC2021091721",
                    "mostrar": "N/S",
                    "mostrarDataTable": "1"
                },
                "direccion_modbus": {
                    "id": "direccion_modbus",
                    "orden": 2,
                    "valor": 10,
                    "mostrar": "Direccion Modbus",
                    "mostrarDataTable": "1"
                }
            },
            "observations": null,
            "unique_field": "SC2021091721",
            "status": "1",
            "geolocation": null,
            "warranty": null,
            "created_at": "2023-09-02T01:46:59.000000Z"
        },
        {
            "id": 3017,
            "cod": "AS001624-09",
            "creator_id": 21,
            "client_id": 79,
            "category_id": 67,
            "sublocation_id": 2183,
            "name": "BLI N° 9 ATP - BANCO N° 2 RED A",
            "city_id": "45",
            "info_general": {
                "n_s": {
                    "id": "n_s",
                    "orden": 1,
                    "valor": "SC2021091759",
                    "mostrar": "N/S",
                    "mostrarDataTable": "1"
                },
                "direccion_modbus": {
                    "id": "direccion_modbus",
                    "orden": 2,
                    "valor": 9,
                    "mostrar": "Direccion Modbus",
                    "mostrarDataTable": "1"
                }
            },
            "observations": null,
            "unique_field": "SC2021091759",
            "status": "1",
            "geolocation": null,
            "warranty": null,
            "created_at": "2023-09-02T01:46:59.000000Z"
        }
    ]
}