def runResponsePlay()

in src/run_response_play/lambda_function.py [0:0]


def runResponsePlay(play, incident, userName):
	headers = {'Content-Type' : 'application/json', 'Accept' : 'application/vnd.pagerduty+json;version=2', 'From': API_user, 'Authorization': f'Token token={PD_API_key}'}
	payload = buildResponsePlayPayload(incident)
	endpoint = f'https://api.pagerduty.com/response_plays/{play}/run'
	print (endpoint)
	resp = requests.post(endpoint,headers=headers,data=json.dumps(payload))
	if resp.ok:
		print ("Response Play run succeeded")
	else:
		print("Response Play run failed")
		print(resp)