Overview of Metered Graph API Calls
Microsoft introduced Metered Graph API calls to allow developers and organizations to access premium, resource-intensive data across the Microsoft 365 ecosystem. These metered APIs come with specific costs based on usage, providing businesses with scalable access to high-value data points and advanced functionality.
Below is an overview of the commonly available Metered Graph API calls across different Microsoft 365 services, including their functionality, common use cases, and what makes them metered. This overview is based on the types of workloads and data that typically require metering due to the resource demands associated with accessing them.
1. Reports API
The Reports API is one of the most common examples of a metered API call. This API provides access to detailed usage data across Microsoft 365 services like Microsoft Teams, SharePoint, OneDrive, Exchange, and more. The reports generated by this API offer insights into user activity, device usage, and adoption rates of Microsoft 365 services.
- Common Endpoints:
GET /reports/getTeamsUserActivityUserDetail(period='D30')
GET /reports/getSharePointSiteUsageDetail(period='D7')
GET /reports/getOneDriveUsageDetail(period='D30')
- Use Case: These APIs are typically used to generate detailed reports on how users interact with specific Microsoft 365 services. For example, they can track which users are most active in Teams, which SharePoint sites are getting the most traffic, or how OneDrive storage is being utilized.
- Why Metered: The depth and breadth of data provided in these reports require significant processing and can involve retrieving detailed information from large datasets.
2. Search API
The Search API allows for complex search queries across multiple Microsoft 365 services, such as SharePoint, OneDrive, and Outlook. The metered Search API is ideal for enterprise-level search scenarios, such as searching for documents, files, or emails based on specific criteria or keywords.
- Common Endpoints:
POST /search/query
- Use Case: This API is used when businesses need to conduct deep searches across documents, emails, or other content stored in Microsoft 365. For example, an organization might use this API to search for all documents related to "Q3 financials" across its SharePoint and OneDrive libraries.
- Why Metered: Enterprise search operations can involve querying large volumes of data spread across multiple Microsoft 365 services. The complexity and resource intensity of performing these searches justify the metered model.
3. Teams API (Message Retrieval)
Retrieving detailed message data from Microsoft Teams can also be metered. The Teams API allows developers to access user chats, messages, and activity logs for analytics or integration into other business applications.
- Common Endpoints:
GET /teams/{team-id}/channels/{channel-id}/messages
- Use Case: Organizations that want to archive or analyze Microsoft Teams conversations, such as for compliance purposes or communication audits, can use this API. It allows for retrieving entire message histories within Teams channels or chats.
- Why Metered: Retrieving messages from large-scale, active Teams environments can involve processing substantial amounts of data. The frequency and size of message retrievals make this a candidate for metered billing.
领英推荐
4. Outlook API (Message & Calendar Retrieval)
The Outlook API provides access to user emails and calendar events. While basic email and calendar operations are included in regular Graph API usage, high-volume message retrieval or advanced calendar management tasks can be metered.
- Common Endpoints:
GET /users/{id | userPrincipalName}/messages
GET /users/{id | userPrincipalName}/events
- Use Case: Companies may use this API to retrieve a user’s complete email history for compliance audits or to sync calendar events across different platforms.
- Why Metered: For organizations with significant email and calendar activity, retrieving detailed data across multiple users and large mailboxes can generate substantial resource loads, making it necessary to meter these operations.
5. OneDrive and SharePoint File Access API
The OneDrive and SharePoint API allows users to retrieve large volumes of files and metadata. While regular file access is covered under standard Graph API calls, bulk retrieval of files, file metadata, or large document libraries from SharePoint or OneDrive is metered.
- Common Endpoints:
GET /drives/{drive-id}/root/children
GET /sites/{site-id}/drives/{drive-id}/items/{item-id}/children
- Use Case: This API is ideal for scenarios where an application needs to list or retrieve many files or folders, such as during a migration process or when syncing data across multiple systems.
- Why Metered: Large-scale file retrievals, especially from massive document libraries or shared drives, place a heavy load on the system, which necessitates metering to ensure fair resource usage.
6. Compliance and Security APIs
Microsoft also offers compliance and security APIs as part of its Graph ecosystem. These APIs allow businesses to access security alerts, compliance data, and audit logs. Such APIs are essential for organizations that need to track and analyze security events or ensure regulatory compliance.
- Common Endpoints:
GET /security/alerts
GET /compliance/auditLogs/signIns
- Use Case: Companies may use these APIs to monitor security threats across their Microsoft 365 environment or track user sign-in attempts for audit purposes.
- Why Metered: Security and compliance data are often vast and require real-time access to events and logs across an organization. Given the resource demands associated with processing this data, these APIs are metered.
Summary
Metered Graph API calls offer businesses greater flexibility and control over their usage of high-demand data within the Microsoft 365 ecosystem. By enabling organizations to scale their access to premium data, such as advanced analytics, extensive file retrievals, or complex search operations, metered APIs ensure that resources are used efficiently and cost-effectively. Understanding the specific use cases and pricing models associated with metered Graph APIs is key to optimizing your organization’s API consumption and ensuring a balance between cost and capability.
If your business is dealing with large datasets, fluctuating demand, or requires access to advanced Microsoft 365 features, metered Graph API calls provide the necessary tools to scale while maintaining transparency and control over API costs.
Automation Artisan | Dedicated Power Platform for Enhanced Business Efficiency
2 个月Great and easy read! I love the format ??