nofusscomputing / centurion_erp

An ERP with a focus on ITSM and Automation
MIT License
0 stars 0 forks source link

API fields for devices #317

Open jasonpagetas opened 1 month ago

jasonpagetas commented 1 month ago

Add the following API fields for creating new devices

manufacturer type model

Links

jon-nfc commented 1 month ago

this work will be done as part of #248.

jon-nfc commented 2 days ago

@jasonpagetas,

how's this for the available fields? This will be available in API v2 (v1.4) dow it cover the crux of this issue


{
    "id": 24,
    "status_icon": [
        {
            "name": "device_status_unk",
            "style": "icon-device-status-unk"
        }
    ],
    "display_name": "a-random-device",
    "name": "a-random-device",
    "device_type": {
        "id": 1,
        "display_name": "Computer",
        "name": "Computer",
        "url": "http://127.0.0.1:8002/api/v2/settings/device_type/1"
    },
    "model_notes": "gfhfgh gfh fghf fghfgh",
    "serial_number": "",
    "uuid": null,
    "is_global": false,
    "is_virtual": false,
    "device_model": {
        "id": 6,
        "display_name": "hfghfg test",
        "name": "test",
        "url": "http://127.0.0.1:8002/api/v2/settings/device_model/6"
    },
    "config": null,
    "rendered_config": {
        "software": [
            {
                "name": "accountsservice",
                "state": "present"
            }
        ]
    },
    "inventorydate": null,
    "context": {},
    "created": "2024-06-13T21:27:47.159500Z",
    "modified": "2024-10-04T05:33:06.889211Z",
    "organization": {
        "id": 2,
        "display_name": "mmm",
        "name": "mmm",
        "url": "http://127.0.0.1:8002/api/v2/access/organization/2"
    },
    "_urls": {
        "_self": "http://127.0.0.1:8002/api/v2/itam/device/24",
        "device_model": "http://127.0.0.1:8002/api/v2/settings/device_model",
        "device_type": "http://127.0.0.1:8002/api/v2/settings/device_type",
        "external_links": "http://127.0.0.1:8002/api/v2/settings/external_link?devices=true",
        "history": "http://127.0.0.1:8002/api/v2/core/device/24/history",
        "notes": "http://127.0.0.1:8002/api/v2/itam/device/24/notes",
        "service": "http://127.0.0.1:8002/api/v2/itam/device/24/service",
        "software": "http://127.0.0.1:8002/api/v2/itam/device/24/software",
        "tickets": "http://127.0.0.1:8002/api/v2/core/device/24/item_ticket"
    }
}