def deletetrigger(config, args):
    url = config['url'] + "/api/serveroverload/" + args['serveroverload'] + "/"
    token = auth.get_token(config)
    r = requests.get(url, headers={"X-Auth-Token": token})
    if r.status_code != 200:
        print("API returned status code %s" % (r.status_code))
        sys.exit(1)
    profile = json.loads(r.content)
    try:
        profile['response_triggers'].pop(args['position'])
    except IndexError:
        print("Position %s was invalid in the response triggers!" % (args['position']))
        sys.exit(1)
    r = requests.put(url, data=json.dumps(profile), headers={"X-Auth-Token": token})
    print("API returned status code %s" % (r.status_code))
dataset/ETHPy150Open emccode/heliosburn/heliosburn/hbcli/controllers/serveroverload.py/deletetrigger/original