REST API GUIDE

wechess-gameplay-service

Version: 1.0.74

Service for managing real-time chess games, matchmaking, move history, and private invitations, including lifecycle management (mutual game-save/resume, admin termination), supporting both guest and registered users. Enables API access for reviewing games, enforcing moderation actions, and tracking game results.

Architectural Design Credit and Contact Information

The architectural design of this microservice is credited to . For inquiries, feedback, or further information regarding the architecture, please direct your communication to:

Email:

We encourage open communication and welcome any questions or discussions related to the architectural aspects of this microservice.

Documentation Scope

Welcome to the official documentation for the Gameplay Service’s REST API. This document is designed to provide a comprehensive guide to interfacing with our Gameplay Service exclusively through RESTful API endpoints.

Intended Audience

This documentation is intended for developers and integrators who are looking to interact with the Gameplay Service via HTTP requests for purposes such as creating, updating, deleting and querying Gameplay objects.

Overview

Within these pages, you will find detailed information on how to effectively utilize the REST API, including authentication methods, request and response formats, endpoint descriptions, and examples of common use cases.

Beyond REST It’s important to note that the Gameplay Service also supports alternative methods of interaction, such as gRPC and messaging via a Message Broker. These communication methods are beyond the scope of this document. For information regarding these protocols, please refer to their respective documentation.

Authentication And Authorization

To ensure secure access to the Gameplay service’s protected endpoints, a project-wide access token is required. This token serves as the primary method for authenticating requests to our service. However, it’s important to note that access control varies across different routes:

Protected API: Certain API (routes) require specific authorization levels. Access to these routes is contingent upon the possession of a valid access token that meets the route-specific authorization criteria. Unauthorized requests to these routes will be rejected.

**Public API **: The service also includes public API (routes) that are accessible without authentication. These public endpoints are designed for open access and do not require an access token.

Token Locations

When including your access token in a request, ensure it is placed in one of the following specified locations. The service will sequentially search these locations for the token, utilizing the first one it encounters.

Location Token Name / Param Name
Query access_token
Authorization Header Bearer
Header wechess-access-token
Cookie wechess-access-token

Please ensure the token is correctly placed in one of these locations, using the appropriate label as indicated. The service prioritizes these locations in the order listed, processing the first token it successfully identifies.

Api Definitions

This section outlines the API endpoints available within the Gameplay service. Each endpoint can receive parameters through various methods, meticulously described in the following definitions. It’s important to understand the flexibility in how parameters can be included in requests to effectively interact with the Gameplay service.

This service is configured to listen for HTTP requests on port 3000, serving both the main API interface and default administrative endpoints.

The following routes are available by default:

This service is accessible via the following environment-specific URLs:

Parameter Inclusion Methods: Parameters can be incorporated into API requests in several ways, each with its designated location. Understanding these methods is crucial for correctly constructing your requests:

Query Parameters: Included directly in the URL’s query string.

Path Parameters: Embedded within the URL’s path.

Body Parameters: Sent within the JSON body of the request.

Session Parameters: Automatically read from the session object. This method is used for parameters that are intrinsic to the user’s session, such as userId. When using an API that involves session parameters, you can omit these from your request. The service will automatically bind them to the API layer, provided that a session is associated with your request.

Note on Session Parameters: Session parameters represent a unique method of parameter inclusion, relying on the context of the user’s session. A common example of a session parameter is userId, which the service automatically associates with your request when a session exists. This feature ensures seamless integration of user-specific data without manual input for each request.

By adhering to the specified parameter inclusion methods, you can effectively utilize the Gameplay service’s API endpoints. For detailed information on each endpoint, including required parameters and their accepted locations, refer to the individual API definitions below.

Common Parameters

The Gameplay service’s business API support several common parameters designed to modify and enhance the behavior of API requests. These parameters are not individually listed in the API route definitions to avoid repetition. Instead, refer to this section to understand how to leverage these common behaviors across different routes. Note that all common parameters should be included in the query part of the URL.

Supported Common Parameters:

By utilizing these common parameters, you can tailor the behavior of API requests to suit your specific requirements, ensuring optimal performance and usability of the Gameplay service.

Error Response

If a request encounters an issue, whether due to a logical fault or a technical problem, the service responds with a standardized JSON error structure. The HTTP status code within this response indicates the nature of the error, utilizing commonly recognized codes for clarity:

Each error response is structured to provide meaningful insight into the problem, assisting in diagnosing and resolving issues efficiently.

{
  "result": "ERR",
  "status": 400,
  "message": "errMsg_organizationIdisNotAValidID",
  "errCode": 400,
  "date": "2024-03-19T12:13:54.124Z",
  "detail": "String"
}

Object Structure of a Successfull Response

When the Gameplay service processes requests successfully, it wraps the requested resource(s) within a JSON envelope. This envelope not only contains the data but also includes essential metadata, such as configuration details and pagination information, to enrich the response and provide context to the client.

Key Characteristics of the Response Envelope:

Design Considerations: The structure of a API’s response data is meticulously crafted during the service’s architectural planning. This design ensures that responses adequately reflect the intended data relationships and service logic, providing clients with rich and meaningful information.

Brief Data: Certain API’s return a condensed version of the object data, intentionally selecting only specific fields deemed useful for that request. In such instances, the API documentation will detail the properties included in the response, guiding developers on what to expect.

API Response Structure

The API utilizes a standardized JSON envelope to encapsulate responses. This envelope is designed to consistently deliver both the requested data and essential metadata, ensuring that clients can efficiently interpret and utilize the response.

HTTP Status Codes:

Success Response Format:

For successful operations, the response includes a "status": "OK" property, signaling the successful execution of the request. The structure of a successful response is outlined below:

{
  "status":"OK",
  "statusCode": 200,   
  "elapsedMs":126,
  "ssoTime":120,
  "source": "db",
  "cacheKey": "hexCode",
  "userId": "ID",
  "sessionId": "ID",
  "requestId": "ID",
  "dataName":"products",
  "method":"GET",
  "action":"list",
  "appVersion":"Version",
  "rowCount":3
  "products":[{},{},{}],
  "paging": {
    "pageNumber":1, 
    "pageRowCount":25, 
    "totalRowCount":3,
    "pageCount":1
  },
  "filters": [],
  "uiPermissions": []
}

Handling Errors:

For details on handling error scenarios and understanding the structure of error responses, please refer to the “Error Response” section provided earlier in this documentation. It outlines how error conditions are communicated, including the use of HTTP status codes and standardized JSON structures for error messages.

Resources

Gameplay service provides the following resources which are stored in its own database as a data object. Note that a resource for an api access is a data object for the service.

ChessGame resource

ChessGame Resource Properties

Name Type Required Default Definition
playerWhiteId ID User ID of the player assigned White (guest or registered); references auth:user.id.
playerBlackId ID **
createdById ID ID of the user who created the game (can be a guest or registered user).
status Enum Lifecycle status: pending, active, paused, completed, terminated
mode Enum Game mode: public (matchmaking), private (invitation-based)
invitationCode String **
currentFEN String Current board state in FEN notation for restoration/resume.
gameType Enum Game type: timed, untimed, blitz, rapid
saveStatus Enum Game mutual-saving: notSaveable, requested, paused (both agreed)
saveRequestWhite Boolean Whether white has requested save/resume; mutual save when both true.
saveRequestBlack Boolean Whether black has requested save/resume; mutual save when both true.
movedAt Date Timestamp of last move (heartbeat/game activity).
result Enum Game result/outcome: whiteWin, blackWin, draw, aborted
terminatedById ID ID of administrator who forced terminated the game (if applicable).
reportStatus Enum Moderation/review status: none, reported, underReview
guestPlayerWhite Boolean True if white is a guest (not a registered user); needed to distinguish guest/registered in history.
guestPlayerBlack Boolean True if black is a guest (not a registered user); needed to distinguish guest/registered in history.
initialFEN String The starting FEN position when the game was created. Used to identify custom games.

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

status Enum Property

Property Definition : Lifecycle status: pending, active, paused, completed, terminatedEnum Options

Name Value Index
pending "pending"" 0
active "active"" 1
paused "paused"" 2
completed "completed"" 3
terminated "terminated"" 4
mode Enum Property

Property Definition : Game mode: public (matchmaking), private (invitation-based)Enum Options

Name Value Index
public "public"" 0
private "private"" 1
gameType Enum Property

Property Definition : Game type: timed, untimed, blitz, rapidEnum Options

Name Value Index
timed "timed"" 0
untimed "untimed"" 1
blitz "blitz"" 2
rapid "rapid"" 3
saveStatus Enum Property

Property Definition : Game mutual-saving: notSaveable, requested, paused (both agreed)Enum Options

Name Value Index
notSaveable "notSaveable"" 0
requested "requested"" 1
paused "paused"" 2
result Enum Property

Property Definition : Game result/outcome: whiteWin, blackWin, draw, abortedEnum Options

Name Value Index
whiteWin "whiteWin"" 0
blackWin "blackWin"" 1
draw "draw"" 2
aborted "aborted"" 3
reportStatus Enum Property

Property Definition : Moderation/review status: none, reported, underReviewEnum Options

Name Value Index
none "none"" 0
reported "reported"" 1
underReview "underReview"" 2

ChessGameMove resource

Resource Definition : Represents a single move in a chess game (FIDE-compliant SAN/LAN representation, timestamp, player, time, move number). ChessGameMove Resource Properties

Name Type Required Default Definition
gameId ID Reference to the chessGame this move belongs to.
moveNumber Integer Move number (starting from 1 in each game).
moveNotation String Chess move in either Standard Algebraic or Long Algebraic Notation (SAN/LAN).
moveTime Integer Time in milliseconds since the previous move (for time control, etc.).
movedById ID User ID of the player who made the move (guest/registered); references auth:user.id.
moveTimestamp Date Timestamp when move was made.

ChessGameInvitation resource

Resource Definition : An invitation for a private chess game between two players; status tracked; expires at set time or when accepted/declined. ChessGameInvitation Resource Properties

Name Type Required Default Definition
gameId ID Game this invitation is linked to.
senderId ID **
recipientId ID **
status Enum **
expiresAt Date Expiration date/time for the invitation.

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

status Enum Property

Enum Options

Name Value Index
pending "pending"" 0
accepted "accepted"" 1
declined "declined"" 2
cancelled "cancelled"" 3

CustomBoard resource

CustomBoard Resource Properties

Name Type Required Default Definition
name String Name of the custom board position
fen String FEN string representing the board position
description Text Optional description of the custom board
isPublished Boolean **
category Enum **
createdById ID **

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

category Enum Property

Enum Options

Name Value Index
endgame "endgame"" 0
opening "opening"" 1
puzzle "puzzle"" 2
custom "custom"" 3

BoardTheme resource

BoardTheme Resource Properties

Name Type Required Default Definition
name String Theme display name
lightSquare String Hex color for light squares
darkSquare String Hex color for dark squares
isPublished Boolean Whether the theme is publicly visible
createdById ID User who created this theme

UserPreference resource

UserPreference Resource Properties

Name Type Required Default Definition
userId ID The user this preferences record belongs to
activeThemeId String ID of the currently selected board theme (preset ID or custom theme ID)
soundEnabled Boolean Whether game sounds are enabled
showAnimations Boolean Whether board animations are shown
boardOrientation Enum Default board orientation preference
premoveEnabled Boolean Whether premove feature is enabled

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

boardOrientation Enum Property

Property Definition : Default board orientation preferenceEnum Options

Name Value Index
auto "auto"" 0
white "white"" 1
black "black"" 2

GameHubMessage resource

Resource Definition : Auto-generated message DataObject for the gameHub RealtimeHub. Stores all messages with typed content payloads. GameHubMessage Resource Properties

Name Type Required Default Definition
roomId ID Reference to the room this message belongs to
senderId ID Reference to the user who sent this message
senderName String Display name of the sender (denormalized from user profile at send time)
senderAvatar String Avatar URL of the sender (denormalized from user profile at send time)
messageType Enum Content type discriminator for this message
content Object Type-specific content payload (structure depends on messageType)
timestamp Message creation time
status Enum Message moderation status

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

messageType Enum Property

Property Definition : Content type discriminator for this messageEnum Options

Name Value Index
text "text"" 0
system "system"" 1
chessMove "chessMove"" 2
drawOffer "drawOffer"" 3
drawAccepted "drawAccepted"" 4
drawDeclined "drawDeclined"" 5
resignation "resignation"" 6
saveRequest "saveRequest"" 7
saveAccepted "saveAccepted"" 8
saveDeclined "saveDeclined"" 9
resumeRequest "resumeRequest"" 10
resumeAccepted "resumeAccepted"" 11
resumeDeclined "resumeDeclined"" 12
status Enum Property

Property Definition : Message moderation statusEnum Options

Name Value Index
pending "pending"" 0
approved "approved"" 1
rejected "rejected"" 2

GameHubModeration resource

Resource Definition : Auto-generated moderation DataObject for the gameHub RealtimeHub. Stores block and silence actions for room-level user moderation. GameHubModeration Resource Properties

Name Type Required Default Definition
roomId ID Reference to the room where the moderation action applies
userId ID The user who is blocked or silenced
action Enum Moderation action type
reason Text Optional reason for the moderation action
duration Integer Duration in seconds. 0 means permanent
expiresAt Expiry timestamp. Null means permanent
issuedBy ID The moderator who issued the action

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

action Enum Property

Property Definition : Moderation action typeEnum Options

Name Value Index
blocked "blocked"" 0
silenced "silenced"" 1

Business Api

Create Game API

[Default create API] — This is the designated default create API for the chessGame data object. Frontend generators and AI agents should use this API for standard CRUD operations. Starts a new chess game session (public or private). Sets up all initial state, assigns player roles, and sets mode.

API Frontend Description By The Backend Architect

Called when matchmaking or private game is created. Invited/private games have invitationCode. Only logged-in users (guest or registered) can create games. Raise event for gameCreated for notification/bff.

Rest Route

The createGame API REST controller can be triggered via the following route:

/v1/game

Rest Request Parameters

The createGame api has got 18 regular request parameters

Parameter Type Required Population
playerWhiteId ID true request.body?.[“playerWhiteId”]
playerBlackId ID false request.body?.[“playerBlackId”]
createdById ID true request.body?.[“createdById”]
status Enum true request.body?.[“status”]
mode Enum true request.body?.[“mode”]
invitationCode String false request.body?.[“invitationCode”]
currentFEN String true request.body?.[“currentFEN”]
gameType Enum true request.body?.[“gameType”]
saveStatus Enum true request.body?.[“saveStatus”]
saveRequestWhite Boolean false request.body?.[“saveRequestWhite”]
saveRequestBlack Boolean false request.body?.[“saveRequestBlack”]
movedAt Date false request.body?.[“movedAt”]
result Enum false request.body?.[“result”]
terminatedById ID false request.body?.[“terminatedById”]
reportStatus Enum false request.body?.[“reportStatus”]
guestPlayerWhite Boolean false request.body?.[“guestPlayerWhite”]
guestPlayerBlack Boolean false request.body?.[“guestPlayerBlack”]
initialFEN String false request.body?.[“initialFEN”]
playerWhiteId : User ID of the player assigned White (guest or registered); references auth:user.id.
playerBlackId :
createdById : ID of the user who created the game (can be a guest or registered user).
status : Lifecycle status: pending, active, paused, completed, terminated
mode : Game mode: public (matchmaking), private (invitation-based)
invitationCode :
currentFEN : Current board state in FEN notation for restoration/resume.
gameType : Game type: timed, untimed, blitz, rapid
saveStatus : Game mutual-saving: notSaveable, requested, paused (both agreed)
saveRequestWhite : Whether white has requested save/resume; mutual save when both true.
saveRequestBlack : Whether black has requested save/resume; mutual save when both true.
movedAt : Timestamp of last move (heartbeat/game activity).
result : Game result/outcome: whiteWin, blackWin, draw, aborted
terminatedById : ID of administrator who forced terminated the game (if applicable).
reportStatus : Moderation/review status: none, reported, underReview
guestPlayerWhite : True if white is a guest (not a registered user); needed to distinguish guest/registered in history.
guestPlayerBlack : True if black is a guest (not a registered user); needed to distinguish guest/registered in history.
initialFEN : The starting FEN position when the game was created. Used to identify custom games.

REST Request To access the api you can use the REST controller with the path POST /v1/game

  axios({
    method: 'POST',
    url: '/v1/game',
    data: {
            playerWhiteId:"ID",  
            playerBlackId:"ID",  
            createdById:"ID",  
            status:"Enum",  
            mode:"Enum",  
            invitationCode:"String",  
            currentFEN:"String",  
            gameType:"Enum",  
            saveStatus:"Enum",  
            saveRequestWhite:"Boolean",  
            saveRequestBlack:"Boolean",  
            movedAt:"Date",  
            result:"Enum",  
            terminatedById:"ID",  
            reportStatus:"Enum",  
            guestPlayerWhite:"Boolean",  
            guestPlayerBlack:"Boolean",  
            initialFEN:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGame",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGame": {
		"id": "ID",
		"playerWhiteId": "ID",
		"playerBlackId": "ID",
		"createdById": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"mode": "Enum",
		"mode_idx": "Integer",
		"invitationCode": "String",
		"currentFEN": "String",
		"gameType": "Enum",
		"gameType_idx": "Integer",
		"saveStatus": "Enum",
		"saveStatus_idx": "Integer",
		"saveRequestWhite": "Boolean",
		"saveRequestBlack": "Boolean",
		"movedAt": "Date",
		"result": "Enum",
		"result_idx": "Integer",
		"terminatedById": "ID",
		"reportStatus": "Enum",
		"reportStatus_idx": "Integer",
		"guestPlayerWhite": "Boolean",
		"guestPlayerBlack": "Boolean",
		"initialFEN": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Game API

[Default update API] — This is the designated default update API for the chessGame data object. Frontend generators and AI agents should use this API for standard CRUD operations. Updates chess game state including board position, status, save flags etc. Auth: only participants or admin.

API Frontend Description By The Backend Architect

Used for updating board state, status, mutual saving, etc. Most fields are read-only after game completion/termination except by admin. Raise event for gameUpdated for notification/bff.

Rest Route

The updateGame API REST controller can be triggered via the following route:

/v1/game/:chessGameId

Rest Request Parameters

The updateGame api has got 13 regular request parameters

Parameter Type Required Population
chessGameId ID true request.params?.[“chessGameId”]
playerBlackId ID request.body?.[“playerBlackId”]
status Enum false request.body?.[“status”]
currentFEN String false request.body?.[“currentFEN”]
saveStatus Enum false request.body?.[“saveStatus”]
saveRequestWhite Boolean false request.body?.[“saveRequestWhite”]
saveRequestBlack Boolean false request.body?.[“saveRequestBlack”]
movedAt Date false request.body?.[“movedAt”]
result Enum false request.body?.[“result”]
terminatedById ID false request.body?.[“terminatedById”]
reportStatus Enum false request.body?.[“reportStatus”]
guestPlayerWhite Boolean false request.body?.[“guestPlayerWhite”]
guestPlayerBlack Boolean false request.body?.[“guestPlayerBlack”]
chessGameId : This id paremeter is used to select the required data object that will be updated
playerBlackId :
status : Lifecycle status: pending, active, paused, completed, terminated
currentFEN : Current board state in FEN notation for restoration/resume.
saveStatus : Game mutual-saving: notSaveable, requested, paused (both agreed)
saveRequestWhite : Whether white has requested save/resume; mutual save when both true.
saveRequestBlack : Whether black has requested save/resume; mutual save when both true.
movedAt : Timestamp of last move (heartbeat/game activity).
result : Game result/outcome: whiteWin, blackWin, draw, aborted
terminatedById : ID of administrator who forced terminated the game (if applicable).
reportStatus : Moderation/review status: none, reported, underReview
guestPlayerWhite : True if white is a guest (not a registered user); needed to distinguish guest/registered in history.
guestPlayerBlack : True if black is a guest (not a registered user); needed to distinguish guest/registered in history.

REST Request To access the api you can use the REST controller with the path PATCH /v1/game/:chessGameId

  axios({
    method: 'PATCH',
    url: `/v1/game/${chessGameId}`,
    data: {
            playerBlackId:"ID",  
            status:"Enum",  
            currentFEN:"String",  
            saveStatus:"Enum",  
            saveRequestWhite:"Boolean",  
            saveRequestBlack:"Boolean",  
            movedAt:"Date",  
            result:"Enum",  
            terminatedById:"ID",  
            reportStatus:"Enum",  
            guestPlayerWhite:"Boolean",  
            guestPlayerBlack:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGame",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGame": {
		"id": "ID",
		"playerWhiteId": "ID",
		"playerBlackId": "ID",
		"createdById": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"mode": "Enum",
		"mode_idx": "Integer",
		"invitationCode": "String",
		"currentFEN": "String",
		"gameType": "Enum",
		"gameType_idx": "Integer",
		"saveStatus": "Enum",
		"saveStatus_idx": "Integer",
		"saveRequestWhite": "Boolean",
		"saveRequestBlack": "Boolean",
		"movedAt": "Date",
		"result": "Enum",
		"result_idx": "Integer",
		"terminatedById": "ID",
		"reportStatus": "Enum",
		"reportStatus_idx": "Integer",
		"guestPlayerWhite": "Boolean",
		"guestPlayerBlack": "Boolean",
		"initialFEN": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Game API

[Default delete API] — This is the designated default delete API for the chessGame data object. Frontend generators and AI agents should use this API for standard CRUD operations. Deletes a chess game (soft-delete). Only allowed for admins or system cleanup.

API Frontend Description By The Backend Architect

Hard deletion not recommended; soft-deletion disables user/game access. Used for moderation/cleanup only. Regular users cannot delete games. Raise event for gameDeleted for moderation/audit.

Rest Route

The deleteGame API REST controller can be triggered via the following route:

/v1/game/:chessGameId

Rest Request Parameters

The deleteGame api has got 1 regular request parameter

Parameter Type Required Population
chessGameId ID true request.params?.[“chessGameId”]
chessGameId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/game/:chessGameId

  axios({
    method: 'DELETE',
    url: `/v1/game/${chessGameId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGame",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGame": {
		"id": "ID",
		"playerWhiteId": "ID",
		"playerBlackId": "ID",
		"createdById": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"mode": "Enum",
		"mode_idx": "Integer",
		"invitationCode": "String",
		"currentFEN": "String",
		"gameType": "Enum",
		"gameType_idx": "Integer",
		"saveStatus": "Enum",
		"saveStatus_idx": "Integer",
		"saveRequestWhite": "Boolean",
		"saveRequestBlack": "Boolean",
		"movedAt": "Date",
		"result": "Enum",
		"result_idx": "Integer",
		"terminatedById": "ID",
		"reportStatus": "Enum",
		"reportStatus_idx": "Integer",
		"guestPlayerWhite": "Boolean",
		"guestPlayerBlack": "Boolean",
		"initialFEN": "String",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Game API

[Default get API] — This is the designated default get API for the chessGame data object. Frontend generators and AI agents should use this API for standard CRUD operations. Fetch a single chess game by ID. Only participants, admin, or invitation recipient may access.

API Frontend Description By The Backend Architect

Retrieve all game details and limited move history for preview/study. If user is not participant, must check invitation. Raise event for gameFetched.

Rest Route

The getGame API REST controller can be triggered via the following route:

/v1/game/:chessGameId

Rest Request Parameters

The getGame api has got 1 regular request parameter

Parameter Type Required Population
chessGameId ID true request.params?.[“chessGameId”]
chessGameId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/game/:chessGameId

  axios({
    method: 'GET',
    url: `/v1/game/${chessGameId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGame",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGame": {
		"id": "ID",
		"playerWhiteId": "ID",
		"playerBlackId": "ID",
		"createdById": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"mode": "Enum",
		"mode_idx": "Integer",
		"invitationCode": "String",
		"currentFEN": "String",
		"gameType": "Enum",
		"gameType_idx": "Integer",
		"saveStatus": "Enum",
		"saveStatus_idx": "Integer",
		"saveRequestWhite": "Boolean",
		"saveRequestBlack": "Boolean",
		"movedAt": "Date",
		"result": "Enum",
		"result_idx": "Integer",
		"terminatedById": "ID",
		"reportStatus": "Enum",
		"reportStatus_idx": "Integer",
		"guestPlayerWhite": "Boolean",
		"guestPlayerBlack": "Boolean",
		"initialFEN": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"moves": [
			{
				"moveNumber": "Integer",
				"moveNotation": "String",
				"moveTime": "Integer",
				"movedById": "ID",
				"moveTimestamp": "Date"
			},
			{},
			{}
		]
	}
}

List Games API

[Default list API] — This is the designated default list API for the chessGame data object. Frontend generators and AI agents should use this API for standard CRUD operations. List chess games by participant or admin query. Supports filtering by status, participants, mode, etc.

API Frontend Description By The Backend Architect

Used for history browsing, admin review, or finding ongoing/mutually saved games. Raise event for gameListFetched for audit/UX.

Rest Route

The listGames API REST controller can be triggered via the following route:

/v1/games

Rest Request Parameters

Filter Parameters

The listGames api supports 2 optional filter parameters for filtering list results:

status (Enum): Lifecycle status: pending, active, paused, completed, terminated

invitationCode (String): Filter by invitationCode

REST Request To access the api you can use the REST controller with the path GET /v1/games

  axios({
    method: 'GET',
    url: '/v1/games',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // status: '<value>' // Filter by status
        // invitationCode: '<value>' // Filter by invitationCode
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGames",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"chessGames": [
		{
			"id": "ID",
			"playerWhiteId": "ID",
			"playerBlackId": "ID",
			"createdById": "ID",
			"status": "Enum",
			"status_idx": "Integer",
			"mode": "Enum",
			"mode_idx": "Integer",
			"invitationCode": "String",
			"currentFEN": "String",
			"gameType": "Enum",
			"gameType_idx": "Integer",
			"saveStatus": "Enum",
			"saveStatus_idx": "Integer",
			"saveRequestWhite": "Boolean",
			"saveRequestBlack": "Boolean",
			"movedAt": "Date",
			"result": "Enum",
			"result_idx": "Integer",
			"terminatedById": "ID",
			"reportStatus": "Enum",
			"reportStatus_idx": "Integer",
			"guestPlayerWhite": "Boolean",
			"guestPlayerBlack": "Boolean",
			"initialFEN": "String",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Gamemove API

[Default create API] — This is the designated default create API for the chessGameMove data object. Frontend generators and AI agents should use this API for standard CRUD operations. Record a move in an ongoing chess game. Only participants or admin can add moves.

API Frontend Description By The Backend Architect

Called in-order for each legitimate move. Ensures move sequence is preserved. Move time and timestamp acquired on submit. Raises event for moveAdded.

Rest Route

The createGameMove API REST controller can be triggered via the following route:

/v1/gamemove

Rest Request Parameters

The createGameMove api has got 6 regular request parameters

Parameter Type Required Population
gameId ID true request.body?.[“gameId”]
moveNumber Integer true request.body?.[“moveNumber”]
moveNotation String true request.body?.[“moveNotation”]
moveTime Integer false request.body?.[“moveTime”]
movedById ID true request.body?.[“movedById”]
moveTimestamp Date true request.body?.[“moveTimestamp”]
gameId : Reference to the chessGame this move belongs to.
moveNumber : Move number (starting from 1 in each game).
moveNotation : Chess move in either Standard Algebraic or Long Algebraic Notation (SAN/LAN).
moveTime : Time in milliseconds since the previous move (for time control, etc.).
movedById : User ID of the player who made the move (guest/registered); references auth:user.id.
moveTimestamp : Timestamp when move was made.

REST Request To access the api you can use the REST controller with the path POST /v1/gamemove

  axios({
    method: 'POST',
    url: '/v1/gamemove',
    data: {
            gameId:"ID",  
            moveNumber:"Integer",  
            moveNotation:"String",  
            moveTime:"Integer",  
            movedById:"ID",  
            moveTimestamp:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGameMove",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGameMove": {
		"id": "ID",
		"gameId": "ID",
		"moveNumber": "Integer",
		"moveNotation": "String",
		"moveTime": "Integer",
		"movedById": "ID",
		"moveTimestamp": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Gamemoves API

[Default list API] — This is the designated default list API for the chessGameMove data object. Frontend generators and AI agents should use this API for standard CRUD operations. List moves for a given game. Only participants or admin can view.

API Frontend Description By The Backend Architect

Used for reviewing game history/study. Returns moves ordered by moveNumber asc.

Rest Route

The listGameMoves API REST controller can be triggered via the following route:

/v1/gamemoves

Rest Request Parameters

Filter Parameters

The listGameMoves api supports 1 optional filter parameter for filtering list results:

gameId (ID): Reference to the chessGame this move belongs to.

REST Request To access the api you can use the REST controller with the path GET /v1/gamemoves

  axios({
    method: 'GET',
    url: '/v1/gamemoves',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // gameId: '<value>' // Filter by gameId
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGameMoves",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"chessGameMoves": [
		{
			"id": "ID",
			"gameId": "ID",
			"moveNumber": "Integer",
			"moveNotation": "String",
			"moveTime": "Integer",
			"movedById": "ID",
			"moveTimestamp": "Date",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Gameinvitation API

[Default create API] — This is the designated default create API for the chessGameInvitation data object. Frontend generators and AI agents should use this API for standard CRUD operations. Send an invitation for a private chess game to a user (guest or registered).

API Frontend Description By The Backend Architect

Used for starting private games. Invitation auto-invalidates on expiry. Raise event for invitationSent for notification.

Rest Route

The createGameInvitation API REST controller can be triggered via the following route:

/v1/gameinvitation

Rest Request Parameters

The createGameInvitation api has got 5 regular request parameters

Parameter Type Required Population
gameId ID true request.body?.[“gameId”]
senderId ID true request.body?.[“senderId”]
recipientId ID true request.body?.[“recipientId”]
status Enum true request.body?.[“status”]
expiresAt Date true request.body?.[“expiresAt”]
gameId : Game this invitation is linked to.
senderId :
recipientId :
status :
expiresAt : Expiration date/time for the invitation.

REST Request To access the api you can use the REST controller with the path POST /v1/gameinvitation

  axios({
    method: 'POST',
    url: '/v1/gameinvitation',
    data: {
            gameId:"ID",  
            senderId:"ID",  
            recipientId:"ID",  
            status:"Enum",  
            expiresAt:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGameInvitation",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGameInvitation": {
		"id": "ID",
		"gameId": "ID",
		"senderId": "ID",
		"recipientId": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"expiresAt": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Gameinvitation API

[Default update API] — This is the designated default update API for the chessGameInvitation data object. Frontend generators and AI agents should use this API for standard CRUD operations. Update the status or expiry of a game invitation (accept, decline, cancel, expire). Only sender, recipient, or admin can change status.

API Frontend Description By The Backend Architect

Used for invitation workflow (accept, decline, cancel); handled securely as only involved users or admin can update. Event is raised for notification.

Rest Route

The updateGameInvitation API REST controller can be triggered via the following route:

/v1/gameinvitation/:chessGameInvitationId

Rest Request Parameters

The updateGameInvitation api has got 5 regular request parameters

Parameter Type Required Population
chessGameInvitationId ID true request.params?.[“chessGameInvitationId”]
senderId ID request.body?.[“senderId”]
recipientId ID request.body?.[“recipientId”]
status Enum request.body?.[“status”]
expiresAt Date false request.body?.[“expiresAt”]
chessGameInvitationId : This id paremeter is used to select the required data object that will be updated
senderId :
recipientId :
status :
expiresAt : Expiration date/time for the invitation.

REST Request To access the api you can use the REST controller with the path PATCH /v1/gameinvitation/:chessGameInvitationId

  axios({
    method: 'PATCH',
    url: `/v1/gameinvitation/${chessGameInvitationId}`,
    data: {
            senderId:"ID",  
            recipientId:"ID",  
            status:"Enum",  
            expiresAt:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGameInvitation",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGameInvitation": {
		"id": "ID",
		"gameId": "ID",
		"senderId": "ID",
		"recipientId": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"expiresAt": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Gameinvitation API

Delete a game invitation (soft-deletes); only admin may do this for moderation/cleanup.

API Frontend Description By The Backend Architect

Not available to normal users. Moderation purposes only. Raise event for invitationRemoved for mods.

Rest Route

The deleteGameInvitation API REST controller can be triggered via the following route:

/v1/gameinvitation/:chessGameInvitationId

Rest Request Parameters

The deleteGameInvitation api has got 1 regular request parameter

Parameter Type Required Population
chessGameInvitationId ID true request.params?.[“chessGameInvitationId”]
chessGameInvitationId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/gameinvitation/:chessGameInvitationId

  axios({
    method: 'DELETE',
    url: `/v1/gameinvitation/${chessGameInvitationId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGameInvitation",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"chessGameInvitation": {
		"id": "ID",
		"gameId": "ID",
		"senderId": "ID",
		"recipientId": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"expiresAt": "Date",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Gameinvitations API

[Default list API] — This is the designated default list API for the chessGameInvitation data object. Frontend generators and AI agents should use this API for standard CRUD operations. List game invitations. Supports filtering by recipientId, senderId, status, gameId.

API Frontend Description By The Backend Architect

Used to show pending invitations to a user, or to list all invitations for a game.

Rest Route

The listGameInvitations API REST controller can be triggered via the following route:

/v1/gameinvitations

Rest Request Parameters

Filter Parameters

The listGameInvitations api supports 3 optional filter parameters for filtering list results:

senderId (ID): Filter by senderId

recipientId (ID): Filter by recipientId

status (Enum): Filter by status

REST Request To access the api you can use the REST controller with the path GET /v1/gameinvitations

  axios({
    method: 'GET',
    url: '/v1/gameinvitations',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // senderId: '<value>' // Filter by senderId
        // recipientId: '<value>' // Filter by recipientId
        // status: '<value>' // Filter by status
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "chessGameInvitations",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"chessGameInvitations": [
		{
			"id": "ID",
			"gameId": "ID",
			"senderId": "ID",
			"recipientId": "ID",
			"status": "Enum",
			"status_idx": "Integer",
			"expiresAt": "Date",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Customboard API

[Default create API] — This is the designated default create API for the customBoard data object. Frontend generators and AI agents should use this API for standard CRUD operations. Create a new custom chess board position. Any logged-in user can create boards.

API Frontend Description By The Backend Architect

Called when a user saves a custom board position from the board editor. createdById is auto-set from session.

Rest Route

The createCustomBoard API REST controller can be triggered via the following route:

/v1/customboards

Rest Request Parameters

The createCustomBoard api has got 6 regular request parameters

Parameter Type Required Population
name String true request.body?.[“name”]
fen String true request.body?.[“fen”]
description Text false request.body?.[“description”]
isPublished Boolean true request.body?.[“isPublished”]
category Enum true request.body?.[“category”]
createdById ID true request.body?.[“createdById”]
name : Name of the custom board position
fen : FEN string representing the board position
description : Optional description of the custom board
isPublished :
category :
createdById :

REST Request To access the api you can use the REST controller with the path POST /v1/customboards

  axios({
    method: 'POST',
    url: '/v1/customboards',
    data: {
            name:"String",  
            fen:"String",  
            description:"Text",  
            isPublished:"Boolean",  
            category:"Enum",  
            createdById:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "customBoard",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"customBoard": {
		"id": "ID",
		"name": "String",
		"fen": "String",
		"description": "Text",
		"isPublished": "Boolean",
		"category": "Enum",
		"category_idx": "Integer",
		"createdById": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Customboards API

[Default list API] — This is the designated default list API for the customBoard data object. Frontend generators and AI agents should use this API for standard CRUD operations. List custom board positions. Supports filtering by isPublished, category, and createdById.

API Frontend Description By The Backend Architect

Used to browse published community boards or user’s own boards. Filter by isPublished=true for public boards.

Rest Route

The listCustomBoards API REST controller can be triggered via the following route:

/v1/customboards

Rest Request Parameters

Filter Parameters

The listCustomBoards api supports 3 optional filter parameters for filtering list results:

isPublished (Boolean): Filter by isPublished

category (Enum): Filter by category

createdById (ID): Filter by createdById

REST Request To access the api you can use the REST controller with the path GET /v1/customboards

  axios({
    method: 'GET',
    url: '/v1/customboards',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // isPublished: '<value>' // Filter by isPublished
        // category: '<value>' // Filter by category
        // createdById: '<value>' // Filter by createdById
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "customBoards",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"customBoards": [
		{
			"id": "ID",
			"name": "String",
			"fen": "String",
			"description": "Text",
			"isPublished": "Boolean",
			"category": "Enum",
			"category_idx": "Integer",
			"createdById": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Get Customboard API

[Default get API] — This is the designated default get API for the customBoard data object. Frontend generators and AI agents should use this API for standard CRUD operations. Fetch a single custom board position by ID.

API Frontend Description By The Backend Architect

Used to load a specific custom board for editing or playing.

Rest Route

The getCustomBoard API REST controller can be triggered via the following route:

/v1/customboards/:customBoardId

Rest Request Parameters

The getCustomBoard api has got 1 regular request parameter

Parameter Type Required Population
customBoardId ID true request.params?.[“customBoardId”]
customBoardId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/customboards/:customBoardId

  axios({
    method: 'GET',
    url: `/v1/customboards/${customBoardId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "customBoard",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"customBoard": {
		"id": "ID",
		"name": "String",
		"fen": "String",
		"description": "Text",
		"isPublished": "Boolean",
		"category": "Enum",
		"category_idx": "Integer",
		"createdById": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Customboard API

[Default update API] — This is the designated default update API for the customBoard data object. Frontend generators and AI agents should use this API for standard CRUD operations. Update a custom board position. Only the creator can update their own boards.

API Frontend Description By The Backend Architect

Used to edit board name, description, FEN, category, or publish/unpublish.

Rest Route

The updateCustomBoard API REST controller can be triggered via the following route:

/v1/customboards/:customBoardId

Rest Request Parameters

The updateCustomBoard api has got 7 regular request parameters

Parameter Type Required Population
customBoardId ID true request.params?.[“customBoardId”]
name String false request.body?.[“name”]
fen String false request.body?.[“fen”]
description Text false request.body?.[“description”]
isPublished Boolean request.body?.[“isPublished”]
category Enum request.body?.[“category”]
createdById ID request.body?.[“createdById”]
customBoardId : This id paremeter is used to select the required data object that will be updated
name : Name of the custom board position
fen : FEN string representing the board position
description : Optional description of the custom board
isPublished :
category :
createdById :

REST Request To access the api you can use the REST controller with the path PATCH /v1/customboards/:customBoardId

  axios({
    method: 'PATCH',
    url: `/v1/customboards/${customBoardId}`,
    data: {
            name:"String",  
            fen:"String",  
            description:"Text",  
            isPublished:"Boolean",  
            category:"Enum",  
            createdById:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "customBoard",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"customBoard": {
		"id": "ID",
		"name": "String",
		"fen": "String",
		"description": "Text",
		"isPublished": "Boolean",
		"category": "Enum",
		"category_idx": "Integer",
		"createdById": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Customboard API

[Default delete API] — This is the designated default delete API for the customBoard data object. Frontend generators and AI agents should use this API for standard CRUD operations. Delete a custom board position (soft-delete). Only creator or admin can delete.

API Frontend Description By The Backend Architect

Used to remove a custom board. Soft-deletes so data can be recovered if needed.

Rest Route

The deleteCustomBoard API REST controller can be triggered via the following route:

/v1/customboards/:customBoardId

Rest Request Parameters

The deleteCustomBoard api has got 1 regular request parameter

Parameter Type Required Population
customBoardId ID true request.params?.[“customBoardId”]
customBoardId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/customboards/:customBoardId

  axios({
    method: 'DELETE',
    url: `/v1/customboards/${customBoardId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "customBoard",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"customBoard": {
		"id": "ID",
		"name": "String",
		"fen": "String",
		"description": "Text",
		"isPublished": "Boolean",
		"category": "Enum",
		"category_idx": "Integer",
		"createdById": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Boardtheme API

[Default create API] — This is the designated default create API for the boardTheme data object. Frontend generators and AI agents should use this API for standard CRUD operations. Create a custom board color theme.

API Frontend Description By The Backend Architect

Called when user saves a new custom theme from the themes picker.

Rest Route

The createBoardTheme API REST controller can be triggered via the following route:

/v1/boardthemes

Rest Request Parameters

The createBoardTheme api has got 4 regular request parameters

Parameter Type Required Population
name String true request.body?.[“name”]
lightSquare String true request.body?.[“lightSquare”]
darkSquare String true request.body?.[“darkSquare”]
createdById ID true request.body?.[“createdById”]
name : Theme display name
lightSquare : Hex color for light squares
darkSquare : Hex color for dark squares
createdById : User who created this theme

REST Request To access the api you can use the REST controller with the path POST /v1/boardthemes

  axios({
    method: 'POST',
    url: '/v1/boardthemes',
    data: {
            name:"String",  
            lightSquare:"String",  
            darkSquare:"String",  
            createdById:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "boardTheme",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"boardTheme": {
		"id": "ID",
		"name": "String",
		"lightSquare": "String",
		"darkSquare": "String",
		"isPublished": "Boolean",
		"createdById": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Boardthemes API

[Default list API] — This is the designated default list API for the boardTheme data object. Frontend generators and AI agents should use this API for standard CRUD operations. List board themes. Filter by isPublished for community themes or createdById for user’s own.

API Frontend Description By The Backend Architect

Used to load user’s custom themes and community-published themes.

Rest Route

The listBoardThemes API REST controller can be triggered via the following route:

/v1/boardthemes

Rest Request Parameters

Filter Parameters

The listBoardThemes api supports 1 optional filter parameter for filtering list results:

isPublished (Boolean): Whether the theme is publicly visible

REST Request To access the api you can use the REST controller with the path GET /v1/boardthemes

  axios({
    method: 'GET',
    url: '/v1/boardthemes',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // isPublished: '<value>' // Filter by isPublished
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "boardThemes",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"boardThemes": [
		{
			"id": "ID",
			"name": "String",
			"lightSquare": "String",
			"darkSquare": "String",
			"isPublished": "Boolean",
			"createdById": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Update Boardtheme API

[Default update API] — This is the designated default update API for the boardTheme data object. Frontend generators and AI agents should use this API for standard CRUD operations. Update a custom board theme. Only creator can update.

API Frontend Description By The Backend Architect

Used to edit theme colors/name or publish/unpublish.

Rest Route

The updateBoardTheme API REST controller can be triggered via the following route:

/v1/boardthemes/:boardThemeId

Rest Request Parameters

The updateBoardTheme api has got 5 regular request parameters

Parameter Type Required Population
boardThemeId ID true request.params?.[“boardThemeId”]
name String false request.body?.[“name”]
lightSquare String false request.body?.[“lightSquare”]
darkSquare String false request.body?.[“darkSquare”]
isPublished Boolean false request.body?.[“isPublished”]
boardThemeId : This id paremeter is used to select the required data object that will be updated
name : Theme display name
lightSquare : Hex color for light squares
darkSquare : Hex color for dark squares
isPublished : Whether the theme is publicly visible

REST Request To access the api you can use the REST controller with the path PATCH /v1/boardthemes/:boardThemeId

  axios({
    method: 'PATCH',
    url: `/v1/boardthemes/${boardThemeId}`,
    data: {
            name:"String",  
            lightSquare:"String",  
            darkSquare:"String",  
            isPublished:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "boardTheme",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"boardTheme": {
		"id": "ID",
		"name": "String",
		"lightSquare": "String",
		"darkSquare": "String",
		"isPublished": "Boolean",
		"createdById": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Boardtheme API

[Default delete API] — This is the designated default delete API for the boardTheme data object. Frontend generators and AI agents should use this API for standard CRUD operations. Delete a custom board theme (soft-delete). Only creator can delete.

API Frontend Description By The Backend Architect

Used to remove user’s custom theme.

Rest Route

The deleteBoardTheme API REST controller can be triggered via the following route:

/v1/boardthemes/:boardThemeId

Rest Request Parameters

The deleteBoardTheme api has got 1 regular request parameter

Parameter Type Required Population
boardThemeId ID true request.params?.[“boardThemeId”]
boardThemeId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/boardthemes/:boardThemeId

  axios({
    method: 'DELETE',
    url: `/v1/boardthemes/${boardThemeId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "boardTheme",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"boardTheme": {
		"id": "ID",
		"name": "String",
		"lightSquare": "String",
		"darkSquare": "String",
		"isPublished": "Boolean",
		"createdById": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Userpreference API

[Default create API] — This is the designated default create API for the userPreference data object. Frontend generators and AI agents should use this API for standard CRUD operations. Create user preferences record. One per user, auto-sets userId from session.

API Frontend Description By The Backend Architect

Called once when user first changes a preference. userId is auto-set.

Rest Route

The createUserPreference API REST controller can be triggered via the following route:

/v1/userpreferences

Rest Request Parameters

The createUserPreference api has got 6 regular request parameters

Parameter Type Required Population
userId ID true request.body?.[“userId”]
activeThemeId String false request.body?.[“activeThemeId”]
soundEnabled Boolean false request.body?.[“soundEnabled”]
showAnimations Boolean false request.body?.[“showAnimations”]
boardOrientation Enum false request.body?.[“boardOrientation”]
premoveEnabled Boolean false request.body?.[“premoveEnabled”]
userId : The user this preferences record belongs to
activeThemeId : ID of the currently selected board theme (preset ID or custom theme ID)
soundEnabled : Whether game sounds are enabled
showAnimations : Whether board animations are shown
boardOrientation : Default board orientation preference
premoveEnabled : Whether premove feature is enabled

REST Request To access the api you can use the REST controller with the path POST /v1/userpreferences

  axios({
    method: 'POST',
    url: '/v1/userpreferences',
    data: {
            userId:"ID",  
            activeThemeId:"String",  
            soundEnabled:"Boolean",  
            showAnimations:"Boolean",  
            boardOrientation:"Enum",  
            premoveEnabled:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "userPreference",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"userPreference": {
		"id": "ID",
		"userId": "ID",
		"activeThemeId": "String",
		"soundEnabled": "Boolean",
		"showAnimations": "Boolean",
		"boardOrientation": "Enum",
		"boardOrientation_idx": "Integer",
		"premoveEnabled": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Userpreference API

[Default update API] — This is the designated default update API for the userPreference data object. Frontend generators and AI agents should use this API for standard CRUD operations. Update user preferences. Only the owner can update their own preferences.

API Frontend Description By The Backend Architect

Called when user changes theme, sound, animation, or other settings.

Rest Route

The updateUserPreference API REST controller can be triggered via the following route:

/v1/userpreferences/:userPreferenceId

Rest Request Parameters

The updateUserPreference api has got 6 regular request parameters

Parameter Type Required Population
userPreferenceId ID true request.params?.[“userPreferenceId”]
activeThemeId String false request.body?.[“activeThemeId”]
soundEnabled Boolean false request.body?.[“soundEnabled”]
showAnimations Boolean false request.body?.[“showAnimations”]
boardOrientation Enum false request.body?.[“boardOrientation”]
premoveEnabled Boolean false request.body?.[“premoveEnabled”]
userPreferenceId : This id paremeter is used to select the required data object that will be updated
activeThemeId : ID of the currently selected board theme (preset ID or custom theme ID)
soundEnabled : Whether game sounds are enabled
showAnimations : Whether board animations are shown
boardOrientation : Default board orientation preference
premoveEnabled : Whether premove feature is enabled

REST Request To access the api you can use the REST controller with the path PATCH /v1/userpreferences/:userPreferenceId

  axios({
    method: 'PATCH',
    url: `/v1/userpreferences/${userPreferenceId}`,
    data: {
            activeThemeId:"String",  
            soundEnabled:"Boolean",  
            showAnimations:"Boolean",  
            boardOrientation:"Enum",  
            premoveEnabled:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "userPreference",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"userPreference": {
		"id": "ID",
		"userId": "ID",
		"activeThemeId": "String",
		"soundEnabled": "Boolean",
		"showAnimations": "Boolean",
		"boardOrientation": "Enum",
		"boardOrientation_idx": "Integer",
		"premoveEnabled": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Userpreference API

[Default get API] — This is the designated default get API for the userPreference data object. Frontend generators and AI agents should use this API for standard CRUD operations. Get a user’s preferences by ID.

API Frontend Description By The Backend Architect

Called on app load to restore user’s preferences.

Rest Route

The getUserPreference API REST controller can be triggered via the following route:

/v1/userpreferences/:userPreferenceId

Rest Request Parameters

The getUserPreference api has got 1 regular request parameter

Parameter Type Required Population
userPreferenceId ID true request.params?.[“userPreferenceId”]
userPreferenceId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/userpreferences/:userPreferenceId

  axios({
    method: 'GET',
    url: `/v1/userpreferences/${userPreferenceId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "userPreference",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"userPreference": {
		"id": "ID",
		"userId": "ID",
		"activeThemeId": "String",
		"soundEnabled": "Boolean",
		"showAnimations": "Boolean",
		"boardOrientation": "Enum",
		"boardOrientation_idx": "Integer",
		"premoveEnabled": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Userpreferences API

[Default list API] — This is the designated default list API for the userPreference data object. Frontend generators and AI agents should use this API for standard CRUD operations. List user preferences. Filter by userId to get a specific user’s preferences.

API Frontend Description By The Backend Architect

Used to find user’s preference record by userId filter.

Rest Route

The listUserPreferences API REST controller can be triggered via the following route:

/v1/userpreferences

Rest Request Parameters The listUserPreferences api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/userpreferences

  axios({
    method: 'GET',
    url: '/v1/userpreferences',
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "userPreferences",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"userPreferences": [
		{
			"id": "ID",
			"userId": "ID",
			"activeThemeId": "String",
			"soundEnabled": "Boolean",
			"showAnimations": "Boolean",
			"boardOrientation": "Enum",
			"boardOrientation_idx": "Integer",
			"premoveEnabled": "Boolean",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

List Gamehubmessages API

[Default list API] — This is the designated default list API for the gameHubMessage data object. Frontend generators and AI agents should use this API for standard CRUD operations. List messages in a gameHub hub room. Accessible by admins and room participants.

Rest Route

The listGameHubMessages API REST controller can be triggered via the following route:

/v1/v1/gameHub-messages

Rest Request Parameters

Filter Parameters

The listGameHubMessages api supports 8 optional filter parameters for filtering list results:

roomId (ID): Reference to the room this message belongs to

senderId (ID): Reference to the user who sent this message

senderName (String): Display name of the sender (denormalized from user profile at send time)

senderAvatar (String): Avatar URL of the sender (denormalized from user profile at send time)

messageType (Enum): Content type discriminator for this message

content (Object): Type-specific content payload (structure depends on messageType)

timestamp (String): Message creation time

status (Enum): Message moderation status

REST Request To access the api you can use the REST controller with the path GET /v1/v1/gameHub-messages

  axios({
    method: 'GET',
    url: '/v1/v1/gameHub-messages',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // roomId: '<value>' // Filter by roomId
        // senderId: '<value>' // Filter by senderId
        // senderName: '<value>' // Filter by senderName
        // senderAvatar: '<value>' // Filter by senderAvatar
        // messageType: '<value>' // Filter by messageType
        // content: '<value>' // Filter by content
        // timestamp: '<value>' // Filter by timestamp
        // status: '<value>' // Filter by status
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "gameHubMessages",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"gameHubMessages": [
		{
			"id": "ID",
			"roomId": "ID",
			"senderId": "ID",
			"senderName": "String",
			"senderAvatar": "String",
			"messageType": "Enum",
			"messageType_idx": "Integer",
			"content": "Object",
			"timestamp": null,
			"status": "Enum",
			"status_idx": "Integer",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Get Gamehubmessage API

[Default get API] — This is the designated default get API for the gameHubMessage data object. Frontend generators and AI agents should use this API for standard CRUD operations. Get a single gameHub hub message by ID.

Rest Route

The getGameHubMessage API REST controller can be triggered via the following route:

/v1/v1/gameHub-messages/:id

Rest Request Parameters

The getGameHubMessage api has got 2 regular request parameters

Parameter Type Required Population
gameHubMessageId ID true request.params?.[“gameHubMessageId”]
id String true request.params?.[“id”]
gameHubMessageId : This id paremeter is used to query the required data object.
id : This parameter will be used to select the data object that is queried

REST Request To access the api you can use the REST controller with the path GET /v1/v1/gameHub-messages/:id

  axios({
    method: 'GET',
    url: `/v1/v1/gameHub-messages/${id}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "gameHubMessage",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"gameHubMessage": {
		"id": "ID",
		"roomId": "ID",
		"senderId": "ID",
		"senderName": "String",
		"senderAvatar": "String",
		"messageType": "Enum",
		"messageType_idx": "Integer",
		"content": "Object",
		"timestamp": null,
		"status": "Enum",
		"status_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Gamehubmessage API

[Default delete API] — This is the designated default delete API for the gameHubMessage data object. Frontend generators and AI agents should use this API for standard CRUD operations. Delete a gameHub hub message. Admins can delete any message; users can delete their own.

Rest Route

The deleteGameHubMessage API REST controller can be triggered via the following route:

/v1/v1/gameHub-messages/:id

Rest Request Parameters

The deleteGameHubMessage api has got 2 regular request parameters

Parameter Type Required Population
gameHubMessageId ID true request.params?.[“gameHubMessageId”]
id String true request.params?.[“id”]
gameHubMessageId : This id paremeter is used to select the required data object that will be deleted
id : This parameter will be used to select the data object that want to be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/v1/gameHub-messages/:id

  axios({
    method: 'DELETE',
    url: `/v1/v1/gameHub-messages/${id}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "gameHubMessage",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"gameHubMessage": {
		"id": "ID",
		"roomId": "ID",
		"senderId": "ID",
		"senderName": "String",
		"senderAvatar": "String",
		"messageType": "Enum",
		"messageType_idx": "Integer",
		"content": "Object",
		"timestamp": null,
		"status": "Enum",
		"status_idx": "Integer",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Gamehubmessage API

[Default update API] — This is the designated default update API for the gameHubMessage data object. Frontend generators and AI agents should use this API for standard CRUD operations. Update a gameHub hub message content. Only the message sender or admins can edit.

Rest Route

The updateGameHubMessage API REST controller can be triggered via the following route:

/v1/v1/gameHub-messages/:id

Rest Request Parameters

The updateGameHubMessage api has got 4 regular request parameters

Parameter Type Required Population
gameHubMessageId ID true request.params?.[“gameHubMessageId”]
content Object false request.body?.[“content”]
status Enum false request.body?.[“status”]
id String true request.params?.[“id”]
gameHubMessageId : This id paremeter is used to select the required data object that will be updated
content : Type-specific content payload (structure depends on messageType)
status : Message moderation status
id : This parameter will be used to select the data object that want to be updated

REST Request To access the api you can use the REST controller with the path PATCH /v1/v1/gameHub-messages/:id

  axios({
    method: 'PATCH',
    url: `/v1/v1/gameHub-messages/${id}`,
    data: {
            content:"Object",  
            status:"Enum",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "gameHubMessage",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"gameHubMessage": {
		"id": "ID",
		"roomId": "ID",
		"senderId": "ID",
		"senderName": "String",
		"senderAvatar": "String",
		"messageType": "Enum",
		"messageType_idx": "Integer",
		"content": "Object",
		"timestamp": null,
		"status": "Enum",
		"status_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Authentication Specific Routes

Common Routes

Route: currentuser

Route Definition: Retrieves the currently authenticated user’s session information.

Route Type: sessionInfo

Access Route: GET /currentuser

Parameters

This route does not require any request parameters.

Behavior

// Sample GET /currentuser call
axios.get("/currentuser", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response Returns the session object, including user-related data and token information.

{
  "sessionId": "9cf23fa8-07d4-4e7c-80a6-ec6d6ac96bb9",
  "userId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
  "email": "user@example.com",
  "fullname": "John Doe",
  "roleId": "user",
  "tenantId": "abc123",
  "accessToken": "jwt-token-string",
  ...
}

Error Response 401 Unauthorized: No active session found.

{
  "status": "ERR",
  "message": "No login found"
}

Notes

Route: permissions

*Route Definition*: Retrieves all effective permission records assigned to the currently authenticated user.

*Route Type*: permissionFetch

Access Route: GET /permissions

Parameters

This route does not require any request parameters.

Behavior

// Sample GET /permissions call
axios.get("/permissions", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response

Returns an array of permission objects.

[
  {
    "id": "perm1",
    "permissionName": "adminPanel.access",
    "roleId": "admin",
    "subjectUserId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
    "subjectUserGroupId": null,
    "objectId": null,
    "canDo": true,
    "tenantCodename": "store123"
  },
  {
    "id": "perm2",
    "permissionName": "orders.manage",
    "roleId": null,
    "subjectUserId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
    "subjectUserGroupId": null,
    "objectId": null,
    "canDo": true,
    "tenantCodename": "store123"
  }
]

Each object reflects a single permission grant, aligned with the givenPermissions model:

Error Responses

{
  "status": "ERR",
  "message": "No login found"
}

Notes

Tip: Applications can cache permission results client-side or server-side, but should occasionally refresh by calling this endpoint, especially after login or permission-changing operations.

Route: permissions/:permissionName

Route Definition: Checks whether the current user has access to a specific permission, and provides a list of scoped object exceptions or inclusions.

Route Type: permissionScopeCheck

Access Route: GET /permissions/:permissionName

Parameters

Parameter Type Required Population
permissionName String Yes request.params.permissionName

Behavior

// Sample GET /permissions/orders.manage
axios.get("/permissions/orders.manage", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response

{
  "canDo": true,
  "exceptions": [
    "a1f2e3d4-xxxx-yyyy-zzzz-object1",
    "b2c3d4e5-xxxx-yyyy-zzzz-object2"
  ]
}

All sources, documents and other digital materials are copyright of .

About Us

For more information please visit our website: .

. .