Get Chat Project Usage
GET/v1/organizations/analytics/apps/chat/projects
Get per-project activity for a given day, with cursor-based pagination.
Returns activity metrics for each project in the organization, sorted by
project ID. Use group_by[] to break projects out per member or per RBAC
group, and filter[] to scope results; the parameter descriptions list the
supported dimensions. Available to organizations on a Claude Enterprise
plan. Requires an API key with the read:analytics scope.
Parameters
Returns
Get Chat Project Usage
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Anthropic\Client;
$client = new Client(apiKey: 'my-anthropic-api-key');
$page = $client->beta->organization->analytics->apps->chat->projects->list(
date: '2019-12-27',
endingDate: '2019-12-27',
filter: ['string'],
groupBy: ['rbac_group_id'],
limit: 1,
order: 'asc',
orderBy: 'order_by',
page: 'page',
startingDate: '2019-12-27',
);
var_dump($page);Response 200
{
"data": [
{
"distinct_user_count": 0,
"message_count": 0,
"project_id": "project_id",
"project_name": "project_name",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"email_address": "email_address",
"type": "user"
},
"distinct_conversation_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"distinct_user_count": 0,
"message_count": 0,
"project_id": "project_id",
"project_name": "project_name",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"email_address": "email_address",
"type": "user"
},
"distinct_conversation_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}