Vircadia World API
The World API Manager is the interface between clients and the PostgreSQL database, and any other services that might be utilized.
REST API
The REST API is accessible at the base path:
/world/rest
Available Endpoints
Endpoint | Method | Path | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AUTH_SESSION_VALIDATE | POST | /world/rest/session/validate | Validates a user session token from an authentication provider | ||||||||||||
Parameters
| |||||||||||||||
ReturnsType: Description: Response indicating whether the session is valid Fields
|
WebSocket API
WebSocket connections are established by upgrading a connection at:
/world/ws
Establish Connection
The WebSocket connection is established by creating a connection with search parameters:
// Format for WebSocket connection URL
const url = new URL(`https://server-domain${Communication.WS_UPGRADE_PATH}`);
url.searchParams.set("token", authToken); // Authentication token
url.searchParams.set("provider", authProvider); // Authentication provider name
const ws = new WebSocket(url);
Required URL parameters:
token
: Authentication token obtained from the authentication providerprovider
: Name of the authentication provider (e.g., 'system', 'local')
Message Types
The following message types are available in the WebSocket API:
Message Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GENERAL_ERROR_RESPONSE | Response sent when a general error occurs during processing | |||||||||||||||||||||
Message FormatType: Description: Error response with details about the failure Fields
| ||||||||||||||||||||||
QUERY_REQUEST | Request to execute a query on the server | |||||||||||||||||||||
Parameters
| ||||||||||||||||||||||
Message FormatType: Description: Query request object Fields
| ||||||||||||||||||||||
QUERY_RESPONSE | Response to a query request with results or error information | |||||||||||||||||||||
Message FormatType: Description: Query response containing results or error details Fields
| ||||||||||||||||||||||
SYNC_GROUP_UPDATES_RESPONSE | Response containing updates for a sync group | |||||||||||||||||||||
Message FormatType: Description: Updates for entities in a specific sync group Fields
| ||||||||||||||||||||||
TICK_NOTIFICATION | Notification sent when a server tick occurs | |||||||||||||||||||||
Message FormatType: Description: Information about the completed tick Fields
|