Python add request to servicedesk plus

Python add request to servicedesk plus

Hello,

Can you help me, please. I'm trying to add request to servicedesk plus using python.

Here is my code : 

import requests

url = "https://web_url:port_number/api/v3/requests"
headers = {"technician_key":"29CFC222-0000-4628-0000-04CAA5123456"}
input_data = '''{
    "operation": {
        "details": {
            "requester": "John Grey",
            "subject": "First request",
            "description": "Test request number 1",
            "requesttemplate": "Default Request",
            "priority": "High",
            "site": "AFL",
            "group": "AFL",
            "level": "Tier 1",
            "status": "open",
            "service": "Email",
            "account": "AFL"
        }
    }
}'''

params = {'input_data': input_data}
response = requests.get(url,headers=headers,params=params,verify=False)
print(response.text)

I get an error: 

{"response_status":{"status":"failed","messages":[{"field":"operation","message":"Extra key found in JSON","status_code":4001,"type":"failed"}]}}

Thank you !

                New to ADSelfService Plus?