|
| 1 | +commonErrors: &commonErrors |
| 2 | + "400": |
| 3 | + $ref: ../../responses/BadRequest.yaml |
| 4 | + "401": |
| 5 | + $ref: ../../responses/Unauthorized.yaml |
| 6 | + "403": |
| 7 | + $ref: ../../responses/Forbidden.yaml |
| 8 | + "404": |
| 9 | + $ref: ../../responses/NotFound.yaml |
| 10 | + "405": |
| 11 | + $ref: ../../responses/MethodNotAllowed.yaml |
| 12 | + "429": |
| 13 | + $ref: ../../responses/TooManyRequests.yaml |
| 14 | + |
| 15 | +sharedGet: &sharedGet |
| 16 | + responses: |
| 17 | + <<: *commonErrors |
| 18 | + "200": |
| 19 | + description: "" |
| 20 | + headers: {} |
| 21 | + content: |
| 22 | + application/json: |
| 23 | + schema: |
| 24 | + $ref: ../../schemas/datasets/DatasetResponse.yaml |
| 25 | + deprecated: false |
| 26 | + |
| 27 | +getById: |
| 28 | + <<: *sharedGet |
| 29 | + tags: |
| 30 | + - Storage/Datasets |
| 31 | + summary: Get dataset |
| 32 | + description: | |
| 33 | + Returns dataset object for given dataset ID. |
| 34 | +
|
| 35 | + This does not return dataset items, only information about the storage itself. |
| 36 | + To retrieve dataset items, use the [List dataset items](/api/v2/dataset-items-get) endpoint. |
| 37 | +
|
| 38 | + :::note |
| 39 | +
|
| 40 | + Keep in mind that attributes `itemCount` and `cleanItemCount` are not propagated right away after data are pushed into a dataset. |
| 41 | +
|
| 42 | + ::: |
| 43 | +
|
| 44 | + There is a short period (up to 5 seconds) during which these counters may not match with exact counts in dataset items. |
| 45 | + operationId: dataset_get |
| 46 | + parameters: |
| 47 | + - $ref: "../../parameters/storageParameters.yaml#/datasetId" |
| 48 | + - name: token |
| 49 | + in: query |
| 50 | + description: | |
| 51 | + API authentication token. It is required only when using the `username~dataset-name` format for `datasetId`. |
| 52 | + style: form |
| 53 | + explode: true |
| 54 | + schema: |
| 55 | + type: string |
| 56 | + example: soSkq9ekdmfOslopH |
| 57 | + x-legacy-doc-urls: |
| 58 | + - https://docs.apify.com/api/v2#/reference/datasets/dataset/get-dataset |
| 59 | + - https://docs.apify.com/api/v2#/reference/datasets/get-dataset |
| 60 | + - https://docs.apify.com/api/v2#tag/DatasetsDataset/operation/dataset_get |
| 61 | + x-js-parent: DatasetClient |
| 62 | + x-js-name: get |
| 63 | + x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#get |
| 64 | + x-py-parent: DatasetClientAsync |
| 65 | + x-py-name: get |
| 66 | + x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/DatasetClientAsync#get |
| 67 | + |
| 68 | +getDefault: |
| 69 | + <<: *sharedGet |
| 70 | + tags: |
| 71 | + - Default storages |
| 72 | + summary: Get default dataset |
| 73 | + description: | |
| 74 | + Returns the default dataset associated with an Actor run. |
| 75 | +
|
| 76 | + This endpoint is a shortcut for getting the run's `defaultDatasetId` and then using the |
| 77 | + [Get dataset](/api/v2/dataset-get) endpoint. |
| 78 | +
|
| 79 | + operationId: actorRun_dataset_get |
| 80 | + parameters: |
| 81 | + - $ref: "../../parameters/runAndBuildParameters.yaml#/runId" |
| 82 | + |
| 83 | +sharedPut: &sharedPut |
| 84 | + requestBody: |
| 85 | + description: "" |
| 86 | + content: |
| 87 | + application/json: |
| 88 | + schema: |
| 89 | + $ref: ../../schemas/datasets/UpdateDatasetRequest.yaml |
| 90 | + required: true |
| 91 | + responses: |
| 92 | + <<: *commonErrors |
| 93 | + "200": |
| 94 | + description: "" |
| 95 | + headers: {} |
| 96 | + content: |
| 97 | + application/json: |
| 98 | + schema: |
| 99 | + $ref: ../../schemas/datasets/DatasetResponse.yaml |
| 100 | + "413": |
| 101 | + $ref: ../../responses/PayloadTooLarge.yaml |
| 102 | + "415": |
| 103 | + $ref: ../../responses/UnsupportedMediaType.yaml |
| 104 | + deprecated: false |
| 105 | + |
| 106 | +putById: |
| 107 | + <<: *sharedPut |
| 108 | + tags: |
| 109 | + - Storage/Datasets |
| 110 | + summary: Update dataset |
| 111 | + description: | |
| 112 | + Updates a dataset's name and general resource access level using a value specified by a JSON object passed in the PUT payload. |
| 113 | + The response is the updated dataset object, as returned by the [Get dataset](/api/v2/dataset-get) API endpoint. |
| 114 | + operationId: |
| 115 | + dataset_put |
| 116 | + parameters: |
| 117 | + - $ref: "../../parameters/storageParameters.yaml#/datasetId" |
| 118 | + x-legacy-doc-urls: |
| 119 | + - https://docs.apify.com/api/v2#/reference/datasets/dataset/update-dataset |
| 120 | + - https://docs.apify.com/api/v2#/reference/datasets/update-dataset |
| 121 | + - https://docs.apify.com/api/v2#tag/DatasetsDataset/operation/dataset_put |
| 122 | + x-js-parent: DatasetClient |
| 123 | + x-js-name: update |
| 124 | + x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#update |
| 125 | + x-py-parent: DatasetClientAsync |
| 126 | + x-py-name: update |
| 127 | + x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/DatasetClientAsync#update |
| 128 | + |
| 129 | +putDefault: |
| 130 | + <<: *sharedPut |
| 131 | + tags: |
| 132 | + - Default storages |
| 133 | + summary: Update default dataset |
| 134 | + description: | |
| 135 | + Updates the default dataset associated with an Actor run. |
| 136 | +
|
| 137 | + This endpoint is a shortcut for getting the run's `defaultDatasetId` and then using the |
| 138 | + [Put dataset](/api/v2/dataset-put) endpoint. |
| 139 | +
|
| 140 | + operationId: actorRun_dataset_put |
| 141 | + parameters: |
| 142 | + - $ref: "../../parameters/runAndBuildParameters.yaml#/runId" |
| 143 | + |
| 144 | +sharedDelete: &sharedDelete |
| 145 | + responses: |
| 146 | + <<: *commonErrors |
| 147 | + "204": |
| 148 | + $ref: ../../responses/NoContent.yaml |
| 149 | + deprecated: false |
| 150 | + |
| 151 | +deleteById: |
| 152 | + <<: *sharedDelete |
| 153 | + tags: |
| 154 | + - Storage/Datasets |
| 155 | + summary: Delete dataset |
| 156 | + description: Deletes a specific dataset. |
| 157 | + operationId: dataset_delete |
| 158 | + parameters: |
| 159 | + - $ref: "../../parameters/storageParameters.yaml#/datasetId" |
| 160 | + x-legacy-doc-urls: |
| 161 | + - https://docs.apify.com/api/v2#/reference/datasets/dataset/delete-dataset |
| 162 | + - https://docs.apify.com/api/v2#/reference/datasets/delete-dataset |
| 163 | + - https://docs.apify.com/api/v2#tag/DatasetsDataset/operation/dataset_delete |
| 164 | + x-js-parent: DatasetClient |
| 165 | + x-js-name: delete |
| 166 | + x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/DatasetClient#delete |
| 167 | + |
| 168 | +deleteDefault: |
| 169 | + <<: *sharedDelete |
| 170 | + tags: |
| 171 | + - Default storages |
| 172 | + summary: Delete default dataset |
| 173 | + description: Deletes default dataset associated with an Actor run. |
| 174 | + operationId: actorRun_dataset_delete |
| 175 | + parameters: |
| 176 | + - $ref: "../../parameters/runAndBuildParameters.yaml#/runId" |
0 commit comments