<service domain|custom domain>/app/<portal>/api/v3/assets
Asset
All physical and virtual assets of your organization along with their financial and lifecycle details can be tracked using the Asset module.
Attributes
id (long)
Unique identifier to identify the asset
name (string)
Unique name to identify the asset
product (product)
Product of the asset
state (asset_state)
State of the asset
asset_tag (string)
Asset tag used to identify the asset
state_history_comments (string)
No Description
More Attributes Expand all
product_depreciation (depreciation_detail)read only
Depreciation details configured for the asset’s product
is_depreciation_configured (boolean)read only
Boolean value indicating whether this asset depreciation is configured or not
Add Asset
This operation helps you Add assets.
Mandatory Fields :- name, product, state
Url
Attributes
id (long)
Unique identifier to identify the asset
name (string)
Unique name to identify the asset
product (product)
Product of the asset
state (asset_state)
State of the asset
asset_tag (string)
Asset tag used to identify the asset
state_history_comments (string)
No Description
More Attributes Expand all
product_depreciation (depreciation_detail)read only
Depreciation details configured for the asset’s product
is_depreciation_configured (boolean)read only
Boolean value indicating whether this asset depreciation is configured or not
$ 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())
{
"assets": [
{
"loan": {
"start_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"id": "2202412849898869",
"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": "1851036130424706"
},
"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": "1931243440974593",
"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": "1600345397919069"
},
"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": "1833730161964620",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"id": "1940146646346105",
"purchase_cost": 1343434.4333,
"state": {
"name": "In Use",
"description": "test-description",
"id": "1997855208293323"
},
"department": {
"name": "Administration",
"id": "1646093724088044"
},
"barcode": "test-barcode",
"product_depreciation": {
"useful_life": "2075185421326656",
"id": "1773555301971862",
"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": "2203626079925056",
"manufacturer": "test-manufacturer"
},
"asset_depreciation": {
"useful_life": "1968676074506315",
"id": "2397974411710814",
"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": "2125499639284144",
"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": "2460346067969005",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "2206962023146413"
},
"product_type": {
"image": "test-image",
"name": "Workstation",
"id": "2435207563113307"
},
"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": "2076880273265196"
},
"udf_boolean1": false,
"udf_long1": "1853534370072958",
"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": "2164213274712948"
}
},
"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": "2468364707909441"
},
"region": {
"name": "test-name",
"id": "2447741868138771"
},
"user": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2013687346724848",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"last_success_audit": {
"description": "test-description",
"id": "1575342738117535",
"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": "1776509158743722",
"time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"status": "test-status"
}
}
],
"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"
},
"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": "2243837130986761",
"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": "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"
},
"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": "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"
}
}
}
Edit Asset
This operation helps you Edit assets.
Url
<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}
Attributes
id (long)
Unique identifier to identify the asset
name (string)
Unique name to identify the asset
product (product)
Product of the asset
state (asset_state)
State of the asset
asset_tag (string)
Asset tag used to identify the asset
state_history_comments (string)
No Description
More Attributes Expand all
product_depreciation (depreciation_detail)read only
Depreciation details configured for the asset’s product
is_depreciation_configured (boolean)read only
Boolean value indicating whether this asset depreciation is configured or not
$ 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())
{
"assets": [
{
"loan": {
"start_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"id": "1744337620909883",
"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": "1800817206051868"
},
"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": "2121864266215477",
"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": "1545788769730604"
},
"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": "2108625337339192",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"id": "1508772825194295",
"purchase_cost": 1343434.4333,
"state": {
"name": "In Use",
"description": "test-description",
"id": "1971363994784207"
},
"department": {
"name": "Administration",
"id": "1694429109768975"
},
"barcode": "test-barcode",
"product_depreciation": {
"useful_life": "1608242897719408",
"id": "1904654563128935",
"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": "2202151501306814",
"manufacturer": "test-manufacturer"
},
"asset_depreciation": {
"useful_life": "2133700083283865",
"id": "1892577029967910",
"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": "1527911356658909",
"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": "1490125119584500",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "2148562567851981"
},
"product_type": {
"image": "test-image",
"name": "Workstation",
"id": "2139831954407142"
},
"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": "1543141107508834"
},
"udf_boolean1": false,
"udf_long1": "1587620509526891",
"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": "1825559602438955"
}
},
"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": "1502149773159483"
},
"region": {
"name": "test-name",
"id": "1981250508163550"
},
"user": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2424818139761592",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"last_success_audit": {
"description": "test-description",
"id": "2238629254612593",
"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": "1797551065842989",
"time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"status": "test-status"
}
}
],
"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"
}
}
}
Get Asset
This operation helps you Get assets.
Url
<service domain|custom domain>/app/<portal>/api/v3/assets/{asset_id}
Attributes
id (long)
Unique identifier to identify the asset
name (string)
Unique name to identify the asset
product (product)
Product of the asset
state (asset_state)
State of the asset
asset_tag (string)
Asset tag used to identify the asset
state_history_comments (string)
No Description
More Attributes Expand all
product_depreciation (depreciation_detail)read only
Depreciation details configured for the asset’s product
is_depreciation_configured (boolean)read only
Boolean value indicating whether this asset depreciation is configured or not
$ 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())
{
"assets": [
{
"loan": {
"start_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"id": "1564901002015404",
"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": "2257318872311513"
},
"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": "2089125928670400",
"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": "2003457426462179"
},
"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": "2070944061434369",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"id": "1998127136981662",
"purchase_cost": 1343434.4333,
"state": {
"name": "In Use",
"description": "test-description",
"id": "2087215867111455"
},
"department": {
"name": "Administration",
"id": "1849032921648865"
},
"barcode": "test-barcode",
"product_depreciation": {
"useful_life": "1656568954037517",
"id": "2251993593459940",
"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": "1649203203549376",
"manufacturer": "test-manufacturer"
},
"asset_depreciation": {
"useful_life": "2066603933365113",
"id": "2336410326544922",
"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": "1765479179677795",
"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": "1886243971885872",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "2079883423354944"
},
"product_type": {
"image": "test-image",
"name": "Workstation",
"id": "2417209522785471"
},
"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": "1805303736372448"
},
"udf_boolean1": false,
"udf_long1": "1746290644152718",
"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": "2356721335361516"
}
},
"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": "2071940277814697"
},
"region": {
"name": "test-name",
"id": "2425230756096240"
},
"user": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "1744693167157971",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"last_success_audit": {
"description": "test-description",
"id": "2274279934289442",
"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": "1759193799481013",
"time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"status": "test-status"
}
}
],
"response_status": {
"status_code": 2000,
"status": "success"
},
"asset": {
"loan": {
"start_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"id": "1677147546200029",
"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": "1748369536196147"
},
"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": "1897736858263960",
"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": "1593228594457747"
},
"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": "1860664181826023",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"id": "1611845356438347",
"purchase_cost": 1343434.4333,
"state": {
"name": "In Use",
"description": "test-description",
"id": "1531546400475640"
},
"department": {
"name": "Administration",
"id": "2092662868546983"
},
"barcode": "test-barcode",
"product_depreciation": {
"useful_life": "2311771328903913",
"id": "1571246457380612",
"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": "1835467961600352",
"manufacturer": "test-manufacturer"
},
"asset_depreciation": {
"useful_life": "2038089490551292",
"id": "1777823972390846",
"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": "1514094052499177",
"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": "1883293288846247",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "1880600746673871"
},
"product_type": {
"image": "test-image",
"name": "Workstation",
"id": "1631018605207779"
},
"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": "2347763628337137"
},
"udf_boolean1": false,
"udf_long1": "1749691798136531",
"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": "1858776025388041"
}
},
"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": "2244170553855784"
},
"region": {
"name": "test-name",
"id": "1806883907696726"
},
"user": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "1711179763131227",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"last_success_audit": {
"description": "test-description",
"id": "1514835742596130",
"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": "1489158482505729",
"time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"status": "test-status"
}
}
}
Get List Asset
This operation helps you Get list assets.
Url
<service domain|custom domain>/app/<portal>/api/v3/assets
Attributes
id (long)
Unique identifier to identify the asset
name (string)
Unique name to identify the asset
product (product)
Product of the asset
state (asset_state)
State of the asset
state_history_comments (string)
No Description
barcode (string)
Unique barcode used to identify the asset
More Attributes Expand all
$ 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
}
}
Delete Asset
This operation helps you Delete assets.
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"
}
}