Get Plugin Usage
Get per-plugin install + invocation usage for a given day, with pagination.
Returns plugin usage metrics for the organization across Cowork and Claude
Code, sorted by plugin name. The plugin_name value third-party is
an aggregate bucket, not a plugin: it collects plugin activity, from
either surface, for which the reporting client did not provide a plugin
name — so an organization's own plugins can contribute both to their own
named rows and to this bucket. Use group_by[] to break usage out per
member, per RBAC group, or per product surface (Cowork / Claude Code),
and filter[] to scope results; the parameter descriptions list the
supported dimensions. Requires an API key with the
read:analytics scope. starting_date / ending_date select
range-rollup mode like /skills.
Parameters
Returns
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Anthropic\Client;
$client = new Client(apiKey: 'my-anthropic-api-key');
$page = $client->beta->organization->analytics->plugins->list(
date: '2019-12-27',
endingDate: '2019-12-27',
filter: ['string'],
groupBy: ['product'],
limit: 1,
order: 'asc',
orderBy: 'order_by',
page: 'page',
startingDate: '2019-12-27',
);
var_dump($page);{
"data": [
{
"claude_code_metrics": {
"distinct_session_plugin_used_count": 0
},
"cowork_metrics": {
"distinct_session_plugin_used_count": 0
},
"distinct_user_count": 0,
"install_count": 0,
"invocation_count": 0,
"plugin_name": "plugin_name",
"chat_cowork_unified_metrics": {
"distinct_session_plugin_used_count": 0
},
"plugin_id": "plugin_id",
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}Returns Examples
{
"data": [
{
"claude_code_metrics": {
"distinct_session_plugin_used_count": 0
},
"cowork_metrics": {
"distinct_session_plugin_used_count": 0
},
"distinct_user_count": 0,
"install_count": 0,
"invocation_count": 0,
"plugin_name": "plugin_name",
"chat_cowork_unified_metrics": {
"distinct_session_plugin_used_count": 0
},
"plugin_id": "plugin_id",
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}