Create key-value store
POST/v2/key-value-stores
Creates a key-value store and returns its object. The response is the same object as returned by the Get store endpoint.
Keep in mind that data stored under unnamed store follows data retention period.
It creates a store with the given name if the parameter name is used. If there is another store with the same name, the endpoint does not create a new one and returns the existing object instead.
Request
Query Parameters
Custom unique name to easily identify the store in the future.
Example:eshop-valuesStatus 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",
"actId": null,
"actRunId": null,
"consoleUrl": "https://console.apify.com/storage/key-value-stores/WkzbQMuFYuamGv3YF",
"keysPublicUrl": "https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/keys?signature=abc123"
}
}
Schema
data object required
- id string requiredExample:
WkzbQMuFYuamGv3YF - name stringExample:
d7b9MDYsbtX5L7XAj - userId string | null nullableExample:
BPWDBd7Z9c746JAnF - username string | null nullableExample:
janedoe - 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 - actId string | null nullableExample:
null - actRunId string | null nullableExample:
null - consoleUrl string<uri>Example:
https://console.apify.com/storage/key-value-stores/27TmTznX9YPeAYhkC - keysPublicUrl string<uri>
A public link to access keys of the key-value store directly.
Example:https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/keys?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 key-value store.
- 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:
9 - writeCount integer requiredExample:
3 - deleteCount integer requiredExample:
6 - listCount integer requiredExample:
2 - s3StorageBytes integerExample:
18
- 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: