跳转到内容

资产

使用资产模块可以跟踪组织所有的物理和虚拟资产及其财务和生命周期详情。

属性

id (长整型)
用于标识资产的唯一标识符

id (长整型)
用于标识资产的唯一标识符

示例

234759602834500

asset_tag (字符串)
用于识别资产的资产标签

asset_tag (字符串)
用于识别资产的资产标签

示例

Sample Content

state_history_comments (字符串)
更改资产状态时提供的备注。

state_history_comments (字符串)
更改资产状态时提供的备注。

示例

Sample Content

serial_number (字符串)
用于识别资产的序列号

serial_number (字符串)
用于识别资产的序列号

示例

Sample Content

barcode (字符串)
用于识别资产的唯一条形码

barcode (字符串)
用于识别资产的唯一条形码

示例

Sample Content

acquisition_date (日期)
表示资产的购置日期。

acquisition_date (日期)
表示资产的购置日期。

更多属性 全部展开

warranty_expiry (日期)

表示资产临近保修期满的日期。

warranty_expiry (日期)
表示资产临近保修期满的日期。

expiry_date (日期)

表示资产的到期日期。

expiry_date (日期)
表示资产的到期日期。

location (字符串)

资产的位置

location (字符串)
资产的位置

示例

Sample Content

is_swscan_needed (布尔值)

指示该资产是否需要进行软件扫描的布尔值

is_swscan_needed (布尔值)
指示该资产是否需要进行软件扫描的布尔值

discovered_serial_number (字符串)

发现的序列号,用于识别资产

discovered_serial_number (字符串)
发现的序列号,用于识别资产

示例

Sample Content

retain_user_site (布尔值)

指示资产是否属于其用户的站点。

retain_user_site (布尔值)
指示资产是否属于其用户的站点。

is_loanable (布尔值)

布尔值,指示该资产是否可借出

is_loanable (布尔值)
布尔值,指示该资产是否可借出

vendor (vendor)

资产的供应商

vendor (vendor)
资产的供应商

示例

{
  "vendor": {
    "name": "test-vendor",
    "id": "234567890123456"
  }
}

site (site)

资产的站点

site (site)
资产的站点

示例

{
  "site": {
    "name": "test-site",
    "id": "234567890123456"
  }
}

udf_fields (udf_fields)

保存与资产关联的自定义字段值。

udf_fields (udf_fields)
保存与资产关联的自定义字段及其值。

user (user)

分配给用户的资产

user (user)
分配给用户的资产

示例

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

department (department)

分配给部门的资产

department (department)
指示分配给资产的部门

示例

{
  "department": {
    "name": "test-department",
    "id": "234567890123456"
  }
}

used_by_asset (asset)

与该资产关联的资产

used_by_asset (asset)
与该资产关联的资产

示例

{
  "used_by_asset": {
    "name": "test-used_by_asset",
    "id": "234567890123456"
  }
}

device_type (device_type)

资产的设备类型

device_type (device_type)
指示资产的设备类型

示例

{
  "device_type": {
    "name": "test-device_type",
    "id": "234567890123456"
  }
}

credential (credential)

资产的凭据

credential (credential)
指示资产的凭据

示例

{
  "credential": {
    "name": "test-credential",
    "id": "234567890123456"
  }
}

probe (probe)

与资产关联的探针

probe (probe)
与资产关联的探针

示例

{
  "probe": {
    "name": "test-probe",
    "id": "234567890123456"
  }
}

suggested_owner (user)

资产的建议所有者

suggested_owner (user)
指示资产的建议所有者

示例

{
  "suggested_owner": {
    "name": "test-suggested_owner",
    "id": "234567890123456"
  }
}

product_type (product_type)

产品的产品类型

product_type (product_type)
资产产品的产品类型

示例

{
  "product_type": {
    "name": "test-product_type",
    "id": "234567890123456"
  }
}

ip_address (字符串)read only

资产的所有IP地址,用逗号分隔。

ip_address (字符串)
资产的所有IP地址,用逗号分隔。

示例

Sample Content

mac_address (字符串)read only

资产的所有Mac地址,用逗号分隔。

mac_address (字符串)
资产的所有Mac地址,用逗号分隔。

示例

Sample Content

region (region)read only

站点所在区域

region (region)
站点所在区域

current_cost (double)read only

资产当前价值

current_cost (double)
资产当前价值

示例

23.08

asset_depreciation (depreciation_detail)read only

为资产配置的折旧详情

asset_depreciation (depreciation_detail)
为资产配置的折旧详情

示例

{
  "asset_depreciation": {
    "name": "test-asset_depreciation",
    "id": "234567890123456"
  }
}

product_depreciation (depreciation_detail)read only

为资产产品配置的折旧详情

product_depreciation (depreciation_detail)
为资产产品配置的折旧详情

示例

{
  "product_depreciation": {
    "name": "test-product_depreciation",
    "id": "234567890123456"
  }
}

is_depreciation_configured (布尔值)read only

布尔值,指示是否配置了该资产折旧

is_depreciation_configured (布尔值)
布尔值,指示是否配置了该资产折旧

is_depreciation_calculated (布尔值)read only

布尔值,指示是否计算了该资产折旧

is_depreciation_calculated (布尔值)
布尔值,指示是否计算了该资产折旧

is_loaned (布尔值)read only

布尔值,指示该资产是否已被借出  

is_loaned (布尔值)
布尔值,指示该资产是否已被借出 

created_time (datetime)read only

指示资产创建的时间。

created_time (datetime)
指示资产创建的时间。

last_updated_time (datetime)read only

指示资产最后更新的时间

last_updated_time (datetime)
指示资产最后更新的时间

created_by (user)read only

指示创建资产的用户

created_by (user)
指示创建资产的用户

示例

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

last_updated_by (user)read only

指示更新资产的用户

last_updated_by (user)
指示更新资产的用户

purchase_order (purchase_order)read only

与该资产关联的采购订单详情

purchase_order (purchase_order)
与该资产关联的采购订单详情

is_in_contract (布尔值)read only

布尔值,指示资产是否在合同期内。

is_in_contract (布尔值)
布尔值,指示资产是否在合同期内。

last_audit (audit_history)read only

指示最后一次审计

last_audit (audit_history)
指示最后一次审计

示例

{
  "last_audit": {
    "name": "test-last_audit",
    "id": "234567890123456"
  }
}

last_success_audit (audit_history)read only

指示最后一次审计

last_success_audit (audit_history)
指示最后一次成功的审计

示例

{
  "last_success_audit": {
    "name": "test-last_success_audit",
    "id": "234567890123456"
  }
}

loan (loaned_asset)read only

指示借贷信息,例如(借贷ID,借贷期限)

loan (loaned_asset)
指示借贷信息,例如(借贷ID,借贷期限)

添加资产

此操作帮助您添加资产。

必填字段:名称,产品

Url

<service domain|custom domain>/app/<portal>/api/v3/assets

属性

id (长整型)
用于标识资产的唯一标识符

id (长整型)
用于标识资产的唯一标识符

示例

234759602834500

asset_tag (字符串)
用于识别资产的资产标签

asset_tag (字符串)
用于识别资产的资产标签

示例

Sample Content

state_history_comments (字符串)
更改资产状态时提供的备注。

state_history_comments (字符串)
更改资产状态时提供的备注。

示例

Sample Content

serial_number (字符串)
用于识别资产的序列号

serial_number (字符串)
用于识别资产的序列号

示例

Sample Content

barcode (字符串)
用于识别资产的唯一条形码

barcode (字符串)
用于识别资产的唯一条形码

示例

Sample Content

acquisition_date (日期)
表示资产的购置日期。

acquisition_date (日期)
表示资产的购置日期。

更多属性 全部展开

warranty_expiry (日期)

表示资产临近保修期满的日期。

warranty_expiry (日期)
表示资产临近保修期满的日期。

expiry_date (日期)

表示资产的到期日期。

expiry_date (日期)
表示资产的到期日期。

location (字符串)

资产的位置

location (字符串)
资产的位置

示例

Sample Content

is_swscan_needed (布尔值)

指示该资产是否需要进行软件扫描的布尔值

is_swscan_needed (布尔值)
指示该资产是否需要进行软件扫描的布尔值

discovered_serial_number (字符串)

发现的序列号,用于识别资产

discovered_serial_number (字符串)
发现的序列号,用于识别资产

示例

Sample Content

retain_user_site (布尔值)

指示资产是否属于其用户的站点。

retain_user_site (布尔值)
指示资产是否属于其用户的站点。

is_loanable (布尔值)

布尔值,指示该资产是否可借出

is_loanable (布尔值)
布尔值,指示该资产是否可借出

vendor (vendor)

资产的供应商

vendor (vendor)
资产的供应商

示例

{
  "vendor": {
    "name": "test-vendor",
    "id": "234567890123456"
  }
}

site (site)

资产的站点

site (site)
资产的站点

示例

{
  "site": {
    "name": "test-site",
    "id": "234567890123456"
  }
}

udf_fields (udf_fields)

保存与资产关联的自定义字段值。

udf_fields (udf_fields)
保存与资产关联的自定义字段及其值。

user (user)

分配给用户的资产

user (user)
分配给用户的资产

示例

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

department (department)

分配给部门的资产

department (department)
指示分配给资产的部门

示例

{
  "department": {
    "name": "test-department",
    "id": "234567890123456"
  }
}

used_by_asset (asset)

与该资产关联的资产

used_by_asset (asset)
与该资产关联的资产

示例

{
  "used_by_asset": {
    "name": "test-used_by_asset",
    "id": "234567890123456"
  }
}

device_type (device_type)

资产的设备类型

device_type (device_type)
指示资产的设备类型

示例

{
  "device_type": {
    "name": "test-device_type",
    "id": "234567890123456"
  }
}

credential (credential)

资产的凭据

credential (credential)
指示资产的凭据

示例

{
  "credential": {
    "name": "test-credential",
    "id": "234567890123456"
  }
}

probe (probe)

与资产关联的探针

probe (probe)
与资产关联的探针

示例

{
  "probe": {
    "name": "test-probe",
    "id": "234567890123456"
  }
}

suggested_owner (user)

资产的建议所有者

suggested_owner (user)
指示资产的建议所有者

示例

{
  "suggested_owner": {
    "name": "test-suggested_owner",
    "id": "234567890123456"
  }
}

product_type (product_type)

产品的产品类型

product_type (product_type)
资产产品的产品类型

示例

{
  "product_type": {
    "name": "test-product_type",
    "id": "234567890123456"
  }
}

ip_address (字符串)read only

资产的所有IP地址,用逗号分隔。

ip_address (字符串)
资产的所有IP地址,用逗号分隔。

示例

Sample Content

mac_address (字符串)read only

资产的所有Mac地址,用逗号分隔。

mac_address (字符串)
资产的所有Mac地址,用逗号分隔。

示例

Sample Content

region (region)read only

站点所在区域

region (region)
站点所在区域

current_cost (double)read only

资产当前价值

current_cost (double)
资产当前价值

示例

23.08

asset_depreciation (depreciation_detail)read only

为资产配置的折旧详情

asset_depreciation (depreciation_detail)
为资产配置的折旧详情

示例

{
  "asset_depreciation": {
    "name": "test-asset_depreciation",
    "id": "234567890123456"
  }
}

product_depreciation (depreciation_detail)read only

为资产产品配置的折旧详情

product_depreciation (depreciation_detail)
为资产产品配置的折旧详情

示例

{
  "product_depreciation": {
    "name": "test-product_depreciation",
    "id": "234567890123456"
  }
}

is_depreciation_configured (布尔值)read only

布尔值,指示是否配置了该资产折旧

is_depreciation_configured (布尔值)
布尔值,指示是否配置了该资产折旧

is_depreciation_calculated (布尔值)read only

布尔值,指示是否计算了该资产折旧

is_depreciation_calculated (布尔值)
布尔值,指示是否计算了该资产折旧

is_loaned (布尔值)read only

布尔值,指示该资产是否已被借出  

is_loaned (布尔值)
布尔值,指示该资产是否已被借出 

created_time (datetime)read only

指示资产创建的时间。

created_time (datetime)
指示资产创建的时间。

last_updated_time (datetime)read only

指示资产最后更新的时间

last_updated_time (datetime)
指示资产最后更新的时间

created_by (user)read only

指示创建资产的用户

created_by (user)
指示创建资产的用户

示例

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

last_updated_by (user)read only

指示更新资产的用户

last_updated_by (user)
指示更新资产的用户

purchase_order (purchase_order)read only

与该资产关联的采购订单详情

purchase_order (purchase_order)
与该资产关联的采购订单详情

is_in_contract (布尔值)read only

布尔值,指示资产是否在合同期内。

is_in_contract (布尔值)
布尔值,指示资产是否在合同期内。

last_audit (audit_history)read only

指示最后一次审计

last_audit (audit_history)
指示最后一次审计

示例

{
  "last_audit": {
    "name": "test-last_audit",
    "id": "234567890123456"
  }
}

last_success_audit (audit_history)read only

指示最后一次审计

last_success_audit (audit_history)
指示最后一次成功的审计

示例

{
  "last_success_audit": {
    "name": "test-last_success_audit",
    "id": "234567890123456"
  }
}

loan (loaned_asset)read only

指示借贷信息,例如(借贷ID,借贷期限)

loan (loaned_asset)
指示借贷信息,例如(借贷ID,借贷期限)

$ curl <service domain|custom domain>/app/<portal>/api/v3/assets\
      -X POST\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
  "asset": {
    "retain_user_site": false,
    "acquisition_date": {
      "value": "1478758440000"
    },
    "vendor": {
      "name": "test-name",
      "id": "1762632440935269"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "1544077640540465"
    },
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1651471221136919"
    },
    "department": {
      "name": "Administration",
      "id": "1569272846971707"
    },
    "barcode": "test-barcode",
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "2279871101619577"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "2061627944496758",
      "barcode": "test-barcode"
    },
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2248743224252246"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2022316323942908"
      },
      "udf_boolean1": false,
      "udf_long1": "2167049216006549",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "1948848567669779"
      }
    },
    "location": "test-location",
    "is_loanable": false,
    "user": {
      "name": "Lincoln",
      "id": "2332056023467953"
    },
    "state_history_comments": "test-state_history_comments"
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/assets";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "asset": {
    "retain_user_site": false,
    "acquisition_date": {
      "value": "1478758440000"
    },
    "vendor": {
      "name": "test-name",
      "id": "1762632440935269"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "1544077640540465"
    },
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1651471221136919"
    },
    "department": {
      "name": "Administration",
      "id": "1569272846971707"
    },
    "barcode": "test-barcode",
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "2279871101619577"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "2061627944496758",
      "barcode": "test-barcode"
    },
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2248743224252246"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2022316323942908"
      },
      "udf_boolean1": false,
      "udf_long1": "2167049216006549",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "1948848567669779"
      }
    },
    "location": "test-location",
    "is_loanable": false,
    "user": {
      "name": "Lincoln",
      "id": "2332056023467953"
    },
    "state_history_comments": "test-state_history_comments"
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: POST
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/assets"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "asset": {
    "retain_user_site": false,
    "acquisition_date": {
      "value": "1478758440000"
    },
    "vendor": {
      "name": "test-name",
      "id": "1762632440935269"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "1544077640540465"
    },
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1651471221136919"
    },
    "department": {
      "name": "Administration",
      "id": "1569272846971707"
    },
    "barcode": "test-barcode",
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "2279871101619577"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "2061627944496758",
      "barcode": "test-barcode"
    },
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2248743224252246"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2022316323942908"
      },
      "udf_boolean1": false,
      "udf_long1": "2167049216006549",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "1948848567669779"
      }
    },
    "location": "test-location",
    "is_loanable": false,
    "user": {
      "name": "Lincoln",
      "id": "2332056023467953"
    },
    "state_history_comments": "test-state_history_comments"
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/assets"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "asset": {
    "retain_user_site": false,
    "acquisition_date": {
      "value": "1478758440000"
    },
    "vendor": {
      "name": "test-name",
      "id": "1762632440935269"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "1544077640540465"
    },
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1651471221136919"
    },
    "department": {
      "name": "Administration",
      "id": "1569272846971707"
    },
    "barcode": "test-barcode",
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "2279871101619577"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "2061627944496758",
      "barcode": "test-barcode"
    },
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2248743224252246"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2022316323942908"
      },
      "udf_boolean1": false,
      "udf_long1": "2167049216006549",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "1948848567669779"
      }
    },
    "location": "test-location",
    "is_loanable": false,
    "user": {
      "name": "Lincoln",
      "id": "2332056023467953"
    },
    "state_history_comments": "test-state_history_comments"
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="POST")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  },
  "asset": {
    "loan": {
      "start_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "id": "1794378589216650",
      "returned_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "barcode": "test-barcode",
      "due_by_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "loan_id": {
        "display_value": "CH 44",
        "value": "44"
      }
    },
    "total_cost": 1343434.4333,
    "retain_user_site": false,
    "type": {
      "name": "Asset",
      "id": "1694816465765730"
    },
    "acquisition_date": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "current_cost": 1343434.4333,
    "mac_address": "test-mac_address",
    "vendor": {
      "name": "test-name",
      "description": "test-description",
      "id": "1762632440935269"
    },
    "suggested_owner": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1544077640540465",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "id": "1705443869314617",
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "description": "test-description",
      "id": "1651471221136919"
    },
    "department": {
      "name": "Administration",
      "id": "1569272846971707"
    },
    "barcode": "test-barcode",
    "product_depreciation": {
      "useful_life": "1884664181507407",
      "id": "1887553156383214",
      "depreciation_percent": 1343434.4333,
      "salvage_value": 1343434.4333
    },
    "operational_cost": 1343434.4333,
    "asset_tag": "test-asset_tag",
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "is_in_contract": false,
    "product": {
      "part_no": "test-part_no",
      "name": "test-name",
      "id": "2279871101619577",
      "manufacturer": "test-manufacturer"
    },
    "asset_depreciation": {
      "useful_life": "2372788052263184",
      "id": "2332434326383660",
      "depreciation_percent": 1343434.4333,
      "salvage_value": 1343434.4333
    },
    "expiry_date": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "2061627944496758",
      "barcode": "test-barcode"
    },
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "ip_address": "test-ip_address",
    "created_by": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1496847786447050",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "site": {
      "deleted": false,
      "name": "Custom Site",
      "id": "2248743224252246"
    },
    "product_type": {
      "image": "test-image",
      "name": "Workstation",
      "id": "2133479715812885"
    },
    "purchase_order": "test-purchase_order",
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2022316323942908"
      },
      "udf_boolean1": false,
      "udf_long1": "2167049216006549",
      "udf_date1": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "1948848567669779"
      }
    },
    "is_depreciation_configured": false,
    "discovered_serial_number": "test-discovered_serial_number",
    "location": "test-location",
    "is_loaned": false,
    "is_loanable": false,
    "is_depreciation_calculated": false,
    "category": {
      "name": "IT",
      "description": "test-description",
      "id": "1727197951644696"
    },
    "region": {
      "name": "test-name",
      "id": "1817558050116230"
    },
    "user": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2332056023467953",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "last_success_audit": {
      "description": "test-description",
      "id": "1560914354969749",
      "time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "status": "test-status"
    },
    "state_history_comments": "test-state_history_comments",
    "last_audit": {
      "description": "test-description",
      "id": "1579144827714947",
      "time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "status": "test-status"
    }
  }
}

编辑资产

此操作帮助您编辑资产。

Url

<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}

属性

id (长整型)
用于标识资产的唯一标识符

id (长整型)
用于标识资产的唯一标识符

示例

234759602834500

asset_tag (字符串)
用于识别资产的资产标签

asset_tag (字符串)
用于识别资产的资产标签

示例

Sample Content

state_history_comments (字符串)
更改资产状态时提供的备注。

state_history_comments (字符串)
更改资产状态时提供的备注。

示例

Sample Content

serial_number (字符串)
用于识别资产的序列号

serial_number (字符串)
用于识别资产的序列号

示例

Sample Content

barcode (字符串)
用于识别资产的唯一条形码

barcode (字符串)
用于识别资产的唯一条形码

示例

Sample Content

acquisition_date (日期)
表示资产的购置日期。

acquisition_date (日期)
表示资产的购置日期。

更多属性 全部展开

warranty_expiry (日期)

表示资产临近保修期满的日期。

warranty_expiry (日期)
表示资产临近保修期满的日期。

expiry_date (日期)

表示资产的到期日期。

expiry_date (日期)
表示资产的到期日期。

location (字符串)

资产的位置

location (字符串)
资产的位置

示例

Sample Content

is_swscan_needed (布尔值)

指示该资产是否需要进行软件扫描的布尔值

is_swscan_needed (布尔值)
指示该资产是否需要进行软件扫描的布尔值

discovered_serial_number (字符串)

发现的序列号,用于识别资产

discovered_serial_number (字符串)
发现的序列号,用于识别资产

示例

Sample Content

retain_user_site (布尔值)

指示资产是否属于其用户的站点。

retain_user_site (布尔值)
指示资产是否属于其用户的站点。

is_loanable (布尔值)

布尔值,指示该资产是否可借出

is_loanable (布尔值)
布尔值,指示该资产是否可借出

vendor (vendor)

资产的供应商

vendor (vendor)
资产的供应商

示例

{
  "vendor": {
    "name": "test-vendor",
    "id": "234567890123456"
  }
}

site (site)

资产的站点

site (site)
资产的站点

示例

{
  "site": {
    "name": "test-site",
    "id": "234567890123456"
  }
}

udf_fields (udf_fields)

保存与资产关联的自定义字段值。

udf_fields (udf_fields)
保存与资产关联的自定义字段及其值。

user (user)

分配给用户的资产

user (user)
分配给用户的资产

示例

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

department (department)

分配给部门的资产

department (department)
指示分配给资产的部门

示例

{
  "department": {
    "name": "test-department",
    "id": "234567890123456"
  }
}

used_by_asset (asset)

与该资产关联的资产

used_by_asset (asset)
与该资产关联的资产

示例

{
  "used_by_asset": {
    "name": "test-used_by_asset",
    "id": "234567890123456"
  }
}

device_type (device_type)

资产的设备类型

device_type (device_type)
指示资产的设备类型

示例

{
  "device_type": {
    "name": "test-device_type",
    "id": "234567890123456"
  }
}

credential (credential)

资产的凭据

credential (credential)
指示资产的凭据

示例

{
  "credential": {
    "name": "test-credential",
    "id": "234567890123456"
  }
}

probe (probe)

与资产关联的探针

probe (probe)
与资产关联的探针

示例

{
  "probe": {
    "name": "test-probe",
    "id": "234567890123456"
  }
}

suggested_owner (user)

资产的建议所有者

suggested_owner (user)
指示资产的建议所有者

示例

{
  "suggested_owner": {
    "name": "test-suggested_owner",
    "id": "234567890123456"
  }
}

product_type (product_type)

产品的产品类型

product_type (product_type)
资产产品的产品类型

示例

{
  "product_type": {
    "name": "test-product_type",
    "id": "234567890123456"
  }
}

ip_address (字符串)read only

资产的所有IP地址,用逗号分隔。

ip_address (字符串)
资产的所有IP地址,用逗号分隔。

示例

Sample Content

mac_address (字符串)read only

资产的所有Mac地址,用逗号分隔。

mac_address (字符串)
资产的所有Mac地址,用逗号分隔。

示例

Sample Content

region (region)read only

站点所在区域

region (region)
站点所在区域

current_cost (double)read only

资产当前价值

current_cost (double)
资产当前价值

示例

23.08

asset_depreciation (depreciation_detail)read only

为资产配置的折旧详情

asset_depreciation (depreciation_detail)
为资产配置的折旧详情

示例

{
  "asset_depreciation": {
    "name": "test-asset_depreciation",
    "id": "234567890123456"
  }
}

product_depreciation (depreciation_detail)read only

为资产产品配置的折旧详情

product_depreciation (depreciation_detail)
为资产产品配置的折旧详情

示例

{
  "product_depreciation": {
    "name": "test-product_depreciation",
    "id": "234567890123456"
  }
}

is_depreciation_configured (布尔值)read only

布尔值,指示是否配置了该资产折旧

is_depreciation_configured (布尔值)
布尔值,指示是否配置了该资产折旧

is_depreciation_calculated (布尔值)read only

布尔值,指示是否计算了该资产折旧

is_depreciation_calculated (布尔值)
布尔值,指示是否计算了该资产折旧

is_loaned (布尔值)read only

布尔值,指示该资产是否已被借出  

is_loaned (布尔值)
布尔值,指示该资产是否已被借出 

created_time (datetime)read only

指示资产创建的时间。

created_time (datetime)
指示资产创建的时间。

last_updated_time (datetime)read only

指示资产最后更新的时间

last_updated_time (datetime)
指示资产最后更新的时间

created_by (user)read only

指示创建资产的用户

created_by (user)
指示创建资产的用户

示例

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

last_updated_by (user)read only

指示更新资产的用户

last_updated_by (user)
指示更新资产的用户

purchase_order (purchase_order)read only

与该资产关联的采购订单详情

purchase_order (purchase_order)
与该资产关联的采购订单详情

is_in_contract (布尔值)read only

布尔值,指示资产是否在合同期内。

is_in_contract (布尔值)
布尔值,指示资产是否在合同期内。

last_audit (audit_history)read only

指示最后一次审计

last_audit (audit_history)
指示最后一次审计

示例

{
  "last_audit": {
    "name": "test-last_audit",
    "id": "234567890123456"
  }
}

last_success_audit (audit_history)read only

指示最后一次审计

last_success_audit (audit_history)
指示最后一次成功的审计

示例

{
  "last_success_audit": {
    "name": "test-last_success_audit",
    "id": "234567890123456"
  }
}

loan (loaned_asset)read only

指示借贷信息,例如(借贷ID,借贷期限)

loan (loaned_asset)
指示借贷信息,例如(借贷ID,借贷期限)

$ curl <service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
  "asset": {
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "1538924561770181"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "1615161639482026",
      "barcode": "test-barcode"
    },
    "retain_user_site": false,
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "acquisition_date": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2008272288144379"
    },
    "vendor": {
      "name": "test-name",
      "id": "1508598106138405"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "2333210300238087"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2265213289869560"
      },
      "udf_boolean1": false,
      "udf_long1": "1806793859686494",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "2175045251780693"
      }
    },
    "location": "test-location",
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1850985561780658"
    },
    "is_loanable": false,
    "department": {
      "name": "Administration",
      "id": "1596297793459486"
    },
    "barcode": "test-barcode",
    "user": {
      "name": "Lincoln",
      "id": "1498540603148390"
    },
    "state_history_comments": "test-state_history_comments"
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "asset": {
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "1538924561770181"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "1615161639482026",
      "barcode": "test-barcode"
    },
    "retain_user_site": false,
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "acquisition_date": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2008272288144379"
    },
    "vendor": {
      "name": "test-name",
      "id": "1508598106138405"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "2333210300238087"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2265213289869560"
      },
      "udf_boolean1": false,
      "udf_long1": "1806793859686494",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "2175045251780693"
      }
    },
    "location": "test-location",
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1850985561780658"
    },
    "is_loanable": false,
    "department": {
      "name": "Administration",
      "id": "1596297793459486"
    },
    "barcode": "test-barcode",
    "user": {
      "name": "Lincoln",
      "id": "1498540603148390"
    },
    "state_history_comments": "test-state_history_comments"
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
  "asset": {
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "1538924561770181"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "1615161639482026",
      "barcode": "test-barcode"
    },
    "retain_user_site": false,
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "acquisition_date": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2008272288144379"
    },
    "vendor": {
      "name": "test-name",
      "id": "1508598106138405"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "2333210300238087"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2265213289869560"
      },
      "udf_boolean1": false,
      "udf_long1": "1806793859686494",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "2175045251780693"
      }
    },
    "location": "test-location",
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1850985561780658"
    },
    "is_loanable": false,
    "department": {
      "name": "Administration",
      "id": "1596297793459486"
    },
    "barcode": "test-barcode",
    "user": {
      "name": "Lincoln",
      "id": "1498540603148390"
    },
    "state_history_comments": "test-state_history_comments"
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "asset": {
    "asset_tag": "test-asset_tag",
    "product": {
      "name": "test-name",
      "id": "1538924561770181"
    },
    "expiry_date": {
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "1615161639482026",
      "barcode": "test-barcode"
    },
    "retain_user_site": false,
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "value": "1478758440000"
    },
    "acquisition_date": {
      "value": "1478758440000"
    },
    "site": {
      "name": "Custom Site",
      "id": "2008272288144379"
    },
    "vendor": {
      "name": "test-name",
      "id": "1508598106138405"
    },
    "suggested_owner": {
      "name": "Lincoln",
      "id": "2333210300238087"
    },
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2265213289869560"
      },
      "udf_boolean1": false,
      "udf_long1": "1806793859686494",
      "udf_date1": {
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "2175045251780693"
      }
    },
    "location": "test-location",
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "id": "1850985561780658"
    },
    "is_loanable": false,
    "department": {
      "name": "Administration",
      "id": "1596297793459486"
    },
    "barcode": "test-barcode",
    "user": {
      "name": "Lincoln",
      "id": "1498540603148390"
    },
    "state_history_comments": "test-state_history_comments"
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  },
  "asset": {
    "loan": {
      "start_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "id": "2436059452452004",
      "returned_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "barcode": "test-barcode",
      "due_by_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "loan_id": {
        "display_value": "CH 44",
        "value": "44"
      }
    },
    "total_cost": 1343434.4333,
    "retain_user_site": false,
    "type": {
      "name": "Asset",
      "id": "2018933285562933"
    },
    "acquisition_date": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "last_updated_by": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1627526992794249",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "current_cost": 1343434.4333,
    "mac_address": "test-mac_address",
    "vendor": {
      "name": "test-name",
      "description": "test-description",
      "id": "1508598106138405"
    },
    "suggested_owner": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2333210300238087",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "id": "1811130946886149",
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "description": "test-description",
      "id": "1850985561780658"
    },
    "department": {
      "name": "Administration",
      "id": "1596297793459486"
    },
    "barcode": "test-barcode",
    "product_depreciation": {
      "useful_life": "1891194435952305",
      "id": "1863910267324447",
      "depreciation_percent": 1343434.4333,
      "salvage_value": 1343434.4333
    },
    "operational_cost": 1343434.4333,
    "asset_tag": "test-asset_tag",
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "is_in_contract": false,
    "product": {
      "part_no": "test-part_no",
      "name": "test-name",
      "id": "1538924561770181",
      "manufacturer": "test-manufacturer"
    },
    "asset_depreciation": {
      "useful_life": "1514169621635118",
      "id": "2155596492095710",
      "depreciation_percent": 1343434.4333,
      "salvage_value": 1343434.4333
    },
    "expiry_date": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "1615161639482026",
      "barcode": "test-barcode"
    },
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "ip_address": "test-ip_address",
    "created_by": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1847855233440788",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "site": {
      "deleted": false,
      "name": "Custom Site",
      "id": "2008272288144379"
    },
    "product_type": {
      "image": "test-image",
      "name": "Workstation",
      "id": "1776127248585271"
    },
    "last_updated_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "purchase_order": "test-purchase_order",
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2265213289869560"
      },
      "udf_boolean1": false,
      "udf_long1": "1806793859686494",
      "udf_date1": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "2175045251780693"
      }
    },
    "is_depreciation_configured": false,
    "discovered_serial_number": "test-discovered_serial_number",
    "location": "test-location",
    "is_loaned": false,
    "is_loanable": false,
    "is_depreciation_calculated": false,
    "category": {
      "name": "IT",
      "description": "test-description",
      "id": "1699748402743342"
    },
    "region": {
      "name": "test-name",
      "id": "1521714521705120"
    },
    "user": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1498540603148390",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "last_success_audit": {
      "description": "test-description",
      "id": "2069819757171727",
      "time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "status": "test-status"
    },
    "state_history_comments": "test-state_history_comments",
    "last_audit": {
      "description": "test-description",
      "id": "1569806904581067",
      "time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "status": "test-status"
    }
  }
}

获取资产

此操作帮助您获取资产。

Url

<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}

属性

id (长整型)
用于标识资产的唯一标识符

id (长整型)
用于标识资产的唯一标识符

示例

234759602834500

asset_tag (字符串)
用于识别资产的资产标签

asset_tag (字符串)
用于识别资产的资产标签

示例

Sample Content

state_history_comments (字符串)
更改资产状态时提供的备注。

state_history_comments (字符串)
更改资产状态时提供的备注。

示例

Sample Content

serial_number (字符串)
用于识别资产的序列号

serial_number (字符串)
用于识别资产的序列号

示例

Sample Content

barcode (字符串)
用于识别资产的唯一条形码

barcode (字符串)
用于识别资产的唯一条形码

示例

Sample Content

acquisition_date (日期)
表示资产的购置日期。

acquisition_date (日期)
表示资产的购置日期。

更多属性 全部展开

warranty_expiry (日期)

表示资产临近保修期满的日期。

warranty_expiry (日期)
表示资产临近保修期满的日期。

expiry_date (日期)

表示资产的到期日期。

expiry_date (日期)
表示资产的到期日期。

location (字符串)

资产的位置

location (字符串)
资产的位置

示例

Sample Content

is_swscan_needed (布尔值)

指示该资产是否需要进行软件扫描的布尔值

is_swscan_needed (布尔值)
指示该资产是否需要进行软件扫描的布尔值

discovered_serial_number (字符串)

发现的序列号,用于识别资产

discovered_serial_number (字符串)
发现的序列号,用于识别资产

示例

Sample Content

retain_user_site (布尔值)

指示资产是否属于其用户的站点。

retain_user_site (布尔值)
指示资产是否属于其用户的站点。

is_loanable (布尔值)

布尔值,指示该资产是否可借出

is_loanable (布尔值)
布尔值,指示该资产是否可借出

vendor (vendor)

资产的供应商

vendor (vendor)
资产的供应商

示例

{
  "vendor": {
    "name": "test-vendor",
    "id": "234567890123456"
  }
}

site (site)

资产的站点

site (site)
资产的站点

示例

{
  "site": {
    "name": "test-site",
    "id": "234567890123456"
  }
}

udf_fields (udf_fields)

保存与资产关联的自定义字段值。

udf_fields (udf_fields)
保存与资产关联的自定义字段及其值。

business_service_connections (business_service_connection)

无描述

business_service_connections (business_service_connection)

user (user)

分配给用户的资产

user (user)
分配给用户的资产

示例

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

department (department)

分配给部门的资产

department (department)
指示分配给资产的部门

示例

{
  "department": {
    "name": "test-department",
    "id": "234567890123456"
  }
}

used_by_asset (asset)

与该资产关联的资产

used_by_asset (asset)
与该资产关联的资产

示例

{
  "used_by_asset": {
    "name": "test-used_by_asset",
    "id": "234567890123456"
  }
}

device_type (device_type)

资产的设备类型

device_type (device_type)
指示资产的设备类型

示例

{
  "device_type": {
    "name": "test-device_type",
    "id": "234567890123456"
  }
}

credential (credential)

资产的凭据

credential (credential)
指示资产的凭据

示例

{
  "credential": {
    "name": "test-credential",
    "id": "234567890123456"
  }
}

probe (probe)

与资产关联的探针

probe (probe)
与资产关联的探针

示例

{
  "probe": {
    "name": "test-probe",
    "id": "234567890123456"
  }
}

suggested_owner (user)

资产的建议所有者

suggested_owner (user)
指示资产的建议所有者

示例

{
  "suggested_owner": {
    "name": "test-suggested_owner",
    "id": "234567890123456"
  }
}

product_type (product_type)

产品的产品类型

product_type (product_type)
资产产品的产品类型

示例

{
  "product_type": {
    "name": "test-product_type",
    "id": "234567890123456"
  }
}

ip_address (字符串)read only

资产的所有IP地址,用逗号分隔。

ip_address (字符串)
资产的所有IP地址,用逗号分隔。

示例

Sample Content

mac_address (字符串)read only

资产的所有Mac地址,用逗号分隔。

mac_address (字符串)
资产的所有Mac地址,用逗号分隔。

示例

Sample Content

region (region)read only

站点所在区域

region (region)
站点所在区域

current_cost (double)read only

资产当前价值

current_cost (double)
资产当前价值

示例

23.08

asset_depreciation (depreciation_detail)read only

为资产配置的折旧详情

asset_depreciation (depreciation_detail)
为资产配置的折旧详情

示例

{
  "asset_depreciation": {
    "name": "test-asset_depreciation",
    "id": "234567890123456"
  }
}

product_depreciation (depreciation_detail)read only

为资产产品配置的折旧详情

product_depreciation (depreciation_detail)
为资产产品配置的折旧详情

示例

{
  "product_depreciation": {
    "name": "test-product_depreciation",
    "id": "234567890123456"
  }
}

is_depreciation_configured (布尔值)read only

布尔值,指示是否配置了该资产折旧

is_depreciation_configured (布尔值)
布尔值,指示是否配置了该资产折旧

is_depreciation_calculated (布尔值)read only

布尔值,指示是否计算了该资产折旧

is_depreciation_calculated (布尔值)
布尔值,指示是否计算了该资产折旧

is_loaned (布尔值)read only

布尔值,指示该资产是否已被借出  

is_loaned (布尔值)
布尔值,指示该资产是否已被借出 

created_time (datetime)read only

指示资产创建的时间。

created_time (datetime)
指示资产创建的时间。

last_updated_time (datetime)read only

指示资产最后更新的时间

last_updated_time (datetime)
指示资产最后更新的时间

created_by (user)read only

指示创建资产的用户

created_by (user)
指示创建资产的用户

示例

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

last_updated_by (user)read only

指示更新资产的用户

last_updated_by (user)
指示更新资产的用户

purchase_order (purchase_order)read only

与该资产关联的采购订单详情

purchase_order (purchase_order)
与该资产关联的采购订单详情

is_in_contract (布尔值)read only

布尔值,指示资产是否在合同期内。

is_in_contract (布尔值)
布尔值,指示资产是否在合同期内。

last_audit (audit_history)read only

指示最后一次审计

last_audit (audit_history)
指示最后一次审计

示例

{
  "last_audit": {
    "name": "test-last_audit",
    "id": "234567890123456"
  }
}

last_success_audit (audit_history)read only

指示最后一次审计

last_success_audit (audit_history)
指示最后一次成功的审计

示例

{
  "last_success_audit": {
    "name": "test-last_success_audit",
    "id": "234567890123456"
  }
}

loan (loaned_asset)read only

指示借贷信息,例如(借贷ID,借贷期限)

loan (loaned_asset)
指示借贷信息,例如(借贷ID,借贷期限)

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}\
      -X GET\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};          
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}  
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  },
  "asset": {
    "loan": {
      "start_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "id": "2436059452452004",
      "returned_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "barcode": "test-barcode",
      "due_by_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "loan_id": {
        "display_value": "CH 44",
        "value": "44"
      }
    },
    "total_cost": 1343434.4333,
    "retain_user_site": false,
    "type": {
      "name": "Asset",
      "id": "2018933285562933"
    },
    "acquisition_date": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "last_updated_by": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1627526992794249",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "current_cost": 1343434.4333,
    "mac_address": "test-mac_address",
    "vendor": {
      "name": "test-name",
      "description": "test-description",
      "id": "1508598106138405"
    },
    "suggested_owner": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2333210300238087",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "id": "1811130946886149",
    "purchase_cost": 1343434.4333,
    "state": {
      "name": "In Use",
      "description": "test-description",
      "id": "1850985561780658"
    },
    "department": {
      "name": "Administration",
      "id": "1596297793459486"
    },
    "barcode": "test-barcode",
    "product_depreciation": {
      "useful_life": "1891194435952305",
      "id": "1863910267324447",
      "depreciation_percent": 1343434.4333,
      "salvage_value": 1343434.4333
    },
    "operational_cost": 1343434.4333,
    "asset_tag": "test-asset_tag",
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "is_in_contract": false,
    "product": {
      "part_no": "test-part_no",
      "name": "test-name",
      "id": "1538924561770181",
      "manufacturer": "test-manufacturer"
    },
    "asset_depreciation": {
      "useful_life": "1514169621635118",
      "id": "2155596492095710",
      "depreciation_percent": 1343434.4333,
      "salvage_value": 1343434.4333
    },
    "expiry_date": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "used_by_asset": {
      "name": "192.0.2.1",
      "id": "1615161639482026",
      "barcode": "test-barcode"
    },
    "serial_number": "test-serial_number",
    "warranty_expiry": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "ip_address": "test-ip_address",
    "created_by": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1847855233440788",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "site": {
      "deleted": false,
      "name": "Custom Site",
      "id": "2008272288144379"
    },
    "product_type": {
      "image": "test-image",
      "name": "Workstation",
      "id": "1776127248585271"
    },
    "last_updated_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "purchase_order": "test-purchase_order",
    "name": "192.0.2.1",
    "udf_fields": {
      "udf_ref1": {
        "name": "192.0.2.1",
        "id": "2265213289869560"
      },
      "udf_boolean1": false,
      "udf_long1": "1806793859686494",
      "udf_date1": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "udf_double1": "test-udf_double1",
      "udf_char1": "test-udf_char1",
      "deptheadid": {
        "name": "192.0.2.1",
        "id": "2175045251780693"
      }
    },
    "is_depreciation_configured": false,
    "discovered_serial_number": "test-discovered_serial_number",
    "location": "test-location",
    "is_loaned": false,
    "is_loanable": false,
    "is_depreciation_calculated": false,
    "category": {
      "name": "IT",
      "description": "test-description",
      "id": "1699748402743342"
    },
    "region": {
      "name": "test-name",
      "id": "1521714521705120"
    },
    "user": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1498540603148390",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "last_success_audit": {
      "description": "test-description",
      "id": "2069819757171727",
      "time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "status": "test-status"
    },
    "state_history_comments": "test-state_history_comments",
    "last_audit": {
      "description": "test-description",
      "id": "1569806904581067",
      "time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "status": "test-status"
    }
  }
}

获取资产列表

此操作帮助您获取资产列表。

Url

<service domain|custom domain>/app/<portal>/api/v3/assets

属性

id (长整型)
用于标识资产的唯一标识符

id (长整型)
用于标识资产的唯一标识符

示例

234759602834500

state_history_comments (字符串)
更改资产状态时提供的备注。

state_history_comments (字符串)
更改资产状态时提供的备注。

示例

Sample Content

barcode (字符串)
用于识别资产的唯一条形码

barcode (字符串)
用于识别资产的唯一条形码

示例

Sample Content

location (字符串)
资产的位置

location (字符串)
资产的位置

示例

Sample Content

retain_user_site (布尔值)
指示资产是否属于其用户的站点。

retain_user_site (布尔值)
指示资产是否属于其用户的站点。

site (site)
资产的站点

site (site)
资产的站点

示例

{
  "site": {
    "name": "test-site",
    "id": "234567890123456"
  }
}

更多属性 全部展开

product_type (product_type)

产品的产品类型

product_type (product_type)
资产产品的产品类型

示例

{
  "product_type": {
    "name": "test-product_type",
    "id": "234567890123456"
  }
}

created_time (datetime)read only

指示资产创建的时间。

created_time (datetime)
指示资产创建的时间。

last_updated_time (datetime)read only

指示资产最后更新的时间

last_updated_time (datetime)
指示资产最后更新的时间

created_by (user)read only

指示创建资产的用户

created_by (user)
指示创建资产的用户

示例

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

last_updated_by (user)read only

指示更新资产的用户

last_updated_by (user)
指示更新资产的用户

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/assets\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      --data-urlencode input_data='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/assets";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {};
params = {"input_data":input_data};           
response = invokeurl
[
    url: url
    type: GET
    parameters:params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/assets"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{}'@
$data = @{ 'input_data' = $input_data}    
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/assets"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{}'''       
url += "?" + urlencode({"input_data":input_data})
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "assets": [
    {
      "loan": {
        "start_time": {
          "display_value": "Nov 10, 2016 11:44 AM",
          "value": "1478758440000"
        },
        "id": "1510894167438614",
        "returned_time": {
          "display_value": "Nov 10, 2016 11:44 AM",
          "value": "1478758440000"
        },
        "barcode": "test-barcode",
        "due_by_time": {
          "display_value": "Nov 10, 2016 11:44 AM",
          "value": "1478758440000"
        },
        "loan_id": {
          "display_value": "CH 44",
          "value": "44"
        }
      },
      "retain_user_site": false,
      "type": {
        "name": "Asset",
        "id": "2221589639239391"
      },
      "last_updated_by": {
        "email_id": "lincoln@zmail.com",
        "is_technician": false,
        "sms_mail": "linc123@xys_sms.co",
        "phone": "test-phone",
        "name": "Lincoln",
        "mobile": "test-mobile",
        "id": "1767056521034237",
        "photo_url": "test-photo_url",
        "is_vip_user": false
      },
      "id": "1535924695172238",
      "purchase_cost": 1343434.4333,
      "state": {
        "name": "In Use",
        "description": "test-description",
        "id": "1880749423319170"
      },
      "barcode": "test-barcode",
      "created_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "product": {
        "part_no": "test-part_no",
        "name": "test-name",
        "id": "1976861984208771",
        "manufacturer": "test-manufacturer"
      },
      "created_by": {
        "email_id": "lincoln@zmail.com",
        "is_technician": false,
        "sms_mail": "linc123@xys_sms.co",
        "phone": "test-phone",
        "name": "Lincoln",
        "mobile": "test-mobile",
        "id": "1621855055856191",
        "photo_url": "test-photo_url",
        "is_vip_user": false
      },
      "site": {
        "deleted": false,
        "name": "Custom Site",
        "id": "1812928581155277"
      },
      "product_type": {
        "image": "test-image",
        "name": "Workstation",
        "id": "1754602739373275"
      },
      "last_updated_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "name": "192.0.2.1",
      "location": "test-location",
      "is_loanable": false,
      "category": {
        "name": "IT",
        "description": "test-description",
        "id": "1817089573167815"
      },
      "state_history_comments": "test-state_history_comments"
    }
  ],
  "response_status": [
    {
      "status_code": 2000,
      "status": "success"
    }
  ],
  "list_info": {
    "has_more_rows": false,
    "row_count": 1
  }
}

删除资产

此操作帮助您删除资产。

Url

<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}

$ curl <service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}\
      -X DELETE\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
    url: url
    type: DELETE
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method delete -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers,method="DELETE")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}