Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
453 changes: 453 additions & 0 deletions apify-api/openapi/components/objects/datasets/dataset-items.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
sharedGet: &sharedGet
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: ../../schemas/datasets/DatasetStatisticsResponse.yaml
"400":
$ref: ../../responses/BadRequest.yaml
"401":
$ref: ../../responses/Unauthorized.yaml
"403":
$ref: ../../responses/Forbidden.yaml
"404":
$ref: ../../responses/NotFound.yaml
"405":
$ref: ../../responses/MethodNotAllowed.yaml
"429":
$ref: ../../responses/TooManyRequests.yaml

getById:
<<: *sharedGet
tags:
- Storage/Datasets
summary: Get dataset statistics
description: |
Returns statistics for given dataset.

Provides only [field statistics](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation#dataset-field-statistics).

operationId: dataset_statistics_get
parameters:
- $ref: "../../parameters/storageParameters.yaml#/datasetId"

getDefault:
<<: *sharedGet
tags:
- Default storages
summary: Get default dataset statistics
description: |
Returns statistics for the Actor run's default dataset.

This endpoint is a shortcut that resolves the run's `defaultDatasetId` and proxies to the
[Get dataset statistics](/api/v2/dataset-statistics-get) endpoint.
operationId: actorRun_dataset_statistics_get
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"

getLastRun:
<<: *sharedGet
tags:
- Last Actor run
summary: Get last run's dataset statistics
description: |
Returns statistics for the last Actor run's default dataset.

This endpoint is a shortcut that resolves the last run's `defaultDatasetId` and proxies to the
[Get dataset statistics](/api/v2/dataset-statistics-get) endpoint.
operationId: act_runs_last_dataset_statistics_get
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
225 changes: 225 additions & 0 deletions apify-api/openapi/components/objects/datasets/dataset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
commonErrors: &commonErrors
"400":
$ref: ../../responses/BadRequest.yaml
"401":
$ref: ../../responses/Unauthorized.yaml
"403":
$ref: ../../responses/Forbidden.yaml
"404":
$ref: ../../responses/NotFound.yaml
"405":
$ref: ../../responses/MethodNotAllowed.yaml
"429":
$ref: ../../responses/TooManyRequests.yaml

sharedGet: &sharedGet
responses:
<<: *commonErrors
"200":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../schemas/datasets/DatasetResponse.yaml
deprecated: false

getById:
<<: *sharedGet
tags:
- Storage/Datasets
summary: Get dataset
description: |
Returns dataset object for given dataset ID.

This does not return dataset items, only information about the storage itself.
To retrieve dataset items, use the [List dataset items](/api/v2/dataset-items-get) endpoint.

:::note

Keep in mind that attributes `itemCount` and `cleanItemCount` are not propagated right away after data are pushed into a dataset.

:::

There is a short period (up to 5 seconds) during which these counters may not match with exact counts in dataset items.
operationId: dataset_get
parameters:
- $ref: "../../parameters/storageParameters.yaml#/datasetId"
- 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
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/datasets/dataset/get-dataset
- https://docs.apify.com/api/v2#/reference/datasets/get-dataset
- https://docs.apify.com/api/v2#tag/DatasetsDataset/operation/dataset_get
x-js-parent: DatasetClient
x-js-name: get
x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#get
x-py-parent: DatasetClientAsync
x-py-name: get
x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/DatasetClientAsync#get

getDefault:
<<: *sharedGet
tags:
- Default storages
summary: Get default dataset
description: |
Returns the default dataset associated with an Actor run.

This endpoint is a shortcut for getting the run's `defaultDatasetId` and then using the
[Get dataset](/api/v2/dataset-get) endpoint.

operationId: actorRun_dataset_get
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"

getLastRun:
<<: *sharedGet
tags:
- Last Actor run
summary: Get last run's default dataset
description: |
Returns the default dataset associated with the last Actor run.

This endpoint is a shortcut for getting the last run's `defaultDatasetId` and then using the
[Get dataset](/api/v2/dataset-get) endpoint.
operationId: act_runs_last_dataset_get
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"

sharedPut: &sharedPut
requestBody:
description: ""
content:
application/json:
schema:
$ref: ../../schemas/datasets/UpdateDatasetRequest.yaml
required: true
responses:
<<: *commonErrors
"200":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../schemas/datasets/DatasetResponse.yaml
"413":
$ref: ../../responses/PayloadTooLarge.yaml
"415":
$ref: ../../responses/UnsupportedMediaType.yaml
deprecated: false

putById:
<<: *sharedPut
tags:
- Storage/Datasets
summary: Update dataset
description: |
Updates a dataset's name and general resource access level using a value specified by a JSON object passed in the PUT payload.
The response is the updated dataset object, as returned by the [Get dataset](/api/v2/dataset-get) API endpoint.
operationId:
dataset_put
parameters:
- $ref: "../../parameters/storageParameters.yaml#/datasetId"
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/datasets/dataset/update-dataset
- https://docs.apify.com/api/v2#/reference/datasets/update-dataset
- https://docs.apify.com/api/v2#tag/DatasetsDataset/operation/dataset_put
x-js-parent: DatasetClient
x-js-name: update
x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#update
x-py-parent: DatasetClientAsync
x-py-name: update
x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/DatasetClientAsync#update

putDefault:
<<: *sharedPut
tags:
- Default storages
summary: Update default dataset
description: |
Updates the default dataset associated with an Actor run.

This endpoint is a shortcut for getting the run's `defaultDatasetId` and then using the
[Put dataset](/api/v2/dataset-put) endpoint.

operationId: actorRun_dataset_put
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"

putLastRun:
<<: *sharedPut
tags:
- Last Actor run
summary: Update last run's default dataset
description: |
Updates the default dataset associated with the last Actor run.

This endpoint is a shortcut for getting the last run's `defaultDatasetId` and then using the
[Update dataset](/api/v2/dataset-put) endpoint.
operationId: act_runs_last_dataset_put
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"

sharedDelete: &sharedDelete
responses:
<<: *commonErrors
"204":
$ref: ../../responses/NoContent.yaml
deprecated: false

deleteById:
<<: *sharedDelete
tags:
- Storage/Datasets
summary: Delete dataset
description: Deletes a specific dataset.
operationId: dataset_delete
parameters:
- $ref: "../../parameters/storageParameters.yaml#/datasetId"
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/datasets/dataset/delete-dataset
- https://docs.apify.com/api/v2#/reference/datasets/delete-dataset
- https://docs.apify.com/api/v2#tag/DatasetsDataset/operation/dataset_delete
x-js-parent: DatasetClient
x-js-name: delete
x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#delete

deleteDefault:
<<: *sharedDelete
tags:
- Default storages
summary: Delete default dataset
description: |
Deletes default dataset associated with an Actor run.

This endpoint is a shortcut for getting the last run's `defaultDatasetId` and then using the
[ Delete dataset ](/api/v2/dataset-delete) endpoint.
operationId: actorRun_dataset_delete
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"

deleteLastRun:
<<: *sharedDelete
tags:
- Last Actor run
summary: Delete last run's default dataset
description: |
Deletes the default dataset associated with the last Actor run.

This endpoint is a shortcut for getting the last run's `defaultDatasetId` and then using the
[Delete dataset](/api/v2/dataset-delete) endpoint.
operationId: act_runs_last_dataset_delete
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
27 changes: 13 additions & 14 deletions apify-api/openapi/components/tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -406,20 +406,6 @@

:::
x-trait: true
- name: Tools
x-displayName: Tools - Introduction
description: |
The API endpoints described in this section provide utility tools for encoding,
signing, and verifying data, as well as inspecting HTTP request details.

- **Browser info** (`/v2/browser-info`) - Returns details about the incoming HTTP request,
including the client IP address, country code, and headers. Accepts any HTTP method
(GET, POST, PUT, DELETE) so you can use it to test proxy behavior and verify that
client IP addresses are anonymized correctly.
- **Encode and sign** (`/v2/tools/encode-and-sign`) - Encodes and signs a JSON object,
tying it to the authenticated user's identity.
- **Decode and verify** (`/v2/tools/decode-and-verify`) - Decodes and verifies a value
previously created by the encode-and-sign endpoint.
- name: Users
x-displayName: Users - Introduction
x-legacy-doc-urls:
Expand All @@ -436,3 +422,16 @@
description: The API endpoints described in this section return information about
user accounts.
x-trait: true
- name: Tools
x-displayName: Tools - Introduction
description: |
The API endpoints described in this section provide utility tools for encoding,
signing, and verifying data, as well as inspecting HTTP request details.
- name: Default storages
x-displayName: Default storages - Introduction
description: |
The API endpoints described in this section are convenience endpoints that provide access to Actor run's default storages (dataset, key-value store, and request queue) without the need to resolve the storage ID first.
- name: Last Actor run
x-displayName: Last Actor run - Introduction
description: |
The API endpoints described in this section are convenience endpoints that provide access to Actor's last run and all it's sub resources without the need to resolve the run ID first.
4 changes: 4 additions & 0 deletions apify-api/openapi/components/x-tag-groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@
- name: Tools
tags:
- Tools
- name: Convenience endpoints
tags:
- Default storages
- Last Actor run
12 changes: 12 additions & 0 deletions apify-api/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,12 @@ paths:
$ref: "paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml"
"/v2/acts/{actorId}/runs/last":
$ref: "paths/actors/acts@{actorId}@runs@last.yaml"
"/v2/acts/{actorId}/runs/last/dataset":
$ref: "paths/actors/acts@{actorId}@runs@last@dataset.yaml"
"/v2/acts/{actorId}/runs/last/dataset/items":
$ref: "paths/actors/acts@{actorId}@runs@last@dataset@items.yaml"
"/v2/acts/{actorId}/runs/last/dataset/statistics":
$ref: "paths/actors/acts@{actorId}@runs@last@dataset@statistics.yaml"
"/v2/acts/{actorId}/runs/{runId}":
$ref: "paths/actors/acts@{actorId}@runs@{runId}.yaml"
"/v2/acts/{actorId}/runs/{runId}/abort":
Expand Down Expand Up @@ -550,6 +556,12 @@ paths:
$ref: paths/actor-runs/actor-runs@{runId}@resurrect.yaml
"/v2/actor-runs/{runId}/charge":
$ref: paths/actor-runs/actor-runs@{runId}@charge.yaml
"/v2/actor-runs/{runId}/dataset":
$ref: paths/actor-runs/actor-runs@{runId}@dataset.yaml
"/v2/actor-runs/{runId}/dataset/items":
$ref: "paths/actor-runs/actor-runs@{runId}@dataset@items.yaml"
"/v2/actor-runs/{runId}/dataset/statistics":
$ref: "paths/actor-runs/actor-runs@{runId}@dataset@statistics.yaml"
/v2/actor-builds:
$ref: paths/actor-builds/actor-builds.yaml
"/v2/actor-builds/{buildId}":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
get:
$ref: "../../components/objects/datasets/dataset.yaml#/getDefault"
put:
$ref: "../../components/objects/datasets/dataset.yaml#/putDefault"
delete:
$ref: "../../components/objects/datasets/dataset.yaml#/deleteDefault"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
get:
$ref: "../../components/objects/datasets/dataset-items.yaml#/getDefault"
post:
$ref: "../../components/objects/datasets/dataset-items.yaml#/postDefault"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
get:
$ref: "../../components/objects/datasets/dataset-statistics.yaml#/getDefault"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
get:
$ref: "../../components/objects/datasets/dataset.yaml#/getLastRun"
put:
$ref: "../../components/objects/datasets/dataset.yaml#/putLastRun"
delete:
$ref: "../../components/objects/datasets/dataset.yaml#/deleteLastRun"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
get:
$ref: "../../components/objects/datasets/dataset-items.yaml#/getLastRun"
post:
$ref: "../../components/objects/datasets/dataset-items.yaml#/postLastRun"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
get:
$ref: "../../components/objects/datasets/dataset-statistics.yaml#/getLastRun"
Loading