# DataStore API ## List Stores List all DataStores within a given experience. ``` USAGE: rbxcloud datastore list-stores [OPTIONS] --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -c, --cursor Cursor for the next set of data -h, --help Print help information -l, --limit Maximum number of items to return -p, --prefix Return only DataStores with this prefix -u, --universe-id Universe ID of the experience ``` ## List Keys List all keys within a given DataStore. ``` USAGE: rbxcloud datastore list [OPTIONS] --datastore-name --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -c, --cursor Cursor for the next set of data -d, --datastore-name DataStore name -h, --help Print help information -l, --limit Maximum number of items to return -o, --all-scopes If true, return keys from all scopes -p, --prefix Return only DataStores with this prefix -s, --scope DataStore scope -u, --universe-id Universe ID of the experience ``` ## List Key Versions List all versions of the specified key. ``` USAGE: rbxcloud datastore list-versions [OPTIONS] --datastore-name --key --sort-order --limit --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -c, --cursor Cursor for the next set of data -d, --datastore-name DataStore name -e, --end-time End time constraint (ISO UTC Datetime) -h, --help Print help information -k, --key The key of the entry -l, --limit Maximum number of items to return -o, --sort-order Sort order [possible values: ascending, descending] -s, --scope DataStore scope -t, --start-time Start time constraint (ISO UTC Datetime) -u, --universe-id Universe ID of the experience ``` ## Get Key Get the entry value of a specific key. ``` USAGE: rbxcloud datastore get [OPTIONS] --datastore-name --key --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -d, --datastore-name DataStore name -h, --help Print help information -k, --key The key of the entry -s, --scope DataStore scope -u, --universe-id Universe ID of the experience ``` ## Set Key Set (or create) the entry value of a specific key. ``` USAGE: rbxcloud datastore set [OPTIONS] --datastore-name --key --data --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -d, --datastore-name DataStore name -D, --data JSON-stringified data (up to 4MB) -e, --exclusive-create Only create the entry if it does not exist -h, --help Print help information -i, --match-version Only update if the current version matches this -k, --key The key of the entry -s, --scope DataStore scope -t, --attributes JSON-stringified attributes data -u, --universe-id Universe ID of the experience -U, --user-ids Comma-separated list of Roblox user IDs ``` ## Increment Key Increment (or create) the entry value of a specific key. ``` USAGE: rbxcloud datastore increment [OPTIONS] --datastore-name --key --increment-by --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -d, --datastore-name DataStore name -h, --help Print help information -i, --increment-by The amount by which the entry should be incremented -k, --key The key of the entry -s, --scope DataStore scope -t, --attributes JSON-stringified attributes data -u, --universe-id Universe ID of the experience -U, --user-ids Comma-separated list of Roblox user IDs ``` ## Delete Key Delete the value of a specific key. Per Roblox's [documentation](https://create.roblox.com/docs/open-cloud/data-store-api#delete-entry), this creates a "tombstone" version for 30 days before being completely deleted. ``` USAGE: rbxcloud datastore delete [OPTIONS] --datastore-name --key --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -d, --datastore-name DataStore name -h, --help Print help information -k, --key The key of the entry -s, --scope DataStore scope -u, --universe-id Universe ID of the experience ``` ## Get Key Version Get a specific entry of a key given the version. ``` USAGE: rbxcloud datastore get-version [OPTIONS] --datastore-name --key --version-id --universe-id --api-key OPTIONS: -a, --api-key Roblox Open Cloud API Key [env: RBXCLOUD_API_KEY=] -d, --datastore-name DataStore name -h, --help Print help information -i, --version-id The version of the key -k, --key The key of the entry -s, --scope DataStore scope -u, --universe-id Universe ID of the experience ```