I tried to create a ticket in the rt server from my chatbot using the following python code. But the ticket is not created in the rt server.
Department = “SMG”
email = “akhil.siby@reflectionsinfos.com”
subject = “test ticket”
url = “http://rt.reflectionsinfo.com//REST/1.0/ticket/new?user=myusername&pass=password”
payload = “content=Queue%3A%20” + Department + “%0ARequestor%3A%20” + email + “%0ASubject%3A%20” + subject + “%0AStatus%3A%20new%0AText%3A%20” + subject
headers = {
‘Content-Type’: ‘application/x-www-form-urlencoded’,
‘Cookie’: ‘RT_SID_rt.reflectionsinfo.com.80=d7d121595bb59f7a9d39bd0a2226e265’
}
response = requests.request(“POST”, url, headers=headers, data=payload, verify=False)
print(response.txt)
this is my code . The ticket is not creating in the RT server. And the response.txt is getting as follows
id: ticket/new
Queue:
Requestor: akhilsiby
Subject:
Cc:
AdminCc:
Owner:
Status: new
Priority:
InitialPriority:
FinalPriority:
TimeEstimated: 0
Starts: 2021-07-29 10:44:27
Due:
SLA:
Attachment:
Text:
can someone please help me to solve this problem