@Override public List<AlertsExternalServiceCondition> list(int policyId) { return getPageable( client.target(CONDITIONS_URL).queryParam("policy_id", policyId).request(APPLICATION_JSON_TYPE), AlertsExternalServiceConditionList.class) .getList(); }
/** * NewRelic API constructor. * * @param restApiUrl NewRelic REST API URL, for example https://api.newrelic.com * @param syntheticsApiUrl NewRelic Synthetics API URL * @param apiKey API Key for given NewRelic account */ public NewRelicInternalApi(String restApiUrl, String syntheticsApiUrl, String apiKey) { NewRelicClient client = new NewRelicClient(restApiUrl, apiKey); applicationsApi = new DefaultApplicationsApi(client); alertsChannelsApi = new DefaultAlertsChannelsApi(client); alertsPoliciesApi = new DefaultAlertsPoliciesApi(client); alertsConditionsApi = new DefaultAlertsConditionsApi(client); alertsExternalServiceConditionsApi = new DefaultAlertsExternalServiceConditionsApi(client); alertsNrqlConditionsApi = new DefaultAlertsNrqlConditionsApi(client); alertsSyntheticsConditionApi = new DefaultAlertsSyntheticsConditionsApi(client); keyTransactionsApi = new DefaultKeyTransactionsApi(client); deploymentsApi = new DefaultDeploymentsApi(client); serversApi = new DefaultServersApi(client); usersApi = new DefaultUsersApi(client); NewRelicClient syntheticsClient = new NewRelicClient(syntheticsApiUrl, apiKey); syntheticsMonitorsApi = new DefaultSyntheticsMonitorsApi(syntheticsClient); } }