def _get_application(self, app_id):
        url = urllib_parse.urljoin(self._api_url + 'applications/', str(app_id) + '.json')
        resp = requests.get(url, headers=self._headers).json()
        if 'application' in resp:
            # pick 1st application
            return resp['application'] if resp['application'] else None
        return None
dataset/ETHPy150Open StackStorm/st2contrib/packs/newrelic/sensors/new_relic_app_sensor.py/NewRelicHookSensor._get_application/original