Count articles for several filter sets at once
Example request
Generated- cURL
- JavaScript
- TypeScript
- Python
- PHP
- Go
- Java
- Ruby
- C#
Responses
Runs a list of filter sets and returns a count for each, so a dashboard can populate many counters in one request instead of one call per counter.
Authentication
-
-
ApiKeyBearerhttpbearerAn API key sent as
Authorization: Bearer <key>. A key holds scopes, the same ones OAuth uses, and an operation needs the scope listed for it under OAuth2. A key may also expire, or be revoked or rotated in Settings > API, after which it is refused with a 401.
-
-
-
OAuth2oauth2An OAuth 2.0 access token for an app acting on behalf of a HelpDocs user, sent as
Authorization: Bearer <token>. The authorization code flow requires PKCE (S256). Each operation names the one scope it needs.
-
Request body Required
The filter sets to count. Each entry takes the same filters as the list endpoint, plus an optional id echoed back on the matching result.
application/json
BatchCountRequest
-
Null is the same as leaving the field out.
{
"filters": [
{
"id": "string",
"article_id": [
"string"
],
"category_id": [
"string"
],
"tag": [
"string"
],
"combine_tags": "string",
"permission_group": [
"string"
],
"combine_permission_groups": "string",
"status": [
"string"
],
"user_id": [
"string"
],
"working_copy_user_id": [
"string"
],
"search_term": "string",
"is_stale": true,
"needs_translation": true,
"outdated_translation": true,
"has_working_copy": true,
"language_code": "string",
"updated_at_before": "string",
"updated_at_after": "string",
"combine_filters": "string",
"working_copy": true,
"only_deleted": true,
"include_archived": true
}
]
}
Generated from the schema
Responses
One count per filter set
application/json
ArticleCountBatchResponse
The request was rejected: a required field is missing from the body, or a value in it is not acceptable.
text/plain
The failure, as a human-readable message.
-
string
The failure, as a human-readable message.
Authentication failed or no API key was supplied.
application/json
Error
An error response.
-
codeinteger RequiredThe HTTP status code.
-
errstring RequiredA human-readable description of the failure.
The key lacks read permission, or the account’s plan does not include API access.
application/json
Error
An error response.
-
codeinteger RequiredThe HTTP status code.
-
errstring RequiredA human-readable description of the failure.
Rate limited. Wait the number of seconds in Retry-After before trying again. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset say which allowance was spent and when it refills.
-
Retry-Afterinteger -
X-RateLimit-Limitinteger -
X-RateLimit-Remaininginteger -
X-RateLimit-Resetinteger
application/json
Error
An error response.
-
codeinteger RequiredThe HTTP status code.
-
errstring RequiredA human-readable description of the failure.