跳转到内容

自定义模块

自定义模块的数据以记录形式添加。

属性

id (长整型)
用于标识自定义模块记录的唯一标识符

id (长整型)
被视为较大数值的数字数字。

示例

234759602834500

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

custom_module (custom_module)read only
添加此记录的自定义模块

custom_module (custom_module)
添加此记录的自定义模块

created_by (用户)read only
表示创建自定义模块记录的用户

created_by (用户)
表示创建自定义模块记录的用户

created_time (日期时间)read only
表示创建自定义模块记录的时间

created_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

last_updated_by (用户)read only
表示最后编辑自定义模块记录的用户

last_updated_by (用户)
表示最后编辑自定义模块记录的用户

更多属性 展开全部

last_updated_time (日期时间)read only

表示最后编辑自定义模块记录的时间

last_updated_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

deleted_time (日期时间)read only

表示自定义模块记录被移至回收站的时间

deleted_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

添加自定义模块

此操作可用于创建新的自定义模块记录。创建新记录时需要自定义模块的 api 名称。

Url

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

属性

id (长整型)
用于标识自定义模块记录的唯一标识符

id (长整型)
被视为较大数值的数字数字。

示例

234759602834500

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

custom_module (custom_module)read only
添加此记录的自定义模块

custom_module (custom_module)
添加此记录的自定义模块

created_by (用户)read only
表示创建自定义模块记录的用户

created_by (用户)
表示创建自定义模块记录的用户

created_time (日期时间)read only
表示创建自定义模块记录的时间

created_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

last_updated_by (用户)read only
表示最后编辑自定义模块记录的用户

last_updated_by (用户)
表示最后编辑自定义模块记录的用户

更多属性 展开全部

last_updated_time (日期时间)read only

表示最后编辑自定义模块记录的时间

last_updated_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

deleted_time (日期时间)read only

表示自定义模块记录被移至回收站的时间

deleted_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

$ curl <service domain|custom domain>/app/<portal>/api/v3/{custom_module_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='{
   "cm_client_portal":{
      "cm_attributes":{
         "txt_name":"John Doe",
         "num_insurance_number":"12344",
         "txt_address":"Paris",
         "txt_email":"johndoe@example.com",
         "ref_department":{
            "id":"1440000000006627"
         }
      }
   }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{custom_module_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 = {
   "cm_client_portal":{
      "cm_attributes":{
         "txt_name":"John Doe",
         "num_insurance_number":"12344",
         "txt_address":"Paris",
         "txt_email":"johndoe@example.com",
         "ref_department":{
            "id":"1440000000006627"
         }
      }
   }
};
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/{custom_module_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 = @'
{
   "cm_client_portal":{
      "cm_attributes":{
         "txt_name":"John Doe",
         "num_insurance_number":"12344",
         "txt_address":"Paris",
         "txt_email":"johndoe@example.com",
         "ref_department":{
            "id":"1440000000006627"
         }
      }
   }
}
'@
$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/{custom_module_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 = '''{
   "cm_client_portal":{
      "cm_attributes":{
         "txt_name":"John Doe",
         "num_insurance_number":"12344",
         "txt_address":"Paris",
         "txt_email":"johndoe@example.com",
         "ref_department":{
            "id":"1440000000006627"
         }
      }
   }
}'''
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"
   },
   "cm_client_portal":{
      "created_time":{
         "display_value":"Oct 13, 2021 11:42 AM",
         "value":"1634105536583"
      },
      "last_updated_by":null,
      "attachments":[
      ],
      "last_updated_time":null,
      "cm_attributes":{
         "num_insurance_number":"12344",
         "txt_address":"Paris",
         "ref_department":{
            "site":null,
            "name":"Sales",
            "id":"1440000000006627"
         },
         "txt_email":"johndoe@example.com",
         "txt_name":"John Doe"
      },
      "id":"1440000004206003",
      "custom_module":{
         "api_plural_name":"cm_client_portal",
         "name":"cm_client_portal",
         "display_name_plural":"Client Portal",
         "id":"1440000004197001",
         "display_name":"Client Portal",
         "icon_name":"cmdb-default-icon"
      },
      "created_by":{
         "email_id":"sugan@zylker.com",
         "is_technician":true,
         "sms_mail":null,
         "mobile":null,
         "last_name":"ugant",
         "user_scope":"0",
         "phone":"9791152464",
         "name":"Sugan",
         "id":"1440000000073011",
         "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
         "is_vip_user":false,
         "department":null,
         "first_name":"V",
         "job_title":null
      },
      "deleted_time":null
   }
}

编辑自定义模块

此操作可用于编辑自定义模块记录。执行此操作需要自定义模块的 api 名称和记录 ID。 

Url

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

属性

id (长整型)
用于标识自定义模块记录的唯一标识符

id (长整型)
被视为较大数值的数字数字。

示例

234759602834500

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

custom_module (custom_module)read only
添加此记录的自定义模块

custom_module (custom_module)
添加此记录的自定义模块

created_by (用户)read only
表示创建自定义模块记录的用户

created_by (用户)
表示创建自定义模块记录的用户

created_time (日期时间)read only
表示创建自定义模块记录的时间

created_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

last_updated_by (用户)read only
表示最后编辑自定义模块记录的用户

last_updated_by (用户)
表示最后编辑自定义模块记录的用户

更多属性 展开全部

last_updated_time (日期时间)read only

表示最后编辑自定义模块记录的时间

last_updated_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

deleted_time (日期时间)read only

表示自定义模块记录被移至回收站的时间

deleted_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

$ curl <service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/{custom_module_record_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='{
   "cm_client_portal":{
      "cm_attributes":{
         "num_insurance_number":"7654"
      }
   }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/{custom_module_record_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
   "cm_client_portal":{
      "cm_attributes":{
         "num_insurance_number":"7654"
      }
   }
};
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/{custom_module_api_name}/{custom_module_record_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
   "cm_client_portal":{
      "cm_attributes":{
         "num_insurance_number":"7654"
      }
   }
}
'@
$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/{custom_module_api_name}/{custom_module_record_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
   "cm_client_portal":{
      "cm_attributes":{
         "num_insurance_number":"7654"
      }
   }
}'''
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"
   },
   "cm_client_portal":{
      "created_time":{
         "display_value":"Oct 11, 2021 10:24 AM",
         "value":"1633928083117"
      },
      "last_updated_by":{
         "email_id":"sugan@zylker.com",
         "is_technician":true,
         "sms_mail":null,
         "mobile":null,
         "last_name":"ugant",
         "user_scope":"0",
         "phone":"9791152464",
         "name":"Sugan",
         "id":"1440000000073011",
         "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
         "is_vip_user":false,
         "department":null,
         "first_name":"V",
         "job_title":null
      },
      "attachments":[
      ],
      "last_updated_time":{
         "display_value":"Oct 13, 2021 11:55 AM",
         "value":"1634106329854"
      },
      "cm_attributes":{
         "num_insurance_number":"7654",
         "txt_address":"17, Pleasanton, California.",
         "ref_department":{
            "site":null,
            "name":"Administration",
            "id":"1440000000006623"
         },
         "txt_email":"abc@zylker.com",
         "txt_name":"Zylker"
      },
      "id":"1440000004197073",
      "custom_module":{
         "api_plural_name":"cm_client_portal",
         "name":"cm_client_portal",
         "display_name_plural":"Client Portal",
         "id":"1440000004197001",
         "display_name":"Client Portal",
         "icon_name":"cmdb-default-icon"
      },
      "created_by":{
         "email_id":"sugan@zylker.com",
         "is_technician":true,
         "sms_mail":null,
         "mobile":null,
         "last_name":"ugant",
         "user_scope":"0",
         "phone":"9791152464",
         "name":"Sugan",
         "id":"1440000000073011",
         "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
         "is_vip_user":false,
         "department":null,
         "first_name":"V",
         "job_title":null
      },
      "deleted_time":null
   }
}

获取自定义模块

此操作可用于获取单个自定义模块记录。执行此操作需要自定义模块的 api 名称和记录 ID。 

Url

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

属性

id (长整型)
用于标识自定义模块记录的唯一标识符

id (长整型)
被视为较大数值的数字数字。

示例

234759602834500

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

custom_module (custom_module)read only
添加此记录的自定义模块

custom_module (custom_module)
添加此记录的自定义模块

created_by (用户)read only
表示创建自定义模块记录的用户

created_by (用户)
表示创建自定义模块记录的用户

created_time (日期时间)read only
表示创建自定义模块记录的时间

created_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

last_updated_by (用户)read only
表示最后编辑自定义模块记录的用户

last_updated_by (用户)
表示最后编辑自定义模块记录的用户

更多属性 展开全部

last_updated_time (日期时间)read only

表示最后编辑自定义模块记录的时间

last_updated_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

deleted_time (日期时间)read only

表示自定义模块记录被移至回收站的时间

deleted_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/{custom_module_record_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/{custom_module_api_name}/{custom_module_record_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/{custom_module_api_name}/{custom_module_record_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/{custom_module_api_name}/{custom_module_record_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"
   },
   "cm_client_portal":{
      "created_time":{
         "display_value":"Oct 11, 2021 10:24 AM",
         "value":"1633928083117"
      },
      "last_updated_by":{
         "email_id":"sugan@zylker.com",
         "is_technician":true,
         "sms_mail":null,
         "mobile":null,
         "last_name":"M Sugan",
         "user_scope":"0",
         "phone":"9791152464",
         "name":"Sugan",
         "id":"1440000000073011",
         "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
         "is_vip_user":false,
         "department":null,
         "first_name":"V",
         "job_title":null
      },
      "attachments":[
      ],
      "last_updated_time":{
         "display_value":"Oct 11, 2021 10:25 AM",
         "value":"1633928135462"
      },
      "cm_attributes":{
         "num_insurance_number":"123",
         "txt_address":"17, Pleasanton, California.",
         "ref_department":{
            "site":null,
            "name":"Administration",
            "id":"1440000000006623"
         },
         "txt_email":"abc@zylker.com",
         "txt_name":"Zylker"
      },
      "id":"1440000004197073",
      "custom_module":{
         "api_plural_name":"cm_client_portal",
         "name":"cm_client_portal",
         "display_name_plural":"Client Portal",
         "id":"1440000004197001",
         "display_name":"Client Portal",
         "icon_name":"cmdb-default-icon"
      },
      "created_by":{
         "email_id":"sugan@zylker.com",
         "is_technician":true,
         "sms_mail":null,
         "mobile":null,
         "last_name":"M Sugan",
         "user_scope":"0",
         "phone":"9791152464",
         "name":"Sugan",
         "id":"1440000000073011",
         "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
         "is_vip_user":false,
         "department":null,
         "first_name":"V",
         "job_title":null
      },
      "deleted_time":null
   }
}

获取自定义模块列表

此操作可用于获取自定义模块所有记录的列表,执行此操作需要自定义模块的 api 名称。

Url

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

属性

id (长整型)
用于标识自定义模块记录的唯一标识符

id (长整型)
被视为较大数值的数字数字。

示例

234759602834500

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

cm_attributes (cm_attributes)
自定义模块记录的自定义属性,基于自定义模块

custom_module (custom_module)read only
添加此记录的自定义模块

custom_module (custom_module)
添加此记录的自定义模块

created_by (用户)read only
表示创建自定义模块记录的用户

created_by (用户)
表示创建自定义模块记录的用户

created_time (日期时间)read only
表示创建自定义模块记录的时间

created_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

last_updated_by (用户)read only
表示最后编辑自定义模块记录的用户

last_updated_by (用户)
表示最后编辑自定义模块记录的用户

更多属性 展开全部

last_updated_time (日期时间)read only

表示最后编辑自定义模块记录的时间

last_updated_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

deleted_time (日期时间)read only

表示自定义模块记录被移至回收站的时间

deleted_time (日期时间)
作为 JSON 对象表示的日期/时间,包含 value 和 display_value 属性。

value :以长整型格式表示的时间(自1970年1月1日以来的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/{custom_module_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='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{custom_module_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 = {};
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/{custom_module_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 = @'{}'@
$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/{custom_module_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 = '''{}'''       
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":false,
      "row_count":1
   },
   "cm_client_portal":[
      {
         "created_time":{
            "display_value":"Oct 11, 2021 10:24 AM",
            "value":"1633928083117"
         },
         "last_updated_by":{
            "email_id":"sugan@zylker.com",
            "is_technician":true,
            "sms_mail":null,
            "mobile":null,
            "last_name":"Sugan",
            "user_scope":"0",
            "phone":"9791152464",
            "name":"VSugan",
            "id":"1440000000073011",
            "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
            "is_vip_user":false,
            "department":null,
            "first_name":"V",
            "job_title":null
         },
         "last_updated_time":{
            "display_value":"Oct 11, 2021 10:25 AM",
            "value":"1633928135462"
         },
         "cm_attributes":{
            "num_insurance_number":"123",
            "txt_address":"17, Pleasanton, California.",
            "ref_department":{
               "site":null,
               "name":"Administration",
               "id":"1440000000006623"
            },
            "txt_email":"abc@zylker.com",
            "txt_name":"Zylker"
         },
         "id":"1440000004197073",
         "custom_module":{
            "api_plural_name":"cm_client_portal",
            "name":"cm_client_portal",
            "display_name_plural":"Client Portal",
            "id":"1440000004197001",
            "display_name":"Client Portal",
            "icon_name":"cmdb-default-icon"
         },
         "created_by":{
            "email_id":"sugan@zylker.com",
            "is_technician":true,
            "sms_mail":null,
            "mobile":null,
            "last_name":"Sugan",
            "user_scope":"0",
            "phone":"9791152464",
            "name":"Suga",
            "id":"1440000000073011",
            "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
            "is_vip_user":false,
            "department":null,
            "first_name":"V",
            "job_title":null
         },
         "deleted_time":null
      }
   ]
}

删除自定义模块

此操作可用于同时删除一个或多个自定义模块记录。执行此操作需要自定义模块的 api 名称和自定义模块记录的 ID。记录 ID 可以使用逗号分隔。

Url

<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}?ids={custom_module_record_ids}

$ curl <service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}?ids={custom_module_record_ids}\
      -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/{custom_module_api_name}?ids={custom_module_record_ids}";
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/{custom_module_api_name}?ids={custom_module_record_ids}"
$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/{custom_module_api_name}?ids={custom_module_record_ids}"
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"
  }
}

将自定义模块记录移至回收站

此操作可用于将自定义模块记录移动到回收站。执行此操作需要自定义模块的 api 名称和记录 ID。记录 ID 可以使用逗号分隔。

Url

<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_move_to_trash?ids=<List of custom module record ids>

$ curl <service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_move_to_trash?ids=<List of custom module record ids>\
      -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='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_move_to_trash?ids=<List of custom module record ids>";
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: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_move_to_trash?ids=<List of custom module record ids>"
$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 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/{custom_module_api_name}/_move_to_trash?ids=<List of custom module record ids>"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{}'''
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,
         "id":"1440000004206003",
         "status":"success"
      }
   ],
   "cm_client_portal":{
      "created_time":{
         "display_value":"Oct 13, 2021 11:42 AM",
         "value":"1634105536583"
      },
      "last_updated_by":null,
      "attachments":[
      ],
      "last_updated_time":null,
      "cm_attributes":{
         "num_insurance_number":"12344",
         "txt_address":"Paris",
         "ref_department":{
            "site":null,
            "name":"Sales",
            "id":"1440000000006627"
         },
         "txt_email":"johndoe@example.com",
         "txt_name":"John Doe"
      },
      "id":"1440000004206003",
      "custom_module":{
         "api_plural_name":"cm_client_portal",
         "name":"cm_client_portal",
         "display_name_plural":"Client Portal",
         "id":"1440000004197001",
         "display_name":"Client Portal",
         "icon_name":"cmdb-default-icon"
      },
      "created_by":{
         "email_id":"sugan@zylker.com",
         "is_technician":true,
         "sms_mail":null,
         "contact_info_id":"1440000000073009",
         "mobile":null,
         "last_name":"ugant",
         "user_scope":"0",
         "phone":"9791152464",
         "name":"Sugan",
         "id":"1440000000073011",
         "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
         "is_vip_user":false,
         "department":null,
         "first_name":"V",
         "job_title":null
      },
      "deleted_time":{
         "display_value":"Oct 13, 2021 12:01 PM",
         "value":"1634106663437"
      }
   }
}

从回收站恢复自定义模块

此操作可用于恢复已删除的自定义模块记录。执行此操作需要自定义模块的 api 名称和记录 ID。记录 ID 可以使用逗号分隔。

Url

<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_restore_from_trash?ids=<List of custom module record ids>

$ curl <service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_restore_from_trash?ids=<List of custom module record ids>\
      -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='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_restore_from_trash?ids=<List of custom module record ids>";
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: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/{custom_module_api_name}/_restore_from_trash?ids=<List of custom module record ids>"
$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 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/{custom_module_api_name}/_restore_from_trash?ids=<List of custom module record ids>"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{}'''
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,
         "id":"1440000004206003",
         "status":"success"
      }
   ],
   "cm_client_portal":{
      "created_time":{
         "display_value":"Oct 13, 2021 11:42 AM",
         "value":"1634105536583"
      },
      "last_updated_by":null,
      "attachments":[
      ],
      "last_updated_time":null,
      "cm_attributes":{
         "num_insurance_number":"12344",
         "txt_address":"Paris",
         "ref_department":{
            "site":null,
            "name":"Sales",
            "id":"1440000000006627"
         },
         "txt_email":"johndoe@example.com",
         "txt_name":"John Doe"
      },
      "id":"1440000004206003",
      "custom_module":{
         "api_plural_name":"cm_client_portal",
         "name":"cm_client_portal",
         "display_name_plural":"Client Portal",
         "id":"1440000004197001",
         "display_name":"Client Portal",
         "icon_name":"cmdb-default-icon"
      },
      "created_by":{
         "email_id":"sugan@zylker.com",
         "is_technician":true,
         "sms_mail":null,
         "contact_info_id":"1440000000073009",
         "mobile":null,
         "last_name":"ugant",
         "user_scope":"0",
         "phone":"9791152464",
         "name":"Sugan",
         "id":"1440000000073011",
         "photo_url":"https://contacts.local.com/file?exp=10&ID=53876454&t=user&height=60&width=60",
         "is_vip_user":false,
         "department":null,
         "first_name":"V",
         "job_title":null
      },
      "deleted_time":{
         "display_value":"Oct 13, 2021 12:01 PM",
         "value":"1634106663437"
      }
   }
}