NOTE: User must me logged in as admin or agent to access this API

URL : service-desk/api/cmdb-asset/{assetId}

Method : GET

Query Parameters :

Parameter Type Possible Values Required/Optional Description
assetId Integer Required Asset Id to get its associated configured assets

Success Response:

{
  "success": true,
  "data": {
    "id": 1,
    "name": "asset 1",
    "cmdb_children": [
      {
        "id": 10,
        "name": "asset 10",
        "cmdb_children": [
          {
            "id": 11,
            "name": "asset 11",
            "cmdb_children": [
              
            ],
            "pivot": {
              "parent_asset_id": 10,
              "child_asset_id": 11,
              "cmdb_id": 22,
              "relation": "inverse"
            },
            "form_cmdb": [
              
            ]
          }
        ],
        "pivot": {
          "parent_asset_id": 1,
          "child_asset_id": 10,
          "cmdb_id": 22,
          "relation": "inverse"
        },
        "form_cmdb": [
          {
            "id": 22,
            "forward_relation_name": "Consists of",
            "inverse_relation_name": "Are part of",
            "key": "are_part_of",
            "created_at": "2021-02-15 04:13:54",
            "updated_at": "2021-02-15 04:13:54",
            "pivot": {
              "parent_asset_id": 10,
              "cmdb_id": 22,
              "child_asset_id": 11,
              "relation": "inverse"
            }
          }
        ]
      }
    ],
    "form_cmdb": [
      {
        "id": 22,
        "forward_relation_name": "Consists of",
        "inverse_relation_name": "Are part of",
        "key": "are_part_of",
        "created_at": "2021-02-15 04:13:54",
        "updated_at": "2021-02-15 04:13:54",
        "pivot": {
          "parent_asset_id": 1,
          "cmdb_id": 22,
          "child_asset_id": 10,
          "relation": "inverse"
        }
      }
    ]
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *