跳至内容

变更原因

变更原因表示发起变更请求的目的。

属性

id (长整型)
变更原因的唯一标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

name (字符串)
变更原因的名称

name (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

description (字符串)
关于变更原因的简短描述

description (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

inactive (布尔型)
表示该变更原因是否处于激活状态

inactive (布尔型)
布尔值,可能取两个值。取值为 true 或 false。

添加变更原因

此操作帮助您添加变更原因。必填字段:name

必填字段:- name

Url

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

属性

id (长整型)
变更原因的唯一标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

name (字符串)
变更原因的名称

name (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

description (字符串)
关于变更原因的简短描述

description (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

inactive (布尔型)
表示该变更原因是否处于激活状态

inactive (布尔型)
布尔值,可能取两个值。取值为 true 或 false。

$ curl <service domain|custom domain>/app/<portal>/api/v3/reasons_for_change\
      -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='{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/reasons_for_change";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
};
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/reasons_for_change"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
}
'@
$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/reasons_for_change"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
}'''
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())
{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description",
    "id": "1587865199226293"
  },
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

编辑变更原因

此操作帮助您编辑变更原因。

Url

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

属性

id (长整型)
变更原因的唯一标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

name (字符串)
变更原因的名称

name (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

description (字符串)
关于变更原因的简短描述

description (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

inactive (布尔型)
表示该变更原因是否处于激活状态

inactive (布尔型)
布尔值,可能取两个值。取值为 true 或 false。

$ curl <service domain|custom domain>/app/<portal>/api/v3/reasons_for_change/{reason_for_change_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='{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/reasons_for_change/{reason_for_change_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
};
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/reasons_for_change/{reason_for_change_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
}
'@
$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/reasons_for_change/{reason_for_change_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description"
  }
}'''
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())
{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description",
    "id": "1549204711281784"
  },
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

获取变更原因

此操作帮助您获取变更原因。

Url

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

属性

id (长整型)
变更原因的唯一标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

name (字符串)
变更原因的名称

name (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

description (字符串)
关于变更原因的简短描述

description (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

inactive (布尔型)
表示该变更原因是否处于激活状态

inactive (布尔型)
布尔值,可能取两个值。取值为 true 或 false。

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/reasons_for_change/{reason_for_change_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/reasons_for_change/{reason_for_change_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/reasons_for_change/{reason_for_change_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/reasons_for_change/{reason_for_change_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())
{
  "reason_for_change": {
    "inactive": false,
    "name": "test-name",
    "description": "test-description",
    "id": "1643086306995826"
  },
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

获取变更原因列表

此操作帮助您获取变更原因列表。

Url

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

属性

id (长整型)
变更原因的唯一标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

name (字符串)
变更原因的名称

name (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

description (字符串)
关于变更原因的简短描述

description (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

inactive (布尔型)
表示该变更原因是否处于激活状态

inactive (布尔型)
布尔值,可能取两个值。取值为 true 或 false。

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/reasons_for_change\
      -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/reasons_for_change";
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/reasons_for_change"
$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/reasons_for_change"
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"
    }
  ],
  "reasons_for_change": [
    {
      "inactive": false,
      "name": "test-name",
      "description": "test-description",
      "id": "1826181378917628"
    }
  ],
  "list_info": {
    "has_more_rows": false,
    "row_count": 1
  }
}

删除变更原因

此操作帮助您删除变更原因。

Url

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

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