Skip to content

Request Approval Level

The approvals are added to the entity Request in different level. This entity represents the level of the approval.

Attributes

id (long)
Primary id for approval level

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

Example

234759602834500

level (int)
Level number of the approval level. Level value should be between 1 to 5.

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

Example

39

status (approval_status)read only
Status of the approval level

status (approval_status)

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

created_time (datetime)read only
Approval level created time

created_time (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 (user)read only
User details of the approval level creator

created_by (user)

Example

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

associated_entity (string)read only
Holds the value of this approval belongs to which entity [request, purchase_order, change]

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

Example

Sample Content

More Attributes Expand all

request (request)read only

Information about the request to which the approval is associated.  The information about the request will be provided only if the approval is associated to that request.

request (request)

Add Request Approval Level

This operation helps you Add request approval level.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels

Attributes

id (long)
Primary id for approval level

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

Example

234759602834500

level (int)
Level number of the approval level. Level value should be between 1 to 5.

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

Example

39

status (approval_status)read only
Status of the approval level

status (approval_status)

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

created_time (datetime)read only
Approval level created time

created_time (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 (user)read only
User details of the approval level creator

created_by (user)

Example

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

associated_entity (string)read only
Holds the value of this approval belongs to which entity [request, purchase_order, change]

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

Example

Sample Content

More Attributes Expand all

request (request)read only

Information about the request to which the approval is associated.  The information about the request will be provided only if the approval is associated to that request.

request (request)

$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels\
      -X POST\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
  "approval_level": {
    "level": 4
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "approval_level": {
    "level": 4
  }
};
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/requests/{request_id}/approval_levels"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "approval_level": {
    "level": 4
  }
}
'@
$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/requests/{request_id}/approval_levels"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "approval_level": {
    "level": 4
  }
}'''
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": {
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "request": {
      "display_id": "39",
      "subject": "Need an External Monitor",
      "id": "2205822821392484"
    },
    "level": 4,
    "associated_entity": "request",
    "rule": {
      "name": "test-name",
      "id": "2204580111763781",
      "type": "test-type",
      "value": "1478758440000"
    },
    "created_by": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2149184807044449",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "id": "1703144493259216",
    "status": {
      "name": "To be Sent",
      "id": "1904441593230081"
    }
  }
}

Get Request Approval Level

This operation helps you Get request approval level.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}

Attributes

id (long)
Primary id for approval level

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

Example

234759602834500

level (int)
Level number of the approval level. Level value should be between 1 to 5.

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

Example

39

status (approval_status)read only
Status of the approval level

status (approval_status)

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

created_time (datetime)read only
Approval level created time

created_time (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 (user)read only
User details of the approval level creator

created_by (user)

Example

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

associated_entity (string)read only
Holds the value of this approval belongs to which entity [request, purchase_order, change]

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

Example

Sample Content

More Attributes Expand all

request (request)read only

Information about the request to which the approval is associated.  The information about the request will be provided only if the approval is associated to that request.

request (request)

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}\
      -X GET\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};          
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}  
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  },
  "approval_level": {
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "request": {
      "display_id": "39",
      "subject": "Need an External Monitor",
      "id": "1817721216599547"
    },
    "level": 3,
    "associated_entity": "request",
    "rule": {
      "name": "test-name",
      "id": "2312760314314435",
      "type": "test-type",
      "value": "1478758440000"
    },
    "created_by": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2281115215007500",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "id": "2176710285804901",
    "status": {
      "name": "To be Sent",
      "id": "1843957154088296"
    }
  }
}

Get List Request Approval Level

This operation helps you Get all request approval levels.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels

Attributes

id (long)
Primary id for approval level

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

Example

234759602834500

level (int)
Level number of the approval level. Level value should be between 1 to 5.

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

Example

39

status (approval_status)read only
Status of the approval level

status (approval_status)

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

created_time (datetime)read only
Approval level created time

created_time (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 (user)read only
User details of the approval level creator

created_by (user)

Example

{
  "created_by": {
    "email_id": "andrews@zmail.com",
    "name": "test-created_by",
    "id": "234567890123456"
  }
}

associated_entity (string)read only
Holds the value of this approval belongs to which entity [request, purchase_order, change]

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

Example

Sample Content

More Attributes Expand all

request (request)read only

Information about the request to which the approval is associated.  The information about the request will be provided only if the approval is associated to that request.

request (request)

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      --data-urlencode input_data='{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}};
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/requests/{request_id}/approval_levels"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'@
$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/requests/{request_id}/approval_levels"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'''       
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": [
    {
      "created_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "request": {
        "display_id": "39",
        "subject": "Need an External Monitor",
        "id": "1634810543466471"
      },
      "level": 1,
      "associated_entity": "request",
      "rule": {
        "name": "test-name",
        "id": "1952943861882090",
        "type": "test-type",
        "value": "1478758440000"
      },
      "created_by": {
        "email_id": "lincoln@zmail.com",
        "is_technician": false,
        "sms_mail": "linc123@xys_sms.co",
        "phone": "test-phone",
        "name": "Lincoln",
        "mobile": "test-mobile",
        "id": "2305737747851454",
        "photo_url": "test-photo_url",
        "is_vip_user": false
      },
      "id": "2275228551168351",
      "status": {
        "name": "To be Sent",
        "id": "1936903819448605"
      }
    }
  ],
  "list_info": {
    "has_more_rows": false,
    "row_count": 1
  }
}

Delete Request Approval Level

This operation helps you Delete request approval level.

Url

<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}

$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}\
      -X DELETE\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
    url: url
    type: DELETE
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method delete -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/approval_levels/{approval_level_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers,method="DELETE")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}