Skip to content

Release Approval

Configuration entity used to manage approvals present in a release.

Attributes

id (long)read only
Id of the approval.

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

Example

234759602834500

sent_by (orguser)
Approval mail sent by.

sent_by (orguser)

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.

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)

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

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

approver (user)

More Attributes Expand all

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.

deleted (boolean)read only

Boolean weather approval is deleted or not.

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

Add Release Approval

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

Mandatory Fields :- approver

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_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

sent_by (orguser)
Approval mail sent by.

sent_by (orguser)

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.

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)

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

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

approver (user)

More Attributes Expand all

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.

deleted (boolean)read only

Boolean weather 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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals\
      -X POST\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: 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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "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
    }
}

Edit Release Approval

No Description

Url

<service domain|custom domain>/app/<portal>/

Attributes

id (long)read only
Id of the approval.

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

Example

234759602834500

sent_by (orguser)
Approval mail sent by.

sent_by (orguser)

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.

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)

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

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

approver (user)

More Attributes Expand all

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.

deleted (boolean)read only

Boolean weather 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>/app/<portal>/\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data=''
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = ;
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'

'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = ''''''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())

Get Release Approval

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

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_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.

key (string)
No Description

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

Example

Sample Content

More Attributes Expand all

sent_by (orguser)

Approval mail sent by.

sent_by (orguser)

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)

obo_approver (user)

No Description

obo_approver (user)

org_role (org_role)

No Description

org_role (org_role)

clarifications (approval_clarification)

No Description

clarifications (approval_clarification)

email (string)read only

No Description

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

Example

guest@zylker.com

deleted (boolean)read only

Boolean weather approval is deleted or not.

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

action_by (user)read only

No Description

action_by (user)

approval_level (approval_level)read only

No Description

approval_level (approval_level)

associated_entity (string)read only

No Description

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

Example

Sample Content

$ curl -G <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}\
      -X GET\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "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
    }
}

Get List Release Approval

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

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_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.

sent_by (orguser)
Approval mail sent by.

sent_by (orguser)

More Attributes Expand all

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)

obo_approver (user)

No Description

obo_approver (user)

org_role (org_role)

No Description

org_role (org_role)

clarifications (approval_clarification)

No Description

clarifications (approval_clarification)

email (string)read only

No Description

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

Example

guest@zylker.com

deleted (boolean)read only

Boolean weather approval is deleted or not.

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

action_by (user)read only

No Description

action_by (user)

approval_level (approval_level)read only

No Description

approval_level (approval_level)

associated_entity (string)read only

No Description

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

Example

Sample Content

$ curl -G <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: 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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "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
    }
}

Delete Release Approval

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

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}

$ curl <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}\
      -X DELETE\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "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"
  }
}

Approve Approval

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

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/approve

$ curl <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/approve\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: 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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/approve";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/approve"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/approve"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "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 release.

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/reject

$ curl <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/reject\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: 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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/reject";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/reject"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}/reject"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "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 release.

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/send_notification

$ curl <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/send_notification\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
    "approval": {
        "notification": {
            "title": "Recommendation required for a Release",
            "description": "${submitter} has requested your recommendations for this Release - ${title}. Click here to view Release details <a href='${approval_link}'>${approval_link}</a> <br> <br> ${ApprovalEmailAction} <br> The  documents that belong to this Release, if any, are attached in this mail.",
            "attachments": []
        }
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/send_notification";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "approval": {
        "notification": {
            "title": "Recommendation required for a Release",
            "description": "${submitter} has requested your recommendations for this Release - ${title}. Click here to view Release details <a href='${approval_link}'>${approval_link}</a> <br> <br> ${ApprovalEmailAction} <br> The  documents that belong to this Release, if any, are attached in this mail.",
            "attachments": []
        }
    }
};
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/releases/{release_id}/approval_levels/{level_id}/approvals/send_notification"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "approval": {
        "notification": {
            "title": "Recommendation required for a Release",
            "description": "${submitter} has requested your recommendations for this Release - ${title}. Click here to view Release details <a href='${approval_link}'>${approval_link}</a> <br> <br> ${ApprovalEmailAction} <br> The  documents that belong to this Release, if any, are attached in this mail.",
            "attachments": []
        }
    }
}
'@
$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/releases/{release_id}/approval_levels/{level_id}/approvals/send_notification"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "approval": {
        "notification": {
            "title": "Recommendation required for a Release",
            "description": "${submitter} has requested your recommendations for this Release - ${title}. Click here to view Release details <a href='${approval_link}'>${approval_link}</a> <br> <br> ${ApprovalEmailAction} <br> The  documents that belong to this Release, if any, are attached in this mail.",
            "attachments": []
        }
    }
}'''
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 release.

Url

<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/get_notification_content

$ curl -G <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/get_notification_content\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/get_notification_content";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/get_notification_content"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "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>/app/<portal>//api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/get_notification_content"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "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 Release - asdadad. <br /><br /> Click here to view Release details ${approval_link}",
        "title": "Recommendation required for Release with ID: ##2##"
    },
    "response_status": {
        "status_code": 2000,
        "status": "success"
    }
}