Cloud APIs
MemoryStoresApi
createSortedMapItem

createSortedMapItem

Creates a sorted map item.

Parameters

NameTypeDescription
universeIdIdentifierThe id of the universe to create the sorted map item in.
sortedMapstringThe sorted map to create the item in.
itemCreateSortedMapItem_ConstructItemConfigThe sorted map item data.

Example

type Item = { isReal: boolean };
const { data } = await MemoryStoresApi.createSortedMapItem<Item>({
  universeId: 5243626809,
  sortedMap: "MySortedMap",
  item: { id: "Testing123", value: { isReal: true }, ttl: "300s", numericSortKey: 1 },
}); 

Example Data

{
  path: "cloud/v2/universes/5243626809/memory-store/sorted-maps/MySortedMap/items",
  value: { isReal: true },
  etag: "10",
  expireTime: 2024-04-18T00:30:14.000Z,
  id: "Testing123",
  numericSortKey: 1,
} 

Endpoint

POST /v2/universes/{universeId}/memory-store/sorted-maps/{sortedMap}/items