def post_annotation(annotation, api_key):
 base_url = 'https://api.circonus.com/v2'
 anootate_post_endpoint = '/annotation'
 resp = requests.post((base_url + anootate_post_endpoint), headers=build_headers(api_key), data=json.dumps(annotation))
 resp.raise_for_status()
 return resp

def post_annotation ( annotation , api_key ) : base_url = 'https://api.circonus.com/v2' anootate_post_endpoint = '/annotation' resp = requests . post ( ( base_url + anootate_post_endpoint ) , headers = build_headers ( api_key ) , data = json . dumps ( annotation ) ) resp . raise_for_status ( ) return resp
takes annotation dict and api_key string .