LogoLogo
API Status
  • ๐Ÿ‘‹Welcome
  • ๐ŸŒWhat is Morpheus Platform?
    • Interoperability
  • โ„น๏ธHelp
    • ๐Ÿ“—Glossary
    • ๐Ÿ†˜Support
    • Firewall problems
    • EULA
  • CREATION
    • ๐ŸŽฎUnreal Development
      • โšกGet Started
        • โš’๏ธDownload the Editor
        • โซUpload Content
        • ๐ŸŒŽCreating your own map
        • ๐Ÿ“Morpheus Base Project
        • โ“Differences from Unreal
          • ๐ŸงCharacter Configuration
        • ๐Ÿ“กMorpheus Networking
          • Introduction to Morpheus Networking
          • Network Levels
          • Replicated Properties
          • RPCs
          • Morpheus Render Targets
          • Morpheus Array
          • Networking FAQ
          • Replicating Sublevels
      • ๐Ÿ“šFeatures & Guides
        • ๐Ÿ“’Example Plugin
          • Nameplates
          • In-game roles
          • Resizing
        • ๐ŸŠActor Pooling
        • ๐Ÿ”ŠAudio
        • ๐ŸŽญAvatars
          • Creating an Avatar
          • Attachments
            • MML Attachments
          • Custom Animation Variables
          • Importing an NFT collection
          • Capsules and Mesh Transforms
        • ๐Ÿค–Bots
        • ๐ŸŽ™๏ธChat
          • Unreal Text Chat
        • ๐ŸŽ›๏ธControl Panels
          • Control Panel Configuration
          • DJ booth mission control
          • Observer Controls
        • ๐Ÿ”‰Crowd Audio
        • ๐ŸคผCrowd Rendering
          • Legacy Animated Crowd
            • Animated Crowd Console Commands
            • Attaching static meshes to crowd members
          • Crowd Materials
          • Performance Parameters
          • Live Config Settings
          • Crowd Animation
            • Crowd Anim Blueprint
              • User Guide - Crowd Anim Blueprint
              • Reference Guide - ABP Nodes
                • Animation Playback
                • States and State Machines
                • Variables
                • Transitions
                • Special
                • Blends
                • Additional Notes
        • ๐ŸฑHelpers & Extras
          • "Instanced Objects" in Blueprints
          • Objects with "world context"
          • Making DataAsset classes
          • Duplicate Objects
          • The Bootflow Subsystem
          • The "Wait For Condition" System
          • Advanced Graphics settings
          • Listening to inputs on UObjects
          • Morpheus UserID
          • World Services
          • M2Extras: Skins System
        • ๐Ÿ–ฅ๏ธLoading Screen
        • โšกLive Config
          • Editing for a World
          • Editing Locally
          • Default Settings
          • Accessing via Blueprint
          • Adding New Settings
          • Overriding Defaults
          • Using Arrays
        • ๐ŸงŠMML
        • ๐Ÿ•บMotion Capture
        • ๐Ÿ“กNetworking
        • ๐Ÿ“ขNotifications
        • Raycastable Crowd
        • ๐ŸŒSingletons
        • ๐Ÿ“ฑStreaming & Multiplatform
          • GFN on mobile
        • ๐Ÿ–ฅ๏ธUI
          • "UI Mode"
        • ๐Ÿ—ƒ๏ธUser Collections
          • Creating a New Object Definition
          • Accessing from Unreal
            • Creating Objects Definitions
            • Transfer Objects
            • User Collection Views
            • Receiving Updates
        • ๐Ÿ“บVideo Players
          • Embedded Video Player
          • Millicast video streaming
            • How to Setup an In-Game Video Stream
            • Picture-in-Picture mode
          • Streaming Video Player
            • How to Setup a URL Video Player
            • Picture-in-Picture mode
        • ๐ŸžVisual Debugging
          • Inspector
        • ๐ŸชŸWeb UI
        • Online Services
          • KV Store Service
        • ๐Ÿ’ Web Requests
          • Http Requests
            • Legacy HTTP Nodes
          • JSON Handling
          • WebSockets
          • Identity Validation
          • Allowed External URLs
          • Walkthrough Example
            • Example Counter Service
        • โœˆ๏ธWorld Travel
          • World Travel in the editor
        • Avatar Physics Assets
        • Action Gameplay Helper Components
      • ๐Ÿ”‘Workflows
        • โ†—๏ธUpgrade the Editor
          • ๐Ÿ–ฅ๏ธVersion History
        • โš™๏ธEditing Project Settings
        • ๐Ÿ“ˆProfiling
        • ๐ŸงบMarketplace Importing
        • ๐Ÿ› ๏ธExtra Workflows
          • Setup Play-in-Editor
          • Setup Local Asset Validation
          • Adding Gameplay Tags
          • Validating Game Assets
          • Custom Connection Modes
          • Connect Editor to a World
          • Common Issues
      • ๐Ÿ“šUseful Reading
        • โญBest Practices
    • ๐ŸŒŽWorlds
      • ๐Ÿ“ฉInvite Players
        • Setting Role Groups
      • Persistent Worlds
      • Always on Worlds
    • ๐Ÿ“…Running events
      • โœ…Large scale events - Checklist
      • ๐Ÿ‘พAnti-Cheat (EAC)
      • ๐ŸŽฎPlayer Entry
        • ๐Ÿ“ฑReact Native
        • Steam
        • ๐Ÿ’ปHardware Reqs
      • ๐ŸŽฅBroadcast
        • ๐Ÿ“นOBS Integration
      • Failover
      • ๐ŸCapacity And Queue Management
  • ADMINS
    • ๐Ÿ‘ชAccess Control
      • Adding metaverse contributors
      • Creating a new project
    • ๐Ÿ’ฒPricing
      • Development Support
      • Included Usage & Overages
      • Cloud Streaming
      • Access Modes
      • War Room Support
      • Platform SLA
    • โš™๏ธSettings
      • ๐Ÿ—ƒ๏ธProjects
  • APIs and Tooling
    • ๐Ÿ–ฅ๏ธAPI Reference
      • Accounts
      • Events
      • Key/Value Store
      • Organizations
      • Realtime
      • User Profile
      • World Builder
      • Worlds
    • ๐Ÿ’ปTemplate Web App
      • ๐Ÿ’ขModeration
    • Pixel Streaming
    • ๐Ÿš€Launcher
  • Integrations
    • ๐Ÿ“ŠAnalytics
      • Sending events from web
      • ๐ŸŽฎSending Events from Unreal
    • ๐Ÿ’ฌChat
      • ๐ŸŽฎIntegrating Pubnub with your Unreal Project
      • Adding Moderation to Chat
Powered by GitBook
On this page

Was this helpful?

  1. APIs and Tooling
  2. API Reference

Key/Value Store

This service provides a flexible, runtime-accessible key/value store for persisting arbitrary data. It can be used by both game clients and servers to cache, retrieve, and manage state and user data.

PreviousEventsNextOrganizations

Last updated 3 days ago

Was this helpful?

๐Ÿ–ฅ๏ธ
  • POSTRead KVStore data
  • POSTUpsert KVStore data
  • POSTClear KVStore data

Read KVStore data

post

Read KVStore data for the specified keys and from the specified stores. If a World ID or Launch Context ID header are supplied, the respective Project ID header must also be supplied.

Data can be read from either the client or server store by both the user and Unreal server or service accounts. Client store data can only be written by the user whose store it is but can be read by the user and an Unreal server or service account. The server store can only be written by the Unreal server or service account but may be read by both the user and the server.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringOptional

The ID of a project

x-m2-launch-context-idstringOptional

The ID of a launch context

x-m2-world-idstringOptional

The ID of a world

Body

Request to read from a KV Store for a given user, store and key.

idstringRequired

The ID of the user who's store is being accessed

storeany ofRequired

Client or Server KV Store

string ยท enumOptionalPossible values:
or
string ยท enumOptionalPossible values:
keystringRequired

The key of the value of interest

Responses
200
The response for a KV Store read request.
application/json
4XX
The error object returned by the API when an error occurs
application/json
post
POST /api/kvstore/read/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 52

[
  {
    "id": "text",
    "store": "kvstoreClient",
    "key": "text"
  }
]
[
  {
    "status": "ok",
    "id": "text",
    "store": "kvstoreClient",
    "object": {
      "key": "text",
      "data": null
    }
  }
]

Upsert KVStore data

post

Upsert KVStore data for the specified keys and from the specified stores. If a World ID or Launch Context ID header are supplied, the respective Project ID header must also be supplied.

Any existing data under the given keys will be overwritten.

Data can be read from either the client or server store by both the user and Unreal server or service accounts. Client store data can only be written by the user who's store it is but can be read by the user and an Unreal server or service account. The server store can only be written by the Unreal server or service account but may be read by both the user and the server.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringOptional

The ID of a project

x-m2-launch-context-idstringOptional

The ID of a launch context

x-m2-world-idstringOptional

The ID of a world

Body

The request body for a KV Store upsert request.

idstringRequired

The ID of the user who's store is being accessed

storeany ofRequired

Client or Server KV Store

string ยท enumOptionalPossible values:
or
string ยท enumOptionalPossible values:
keystringRequired

The key of the value of interest

dataanyRequired

The data to upsert against the passed key in the specified store

Responses
200
The response for a KV Store upsert request. Object contains the upserted data.
application/json
4XX
The error object returned by the API when an error occurs
application/json
post
POST /api/kvstore/upsert/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 64

[
  {
    "id": "text",
    "store": "kvstoreClient",
    "key": "text",
    "data": null
  }
]
[
  {
    "id": "text",
    "store": "kvstoreClient",
    "object": {
      "key": "text",
      "data": null
    }
  }
]

Clear KVStore data

post

Delete all KVStore data except for the specified keys. If a World ID or Launch Context ID header are supplied, the respective Project ID header must also be supplied.

Both the client and server data will be cleared at the given level only. i.e. clearing the Organization store will not have an impact on any child Projects, Launch Contexts, nor Worlds.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringOptional

The ID of a project

x-m2-launch-context-idstringOptional

The ID of a launch context

x-m2-world-idstringOptional

The ID of a world

Body

The request body for a KV Store delete request.

keysToIgnorestring[]Optional

An array of keys to ignore when clearing the store

storeany ofRequired

Client or Server KV Store

string ยท enumOptionalPossible values:
or
string ยท enumOptionalPossible values:
Responses
204
Indicates the KV Store was successfully cleared.
application/json
Responseobject

Indicates the KV Store was successfully cleared.

4XX
The error object returned by the API when an error occurs
application/json
post
POST /api/kvstore/delete/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "keysToIgnore": [
    "text"
  ],
  "store": "kvstoreClient"
}
{}