Get Post Type Stats
GET
/api/v1/post-types/{key}/stats
Admin stats for one type: by_status, by_lang, by_author.
Authorizations
SessionAuth
Session ID for authenticated requests
Type
API Key (header: X-Session-ID)
Parameters
Path Parameters
key*
type_key of the post type
Type
Requiredstring
Responses
Stats payload
application/json
JSON "data": { "type_key": "string", "total": 0, "by_status": { "additionalProperties": 0 }, "by_lang": { "additionalProperties": 0 }, "by_author": [ { "additionalProperties": "string" } ] }
{
}
Admin stats for one type: totals by status, language, and author.
Auth: session + post-types admin role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | type_key |
Request Body
None.
Response 200
json
{
"data": {
"type_key": "case-study",
"total": 12,
"by_status": { "published": 8, "draft": 4 },
"by_lang": { "en": 7, "es": 5 },
"by_author": [{ "author_id": "u_1", "count": 5 }]
}
}Response Errors
401missing session403insufficient role404type not found503MODULE_DISABLED
Notes
- Useful for type management dashboards and capacity checks (
max_per_author).