### Site Association Example (JSON) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/projects/project.html Provides an example of how to associate a project with a site using its ID. ```json { "site": { "id": "601" } } ``` -------------------------------- ### Retrieve Approval Details via API Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release_approval.html Demonstrates how to fetch a specific approval record using a GET request. The examples include necessary headers for authentication and content negotiation across multiple programming environments. ```bash $ curl -G /api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}\ -X GET\ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded" ``` ```deluge // Deluge Sample script url = "/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", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; response = invokeurl [ url: url type: GET headers: headers ]; info response; ``` ```powershell #Powershell version - 5.1 $url = "/api/v3/releases/{release_id}/approval_levels/{level_id}/approvals/{approval_id}" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $response = Invoke-RestMethod -Uri $url -Method get -Headers $headers $response ``` ```python #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}/approvals/{approval_id}" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Retrieve Approval Level Details via API Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/changes/change_approval_level.html Demonstrates how to perform a GET request to fetch specific approval level details for a change request. The examples cover authentication via authtoken and setting the required headers for the API. ```curl $ curl -G /api/v3/changes/{change_id}/approval_levels/{approval_level_id}\ -X GET\ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded" ``` ```deluge // Deluge Sample script url = "/api/v3/changes/{change_id}/approval_levels/{approval_level_id}"; headers = {"Accept":"application/vnd.manageengine.sdp.v3+json", "Content-Type": "application/x-www-form-urlencoded", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; response = invokeurl [ url: url type: GET headers: headers ]; info response; ``` ```powershell #Powershell version - 5.1 $url = "/api/v3/changes/{change_id}/approval_levels/{approval_level_id}" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $response = Invoke-RestMethod -Uri $url -Method get -Headers $headers $response ``` ```python #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/changes/{change_id}/approval_levels/{approval_level_id}" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: ``` -------------------------------- ### Project Title Example (JSON) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/projects/project.html Shows an example of a project title, which is a plain text string without rich text or new lines. ```json Sample Content ``` -------------------------------- ### Get Worklog Details using API (Powershell) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release_worklog.html This Powershell script provides an example for retrieving worklog information via the ServiceDesk Plus v3 API. It outlines the necessary components for making an authenticated GET request, though the specific implementation details are not provided in the snippet. ```powershell #Powershell version - 5.1 ``` -------------------------------- ### Actual Start Time Example Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release_task.html Represents the actual time a task was started. It includes a 'value' in milliseconds and a 'display_value' in a human-readable format. ```json { "actual_start_time": { "value": 1678886400000, "display_value": "2023-03-15 10:00 AM" } } ``` -------------------------------- ### Fetch Project Milestones using various languages Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/projects/milestone.html This section provides code examples for fetching milestone details for a given project using different programming languages and tools. It demonstrates how to make GET requests to the ServiceDesk Plus API endpoint for milestones. ```curl $ curl -G /api/v3/projects/{project_id}/milestones/{milestone_id}\n -X GET\n -H "Accept: application/vnd.manageengine.sdp.v3+json"\n -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\n -H "Content-Type: application/x-www-form-urlencoded" ``` ```deluge // Deluge Sample script url = "/api/v3/projects/{project_id}/milestones/{milestone_id}"; headers = {"Accept":"application/vnd.manageengine.sdp.v3+json", "Content-Type": "application/x-www-form-urlencoded", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; response = invokeurl [ url: url type: GET headers: headers ]; info response; ``` ```powershell #Powershell version - 5.1 $url = "/api/v3/projects/{project_id}/milestones/{milestone_id}" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $response = Invoke-RestMethod -Uri $url -Method get -Headers $headers $response ``` ```python #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/projects/{project_id}/milestones/{milestone_id}" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Actual Cost Example (JSON) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/projects/project.html Shows an example of the actual cost of a project, represented as a double-precision floating-point number. ```json 23.08 ``` -------------------------------- ### Get Project List using Powershell Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/projects/project.html Demonstrates how to get a list of projects using Powershell. It defines the API endpoint URL and headers, including the authentication token, and then uses `Invoke-RestMethod` to perform a GET request. ```powershell #Powershell version - 5.1 $url = "/api/v3/projects/{project_id}" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $response = Invoke-RestMethod -Uri $url -Method get -Headers $headers $response ``` -------------------------------- ### Get Release Approval Summary using Powershell Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release.html Uses Powershell to get the release approval summary. It defines the URL and headers, including the authentication token, and then uses `Invoke-RestMethod` to send a GET request. The response is stored and displayed. ```powershell #Powershell version - 5.1 $url = "/api/v3/releases/{release_id}/approval_levels/_approval_summary" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $response = Invoke-RestMethod -Uri $url -Method get -Headers $headers $response ``` -------------------------------- ### Retrieve User Information via API (cURL, Deluge, PowerShell, Python) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/admin/user.html This snippet demonstrates how to retrieve user information from the ServiceDesk Plus API. It includes examples for cURL, Deluge, PowerShell, and Python, showing how to set headers, parameters, and make the GET request. The input data specifies sorting, pagination, search fields, and required fields for the user data. ```curl $ curl -G /api/v3/users\ -X GET\ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded"\ --data-urlencode input_data='{ "list_info": { "sort_field": "name", "start_index": 1, "sort_order": "asc", "row_count": "25", "get_total_count": true, "search_fields": { "email_id": "guest@zylker.com" } }, "fields_required": [ "name", "is_technician", "citype", "login_name", "email_id", "department", "phone", "mobile", "jobtitle", "project_roles", "employee_id", "first_name", "middle_name", "last_name", "is_vipuser", "ciid" ] }' ``` ```deluge // Deluge Sample script url = "/api/v3/users"; headers = {"Accept":"application/vnd.manageengine.sdp.v3+json", "Content-Type": "application/x-www-form-urlencoded", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; input_data = { "list_info": { "sort_field": "name", "start_index": 1, "sort_order": "asc", "row_count": "25", "get_total_count": true, "search_fields": { "email_id": "guest@zylker.com" } }, "fields_required": [ "name", "is_technician", "citype", "login_name", "email_id", "department", "phone", "mobile", "jobtitle", "project_roles", "employee_id", "first_name", "middle_name", "last_name", "is_vipuser", "ciid" ] }; params = {"input_data":input_data}; response = invokeurl [ url: url type: GET parameters:params headers: headers ]; info response; ``` ```powershell #Powershell version - 5.1 $url = "/api/v3/users" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $input_data = @'{ "list_info": { "sort_field": "name", "start_index": 1, "sort_order": "asc", "row_count": "25", "get_total_count": true, "search_fields": { "email_id": "guest@zylker.com" } }, "fields_required": [ "name", "is_technician", "citype", "login_name", "email_id", "department", "phone", "mobile", "jobtitle", "project_roles", "employee_id", "first_name", "middle_name", "last_name", "is_vipuser", "ciid" ] }'@ $data = @{ 'input_data' = $input_data} $response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers $response ``` ```python #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/users" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} input_data = '''{ "list_info": { "sort_field": "name", "start_index": 1, "sort_order": "asc", "row_count": "25", "get_total_count": true, "search_fields": { "email_id": "guest@zylker.com" } }, "fields_required": [ "name", "is_technician", "citype", "login_name", "email_id", "department", "phone", "mobile", "jobtitle", "project_roles", "employee_id", "first_name", "middle_name", "last_name", "is_vipuser", "ciid" ] }''' 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()) ``` -------------------------------- ### Define Release Attribute Examples Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release.html Examples of raw data formats for various release attributes, including long integers, plain text strings, and HTML formatted content. ```text 234759602834500 ``` ```text Sample Content ``` ```html The content to be displayed ``` -------------------------------- ### Get Request Problem - Python Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/requests/request.html Python script to fetch problem details for a request via the ServiceDesk Plus v3 API. This example uses the `urllib` module and requires the `requests` module to be installed. ```python #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/requests/{request_id}/problem" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Create User via SDP v3 API (Python) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/admin/user.html This Python script demonstrates how to create a new user in ManageEngine ServiceDesk Plus using the v3 API. It utilizes the `urllib` library to construct and send a POST request with the necessary headers and JSON payload. Error handling for HTTP requests is included. ```python #Python version - 3.10 from urllib.error import HTTPError from urllib.parse import urlencode from urllib.request import urlopen,Request url = "/api/v3/users" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} input_data = '''{ "user": { "first_name": "Peter", "middle_name": "Rabbit", "last_name": "Atom", "name": "Peter Rabbit Atom", "is_vipuser": "false", "employee_id": "4229", "department": { "id": "5" }, "mobile": "02892902", "description": "Help Desk manager", "sms_mail_id": "user1@zylker.com", "jobtitle": "Java developer", "phone": "929992", "email_id": "guest@zylker.com", "secondary_emailids": [ "user1@zylker.com", "rabbit@zylker.com", "atom@zylker.com" ], "cost_per_hour": "929", "service_request_approver": "true", "purchase_approver": "true", "purchase_approval_limit": "-1", "project_roles": { "id": "3" }, "reporting_to": { "id": "4" }, "requester_allowed_to_view": "0", "login_name": "peter", "password": "peter", "domain": { "id": "2" }, "user_udf_fields": { "udf_long_3": "982999292", "udf_date_4": { "value": "1569519360000" }, "udf_pick_2": "Market gaps", "udf_sline_1": "Manager" }, "ci_default_fields": { "udf_pick_165": "Team member", "udf_pickref_1": { "id": 2 }, "udf_sline_164": "Testing line" }, "ci_user_fields": { "udf_pickref_160": null, "udf_sline_158": "929", "udf_pick_163": "7 th floor", "udf_pickref_161": { "id": "6" }, "udf_pickref_159": { "id": "2" }, "udf_sline_162": "928KSi82" } } }''' 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()) ``` -------------------------------- ### Get Release Status Comments using Curl Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release.html Fetches status comments for a specific release using the ManageEngine SDP v3 API. Requires an authentication token and the release ID. This example demonstrates a GET request. ```curl $ curl -G /api/v3/releases/{release_id}/status_comments \ -X GET \ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded" ``` -------------------------------- ### Created Time Example (JSON) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/projects/project.html Illustrates the JSON format for the creation timestamp of a project, including both the millisecond value and a displayable string. ```json {"value":"1427119462376","display_value":"Nov 24, 2014 11:58 AM"} ``` -------------------------------- ### Department Association Example (JSON) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/projects/project.html Shows how to link a project to a department by specifying the department's ID. ```json { "department": { "id": "1" } } ``` -------------------------------- ### Get Change Metainfo using Python Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/changes/change.html Fetches change metainfo from the ServiceDesk Plus v3 API using Python's `urllib` module. This script requires the `requests` module to be installed and demonstrates making a GET request with custom headers, including the authentication token. ```python #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/changes/metainfo" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Get Release Status Comments using Python Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release.html Retrieves release status comments using Python's `urllib` module. This script makes a GET request to the ManageEngine SDP v3 API and requires the `requests` module to be installed. It handles potential HTTP errors. ```python #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}/status_comments" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Create User via SDP v3 API (PowerShell) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/admin/user.html This PowerShell script demonstrates how to create a new user in ManageEngine ServiceDesk Plus using the v3 API. It includes setting up the request URL, headers with authentication token, and a JSON payload for user details. The script utilizes `Invoke-RestMethod` to send a POST request and prints the API response. ```powershell #Powershell version - 5.1 $url = "/api/v3/users" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $input_data = @' { "user": { "first_name": "Peter", "middle_name": "Rabbit", "last_name": "Atom", "name": "Peter Rabbit Atom", "is_vipuser": "false", "employee_id": "4229", "department": { "id": "5" }, "mobile": "02892902", "description": "Help Desk manager", "sms_mail_id": "user1@zylker.com", "jobtitle": "Java developer", "phone": "929992", "email_id": "guest@zylker.com", "secondary_emailids": [ "user1@zylker.com", "rabbit@zylker.com", "atom@zylker.com" ], "cost_per_hour": "929", "service_request_approver": "true", "purchase_approver": "true", "purchase_approval_limit": "-1", "project_roles": { "id": "3" }, "reporting_to": { "id": "4" }, "requester_allowed_to_view": "0", "login_name": "peter", "password": "peter", "domain": { "id": "2" }, "user_udf_fields": { "udf_long_3": "982999292", "udf_date_4": { "value": "1569519360000" }, "udf_pick_2": "Market gaps", "udf_sline_1": "Manager" }, "ci_default_fields": { "udf_pick_165": "Team member", "udf_pickref_1": { "id": 2 }, "udf_sline_164": "Testing line" }, "ci_user_fields": { "udf_pickref_160": null, "udf_sline_158": "929", "udf_pick_163": "7 th floor", "udf_pickref_161": { "id": "6" }, "udf_pickref_159": { "id": "2" }, "udf_sline_162": "928KSi82" } } } '@ $data = @{ 'input_data' = $input_data} $response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers $response ``` -------------------------------- ### Pagination - Row Count and Start Index Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/getting-started/pagination.html This section explains how to use `row_count` to specify the number of records per page and `start_index` to define the starting point for fetching data. It also provides examples of request parameters and response structure. ```APIDOC ## Pagination Parameters ### Description Pagination is used for fetching list responses in batches to reduce response overhead and render data in pages. This includes controlling the number of rows per page (`row_count`) and the starting index (`start_index`) for data retrieval. ### Method POST (Implied, as parameters are sent within `input_data`) ### Endpoint /websites/manageengine_products_service-desk_sdpop-v3-api (Base endpoint, specific list endpoint not provided) ### Parameters #### Request Body - **input_data** (object) - Required - Contains pagination settings. - **list_info** (object) - Required - Information about the list. - **row_count** (integer) - Optional - The number of records to retrieve per page. Defaults to 10. - **start_index** (integer) - Optional - The index from which to start fetching records. Defaults to 1. ### Request Example ```json { "input_data": { "list_info": { "row_count": 3, "start_index": 1 } } } ``` ### Response #### Success Response (2000) - **response_status** (array) - Status of the request. - **status_code** (integer) - The status code of the response. - **status** (string) - The status message. - **list_info** (object) - Information about the list pagination. - **has_more_rows** (boolean) - Indicates if there are more rows available. - **start_index** (integer) - The starting index of the current response. - **row_count** (integer) - The number of rows returned in the current response. - **requests** (array) - An array of retrieved records (structure not detailed). #### Response Example ```json { "response_status": [ { "status_code": 2000, "status": "success" } ], "list_info": { "has_more_rows": false, "start_index": 1, "row_count": 3 }, "requests": [ {...}, {...}, {...}, ] } ``` ## How to get next N records? ### Description To fetch subsequent records, update the `start_index` by adding the `row_count` to the previous `start_index`. ### Method POST (Implied) ### Endpoint /websites/manageengine_products_service-desk_sdpop-v3-api (Base endpoint) ### Parameters #### Request Body - **input_data** (object) - Required - Contains pagination settings. - **list_info** (object) - Required - Information about the list. - **row_count** (integer) - Required - The number of records to retrieve per page. - **start_index** (integer) - Required - The index from which to start fetching records. ### Request Example ```json { "input_data": { "list_info": { "row_count": 3, "start_index": 4 } } } ``` ### Response #### Success Response (2000) - **response_status** (array) - Status of the request. - **status_code** (integer) - The status code of the response. - **status** (string) - The status message. - **list_info** (object) - Information about the list pagination. - **has_more_rows** (boolean) - Indicates if there are more rows available. - **start_index** (integer) - The starting index of the current response. - **row_count** (integer) - The number of rows returned in the current response. - **requests** (array) - An array of retrieved records (structure not detailed). #### Response Example ```json { "response_status": [ { "status_code": 2000, "status": "success" } ], "list_info": { "has_more_rows": false, "start_index": 4, "row_count": 3 }, "requests": [ {...}, {...}, {...}, ] } ``` ``` -------------------------------- ### Create Approval via API Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/changes/change_approval.html Demonstrates how to create an approval for a specific change level using a POST request. The examples show how to structure the input_data payload and include the necessary authentication headers across multiple programming languages. ```bash curl /api/v3/changes/{change_id}/approval_levels/{level_id}/approvals\ -X POST\ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded"\ -d input_data='{ "approvals": [ { "approver": { "id": 6 } } ] }' ``` ```deluge url = "/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals"; headers = {"Accept":"application/vnd.manageengine.sdp.v3+json", "Content-Type": "application/x-www-form-urlencoded", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; input_data = { "approvals": [ { "approver": { "id": 6 } } ] }; params = {"input_data": input_data}; response = invokeurl [ url: url type: POST parameters: params headers: headers ]; info response; ``` ```powershell $url = "/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $input_data = @' { "approvals": [ { "approver": { "id": 6 } } ] } '@ $data = @{ 'input_data' = $input_data} $response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers $response ``` ```python from urllib.error import HTTPError from urllib.parse import urlencode from urllib.request import urlopen,Request url = "/api/v3/changes/{change_id}/approval_levels/{level_id}/approvals" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} input_data = '''{ "approvals": [ { "approver": { "id": 6 } } ] }''' data = urlencode({"input_data":input_data}).encode() httprequest = Request(url, headers=headers,data=data, method="POST") try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Create Worklog via API Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release_worklog.html Demonstrates how to create a new worklog for a specific release using a POST request. The payload includes owner details, time ranges, and cost information. ```cURL $ curl /api/v3/releases/{release_id}/worklogs\ -X POST\ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded"\ -d input_data='{ "worklog": { "owner": { "id": "4" }, "description": "New Worklog Added", "start_time": { "value": "1586419380000" }, "end_time": { "value": "1586505780000" }, "time_spent": { "hours": "24", "minutes": "0" }, "other_cost": "0", "type": { "id": "1" }, "include_nonoperational_hours": true, "mark_first_response": false } }' ``` ```Deluge // Deluge Sample script url = "/api/v3/releases/{release_id}/worklogs"; headers = {"Accept":"application/vnd.manageengine.sdp.v3+json", "Content-Type": "application/x-www-form-urlencoded", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; input_data = { "worklog": { "owner": { "id": "4" }, "description": "New Worklog Added", "start_time": { "value": "1586419380000" }, "end_time": { "value": "1586505780000" } } }; ``` -------------------------------- ### Get Release Note using API (Curl, Deluge, Powershell, Python) Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release_note.html This snippet demonstrates how to fetch a specific release note using the ServiceDesk Plus v3 API. It requires the release ID and note ID in the URL. The API returns a JSON object containing the note details, including its ID, description, attachments, and timestamps. The examples show how to make the GET request using Curl, Deluge, Powershell, and Python. ```curl $ curl -G /api/v3/releases/{release_id}/notes/{note_id}\ -X GET\ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded" ``` ```deluge // Deluge Sample script url = "/api/v3/releases/{release_id}/notes/{note_id}"; headers = {"Accept":"application/vnd.manageengine.sdp.v3+json", "Content-Type": "application/x-www-form-urlencoded", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; response = invokeurl [ url: url type: GET headers: headers ]; info response; ``` ```powershell #Powershell version - 5.1 $url = "/api/v3/releases/{release_id}/notes/{note_id}" $headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json" "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX" "Content-Type" = "application/x-www-form-urlencoded"} $response = Invoke-RestMethod -Uri $url -Method get -Headers $headers $response ``` ```python #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}/notes/{note_id}" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Retrieve Worklogs via API Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release_worklog.html Demonstrates how to fetch a list of worklogs associated with a specific release. The examples show the required headers, authentication tokens, and input parameters for both cURL and Deluge environments. ```bash $ curl -G /api/v3/releases/{release_id}/worklogs\ -X GET\ -H "Accept: application/vnd.manageengine.sdp.v3+json"\ -H "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\ -H "Content-Type: application/x-www-form-urlencoded"\ --data-urlencode input_data='{ "list_info": { "row_count": 100 } }' ``` ```deluge // Deluge Sample script url = "/api/v3/releases/{release_id}/worklogs"; headers = {"Accept":"application/vnd.manageengine.sdp.v3+json", "Content-Type": "application/x-www-form-urlencoded", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"}; input_data = { "list_info": { "row_count": 100 } }; params = {"input_data":input_data}; ``` -------------------------------- ### Get Release Permissions using Python Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release.html This Python script retrieves release permissions from the ServiceDesk Plus v3 API using the `urllib` module. It requires the `requests` module to be installed. The script constructs the request with appropriate headers and handles potential HTTP errors. ```python #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}/_get_permissions" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Get Release Approval Summary using Python Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/releases/release.html A Python script to fetch the release approval summary. It requires the `requests` module. The script sets up the URL and headers, including the authentication token, and makes a GET request. Error handling for HTTP requests is included. ```python #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/_approval_summary" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ``` -------------------------------- ### Get List Change Approval Level - API Request Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/changes/change_approval_level.html This is an example of how to make an API request to retrieve all approval levels associated with a specific change ID. Replace '{service domain|custom domain}' with your actual service domain or custom domain, and '{change_id}' with the ID of the change you are querying. ```http GET /api/v3/changes/{change_id}/approval_levels ``` -------------------------------- ### Fetch All List View Filters using Python Source: https://www.manageengine.com/products/service-desk/sdpop-v3-api/requests/request.html This Python script retrieves all list view filters using the `urllib` module. It requires the `requests` module to be installed. The script constructs the URL and headers, makes a GET request, and handles potential HTTP errors. ```python #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/list_view_filters/show_all" headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX", "Content-Type" : "application/x-www-form-urlencoded"} httprequest = Request(url, headers=headers) try: with urlopen(httprequest) as response: print(response.read().decode()) except HTTPError as e: print(e.read().decode()) ```