Expand my Community achievements bar.

Check out the November edition of the Analytics Community Lens newsletter to see what's been trending in the last two months!

Adobe Insertion API health check

Avatar

Level 1

Hi, 

 

Is there a health check endpoint or something similar that we can use to verify if the Insertion API is up and running?

We have a service that processes messages from a Kafka topic that would later be feed into Adobe Analytics through the Insertion API and would like to perform a health check so that we could pause processing of messages when it is unhealthy. Could someone point me to the right direction on how to achieve this? Thank you!

 

Regards,
Paul

1 Reply

Avatar

Level 5
 

Hi Paul,

Yes, there is a health check endpoint for the Insertion API. You can use the following URL to check the health of the API:

https://api.adobe.com/analytics/v1/health

This endpoint will return a JSON response with the following information:

  • status: The status of the API (e.g., "UP" or "DOWN")
  • message: A message describing the current status of the API

If the API is unhealthy, you can pause the processing of messages by setting a flag in your service. This flag can be used to determine whether or not to process messages from the Kafka topic.

Here is an example of how you can set a flag in your service:

// Set a flag to indicate whether or not the Insertion API is healthy
boolean isInsertionApiHealthy = false;

// Get the health status of the Insertion API
String healthStatus = getInsertionApiHealthStatus();

// Update the flag based on the health status
if (healthStatus.equals("UP")) {
  isInsertionApiHealthy = true;
}

Once you have set the flag, you can use it to determine whether or not to process messages from the Kafka topic. For example, you can use the following code to process messages only when the Insertion API is healthy:

// Only process messages if the Insertion API is healthy
if (isInsertionApiHealthy) {
  processMessagesFromKafkaTopic();
}

I hope this helps! Let me know if you have any other questions.

Best regards,
Hemang