メインコンテンツまでスキップ

Group and total a register's rows.

POST/api/v1/custom-field-templates/{custom_field_template_id}/rows/aggregateregisters:read
注記

このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。

The Portal's chart data over the register rows the caller can read: filter (eq, neq, gt, lt, gte, lte, between, in, contains; the values today, now, yesterday, tomorrow, this_week_start, this_month_start and this_year_start stand for dates), group by any number of fields, take metrics (count, sum, avg, min, max over a field), order and limit. Each answer group holds its value of every group_by field (by custom_field_id) and every metric (by name). owner narrows the rows to one document's.

スコープregisters:read
非同期いいえ
MCP ツールaggregate_custom_field_template_rows
Portal の権限view_custom_field_values

パラメーター​

名前場所型必須説明
custom_field_template_idpathstring必須
Docwize-Versionheaderstring (date)任意

リクエスト本文​

Content-Type型
application/jsonRegisterAggregateInput

応答​

ステータス説明本文
200Success.application/json RegisterAggregateResult
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

エラー​

この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。

スキーマ​

RegisterAggregateFilterInput​

フィールド型必須説明
custom_field_idstring必須
operatorstring必須eq, neq, gt, lt, gte, lte, between, in or contains.
valuestring または null任意The value to compare with, as text: a number as decimal text, a date as YYYY-MM-DD (or today, now, yesterday, tomorrow, this_week_start, this_month_start, this_year_start). For every operator except in and between.
valuesstring の配列任意The values for in (one or more) and between (exactly two: from, to), as value gives them.

RegisterAggregateGroup​

フィールド型必須説明
groupobject必須The group's value of each group_by field, keyed by the field's custom_field_id; null for rows with no value. Decimals are text, dates ISO text.
valuesobject必須The group's metrics, keyed by the metric's name. count is a number; the others are decimal text, or null when the group has no value.

RegisterAggregateInput​

フィールド型必須説明
filtersRegisterAggregateFilterInput の配列任意Conditions every row must meet (all of them).
group_bystring の配列任意The fields the rows are grouped by, in this order; none gives one group of every row.
limitinteger または null任意The most groups to answer; all of them when absent. has_more says whether more existed.
metricsRegisterAggregateMetricInput の配列任意What to total in each group; a count by default.
order_byRegisterAggregateOrderInput の配列任意The order of the groups.
ownerRowOwnerWriteInput または null任意Only the rows of this document (type document); you must be able to read it.

RegisterAggregateMetricInput​

フィールド型必須説明
custom_field_idstring または null任意The field the function is taken over: required except for count, which counts the group's rows (with a field, the rows that have a value in it). sum and avg need a numeric field.
functionstring必須count, sum, avg, min or max.
namestring または null任意The key the answer holds this metric's value under; the function's name by default. Names are unique in a request.

RegisterAggregateOrderInput​

フィールド型必須説明
custom_field_idstring または null任意A field named in group_by.
directionstring または null任意asc (the default) or desc.
metricstring または null任意The name of a metric. Exactly one of metric and custom_field_id.

RegisterAggregateResult​

フィールド型必須説明
groupsRegisterAggregateGroup の配列必須
has_moreboolean必須Whether more groups existed beyond the limit.

RowOwnerWriteInput​

フィールド型必須説明
document_idstring または null任意The document's ID, for type document.
typestring必須document (the only owner a row write takes).