Skip to main content

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 key-value 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

    name string

    Custom unique name to easily identify the store in the future.


    Example: eshop-values

Status 200

Returns the existing key-value store object if a store with the given name already exists.

{
"data": {
"id": "WkzbQMuFYuamGv3YF",
"name": "d7b9MDYsbtX5L7XAj",
"userId": "BPWDBd7Z9c746JAnF",
"username": "janedoe",
"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/27TmTznX9YPeAYhkC",
"keysPublicUrl": "https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/keys?signature=abc123",
"recordsPublicUrl": "https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/records",
"schema": "Unknown Type: object,null",
"urlSigningSecretKey": "string",
"generalAccess": "RESTRICTED",
"stats": {
"readCount": 9,
"writeCount": 3,
"deleteCount": 6,
"listCount": 2,
"s3StorageBytes": 18,
"storageBytes": 457225
}
}
}