Count the projects by project type or by status.
POST/api/v1/projects/aggregateprojects:read
group_by is project_type or project_status. One group per value that visible projects hold, with how many; the counts the List Manager shows before a type or status is edited or deleted, but only over the projects the caller can see. Needs View Project Details. list_projects with project_type_id or project_status_id lists the projects of one group.
| Scope | projects:read |
| Asynchronous | No |
| MCP tool | aggregate_projects |
| Portal permissions | view_project_details |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Docwize-Version | header | string (date) | Optional |
Request body
| Content type | Type |
|---|---|
application/json | ProjectAggregateInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json ProjectAggregateResult |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
ProjectAggregateInput
| Field | Type | Required | Description |
|---|---|---|---|
group_by | string | Required | project_type or project_status. |
ProjectAggregateResult
| Field | Type | Required | Description |
|---|---|---|---|
group_by | string | Required | |
groups | array of ProjectGroup | Required | One group per stored value, including the projects that hold none; a stored name that matches no list entry has a null ID. |
ProjectGroup
| Field | Type | Required | Description |
|---|---|---|---|
project_count | integer | Required | The projects the caller can see that hold it. ≥ -2147483648; ≤ 2147483647 |
project_status | object or null | Required | The project status, when grouping by project_status; null for projects with none, and when grouping by type. |
project_type | object or null | Required | The project type, when grouping by project_type; null for projects with none, and when grouping by status. |