Create dataset
POST/v2/datasets
Creates a dataset and returns its object. Keep in mind that data stored under unnamed dataset follows data retention period. It creates a dataset with the given name if the parameter name is used. If a dataset with the given name already exists then returns its object.
Request
Query Parameters
Custom unique name to easily identify the dataset in the future.
Example:eshop-itemsStatus 201
Response Headers
- Location
{
"data": {
"id": "WkzbQMuFYuamGv3YF",
"name": "d7b9MDYsbtX5L7XAj",
"userId": "wRsJZtadYvn4mBZmm",
"createdAt": "2019-12-12T07:34:14.202Z",
"modifiedAt": "2019-12-13T08:36:13.202Z",
"accessedAt": "2019-12-14T08:36:13.202Z",
"itemCount": 7,
"cleanItemCount": 5,
"actId": null,
"actRunId": null,
"fields": [],
"consoleUrl": "https://console.apify.com/storage/datasets/WkzbQMuFYuamGv3YF"
}
}
Schema
data object required
- id string requiredExample:
WkzbQMuFYuamGv3YF - name stringExample:
d7b9MDYsbtX5L7XAj - userId string requiredExample:
wRsJZtadYvn4mBZmm - createdAt string<date-time> requiredExample:
2019-12-12T07:34:14.202Z - modifiedAt string<date-time> requiredExample:
2019-12-13T08:36:13.202Z - accessedAt string<date-time> requiredExample:
2019-12-14T08:36:13.202Z - itemCount integer required
Possible values:
Example:>= 07 - cleanItemCount integer required
Possible values:
Example:>= 05 - actId string | null nullable
- actRunId string | null nullable
- fields string[] nullable
- schema object | null nullable
Defines the schema of items in your dataset, the full specification can be found in Apify docs
Example:{"actorSpecification":1,"title":"My dataset","views":{"overview":{"title":"Overview","transformation":{"fields":["linkUrl"]},"display":{"component":"table","properties":{"linkUrl":{"label":"Link URL","format":"link"}}}}}} - consoleUrl string<uri> requiredExample:
https://console.apify.com/storage/datasets/27TmTznX9YPeAYhkC - itemsPublicUrl string<uri>
A public link to access the dataset items directly.
Example:https://api.apify.com/v2/datasets/WkzbQMuFYuamGv3YF/items?signature=abc123 - urlSigningSecretKey string | null nullable
A secret key for generating signed public URLs. It is only provided to clients with WRITE permission for the dataset.
- generalAccess GeneralAccessEnum (string)
Defines the general access level for the resource.
Possible values: [
Example:ANYONE_WITH_ID_CAN_READ,ANYONE_WITH_NAME_CAN_READ,FOLLOW_USER_SETTING,RESTRICTED]RESTRICTED stats object
- readCount integer requiredExample:
22 - writeCount integer requiredExample:
3 - storageBytes integer requiredExample:
783
- readCount integer requiredExample:
- id string requiredExample:
Status 400
Bad request - invalid input parameters or request body.
{
"error": {
"type": "invalid-input",
"message": "Invalid input: The request body contains invalid data."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample: