Bulk Request Delete via python script invoked from command prompt

Bulk Request Delete via python script invoked from command prompt

Please refer to the below link to install and configure python on the server.

Steps for configuring the script:
  1. Extract the zip in a particular location, eg:  <sdp_home>\integration\custom_scripts
  2. Update the app url and technician_key in the script.

  3. Follow this link to create integration key: https://pitstop.manageengine.com/portal/en/kb/articles/creating-integration-key
  4. Create a Query Report with the below query and save it with a name.
    1. SELECT wo.WORKORDERID AS "workorderid",wo.helpdeskid "portalid" FROM WorkOrder wo 
      LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID 
      LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
      WHERE (wo.ISPARENT='1') and wo.title = 'Cryptocurrency wallet software started'
    2. Assumptions: 
      1. Subject is "Cryptocurrency wallet software started"
      2. Also, please maintain the same names for the columns(workorderid, portalid) as they are used within the script.
    3. Please update the above as per your instance in the query and export the report as a csv file.
    4. Save the exported file in the same location as the python file. 
  5. Open command prompt with administrator permission and invoke the below command. CMD: py delete_request_csv.py <report_filename>.csv


                  New to ADSelfService Plus?