Create Memory

End Point: [TMEngine URL]/create
Default: http://localhost:8000/TMServer/create
Send a 'POST' request to the method end point with these parameters in a JSON body:
Field Required Content
id No
ID of the memory to create. The value of 'id' must be unique.
Default value is current server time represented as the number of milliseconds since January 1, 1970, 00:00:00 GMT
name Yes A meaningful name to identify the memory
owner No
Text string used to identify the owner of the memory.
Default value is the login name of the user running the server.
type No
Type of engine to use. Possible values are:
  • 'MapDbEngine' (default)
  • 'SQLEngine'
serverName No
Name or IP of the server running MySQL or MariaDB.
Required for SQLEngine. Defaut value: 'localhost'
port No
Port in which MySQL or MariaDB listens for requests.
Required for SQLEngine. Default value: 3306
userName No
ID of of the MySQL or MariaDB user creating the database.
Required for SQLEngine.
password No
Password of the MySQL or MariaDB user creating the database.
Required for SQLEngine.
Example:
{
  "name": "First Memory",
  "type": "MapDbEngine"
}
{
  "name": "MariaMemory",
  "type": "SQLEngine",
  "serverName": "localhost",
  "port": 3306,
  "userName": "root",
  "password": "secret123!"
}
The server responds with a JSON object containing two fields.
On success, field 'status' is set to 'OK' and field 'id' contains the ID assigned to the new memory.
Example:
{
  "status": "OK",            
  "id": "1234567890987"        
}
On error, field 'status' is set to 'failed' and field 'reason' contains the error cause.
Example:
{
  "status": "failed",            
  "reason": "Duplicated id"        
}