Hi,
I can attach an email to a running job using CLI.
However, not understanding what my error is when using REST API.
Here is the code fragment
# Get job reference job_ref
......
# attach email to the job. It will automatically send email on job status
# s is the session object. I am using request module
print (os.environ['EMAIL_GROUP'])
payload = {
"type":"Job",
"emailAddresses":[os.environ['EMAIL_GROUP']]
}
rsp=s.post(endpoint + "job/" + job_ref, headers=headers,params=payload)
print(rsp.url)
print(rsp.text)
######################################
Output as below:
dbd.mathews@blueshieldca.comhttp://sac-delphix.bsc.bscal.com/resources/json/delphix/job/JOB-6364?emailAddresses=dbd.mathews%40blueshieldca.com&type=Job{"type":"ErrorResult","status":"ERROR","error":{"type":"APIError","details":"Missing required input of type \"Job\".","action":"Provide the input parameter and try again.","id":"exception.webservices.api.input.missing","commandOutput":null,"diagnoses":[]}}
#############################################
What am I doing wrong?
------------------------------
Ansamma Mathews
Community Member
Blue Shield of California Life & Health Insurance Company
------------------------------