MemoryStoreQueueItem

Represents an item within a queue structure.

Attributes

pathstring

The resource path of the memory store queue item.

Format: universes/{universe_id}/memory-store/queues/{memory_store_queue_id}/items/{memory_store_queue_item_id}.

dataJSON value

The value of the queue item.

A JSON value can be null, boolean, string, number, array, or object.

prioritynumber

The priority of the queue item.

One of the following for expiration:

ttlstring
Input Only

The TTL for the item.

expireTimestring
Output Only

The expiration time of the item. This string is formatted as a Timestamp.

idstring
Output Only

The name of the item.

Base URL

https://apis.roblox.com
The MemoryStoreQueueItem Resource

{
"path": "universes/123/memory-store/queues/some-memory-store-queue-id/items/some-memory-store-queue-item-id",
"data": "JSON value",
"priority": "number",
"ttl": "3s",
"id": "string"
}

MemoryStoreQueueItem

Create Memory Store Queue Item
Beta

POST /cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items

Creates a new queue item.

If ttl is set, the item will automatically be removed from the queue after the time interval specified.

If a numerical priority is set, the item will be inserted into the queue based on the priority value. The higher the value, the closer to the front of the queue the item will be. If priority values are the same then the item will be inserted after existing values with the same priority.

Scopes
universe.memory-store.queue:write
RequestPath Parameters
universe_idstring
Required

The universe ID.

queue_idstring
Required

The queue ID.

Request BodyMemoryStoreQueueItem
POST /cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items

curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"data": "JSON value",
"priority": "number",
"ttl": "3s"
}'
Response

{
"path": "universes/123/memory-store/queues/some-memory-store-queue-id/items/some-memory-store-queue-item-id",
"data": "JSON value",
"priority": "number",
"id": "string"
}

MemoryStoreQueueItem

Discard Memory Store Queue Items
Beta

POST /cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items:discard

Discards read items from the front of the queue.

Takes a readId from a previous Read operation.

Scopes
universe.memory-store.queue:discard
RequestPath Parameters
universe_idstring
Required

The universe ID.

queue_idstring
Required

The queue ID.

Request Body
readIdstring

The readId of the previous read operation for which to discard read items.

POST /cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items:discard

curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items:discard' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"readId": "string"
}'

MemoryStoreQueueItem

Read Memory Store Queue Items
Beta

GET /cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items:read

Returns the specified number of items at the front of the queue.

Scopes
universe.memory-store.queue:dequeue
RequestPath Parameters
universe_idstring
Required

The universe ID.

queue_idstring
Required

The queue ID.

Query Parameters
countnumber

The number of items to read from the queue If unspecified, 1 item will be returned. The maximum value is 200; values above 200 will be coerced to 200.

allOrNothingboolean

If all_or_nothing is true and the requested number of objects is not available, will return a 404 Error.

Otherwise, will return the path and read_id of the read operation and a list of the MemoryStoreQueue items.

invisibilityWindowstring

Invisibility window for items read, in seconds.

Items read are invisible in subsequent reads during the invisibility window duration.

It must be written in seconds greater than 0 and end with s.

Defaults to 30s.

Response

Returns the specified number of items at the front of the queue.

readIdstring

An identifier of the read operation

This can be passed to :discard in order to mark the items as processed.

GET /cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items:read

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/memory-store/queues/{queue_id}/items:read?count={integer}&allOrNothing={boolean}&invisibilityWindow={string}' \
-H 'x-api-key: {your-api-key}'
Response

{
"readId": "string",
"items": [
{
"path": "universes/123/memory-store/queues/some-memory-store-queue-id/items/some-memory-store-queue-item-id",
"data": "JSON value",
"priority": "number",
"id": "string"
}
]
}