#List of Packages used in this Script.
import sys
import json
import urllib
detailsJSON1={}
detailsJSON1['requester']=requestObj['REQUESTER']
#Setting up the result operation
resultjson={}
resultjson["operation"] = []
resultjson["result"]="success"
message = "Sample Python script for adding approvers"
resultjson["message"]=message
#Creating the json object for submitting Approval
operationJson={"INPUT_DATA":[]}
operationJson["OPERATIONNAME"]="ADD_APPROVAL_STAGE"
approvalArray={}
approvalObject='$REPORTING_TO$' # The email will be send to whoever we setup as reporting to in the requesters settings. Alternatively use 'anyone@company.com' for fixed aprover
approvalArray={"StageOne":[]}
approvalArray['StageOne'].append(approvalObject);
operationJson['INPUT_DATA'].append(approvalArray)
operationJson["send_immediately"]="true" #When this is set to true , the approvals will be added and the mail will be send immediately.
resultjson['operation'].append(operationJson)
print(resultjson)
#--- End of Script----