diff --git a/apify-api/openapi/components/schemas/datasets/GetDatasetFieldStatisticsResponse.yaml b/apify-api/openapi/components/schemas/datasets/GetDatasetFieldStatisticsResponse.yaml deleted file mode 100644 index c0801a85e..000000000 --- a/apify-api/openapi/components/schemas/datasets/GetDatasetFieldStatisticsResponse.yaml +++ /dev/null @@ -1,10 +0,0 @@ -title: GetDatasetFieldStatisticsResponse -required: - - data -type: object -properties: - data: - type: object - additionalProperties: - $ref: ./DatasetFieldStatistics.yaml - description: 'Statistics for each field from dataset fields schema.' diff --git a/apify-api/openapi/components/schemas/datasets/GetDatasetStatisticsResponse.yaml b/apify-api/openapi/components/schemas/datasets/GetDatasetStatisticsResponse.yaml new file mode 100644 index 000000000..9b659ad5c --- /dev/null +++ b/apify-api/openapi/components/schemas/datasets/GetDatasetStatisticsResponse.yaml @@ -0,0 +1,15 @@ +title: GetDatasetStatisticsResponse +required: + - data +type: object +properties: + data: + type: object + properties: + fieldStatistics: + type: object + additionalProperties: + $ref: ./DatasetFieldStatistics.yaml + description: 'When you configure the dataset [fields schema](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation), we measure the statistics such as `min`, `max`, `nullCount` and `emptyCount` for each field. + This property provides statistics for each field from dataset fields schema. +

See dataset field statistics [documentation](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation#dataset-field-statistics) for more information.' diff --git a/apify-api/openapi/components/tags.yaml b/apify-api/openapi/components/tags.yaml index c5c6eb003..dfa8659c0 100644 --- a/apify-api/openapi/components/tags.yaml +++ b/apify-api/openapi/components/tags.yaml @@ -758,8 +758,8 @@ x-legacy-doc-urls: - '#/reference/datasets/item-collection' x-trait: 'true' -- name: Datasets/Field statistics - x-displayName: Field statistics +- name: Datasets/Statistics + x-displayName: Statistics x-parent-tag-name: Datasets x-trait: 'true' - name: Request queues diff --git a/apify-api/openapi/components/x-tag-groups.yaml b/apify-api/openapi/components/x-tag-groups.yaml index fbb05fb66..8e578a4fa 100644 --- a/apify-api/openapi/components/x-tag-groups.yaml +++ b/apify-api/openapi/components/x-tag-groups.yaml @@ -62,7 +62,7 @@ - Datasets/Dataset collection - Datasets/Dataset - Datasets/Item collection - - Datasets/Field statistics + - Datasets/Statistics - name: Request queues tags: - Request queues diff --git a/apify-api/openapi/openapi.yaml b/apify-api/openapi/openapi.yaml index 75f0a1a90..377ae251e 100644 --- a/apify-api/openapi/openapi.yaml +++ b/apify-api/openapi/openapi.yaml @@ -566,8 +566,8 @@ paths: $ref: 'paths/datasets/datasets@{datasetId}.yaml' '/v2/datasets/{datasetId}/items': $ref: 'paths/datasets/datasets@{datasetId}@items.yaml' - '/v2/datasets/{datasetId}/field-statistics': - $ref: 'paths/datasets/datasets@{datasetId}@field-statistics.yaml' + '/v2/datasets/{datasetId}/statistics': + $ref: 'paths/datasets/datasets@{datasetId}@statistics.yaml' /v2/request-queues: $ref: paths/request-queues/request-queues.yaml '/v2/request-queues/{queueId}': diff --git a/apify-api/openapi/paths/datasets/datasets@{datasetId}@field-statistics.yaml b/apify-api/openapi/paths/datasets/datasets@{datasetId}@field-statistics.yaml deleted file mode 100644 index fd666df79..000000000 --- a/apify-api/openapi/paths/datasets/datasets@{datasetId}@field-statistics.yaml +++ /dev/null @@ -1,50 +0,0 @@ -get: - tags: - - Datasets/Field statistics - summary: Get field statistics - description: | - Returns field statistics for given dataset. - When you configure the dataset [fields schema](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation), we measure the statistics such as `min`, `max`, `nullCount` and `emptyCount` for each field. - - See dataset fields schema [documentation](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation#dataset-field-statistics) for more information. - - operationId: dataset_field_statistics_get - parameters: - - name: datasetId - in: path - description: Dataset ID or `username~dataset-name`. - required: true - style: simple - schema: - type: string - example: WkzbQMuFYuamGv3YF - - name: token - in: query - description: | - API authentication token. It is required only when using the `username~dataset-name` format for `datasetId`. - style: form - explode: true - schema: - type: string - example: soSkq9ekdmfOslopH - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: "../../components/schemas/datasets/GetDatasetFieldStatisticsResponse.yaml" - example: - data: - name: - nullCount: 122 - price: - min: 59 - max: 89 -# TODO: add clients methods -# x-js-parent: DatasetClient -# x-js-name: fieldStatistics -# x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#fieldStatistics -# x-py-parent: DatasetClientAsync -# x-py-name: field_statistics -# x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/DatasetClientAsync#field_statistics diff --git a/apify-api/openapi/paths/datasets/datasets@{datasetId}@statistics.yaml b/apify-api/openapi/paths/datasets/datasets@{datasetId}@statistics.yaml new file mode 100644 index 000000000..52ce3ea06 --- /dev/null +++ b/apify-api/openapi/paths/datasets/datasets@{datasetId}@statistics.yaml @@ -0,0 +1,49 @@ +get: + tags: + - Datasets/Statistics + summary: Get dataset statistics + description: | + Returns statistics for given dataset. + Currently provides only [field statistics](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation#dataset-field-statistics). + + operationId: dataset_statistics_get + parameters: + - name: datasetId + in: path + description: Dataset ID or `username~dataset-name`. + required: true + style: simple + schema: + type: string + example: WkzbQMuFYuamGv3YF + - name: token + in: query + description: | + API authentication token. It is required only when using the `username~dataset-name` format for `datasetId`. + style: form + explode: true + schema: + type: string + example: soSkq9ekdmfOslopH + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: "../../components/schemas/datasets/GetDatasetStatisticsResponse.yaml" + example: + data: + fieldStatistics: + name: + nullCount: 122 + price: + min: 59 + max: 89 +# TODO: add clients methods +# x-js-parent: DatasetClient +# x-js-name: statistics +# x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#statistics +# x-py-parent: DatasetClientAsync +# x-py-name: statistics +# x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/DatasetClientAsync#statistics