Graph API Keeaplive service

Sangeetha Premsundar 20 Reputation points
2024-02-10T10:10:21.9633333+00:00

Hi Team, We are implementing application to invoke Graph API - Mail - Message- functionality (Reply/Forward/List Attachment/Get Attachment). In order to handle, Graph API system down scenario. Do u have any keepalive service / health check url which will return 200 success if Graph API available and 500 Error if Graph API is down. Regards, Sangeehta

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,835 questions
0 comments No comments
{count} votes

Accepted answer
  1. RevelinoB 2,780 Reputation points
    2024-02-10T11:37:28.36+00:00

    Hi Sangeetha, While Microsoft Graph API doesn't directly offer a specific "keepalive" or health check URL to assess its availability through HTTP status codes like 200 for success or 500 for server errors, you might explore alternative strategies to ensure your application can gracefully handle scenarios when the Graph API might be down. Here are a few suggestions: Simple Check-Up Call: Consider crafting a non-intensive request that your application can periodically send to the Graph API. A common method is to fetch a basic resource that requires minimal permissions, such as the profile of the currently authenticated user (/me). The success or failure of this request can serve as an indicator of the API's availability. Peek at the Dashboard: Though not a direct API call for health checks, Microsoft's Service Health dashboard in the Microsoft 365 admin center provides detailed status updates on all Microsoft services, including the Graph API. For applications with administrative privileges, there are Graph API endpoints available to query the service health status programmatically. Utilize Azure Monitoring Tools: If your infrastructure is on Azure, employing Azure Monitor and Application Insights can offer insights into your application's health, including its interactions with external services like Graph API. These tools can help you set up alerts based on metrics such as API response times and error rates. DIY Health Check: For a more tailored solution, you might develop an internal endpoint within your application that periodically checks the Graph API's status by making a test call and reporting the outcome. This endpoint could then be used to inform your system or administrators of the API's health.

    Just be aware that it's crucial to design these checks thoughtfully to minimize unnecessary traffic and avoid hitting the API's rate limits. I hope this helps?

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.