Skip to content

Change Approval Level

With Multi Level Approval, it is possible that there will be several multi-level approval processes for a single Change Request.

Attributes

id (long)read only
Denotes the id of the Approval Level.

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

Example

234759602834500

level (int)read only
Denotes the Approval Level.

level (int)
Numerical digits which are considered to have smaller numbers.

Example

39

name (string)
Denotes the name of the Approval Level

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

Example

Sample Content

status (sdp_approval_status)
Denotes the status of the approval level.

status (sdp_approval_status)

comments (string)
Denotes the comments provided by the approval.

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

Example

Sample Content

action_taken_by (orguser)
Denotes the user who approved the approval level.

action_taken_by (orguser)

More Attributes Expand all

action_taken_on (datetime)

Denotes the date when approval level was approved.

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.

created_by (orguser)read only

Denotes the user who created the approval level.

created_by (orguser)

created_on (datetime)read only

Denotes the date when the approval level was created.

created_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.

stage (change_stage)

No Description

stage (change_stage)

rule (JSONObject)

Denotes the rule of the approval level.
show attribute

rule (JSONObject)

type (string)

No Description

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

Example

Sample Content

value (string)

No Description

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

Example

Sample Content

deleted (boolean)read only

Denotes whether the approval level is deleted.

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

approvals (change_approval)

Denotes the approvals of the approval level.

approvals (change_approval)

is_current (boolean)read only

Denotes whether the approval level is the current one or not.

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

Add Change Approval Level

This operation adds an approval level for the given change id. The name, stage, rule and approvals for the level can be given as input data.

Mandatory Fields :- name, stage, rule

Url

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

Attributes

id (long)read only
Denotes the id of the Approval Level.

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

Example

234759602834500

level (int)read only
Denotes the Approval Level.

level (int)
Numerical digits which are considered to have smaller numbers.

Example

39

name (string)
Denotes the name of the Approval Level

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

Example

Sample Content

status (sdp_approval_status)
Denotes the status of the approval level.

status (sdp_approval_status)

comments (string)
Denotes the comments provided by the approval.

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

Example

Sample Content

action_taken_by (orguser)
Denotes the user who approved the approval level.

action_taken_by (orguser)

More Attributes Expand all

action_taken_on (datetime)

Denotes the date when approval level was approved.

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.

created_by (orguser)read only

Denotes the user who created the approval level.

created_by (orguser)

created_on (datetime)read only

Denotes the date when the approval level was created.

created_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.

stage (change_stage)

No Description

stage (change_stage)

rule (JSONObject)

Denotes the rule of the approval level.
show attribute

rule (JSONObject)

type (string)

No Description

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

Example

Sample Content

value (string)

No Description

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

Example

Sample Content

deleted (boolean)read only

Denotes whether the approval level is deleted.

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

approvals (change_approval)

Denotes the approvals of the approval level.

approvals (change_approval)

is_current (boolean)read only

Denotes whether the approval level is the current one or not.

is_current (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\
      -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='{
    "approval_level": {
        "name": "Last level",
        "rule": {
            "type": "percent",
            "value": "90"
        },
        "stage": {
            "id": "1"
        },
        "approvals": [
            {
                "approver": {
                    "id": "5"
                }
            },
            {
                "approver": {
                    "id": "6"
                }
            }
        ]
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "approval_level": {
        "name": "Last level",
        "rule": {
            "type": "percent",
            "value": "90"
        },
        "stage": {
            "id": "1"
        },
        "approvals": [
            {
                "approver": {
                    "id": "5"
                }
            },
            {
                "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"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "approval_level": {
        "name": "Last level",
        "rule": {
            "type": "percent",
            "value": "90"
        },
        "stage": {
            "id": "1"
        },
        "approvals": [
            {
                "approver": {
                    "id": "5"
                }
            },
            {
                "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"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "approval_level": {
        "name": "Last level",
        "rule": {
            "type": "percent",
            "value": "90"
        },
        "stage": {
            "id": "1"
        },
        "approvals": [
            {
                "approver": {
                    "id": "5"
                }
            },
            {
                "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,
        "status": "success"
    },
    "approval_level": {
        "request": null,
        "comments": null,
        "change_stage": {
            "internal_name": "Submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "level": 1,
        "purchase_request": null,
        "release": null,
        "action_taken_by": {
            "email_id": null,
            "phone": null,
            "name": "System",
            "mobile": null,
            "profile_pic": null,
            "is_vipuser": false,
            "id": "1",
            "department": null
        },
        "change": {
            "short_description": "",
            "id": "48",
            "title": "12345",
            "change_requester": null
        },
        "rule": {
            "type": "percent",
            "value": "anyone_approves"
        },
        "created_by": {
            "email_id": null,
            "phone": null,
            "name": "System",
            "mobile": null,
            "profile_pic": null,
            "is_vipuser": false,
            "id": "1",
            "department": null
        },
        "deleted": false,
        "stage": {
            "internal_name": "Submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "created_on": {
            "display_value": "Jan 22, 2023 11:49 AM",
            "value": "1674368354483"
        },
        "purchase_order": null,
        "approvals": [
            {
                "approver": {
                    "email_id": "guest@zylker.com",
                    "phone": "1122334455",
                    "name": "administrator",
                    "mobile": "1234567890",
                    "profile_pic": null,
                    "is_vipuser": false,
                    "id": "5",
                    "department": null
                },
                "comments": null,
                "approval_level": {
                    "request": null,
                    "change_stage": {
                        "id": "1"
                    },
                    "level": 1,
                    "purchase_order": null,
                    "purchase_request": null,
                    "release": null,
                    "change": {
                        "id": "48"
                    },
                    "name": "Level Created By Workflow Statement - Test",
                    "id": "8",
                    "status": {
                        "id": "1"
                    }
                },
                "sent_on": {
                    "display_value": "Jan 22, 2023 11:49 AM",
                    "value": "1674368354915"
                },
                "org_role": null,
                "action_by": null,
                "deleted": false,
                "sent_by": {
                    "email_id": null,
                    "phone": null,
                    "name": "System",
                    "mobile": null,
                    "profile_pic": null,
                    "is_vipuser": false,
                    "id": "1",
                    "department": null
                },
                "id": "10",
                "obo_approver": null,
                "email": "guest@zylker.com",
                "key": "cf0d7cb5-6276-4469-8608-d0149d90de7a",
                "status": {
                    "name": "Pending Approval",
                    "id": "1"
                },
                "action_taken_on": null
            }
        ],
        "name": "Level Created By Workflow Statement - Test",
        "id": "8",
        "is_current": false,
        "status": {
            "name": "Pending Approval",
            "id": "1"
        },
        "action_taken_on": {
            "display_value": "Jan 22, 2023 11:49 AM",
            "value": "1674368354915"
        }
    }
}

Edit Change Approval Level

This operation is used to edit the approval level. The details to edit the level are given in the input data.

Url

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

Attributes

id (long)read only
Denotes the id of the Approval Level.

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

Example

234759602834500

level (int)read only
Denotes the Approval Level.

level (int)
Numerical digits which are considered to have smaller numbers.

Example

39

name (string)
Denotes the name of the Approval Level

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

Example

Sample Content

status (sdp_approval_status)
Denotes the status of the approval level.

status (sdp_approval_status)

comments (string)
Denotes the comments provided by the approval.

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

Example

Sample Content

action_taken_by (orguser)
Denotes the user who approved the approval level.

action_taken_by (orguser)

More Attributes Expand all

action_taken_on (datetime)

Denotes the date when approval level was approved.

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.

created_by (orguser)read only

Denotes the user who created the approval level.

created_by (orguser)

created_on (datetime)read only

Denotes the date when the approval level was created.

created_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.

stage (change_stage)

No Description

stage (change_stage)

rule (JSONObject)

Denotes the rule of the approval level.
show attribute

rule (JSONObject)

type (string)

No Description

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

Example

Sample Content

value (string)

No Description

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

Example

Sample Content

deleted (boolean)read only

Denotes whether the approval level is deleted.

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

approvals (change_approval)

Denotes the approvals of the approval level.

approvals (change_approval)

is_current (boolean)read only

Denotes whether the approval level is the current one or not.

is_current (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/{approval_level_id}\
      -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_level": {
        "name": "Level 4",
        "rule": {
            "type": "percent",
            "value": "100"
        }
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "approval_level": {
        "name": "Level 4",
        "rule": {
            "type": "percent",
            "value": "100"
        }
    }
};
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}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
    "approval_level": {
        "name": "Level 4",
        "rule": {
            "type": "percent",
            "value": "100"
        }
    }
}
'@
$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}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "approval_level": {
        "name": "Level 4",
        "rule": {
            "type": "percent",
            "value": "100"
        }
    }
}'''
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_level": {
        "request": null,
        "comments": null,
        "change_stage": {
            "internal_name": "Submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "level": 1,
        "purchase_request": null,
        "release": null,
        "action_taken_by": {
            "email_id": null,
            "phone": null,
            "name": "System",
            "mobile": null,
            "profile_pic": null,
            "is_vipuser": false,
            "id": "1",
            "department": null
        },
        "change": {
            "short_description": "",
            "id": "48",
            "title": "12345",
            "change_requester": null
        },
        "rule": {
            "type": "percent",
            "value": "anyone_approves"
        },
        "created_by": {
            "email_id": null,
            "phone": null,
            "name": "System",
            "mobile": null,
            "profile_pic": null,
            "is_vipuser": false,
            "id": "1",
            "department": null
        },
        "deleted": false,
        "stage": {
            "internal_name": "Submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "created_on": {
            "display_value": "Jan 22, 2023 11:49 AM",
            "value": "1674368354483"
        },
        "purchase_order": null,
        "approvals": [
            {
                "approver": {
                    "email_id": "guest@zylker.com",
                    "phone": "1122334455",
                    "name": "administrator",
                    "mobile": "1234567890",
                    "profile_pic": null,
                    "is_vipuser": false,
                    "id": "5",
                    "department": null
                },
                "comments": null,
                "approval_level": {
                    "request": null,
                    "change_stage": {
                        "id": "1"
                    },
                    "level": 1,
                    "purchase_order": null,
                    "purchase_request": null,
                    "release": null,
                    "change": {
                        "id": "48"
                    },
                    "name": "Level Created By Workflow Statement - Test",
                    "id": "8",
                    "status": {
                        "id": "1"
                    }
                },
                "sent_on": {
                    "display_value": "Jan 22, 2023 11:49 AM",
                    "value": "1674368354915"
                },
                "org_role": null,
                "action_by": null,
                "deleted": false,
                "sent_by": {
                    "email_id": null,
                    "phone": null,
                    "name": "System",
                    "mobile": null,
                    "profile_pic": null,
                    "is_vipuser": false,
                    "id": "1",
                    "department": null
                },
                "id": "10",
                "obo_approver": null,
                "email": "guest@zylker.com",
                "key": "cf0d7cb5-6276-4469-8608-d0149d90de7a",
                "status": {
                    "name": "Pending Approval",
                    "id": "1"
                },
                "action_taken_on": null
            }
        ],
        "name": "Level Created By Workflow Statement - Test",
        "id": "8",
        "is_current": false,
        "status": {
            "name": "Pending Approval",
            "id": "1"
        },
        "action_taken_on": {
            "display_value": "Jan 22, 2023 11:49 AM",
            "value": "1674368354915"
        }
    }
}

Get Change Approval Level

This operation is used to get the details of an approval level.

Url

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

Attributes

id (long)read only
Denotes the id of the Approval Level.

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

Example

234759602834500

stage (change_stage)
No Description

stage (change_stage)

name (string)
Denotes the name of the Approval Level

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

Example

Sample Content

rule (JSONObject)
Denotes the rule of the approval level.
show attribute

rule (JSONObject)

value (string)
No Description

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

Example

Sample Content

type (string)
No Description

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

Example

Sample Content

comments (string)
Denotes the comments provided by the approval.

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

Example

Sample Content

action_taken_on (datetime)
Denotes the date when approval level was approved.

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.

More Attributes Expand all

approvals (change_approval)

Denotes the approvals of the approval level.

approvals (change_approval)

status (sdp_approval_status)

Denotes the status of the approval level.

status (sdp_approval_status)

action_taken_by (orguser)

Denotes the user who approved the approval level.

action_taken_by (orguser)

change (change)read only

No Description

change (change)

level (int)read only

Denotes the Approval Level.

level (int)
Numerical digits which are considered to have smaller numbers.

Example

39

created_by (orguser)read only

Denotes the user who created the approval level.

created_by (orguser)

created_on (datetime)read only

Denotes the date when the approval level was created.

created_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.

deleted (boolean)read only

Denotes whether the approval level is deleted.

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

is_current (boolean)read only

Denotes whether the approval level is the current one or not.

is_current (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/{approval_level_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/{approval_level_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/{approval_level_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/{approval_level_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_level": {
        "request": null,
        "comments": null,
        "change_stage": {
            "internal_name": "Submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "level": 1,
        "purchase_request": null,
        "release": null,
        "action_taken_by": {
            "email_id": null,
            "phone": null,
            "name": "System",
            "mobile": null,
            "profile_pic": null,
            "is_vipuser": false,
            "id": "1",
            "department": null
        },
        "change": {
            "short_description": "",
            "id": "48",
            "title": "12345",
            "change_requester": null
        },
        "rule": {
            "type": "percent",
            "value": "anyone_approves"
        },
        "created_by": {
            "email_id": null,
            "phone": null,
            "name": "System",
            "mobile": null,
            "profile_pic": null,
            "is_vipuser": false,
            "id": "1",
            "department": null
        },
        "deleted": false,
        "stage": {
            "internal_name": "Submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "created_on": {
            "display_value": "Jan 22, 2023 11:49 AM",
            "value": "1674368354483"
        },
        "purchase_order": null,
        "approvals": [
            {
                "approver": {
                    "email_id": "guest@zylker.com",
                    "phone": "1122334455",
                    "name": "administrator",
                    "mobile": "1234567890",
                    "profile_pic": null,
                    "is_vipuser": false,
                    "id": "5",
                    "department": null
                },
                "comments": null,
                "approval_level": {
                    "request": null,
                    "change_stage": {
                        "id": "1"
                    },
                    "level": 1,
                    "purchase_order": null,
                    "purchase_request": null,
                    "release": null,
                    "change": {
                        "id": "48"
                    },
                    "name": "Level Created By Workflow Statement - Test",
                    "id": "8",
                    "status": {
                        "id": "1"
                    }
                },
                "sent_on": {
                    "display_value": "Jan 22, 2023 11:49 AM",
                    "value": "1674368354915"
                },
                "org_role": null,
                "action_by": null,
                "deleted": false,
                "sent_by": {
                    "email_id": null,
                    "phone": null,
                    "name": "System",
                    "mobile": null,
                    "profile_pic": null,
                    "is_vipuser": false,
                    "id": "1",
                    "department": null
                },
                "id": "10",
                "obo_approver": null,
                "email": "guest@zylker.com",
                "key": "cf0d7cb5-6276-4469-8608-d0149d90de7a",
                "status": {
                    "name": "Pending Approval",
                    "id": "1"
                },
                "action_taken_on": null
            }
        ],
        "name": "Level Created By Workflow Statement - Test",
        "id": "8",
        "is_current": false,
        "status": {
            "name": "Pending Approval",
            "id": "1"
        },
        "action_taken_on": {
            "display_value": "Jan 22, 2023 11:49 AM",
            "value": "1674368354915"
        }
    }
}

Get List Change Approval Level

This operation displays all the approvals of the approval level.

Url

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

Attributes

id (long)read only
Denotes the id of the Approval Level.

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

Example

234759602834500

stage (change_stage)
No Description

stage (change_stage)

name (string)
Denotes the name of the Approval Level

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

Example

Sample Content

rule (JSONObject)
Denotes the rule of the approval level.
show attribute

rule (JSONObject)

value (string)
No Description

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

Example

Sample Content

type (string)
No Description

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

Example

Sample Content

comments (string)
Denotes the comments provided by the approval.

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

Example

Sample Content

action_taken_on (datetime)
Denotes the date when approval level was approved.

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.

More Attributes Expand all

approvals (change_approval)

Denotes the approvals of the approval level.

approvals (change_approval)

status (sdp_approval_status)

Denotes the status of the approval level.

status (sdp_approval_status)

action_taken_by (orguser)

Denotes the user who approved the approval level.

action_taken_by (orguser)

change (change)read only

No Description

change (change)

level (int)read only

Denotes the Approval Level.

level (int)
Numerical digits which are considered to have smaller numbers.

Example

39

created_by (orguser)read only

Denotes the user who created the approval level.

created_by (orguser)

created_on (datetime)read only

Denotes the date when the approval level was created.

created_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.

deleted (boolean)read only

Denotes whether the approval level is deleted.

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

is_current (boolean)read only

Denotes whether the approval level is the current one or not.

is_current (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\
      -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,
        "sort_field": "id",
        "sort_order": "asc",
        "search_criteria": {
            "field": "stage.id",
            "value": 1,
            "condition": "is"
        }
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels";
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,
        "sort_field": "id",
        "sort_order": "asc",
        "search_criteria": {
            "field": "stage.id",
            "value": 1,
            "condition": "is"
        }
    }
};
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"
$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,
        "sort_field": "id",
        "sort_order": "asc",
        "search_criteria": {
            "field": "stage.id",
            "value": 1,
            "condition": "is"
        }
    }
}'@
$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"
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,
        "sort_field": "id",
        "sort_order": "asc",
        "search_criteria": {
            "field": "stage.id",
            "value": 1,
            "condition": "is"
        }
    }
}'''       
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"
        }
    ],
    "approval_levels": [
        {
            "comments": "Level auto approved in accordance with approval rule",
            "level": 1,
            "action_taken_by": {
                "email_id": null,
                "name": "System",
                "is_vipuser": false,
                "id": "1",
                "department": null
            },
            "rule": {
                "type": "percent",
                "value": "100"
            },
            "created_by": {
                "email_id": "aaa@zylker.com",
                "name": "administrator",
                "is_vipuser": false,
                "id": "4",
                "department": null
            },
            "deleted": false,
            "stage": {
                "id": "1"
            },
            "created_on": {
                "display_value": "Mar 17, 2020 12:44 PM",
                "value": "1584429297507"
            },
            "name": "Default",
            "id": "603",
            "is_current": false,
            "status": {
                "name": "Approved",
                "id": "2"
            },
            "action_taken_on": {
                "display_value": "Mar 17, 2020 02:14 PM",
                "value": "1584434696869"
            }
        },
        {
            "comments": null,
            "level": 2,
            "action_taken_by": null,
            "rule": {
                "type": "percent",
                "value": "100"
            },
            "created_by": {
                "email_id": "aaa@zylker.com",
                "name": "administrator",
                "is_vipuser": false,
                "id": "4",
                "department": null
            },
            "deleted": false,
            "stage": {
                "id": "1"
            },
            "created_on": {
                "display_value": "Mar 17, 2020 02:18 PM",
                "value": "1584434922825"
            },
            "name": "Default",
            "id": "901",
            "is_current": true,
            "status": {
                "name": "To Be Sent",
                "id": "4"
            },
            "action_taken_on": null
        }
    ],
    "list_info": {
        "has_more_rows": false,
        "sort_field": "id",
        "start_index": 1,
        "sort_order": "asc",
        "search_criteria": {
            "condition": "is",
            "field": "stage.id",
            "value": "1"
        },
        "row_count": 2
    }
}

Delete Change Approval Level

This operation deletes the specified approval level of the given change id.

Url

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

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_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/{approval_level_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/{approval_level_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/{approval_level_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"
  }
}

Reject An Approval Level

This operation is used to reject the specified approval level of the given change id.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/reject

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_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_level": {
        "comments": "Rejected this Change request as it conflicts another Change."
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_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_level": {
        "comments": "Rejected this Change request as it conflicts another Change."
    }
};
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}/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_level": {
        "comments": "Rejected this Change request as it conflicts another Change."
    }
}
'@
$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}/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_level": {
        "comments": "Rejected this Change request as it conflicts another Change."
    }
}'''
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"
    }
}

Approve An Approval Level

This operation is used to approve the specified approval level of the given change id.

Url

<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approve

$ curl <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_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_level": {
        "comments": "Yes"
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/{approval_level_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_level": {
        "comments": "Yes"
    }
};
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}/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_level": {
        "comments": "Yes"
    }
}
'@
$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}/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_level": {
        "comments": "Yes"
    }
}'''
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_level": {
        "workflow_update": {
            "newStageId": "2",
            "currentStageId": "1",
            "newStatusName": "Planning In Progress",
            "currentStatusName": "Requested",
            "newStageName": "Planning",
            "changeId": 51,
            "currentStageName": "Submission",
            "userId": 5,
            "currentStatusId": "3",
            "status": "success",
            "newStatusId": "16"
        }
    }
}

Approval Summary For Change

This operation is used to get the approval summary of the change.

Url

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

$ curl -G <service domain|custom domain>/api/v3/changes/{change_id}/approval_levels/approval_summary\
      -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/approval_summary";
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/approval_summary"
$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/approval_summary"
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())
{
    "approval_summary": [
        {
            "commented_by": {
                "phone": "1234455",
                "name": "Administrator"
            },
            "stage": {
                "internal_name": "Submission",
                "stage_index": "1",
                "name": "Submission",
                "id": "1"
            },
            "approval_levels": [],
            "commented_on": {
                "display_value": "Sep 28, 2017 01:12 PM",
                "value": "1506584528707"
            },
            "comment": "The above stage/status is set as part of 'Change' creation",
            "state": "in_progress",
            "status": {
                "internal_name": "Requested",
                "prominent": false,
                "stage": {
                    "id": "1"
                }
            }
        },
        {
            "stage": {
                "internal_name": "Planning",
                "inactive": false,
                "stage_index": 2,
                "name": "Planning",
                "description": "The Stage when the planning for the change is commenced.",
                "id": "2"
            },
            "state": "upcoming"
        },
        {
            "stage": {
                "internal_name": "Approval",
                "inactive": false,
                "stage_index": 3,
                "name": "Approval",
                "description": "The stage when a change is awaiting approval from the concern authority.",
                "id": "3"
            },
            "state": "upcoming"
        },
        {
            "stage": {
                "internal_name": "Implementation",
                "inactive": false,
                "stage_index": 4,
                "name": "Implementation",
                "description": "The stage when the implementation of the change is carried out.",
                "id": "4"
            },
            "state": "upcoming"
        },
        {
            "stage": {
                "internal_name": "Review",
                "inactive": false,
                "stage_index": 5,
                "name": "Review",
                "description": "The stage when the implementation is reviewed from the concern authority.",
                "id": "5"
            },
            "state": "upcoming"
        },
        {
            "stage": {
                "internal_name": "Close",
                "inactive": false,
                "stage_index": 6,
                "name": "Close",
                "description": "The stage when the review is successful and the change is closed.",
                "id": "6"
            },
            "state": "upcoming"
        }
    ],
    "response_status": [
        {
            "status_code": 2000,
            "status": "success"
        }
    ]
}