Interface NewRelicClient
-
- All Known Implementing Classes:
NewRelicClientImpl
public interface NewRelicClientREST client interface for the New Relic API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetApiEndpoint()Get API Endpoint URL for looking up credentials.StringgetApiEndpoint(boolean european)List<Application>getApplications(String apiKey, boolean european)Get the list of applications available to record deployment notifications for.voidsendNotification(String apiKey, String applicationId, String description, String revision, String changelog, String user, boolean european)Submit deployment notificationvoidsendNotificationV2(String apiKey, String changelog, String commit, String deepLink, String deploymentType, String description, String entityGuid, String groupId, String timestamp, String user, String version, boolean european, TaskListener listener)Submit deployment notification
-
-
-
Method Detail
-
getApplications
List<Application> getApplications(String apiKey, boolean european) throws IOException
Get the list of applications available to record deployment notifications for.- Parameters:
apiKey- New Relic User API keyeuropean- Is the User API key created under a European account- Returns:
- A list of applications available for supplied API key.
- Throws:
IOException- when HttpClient is not able to be closed- See Also:
- https://docs.newrelic.com/docs/apm/apis/requirements/api-key
-
sendNotification
void sendNotification(String apiKey, String applicationId, String description, String revision, String changelog, String user, boolean european) throws IOException
Submit deployment notification- Parameters:
apiKey- New Relic API keyapplicationId- Application to register deployment fordescription- Text annotation for the deploymentrevision- The revision number from your source control systemchangelog- A list of changes for this deploymentuser- The name of the user/process that triggered this deployment- Throws:
IOException- when HttpClient is not able to be closed or unexpected status code received- See Also:
- https://docs.newrelic.com/docs/apm/apis/requirements/api-key
-
getApiEndpoint
String getApiEndpoint()
Get API Endpoint URL for looking up credentials.- Returns:
- The endpoint URL for the New Relic API
-
getApiEndpoint
String getApiEndpoint(boolean european)
-
sendNotificationV2
void sendNotificationV2(String apiKey, String changelog, String commit, String deepLink, String deploymentType, String description, String entityGuid, String groupId, String timestamp, String user, String version, boolean european, TaskListener listener) throws IOException
Submit deployment notification- Parameters:
apiKey- New Relic API keychangelog- A list of changes for this deploymentcommit- A commit hash for the deploymentdeepLink- A deep link for the deploymentdeploymentType- A deployment type for the deploymentdescription- Text annotation for the deploymententityGuid- An entity GUID to identify the application for Nerdgraph deployment markersgroupId- A group id for the deploymenttimestamp- A timestamp for the deploymentuser- The name of the user/process that triggered this deploymentversion- A version for the deployment- Throws:
IOException- when HttpClient is not able to be closed or unexpected status code received- See Also:
- https://docs.newrelic.com/docs/apm/apis/requirements/api-key
-
-