Skip to content

Release Approval Level

Configuration entity used to manage approval levels present in a release.

Attributes

id (long)read only
Primary id for approval level.

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

Example

234759602834500

name (string)
Name of approval level.

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

Example

Sample Content

comments (string)
Comments given by the approver when an approval level 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)
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.

status (sdp_approval_status)
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)

More Attributes Expand all

approvals (approval)

List of user approvals.

approvals (approval)

level (int)read only

Level number of the approval level.

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

Example

39

created_by (orguser)read only

Approval level created time.

created_by (orguser)

created_on (datetime)read only

User details of the approval level creator.

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 if the level is active/inactive.

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

is_current (boolean)read only

Denotes if the level is current approval level.

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

Reject Approval Level

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

Url

/api/v3/releases/{release_id}/approval_levels/{level_id}/reject

$ curl /api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "comments": "Rejecting"
    }
}'
// Deluge Sample script
url = "/api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "comments": "Rejecting"
    }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "/api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "comments": "Rejecting"
    }
}
'@
$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 = "/api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "comments": "Rejecting"
    }
}'''
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"
    }
}

Reset Levels

This operation is used to reset all approval level in a release.

Url

/api/v3/releases/{release_id}/approval_levels/_reset_levels

$ curl /api/v3/releases/{release_id}/approval_levels/_reset_levels
      -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= '{
    "stage": [
        1
    ]
}'
// Deluge Sample script
url = "/api/v3/releases/{release_id}/approval_levels/_reset_levels";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
    "stage": [
        1
    ]
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "/api/v3/releases/{release_id}/approval_levels/_reset_levels"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "stage": [
        1
    ]
}
'@
$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 = "/api/v3/releases/{release_id}/approval_levels/_reset_levels"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "stage": [
        1
    ]
}'''
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 Approval Level

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

Url

/api/v3/releases/{release_id}/approval_levels/{level_id}/approve

$ curl /api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "comments": "recommend"
    }
}'
// Deluge Sample script
url = "/api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "comments": "recommend"
    }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "/api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "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 = "/api/v3/releases/{release_id}/approval_levels/{level_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_level": {
        "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"
    }
}

Get List Release Approval Level

This operation is used to fetch all approval level details for a release.

Url

/api/v3/releases/{release_id}/approval_levels

Attributes

id (long)read only
Primary id for approval level.

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

Example

234759602834500

name (string)
Name of approval level.

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

Example

Sample Content

comments (string)
Comments given by the approver when an approval level 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)
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.

status (sdp_approval_status)
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)

More Attributes Expand all

approvals (approval)

List of user approvals.

approvals (approval)

level (int)read only

Level number of the approval level.

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

Example

39

created_by (orguser)read only

Approval level created time.

created_by (orguser)

created_on (datetime)read only

User details of the approval level creator.

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 if the level is active/inactive.

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

is_current (boolean)read only

Denotes if the level is current approval level.

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

$ curl -G /api/v3/releases/{release_id}/approval_levels
      -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,
        "sort_field": "id",
        "sort_order": "asc",
        "search_criteria": {
            "field": "stage.id",
            "value": 1,
            "condition": "is"
        }
    }
}'
// Deluge Sample script
url = "/api/v3/releases/{release_id}/approval_levels";
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,
        "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 = "/api/v3/releases/{release_id}/approval_levels"
$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,
        "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 = "/api/v3/releases/{release_id}/approval_levels"
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,
        "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": "rajeshkumarr@sdplinmail.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": "rajeshkumarr@sdplinmail.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
    }
}

Get Release Approval Level

This operation is used to fetch a particular approval level details for a release.

Url

/api/v3/releases/{release_id}/approval_levels/{level_id}

Attributes

id (long)read only
Primary id for approval level.

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

Example

234759602834500

name (string)
Name of approval level.

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

Example

Sample Content

comments (string)
Comments given by the approver when an approval level 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)
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.

status (sdp_approval_status)
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)

More Attributes Expand all

approvals (approval)

List of user approvals.

approvals (approval)

level (int)read only

Level number of the approval level.

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

Example

39

created_by (orguser)read only

Approval level created time.

created_by (orguser)

created_on (datetime)read only

User details of the approval level creator.

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 if the level is active/inactive.

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

is_current (boolean)read only

Denotes if the level is current approval level.

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

$ curl -G /api/v3/releases/{release_id}/approval_levels/{level_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"
      --data-urlencode input_data = '{}'
// Deluge Sample script
url = "/api/v3/releases/{release_id}/approval_levels/{level_id}";
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: GET
    parameters:params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "/api/v3/releases/{release_id}/approval_levels/{level_id}"
$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 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 = "/api/v3/releases/{release_id}/approval_levels/{level_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{}'''       
url += "?" + urlencode({"input_data":input_data})
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
    "response_status": {
        "status_code": 2000,
        "status": "success"
    },
    "approval_level": {
        "comments": null,
        "level": 2,
        "action_taken_by": null,
        "rule": {
            "type": "percent",
            "value": "100"
        },
        "created_by": {
            "email_id": "rajeshkumarr@sdplinmail.com",
            "name": "administrator",
            "is_vipuser": false,
            "id": "4",
            "department": null
        },
        "deleted": false,
        "stage": {
            "internal_name": "submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "created_on": {
            "display_value": "Mar 17, 2020 02:18 PM",
            "value": "1584434922825"
        },
        "approvals": [],
        "name": "Default",
        "id": "901",
        "is_current": true,
        "status": {
            "name": "To Be Sent",
            "id": "4"
        },
        "action_taken_on": null
    }
}

Delete Release Approval Level

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

Url

/api/v3/releases/{release_id}/approval_levels/{level_id}

$ curl /api/v3/releases/{release_id}/approval_levels/{level_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 = "/api/v3/releases/{release_id}/approval_levels/{level_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 = "/api/v3/releases/{release_id}/approval_levels/{level_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 = "/api/v3/releases/{release_id}/approval_levels/{level_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"
  }
}

Edit Release Approval Level

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

Url

/api/v3/releases/{release_id}/approval_levels/{level_id}

Attributes

id (long)read only
Primary id for approval level.

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

Example

234759602834500

name (string)
Name of approval level.

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

Example

Sample Content

comments (string)
Comments given by the approver when an approval level 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)
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.

status (sdp_approval_status)
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)

More Attributes Expand all

approvals (approval)

List of user approvals.

approvals (approval)

level (int)read only

Level number of the approval level.

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

Example

39

created_by (orguser)read only

Approval level created time.

created_by (orguser)

created_on (datetime)read only

User details of the approval level creator.

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 if the level is active/inactive.

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

is_current (boolean)read only

Denotes if the level is current approval level.

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

$ curl /api/v3/releases/{release_id}/approval_levels/{level_id}
      -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_level": {
        "name": "Default Updated"
    }
}'
// Deluge Sample script
url = "/api/v3/releases/{release_id}/approval_levels/{level_id}";
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_level": {
        "name": "Default Updated"
    }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "/api/v3/releases/{release_id}/approval_levels/{level_id}"
$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_level": {
        "name": "Default Updated"
    }
}
'@
$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 = "/api/v3/releases/{release_id}/approval_levels/{level_id}"
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_level": {
        "name": "Default Updated"
    }
}'''
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": {
        "comments": "Level reset by system.",
        "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": "rajeshkumarr@sdplinmail.com",
            "name": "administrator",
            "is_vipuser": false,
            "id": "4",
            "department": null
        },
        "deleted": false,
        "stage": {
            "internal_name": "submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "created_on": {
            "display_value": "Mar 17, 2020 12:44 PM",
            "value": "1584429297507"
        },
        "approvals": [
            {
                "approver": {
                    "email_id": "rajeshkumarr@sdplinmail.com",
                    "name": "administrator",
                    "is_vipuser": false,
                    "id": "4",
                    "department": null
                },
                "comments": "Approval reset by System.",
                "deleted": false,
                "sent_by": {
                    "email_id": "rajeshkumarr@sdplinmail.com",
                    "name": "administrator",
                    "is_vipuser": false,
                    "id": "4",
                    "department": null
                },
                "id": "901",
                "sent_on": {
                    "display_value": "Mar 17, 2020 02:12 PM",
                    "value": "1584434560412"
                },
                "status": {
                    "name": "To Be Sent",
                    "id": "4"
                },
                "action_taken_on": {
                    "display_value": "Mar 17, 2020 02:35 PM",
                    "value": "1584435956727"
                }
            },
            {
                "approver": {
                    "email_id": null,
                    "name": "Heather Graham",
                    "is_vipuser": false,
                    "id": "6",
                    "department": null
                },
                "comments": "Approval reset by System.",
                "deleted": false,
                "sent_by": null,
                "id": "601",
                "sent_on": null,
                "status": {
                    "name": "To Be Sent",
                    "id": "4"
                },
                "action_taken_on": {
                    "display_value": "Mar 17, 2020 02:35 PM",
                    "value": "1584435956727"
                }
            },
            {
                "approver": {
                    "email_id": null,
                    "name": "Shawn Adams",
                    "is_vipuser": false,
                    "id": "5",
                    "department": null
                },
                "comments": "Approval reset by System.",
                "deleted": false,
                "sent_by": null,
                "id": "602",
                "sent_on": null,
                "status": {
                    "name": "To Be Sent",
                    "id": "4"
                },
                "action_taken_on": {
                    "display_value": "Mar 17, 2020 02:35 PM",
                    "value": "1584435956727"
                }
            }
        ],
        "name": "Default Updated",
        "id": "603",
        "is_current": true,
        "status": {
            "name": "To Be Sent",
            "id": "4"
        },
        "action_taken_on": {
            "display_value": "Mar 17, 2020 02:35 PM",
            "value": "1584435956727"
        }
    }
}

Add Release Approval Level

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

Mandatory Fields :- name

Url

/api/v3/releases/{release_id}/approval_levels

Attributes

id (long)read only
Primary id for approval level.

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

Example

234759602834500

name (string)
Name of approval level.

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

Example

Sample Content

comments (string)
Comments given by the approver when an approval level 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)
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.

status (sdp_approval_status)
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)

More Attributes Expand all

approvals (approval)

List of user approvals.

approvals (approval)

level (int)read only

Level number of the approval level.

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

Example

39

created_by (orguser)read only

Approval level created time.

created_by (orguser)

created_on (datetime)read only

User details of the approval level creator.

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 if the level is active/inactive.

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

is_current (boolean)read only

Denotes if the level is current approval level.

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

$ curl /api/v3/releases/{release_id}/approval_levels
      -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= '{
    "approval_level": {
        "rule": {
            "type": "percent",
            "value": "100"
        },
        "name": "Default",
        "stage": {
            "id": "1"
        },
        "approvals": []
    }
}'
// Deluge Sample script
url = "/api/v3/releases/{release_id}/approval_levels";
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_level": {
        "rule": {
            "type": "percent",
            "value": "100"
        },
        "name": "Default",
        "stage": {
            "id": "1"
        },
        "approvals": []
    }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: POST
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "/api/v3/releases/{release_id}/approval_levels"
$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_level": {
        "rule": {
            "type": "percent",
            "value": "100"
        },
        "name": "Default",
        "stage": {
            "id": "1"
        },
        "approvals": []
    }
}
'@
$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 = "/api/v3/releases/{release_id}/approval_levels"
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_level": {
        "rule": {
            "type": "percent",
            "value": "100"
        },
        "name": "Default",
        "stage": {
            "id": "1"
        },
        "approvals": []
    }
}'''
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": {
        "comments": null,
        "level": 1,
        "action_taken_by": null,
        "rule": {
            "type": "percent",
            "value": "100"
        },
        "created_by": {
            "email_id": "rajeshkumarr@sdplinmail.com",
            "name": "administrator",
            "is_vipuser": false,
            "id": "4",
            "department": null
        },
        "deleted": false,
        "stage": {
            "internal_name": "submission",
            "stage_index": "1",
            "name": "Submission",
            "id": "1"
        },
        "created_on": {
            "display_value": "Mar 17, 2020 12:44 PM",
            "value": "1584429297507"
        },
        "approvals": [],
        "name": "Default",
        "id": "603",
        "is_current": true,
        "status": {
            "name": "To Be Sent",
            "id": "4"
        },
        "action_taken_on": null
    }
}