跳转到内容

自定义资产

自定义产品类型的详细信息可以在自定义产品类型下组织和跟踪

属性

id (长整型)
表示用于识别自定义资产的唯一标识符

id (长整型)
表示用于识别自定义资产的唯一标识符

示例

234759602834500

名称 (字符串)
表示用于识别资产的唯一名称

名称 (字符串)
表示用于识别资产的唯一名称

示例

Sample Content

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

添加自定义资产

本操作帮助您创建新的自定义资产。

必填字段 :- name

URL

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

属性

id (长整型)
表示用于识别自定义资产的唯一标识符

id (长整型)
表示用于识别自定义资产的唯一标识符

示例

234759602834500

名称 (字符串)
表示用于识别资产的唯一名称

名称 (字符串)
表示用于识别资产的唯一名称

示例

Sample Content

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

$ curl <service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}\
      -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='{
  "name": "LAP-IND-0921",
  "asset_tag": "LAP-0921",
  "serial_number": "C02XK1ABJG5J",
  "product": {
    "name": "MacBook Pro 14 M3"
  },
  "vendor": {
    "name": "Apple India Pvt Ltd"
  },
  "site": {
    "name": "Bangalore"
  },
  "user": {
    "email_id": "rita@acme.com"
  },
  "department": {
    "name": "Engineering"
  },
  "ip_address": "10.34.12.91",
  "mac_address": "8C:85:90:C1:9A:1F",
  "acquisition_date": {
    "value": "1715731200000"
  },
  "warranty_expiry": {
    "value": "1810339200000"
  },
  "is_loanable": true,
  "udf_fields": {
    "screen_size": "14 inch",
    "ram_size": 18,
    "storage_type": "NVMe",
    "storage_capacity": 1024,
    "operating_system": "macOS 15 Sequoia",
    "handover_date": {
      "value": "1716422400000"
    },
    "insurance_provider": {
      "name": "ICICI Lombard"
    }
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "name": "LAP-IND-0921",
  "asset_tag": "LAP-0921",
  "serial_number": "C02XK1ABJG5J",
  "product": {
    "name": "MacBook Pro 14 M3"
  },
  "vendor": {
    "name": "Apple India Pvt Ltd"
  },
  "site": {
    "name": "Bangalore"
  },
  "user": {
    "email_id": "rita@acme.com"
  },
  "department": {
    "name": "Engineering"
  },
  "ip_address": "10.34.12.91",
  "mac_address": "8C:85:90:C1:9A:1F",
  "acquisition_date": {
    "value": "1715731200000"
  },
  "warranty_expiry": {
    "value": "1810339200000"
  },
  "is_loanable": true,
  "udf_fields": {
    "screen_size": "14 inch",
    "ram_size": 18,
    "storage_type": "NVMe",
    "storage_capacity": 1024,
    "operating_system": "macOS 15 Sequoia",
    "handover_date": {
      "value": "1716422400000"
    },
    "insurance_provider": {
      "name": "ICICI Lombard"
    }
  }
};
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/{product_type_api_name}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "name": "LAP-IND-0921",
  "asset_tag": "LAP-0921",
  "serial_number": "C02XK1ABJG5J",
  "product": {
    "name": "MacBook Pro 14 M3"
  },
  "vendor": {
    "name": "Apple India Pvt Ltd"
  },
  "site": {
    "name": "Bangalore"
  },
  "user": {
    "email_id": "rita@acme.com"
  },
  "department": {
    "name": "Engineering"
  },
  "ip_address": "10.34.12.91",
  "mac_address": "8C:85:90:C1:9A:1F",
  "acquisition_date": {
    "value": "1715731200000"
  },
  "warranty_expiry": {
    "value": "1810339200000"
  },
  "is_loanable": true,
  "udf_fields": {
    "screen_size": "14 inch",
    "ram_size": 18,
    "storage_type": "NVMe",
    "storage_capacity": 1024,
    "operating_system": "macOS 15 Sequoia",
    "handover_date": {
      "value": "1716422400000"
    },
    "insurance_provider": {
      "name": "ICICI Lombard"
    }
  }
}
'@
$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/{product_type_api_name}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "name": "LAP-IND-0921",
  "asset_tag": "LAP-0921",
  "serial_number": "C02XK1ABJG5J",
  "product": {
    "name": "MacBook Pro 14 M3"
  },
  "vendor": {
    "name": "Apple India Pvt Ltd"
  },
  "site": {
    "name": "Bangalore"
  },
  "user": {
    "email_id": "rita@acme.com"
  },
  "department": {
    "name": "Engineering"
  },
  "ip_address": "10.34.12.91",
  "mac_address": "8C:85:90:C1:9A:1F",
  "acquisition_date": {
    "value": "1715731200000"
  },
  "warranty_expiry": {
    "value": "1810339200000"
  },
  "is_loanable": true,
  "udf_fields": {
    "screen_size": "14 inch",
    "ram_size": 18,
    "storage_type": "NVMe",
    "storage_capacity": 1024,
    "operating_system": "macOS 15 Sequoia",
    "handover_date": {
      "value": "1716422400000"
    },
    "insurance_provider": {
      "name": "ICICI Lombard"
    }
  }
}'''
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" }
  ],
  "custom_asset_laptop": {
    "id"            : "12000000183045",
    "name"          : "LAP-IND-0921",
    "asset_tag"     : "LAP-0921",
    "serial_number" : "C02XK1ABJG5J",
    "product_type"  : { "id": "12000000034011", "name": "Laptop" },
    "product"       : { "id": "12000000034178", "name": "MacBook Pro 14 M3" },
    "vendor"        : { "id": "12000000017900", "name": "Apple India Pvt Ltd" },
    "state"         : { "id": "12000000005001", "name": "In Stock" },
    "site"          : { "id": "12000000003012", "name": "Bangalore" },
    "user"          : { "id": "12000000060145", "email_id": "rita@acme.com" },
    "ip_address"    : "10.34.12.91",
    "mac_address"   : "8C:85:90:C1:9A:1F",
    "acquisition_date": { "value": "1715731200000", "display_value": "May 15, 2024 12:00 AM" },
    "warranty_expiry" : { "value": "1810339200000", "display_value": "May 15, 2027 12:00 AM" },
    "is_loanable"   : true,
    "udf_fields": {
      "screen_size"      : "14 inch",
      "ram_size"         : 18,
      "storage_type"     : "NVMe",
      "storage_capacity" : 1024,
      "operating_system" : "macOS 15 Sequoia",
      "handover_date"    : { "value": "1716422400000", "display_value": "May 23, 2024 12:00 AM" },
      "insurance_provider": { "id": "12000000017945", "name": "ICICI Lombard" }
    },
    "created_time"  : { "value": "1747312033000", "display_value": "May 15, 2026 06:30 PM" },
    "created_by"    : { "id": "12000000060001", "email_id": "admin@acme.com" }
  }
}

编辑自定义资产

本操作帮助您编辑自定义资产。

URL

<service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}/{id}

属性

id (长整型)
表示用于识别自定义资产的唯一标识符

id (长整型)
表示用于识别自定义资产的唯一标识符

示例

234759602834500

名称 (字符串)
表示用于识别资产的唯一名称

名称 (字符串)
表示用于识别资产的唯一名称

示例

Sample Content

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

$ curl <service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}/{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='{
  "state": {
    "name": "In Use"
  },
  "user": {
    "email_id": "arjun@mail.com"
  },
  "location": "Tower B - 3rd floor",
  "udf_fields": {
    "handover_date": {
      "value": "1747094400000"
    },
    "ram_size": 36
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}/{id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "state": {
    "name": "In Use"
  },
  "user": {
    "email_id": "arjun@mail.com"
  },
  "location": "Tower B - 3rd floor",
  "udf_fields": {
    "handover_date": {
      "value": "1747094400000"
    },
    "ram_size": 36
  }
};
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/{product_type_api_name}/{id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
  "state": {
    "name": "In Use"
  },
  "user": {
    "email_id": "arjun@mail.com"
  },
  "location": "Tower B - 3rd floor",
  "udf_fields": {
    "handover_date": {
      "value": "1747094400000"
    },
    "ram_size": 36
  }
}
'@
$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/{product_type_api_name}/{id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "state": {
    "name": "In Use"
  },
  "user": {
    "email_id": "arjun@mail.com"
  },
  "location": "Tower B - 3rd floor",
  "udf_fields": {
    "handover_date": {
      "value": "1747094400000"
    },
    "ram_size": 36
  }
}'''
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" }],
  "custom_asset_laptop": {
    "id"        : "12000000183045",
    "state"     : { "id": "12000000005002", "name": "In Use" },
    "user"      : { "id": "12000000060178", "email_id": "arjun@mail.com" },
    "location"  : "Tower B - 3rd floor",
    "udf_fields": {
      "handover_date" : { "value": "1747094400000", "display_value": "May 12, 2026 04:30 PM" },
      "ram_size"      : 36
    },
    "last_updated_time": { "value": "1747312500000", "display_value": "May 15, 2026 06:38 PM" },
    "last_updated_by" : { "email_id": "admin@acme.com" }
  }
}

获取自定义资产

本操作帮助您获取自定义资产。

URL

<service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}/{id}

属性

id (长整型)
表示用于识别自定义资产的唯一标识符

id (长整型)
表示用于识别自定义资产的唯一标识符

示例

234759602834500

名称 (字符串)
表示用于识别资产的唯一名称

名称 (字符串)
表示用于识别资产的唯一名称

示例

Sample Content

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

udf_fields (udf_fields)
保存为特定产品类型及其父类型创建的附加字段。

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}/{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/{product_type_api_name}/{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/{product_type_api_name}/{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/{product_type_api_name}/{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" }],
  "custom_asset_laptop": {
    "id"            : "12000000183045",
    "name"          : "LAP-IND-0921",
    "asset_tag"     : "LAP-0921",
    "serial_number" : "C02XK1ABJG5J",
    "product_type"  : { "id": "12000000034011", "name": "Laptop" },
    "product"       : { "id": "12000000034178", "name": "MacBook Pro 14 M3" },
    "vendor"        : { "id": "12000000017900", "name": "Apple India Pvt Ltd" },
    "state"         : { "id": "12000000005002", "name": "In Use" },
    "user"          : { "id": "12000000060178", "email_id": "arjun@mail.com" },
    "site"          : { "id": "12000000003012", "name": "Bangalore" },
    "location"      : "Tower B - 3rd floor",
    "ip_address"    : "10.34.12.91",
    "mac_address"   : "8C:85:90:C1:9A:1F",
    "is_loanable"   : true,
    "is_in_contract": true,
    "current_cost"  : 152400.00,
    "warranty_expiry": { "value": "1810339200000", "display_value": "May 15, 2027 12:00 AM" },
    "udf_fields": {
      "screen_size"      : "14 inch",
      "ram_size"         : 36,
      "storage_type"     : "NVMe",
      "storage_capacity" : 1024,
      "operating_system" : "macOS 15 Sequoia",
      "handover_date"    : { "value": "1747094400000", "display_value": "May 12, 2026 04:30 PM" },
      "insurance_provider": { "id": "12000000017945", "name": "ICICI Lombard" }
    },
    "created_time"     : { "value": "1715731200000", "display_value": "May 15, 2024 12:00 AM" },
    "last_updated_time": { "value": "1747312500000", "display_value": "May 15, 2026 06:38 PM" }
  }
}

获取自定义资产列表

本操作帮助您获取所有自定义资产列表。

URL

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

属性

id (长整型)
表示用于识别自定义资产的唯一标识符

id (长整型)
表示用于识别自定义资产的唯一标识符

示例

234759602834500

名称 (字符串)
表示用于识别资产的唯一名称

名称 (字符串)
表示用于识别资产的唯一名称

示例

Sample Content

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}\
      -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='{
  "list_info": {
    "row_count": 50,
    "start_index": 1,
    "sort_field": "last_updated_time",
    "sort_order": "desc",
    "get_total_count": true,
    "search_criteria": [
      {
        "field": "state.name",
        "condition": "is",
        "value": "In Use"
      },
      {
        "field": "udf_fields.storage_capacity",
        "condition": "gte",
        "value": "512",
        "logical_operator": "AND"
      },
      {
        "field": "warranty_expiry",
        "condition": "lt",
        "value": "1735689600000",
        "logical_operator": "AND"
      }
    ]
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "list_info": {
    "row_count": 50,
    "start_index": 1,
    "sort_field": "last_updated_time",
    "sort_order": "desc",
    "get_total_count": true,
    "search_criteria": [
      {
        "field": "state.name",
        "condition": "is",
        "value": "In Use"
      },
      {
        "field": "udf_fields.storage_capacity",
        "condition": "gte",
        "value": "512",
        "logical_operator": "AND"
      },
      {
        "field": "warranty_expiry",
        "condition": "lt",
        "value": "1735689600000",
        "logical_operator": "AND"
      }
    ]
  }
};
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/{product_type_api_name}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{
  "list_info": {
    "row_count": 50,
    "start_index": 1,
    "sort_field": "last_updated_time",
    "sort_order": "desc",
    "get_total_count": true,
    "search_criteria": [
      {
        "field": "state.name",
        "condition": "is",
        "value": "In Use"
      },
      {
        "field": "udf_fields.storage_capacity",
        "condition": "gte",
        "value": "512",
        "logical_operator": "AND"
      },
      {
        "field": "warranty_expiry",
        "condition": "lt",
        "value": "1735689600000",
        "logical_operator": "AND"
      }
    ]
  }
}'@
$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/{product_type_api_name}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "list_info": {
    "row_count": 50,
    "start_index": 1,
    "sort_field": "last_updated_time",
    "sort_order": "desc",
    "get_total_count": true,
    "search_criteria": [
      {
        "field": "state.name",
        "condition": "is",
        "value": "In Use"
      },
      {
        "field": "udf_fields.storage_capacity",
        "condition": "gte",
        "value": "512",
        "logical_operator": "AND"
      },
      {
        "field": "warranty_expiry",
        "condition": "lt",
        "value": "1735689600000",
        "logical_operator": "AND"
      }
    ]
  }
}'''       
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())
{
  "response_status": [{ "status_code": 2000, "status": "success" }],
  "list_info": {
    "has_more_rows" : true,
    "start_index"   : 1,
    "row_count"     : 50,
    "total_count"   : 137
  },
  "custom_asset_laptops": [
    {
      "id"          : "12000000183045",
      "name"        : "LAP-IND-0921",
      "asset_tag"   : "LAP-0921",
      "product"     : { "name": "MacBook Pro 14 M3" },
      "state"       : { "name": "In Use" },
      "user"        : { "email_id": "arjun@mail.com" },
      "udf_fields"  : { "storage_capacity": 1024, "ram_size": 36 }
    },
    {
      "id"          : "12000000183071",
      "name"        : "LAP-IND-0938",
      "asset_tag"   : "LAP-0938",
      "product"     : { "name": "Latitude 7440" },
      "state"       : { "name": "In Use" },
      "user"        : { "email_id": "kavya@mail.com" },
      "udf_fields"  : { "storage_capacity": 512, "ram_size": 16 }
    }
  ]
}

删除自定义资产

本操作帮助您删除自定义资产。

URL

<service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}/{id}

$ curl <service domain|custom domain>/app/<portal>/api/v3/{product_type_api_name}/{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/{product_type_api_name}/{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/{product_type_api_name}/{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/{product_type_api_name}/{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"
  }
}