Skip to content

Change Approval

No Description

Attributes

id (long)read only
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

approver (user)
The user who can take action on the approval

approver (user)

sent_on (datetime)
Date of approval mail sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

comments (string)
Comments given by the approver when an approval action is taken

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

action_taken_on (datetime)
Date of approval action taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

status (sdp_approval_status)
Current status of the approval. The possible values for this attribute can be Approved, Rejected, Pending Approval and To Be Sent

status (sdp_approval_status)

More Attributes Expand all

deleted (boolean)read only

Whether approval is deleted or not

deleted (boolean)
Boolean value which can have two possible values. The values are true and false.

Get List Change Approval

This operation is used to fetch all approval details present in an approval level of a change.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals

Attributes

id (long)read only
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

approver (user)
The user who can take action on the approval

approver (user)

sent_on (datetime)
Date of approval mail sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

comments (string)
Comments given by the approver when an approval action is taken

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

action_taken_on (datetime)
Date of approval action taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

status (sdp_approval_status)
Current status of the approval. The possible values for this attribute can be Approved, Rejected, Pending Approval and To Be Sent

status (sdp_approval_status)

More Attributes Expand all

deleted (boolean)read only

Whether approval is deleted or not

deleted (boolean)
Boolean value which can have two possible values. The values are true and false.

$ curl -G <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      --data-urlencode input_data='{
    "list_info": {
        "row_count": 100
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "list_info": {
        "row_count": 100
    }
};
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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{
    "list_info": {
        "row_count": 100
    }
}'@
$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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "list_info": {
        "row_count": 100
    }
}'''       
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"
        }
    ],
    "approvals": [
        {
            "approver": {
                "email_id": null,
                "name": "Heather Graham",
                "is_vipuser": false,
                "id": "6",
                "department": null
            },
            "comments": null,
            "deleted": false,
            "sent_by": null,
            "id": "601",
            "sent_on": null,
            "status": {
                "name": "To Be Sent",
                "id": "4"
            },
            "action_taken_on": null
        },
        {
            "approver": {
                "email_id": null,
                "name": "Shawn Adams",
                "is_vipuser": false,
                "id": "5",
                "department": null
            },
            "comments": null,
            "deleted": false,
            "sent_by": null,
            "id": "602",
            "sent_on": null,
            "status": {
                "name": "To Be Sent",
                "id": "4"
            },
            "action_taken_on": null
        }
    ],
    "list_info": {
        "has_more_rows": false,
        "start_index": 1,
        "row_count": 2
    }
}

Get Change Approval

This operation is used to fetch a particular approval details present in an approval level of a change.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}

Attributes

id (long)read only
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

approver (user)
The user who can take action on the approval

approver (user)

sent_on (datetime)
Date of approval mail sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

comments (string)
Comments given by the approver when an approval action is taken

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

action_taken_on (datetime)
Date of approval action taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

status (sdp_approval_status)
Current status of the approval. The possible values for this attribute can be Approved, Rejected, Pending Approval and To Be Sent

status (sdp_approval_status)

More Attributes Expand all

deleted (boolean)read only

Whether approval is deleted or not

deleted (boolean)
Boolean value which can have two possible values. The values are true and false.

$ curl -G <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}\
      -X GET\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};          
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "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"
    },
    "approval": {
        "approver": {
            "email_id": null,
            "name": "Heather Graham",
            "is_vipuser": false,
            "id": "6",
            "department": null
        },
        "comments": null,
        "deleted": false,
        "sent_by": null,
        "id": "601",
        "sent_on": null,
        "status": {
            "name": "To Be Sent",
            "id": "4"
        },
        "action_taken_on": null
    }
}

Delete Change Approval

This operation is used to delete an approval in an approval level of a change.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}\
      -X DELETE\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
response = invokeurl
[
    url: url
    type: DELETE
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "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"
  }
}

Add Change Approval

This operation is used to add an approval to an approval level of a change.

Mandatory Fields :- approver

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals

Attributes

id (long)read only
Id of the approval

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

approver (user)
The user who can take action on the approval

approver (user)

sent_on (datetime)
Date of approval mail sent

sent_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

comments (string)
Comments given by the approver when an approval action is taken

comments (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

action_taken_on (datetime)
Date of approval action taken

action_taken_on (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

status (sdp_approval_status)
Current status of the approval. The possible values for this attribute can be Approved, Rejected, Pending Approval and To Be Sent

status (sdp_approval_status)

More Attributes Expand all

deleted (boolean)read only

Whether approval is deleted or not

deleted (boolean)
Boolean value which can have two possible values. The values are true and false.

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals\
      -X POST\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
    "approvals": [
        {
            "approver": {
                "id": 6
            }
        }
    ]
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "approvals": [
        {
            "approver": {
                "id": 6
            }
        }
    ]
};
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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "approvals": [
        {
            "approver": {
                "id": 6
            }
        }
    ]
}
'@
$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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "approvals": [
        {
            "approver": {
                "id": 6
            }
        }
    ]
}'''
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,
            "id": "601",
            "status": "success"
        }
    ],
    "approvals": {
        "approver": {
            "email_id": null,
            "name": "Heather Graham",
            "is_vipuser": false,
            "id": "6",
            "department": null
        },
        "comments": null,
        "deleted": false,
        "sent_by": null,
        "id": "601",
        "sent_on": null,
        "status": {
            "name": "To Be Sent",
            "id": "4"
        },
        "action_taken_on": null
    }
}

Approve Approval

This operation is used to approve an approval in an approval level of a change.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/approve

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/approve\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
    "approval": {
        "comments": "recommend"
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/approve";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "approval": {
        "comments": "recommend"
    }
};
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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/approve"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "approval": {
        "comments": "recommend"
    }
}
'@
$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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/approve"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "approval": {
        "comments": "recommend"
    }
}'''
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"
    }
}

Reject Approval

This operation is used to reject an approval in an approval level of a change.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/reject

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/reject\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
    "approval": {
        "comments": "reject"
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/reject";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "approval": {
        "comments": "reject"
    }
};
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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/reject"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "approval": {
        "comments": "reject"
    }
}
'@
$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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/{approval_id}/reject"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "approval": {
        "comments": "reject"
    }
}'''
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"
    }
}

Send Notification

This operation is used to send notification to all approvals in an approval level of a change.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/send_notification?ids={comma_seperated_approval_ids}

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/send_notification?ids={comma_seperated_approval_ids}\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
    "approval": {
        "notification": {
            "title": "Recommendation requested for Change : ID 8",
            "description": "Please go through the Change and approve/reject"
        }
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/send_notification?ids={comma_seperated_approval_ids}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "approval": {
        "notification": {
            "title": "Recommendation requested for Change : ID 8",
            "description": "Please go through the Change and approve/reject"
        }
    }
};
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>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/send_notification?ids={comma_seperated_approval_ids}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "approval": {
        "notification": {
            "title": "Recommendation requested for Change : ID 8",
            "description": "Please go through the Change and approve/reject"
        }
    }
}
'@
$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>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/send_notification?ids={comma_seperated_approval_ids}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "approval": {
        "notification": {
            "title": "Recommendation requested for Change : ID 8",
            "description": "Please go through the Change and approve/reject"
        }
    }
}'''
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"
    },
    "approval": {
        "mail_sent_success_approvals": [
            901
        ],
        "mail_sent_failed_approvals": [],
        "empty_email_approvals": [
            601,
            602
        ]
    }
}

Get Notification Content

This operation is used to get notification content configured in an approval level of a change.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/get_notification_content

$ curl -G <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/get_notification_content\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/get_notification_content";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/get_notification_content"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "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>/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals/get_notification_content"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "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())
{
    "notification": {
        "description": "administrator has requested your recommendations for this change - asdadad. <br /><br /> Click here to view change details ${approval_link}",
        "title": "Recommendation required for change with ID: ##2##"
    },
    "response_status": {
        "status_code": 2000,
        "status": "success"
    }
}