### Create Table Synchronous (No Web Calls) in C# Source: https://github.com/maplarge/maplargesdk/blob/master/README.md This example shows how to create a table synchronously without making web calls by setting MapLargeConnector.NO_WEB_CALLS to true. Remember to reset it to false afterwards. ```csharp //CREATE TABLE SYNCHRONOUS (NO WEB CALL) paramlist.Add("account", "test"); paramlist.Add("tablename", "testJavaSdkTable"); paramlist.Add("fileurl", "http://www.domain.com/testfile.csv"); MapLargeConnector.NO_WEB_CALLS = true; string response = mlconnPassword.InvokeAPIRequest("CreateTableSynchronous", paramlist); Console.WriteLine(response); MapLargeConnector.NO_WEB_CALLS = false; ``` -------------------------------- ### Get Table Versions Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Retrieves a list of all versions for a specified table, including detailed information for each version. ```APIDOC ## GetTableVersions ### Description Retrieves a list of all versions for a specified table, including detailed information for each version. ### Parameters #### Request Parameters - **tablename** (string) - Required - Active table name to get the full ID for. This is the active ID "account/table". ### Response #### Success Response (200) - **versions** (mixed[]) - A list of table information for all versions of the given table. Contains keys id (long), acctcode (string), name (string), version (long), description (string), created (int), inram (true/false), columns (mixed[] [ id (long), type (string)]). ### Response Example ```json { "versions": [ { "id": 12345, "acctcode": "account1", "name": "table1", "version": 1, "description": "First version", "created": 1678886400, "inram": true, "columns": [ { "id": 1, "type": "string" } ] } ] } ``` ``` -------------------------------- ### Get All Tables Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Retrieves a list of all tables accessible by the user, with options for filtering by account and verbosity. ```APIDOC ## GetAllTables ### Description Retrieves a list of all tables accessible by the user, with options for filtering by account and verbosity. ### Parameters #### Request Parameters - **account** (string) - Optional - If present, response value will only contain tables from this account. - **verbose** (true/false) - Optional - Whether to use the long format OO keys for the response. Defaults to false if not present. ### Response #### Success Response (200) - **tables** (mixed[]) - A list of all tables in accounts with valid permissions, and all public tables. The response can be in one of two formats: Verbose: id (string), acctcode (string), name (string), version (long), created (int), isactive (true/false), inram (true/false), columns (mixed[] [ id (long), type (string), created (long)]). Short: id (int), isactive (true/false), columns (mixed[] [ names (comma delimited string of column names), types (comma delimited string of column names)]). ### Response Example ```json { "tables": [ { "id": "12345", "acctcode": "account1", "name": "table1", "version": 1, "created": 1678886400, "isactive": true, "inram": true, "columns": [ { "id": 1, "type": "string", "created": 1678886400 } ] } ] } ``` ``` -------------------------------- ### Get Active Tables Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Retrieves a list of all currently active tables, with options for filtering by account and verbosity. ```APIDOC ## GetActiveTables ### Description Retrieves a list of all currently active tables, with options for filtering by account and verbosity. ### Parameters #### Request Parameters - **account** (string) - Optional - If present, response value will only contain tables from this account. - **verbose** (true/false) - Optional - Whether to use the long format OO keys for the response. Defaults to false. ### Response #### Success Response (200) - **tables** (mixed[]) - A list of all active tables in accounts with valid permissions, and all public tables. The response can be in one of two formats: Verbose: id (string), acctcode (string), name (string), version (long), created (int), inram (true/false), columns (mixed[] [ id (long), type (string), created (long)]). Short: id (int), columns (mixed[] [ names (comma delimited string of column names), types (comma delimited string of column names)]). ### Response Example ```json { "tables": [ { "id": "12345", "acctcode": "account1", "name": "table1", "version": 1, "created": 1678886400, "inram": true, "columns": [ { "id": 1, "type": "string", "created": 1678886400 } ] } ] } ``` ``` -------------------------------- ### InvokeAPIRequest (C#) Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Invokes API requests suitable for GET requests, such as retrieving account or table listings. For file uploads, use the POST method. Returns 'ERROR' on exception. ```csharp string InvokeAPIRequest(string actionname, Dictionary paramlist) ``` -------------------------------- ### Remote Table API - General Request Structure Source: https://github.com/maplarge/maplargesdk/blob/master/api.md All API requests are sent using GET parameters through the URL. Authentication requires three parameters: mluser, mlpass or mltoken, and customid. An optional callback parameter can be used for JSONP responses. ```APIDOC ## General Request Structure ### Description All API requests are sent using GET parameters through the URL. Authentication requires three parameters: mluser, mlpass or mltoken, and customid. An optional callback parameter can be used for JSONP responses. ### Method GET ### Endpoint `http://alphaapi.maplarge.com/Remote/[Action]` ### Parameters #### Query Parameters - **mluser** (string) - Required - User name to sign in with. - **mlpass** (string) - Required - Either the password for the mluser account. - **mltoken** (string) - Required - Or the MapLarge generated auth token for the client profile. - **customid** (string) - Required - A custom id provided by the calling script that will be returned in the response. - **callback** (string) - Optional - The name of the function in which to wrap the JSON return data. ### Response #### Success Response (200) - **success** (boolean) - Whether this action was successful in its task. - **id** (string) - A unique 128-bit hexadecimal value that identifies this action. Length 32. - **errors** (string[]) - A list of any errors encountered in the execution of this action. - **timestamp** (int) - Integer "linux-style" timestamp. Time is in UTC. - **[extra data]** - Any additional action specific values. Defined per-action below. #### Response Example ```json { "success": true, "id": "a1b2c3d4e5f67890a1b2c3d4e5f67890", "errors": [], "timestamp": 1678886400, "some_action_specific_data": "value" } ``` ``` -------------------------------- ### InvokeAPIRequest - GET-based API Call (Python) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP GET, suitable for lightweight operations. Returns a JSON string or 'ERROR' on exception. Requires a dictionary of string parameters. ```python params = { "account": "myaccount", "tablename": "salesdata2024", "fileurl": "http://data.example.com/sales.csv" } response = mlconn.InvokeAPIRequest("CreateTableSynchronous", params) # response: {"success":true,"id":"...","table":"myaccount/salesdata2024/1"} ``` -------------------------------- ### InvokeAPIRequest - GET-based API Call (C#) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP GET, suitable for lightweight operations. Returns a JSON string or 'ERROR' on exception. Requires a Dictionary of string parameters. ```csharp var paramlist = new Dictionary { { "account", "myaccount" } }; string response = mlconn.InvokeAPIRequest("GetAllTables", paramlist); // response: {"success":true,"id":"...","tables":[...]} ``` ```csharp var paramlist2 = new Dictionary { { "account", "myaccount" }, { "tablename", "salesdata2024" }, { "fileurl", "http://data.example.com/sales.csv" } }; string response2 = mlconn.InvokeAPIRequest("CreateTableSynchronous", paramlist2); // response2: {"success":true,"id":"...","table":"myaccount/salesdata2024/1"} ``` -------------------------------- ### InvokeAPIRequest Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Used to invoke API requests over HTTP that can be handled sufficiently by GET requests. Suitable for retrieving account or table listings, or for passing files by URL. ```APIDOC ## InvokeAPIRequest ### Description Used to invoke API requests over HTTP that can be handled sufficiently by GET requests. Suitable for retrieving account or table listings, or for passing files by URL. Uploading of file data directly must use the POST method. ### Method GET (implied) ### Endpoint Not specified, determined by `actionname` and `paramlist`. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **actionname** (string) - Required - Name of the API action being called. - **paramlist** (Dictionary) - Required - Array of key value pairs representing parameters for the API action. ### Return Value - **string** - API response, usually a JSON formatted string. Returns "ERROR" on exception. ``` -------------------------------- ### InvokeAPIRequest - GET-based API Call (Java) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP GET, suitable for lightweight operations. Returns a JSON string or 'ERROR' on exception. Requires a Map of string parameters. ```java Map params = new HashMap<>(); params.put("tablename", "myaccount/salesdata2024"); String response = mlconn.InvokeAPIRequest("GetActiveTableID", params); // response: {"success":true,"id":"...","table":"myaccount/salesdata2024/3"} ``` -------------------------------- ### InvokeAPIRequest Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP GET. Suitable for lightweight operations such as listing tables or accounts where request data fits in a URL query string. Returns a JSON string; returns "ERROR" on exception. ```APIDOC ## InvokeAPIRequest — GET-based API Call Sends a Remote API action via HTTP GET. Suitable for lightweight operations such as listing tables or accounts where request data fits in a URL query string. Returns a JSON string; returns `"ERROR"` on exception. ```csharp // C# — list all tables for an account var paramlist = new Dictionary { { "account", "myaccount" } }; string response = mlconn.InvokeAPIRequest("GetAllTables", paramlist); // response: {"success":true,"id":"...","tables":[...]} // C# — create a table from a remote CSV URL (synchronous) var paramlist2 = new Dictionary { { "account", "myaccount" }, { "tablename", "salesdata2024" }, { "fileurl", "http://data.example.com/sales.csv" } }; string response2 = mlconn.InvokeAPIRequest("CreateTableSynchronous", paramlist2); // response2: {"success":true,"id":"...","table":"myaccount/salesdata2024/1"} ``` ```java // Java — get active table ID Map params = new HashMap<>(); params.put("tablename", "myaccount/salesdata2024"); String response = mlconn.InvokeAPIRequest("GetActiveTableID", params); // response: {"success":true,"id":"...","table":"myaccount/salesdata2024/3"} ``` ```python # Python — create table from URL (synchronous) params = { "account": "myaccount", "tablename": "salesdata2024", "fileurl": "http://data.example.com/sales.csv" } response = mlconn.InvokeAPIRequest("CreateTableSynchronous", params) # response: {"success":true,"id":"...","table":"myaccount/salesdata2024/1"} ``` ``` -------------------------------- ### InvokeAPIRequestPost — POST-based API Call (no file upload) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP POST. Use this for any operation where GET query-string length could be a concern, or for actions that modify server state. Returns a JSON string; returns "ERROR" on exception. ```csharp // C# — list groups for an account var paramlist = new Dictionary { { "account", "myaccount" } }; string response = mlconn.InvokeAPIRequestPost("ListGroups", paramlist); // response: {"success":true,"id":"...","groups":[{"id":1,"account":"myaccount","name":"Editors","description":"..."}]} ``` ```csharp // C# — set active table version var paramlist2 = new Dictionary { { "tablename", "myaccount/salesdata2024/3" } }; string response2 = mlconn.InvokeAPIRequestPost("SetActiveTable", paramlist2); // response2: {"success":true,"id":"..."} ``` -------------------------------- ### InvokeAPIRequestPost — POST-based API Call (no file upload) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP POST. Use this for any operation where GET query-string length could be a concern, or for actions that modify server state. Returns a JSON string; returns "ERROR" on exception. ```APIDOC ## InvokeAPIRequestPost (POST, no file upload) ### Description Sends a Remote API action via HTTP POST. Use this for any operation where GET query-string length could be a concern, or for actions that modify server state (e.g., listing groups, setting active table, creating auto-imports). Returns a JSON string; returns `"ERROR"` on exception. ### Method POST ### Endpoint `/InvokeAPIRequestPost` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **action** (string) - Required - The name of the API action to invoke. - **parameters** (object) - Optional - A JSON object containing key-value pairs for the action's parameters. ### Request Example ```json { "action": "ListGroups", "parameters": { "account": "myaccount" } } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **id** (string) - A unique identifier for the request. - **[action-specific fields]** - Fields returned depend on the invoked action (e.g., `groups`, `users`, `autoimportid`, `table`). #### Response Example ```json { "success": true, "id": "...", "groups": [ { "id": 1, "account": "myaccount", "name": "Editors", "description": "..." } ] } ``` ``` -------------------------------- ### InvokeAPIRequestPost — POST-based API Call (no file upload) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP POST. Use this for any operation where GET query-string length could be a concern, or for actions that modify server state. Returns a JSON string; returns "ERROR" on exception. ```java // Java — list users Map params = new HashMap<>(); String response = mlconn.InvokeAPIRequestPost("ListUsers", params); // response: {"success":true,"id":"...","users":[{"id":42,"name":"jdoe","email":"jdoe@example.com","tags":[],"groupcount":2}]} ``` -------------------------------- ### InvokeAPIRequestPost — POST-based API Call (no file upload) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP POST. Use this for any operation where GET query-string length could be a concern, or for actions that modify server state. Returns a JSON string; returns "ERROR" on exception. ```php // PHP — create automated import $paramlist = [ 'account' => 'myaccount', 'importname' => 'DailySalesImport', 'tablename' => 'dailysales', 'updatefrequency' => '60', 'remoteurl' => 'http://data.example.com/daily.csv', 'description' => 'Imports daily sales CSV every hour', 'versionstokeep' => '7' ]; $response = $mlconn->InvokeAPIRequestPost("CreateAutoImport", $paramlist); // $response: {"success":true,"id":"...","autoimportid":99} ``` -------------------------------- ### InvokeAPIRequestPost — POST-based API Call (no file upload) Source: https://context7.com/maplarge/maplargesdk/llms.txt Sends a Remote API action via HTTP POST. Use this for any operation where GET query-string length could be a concern, or for actions that modify server state. Returns a JSON string; returns "ERROR" on exception. ```python # Python — list groups params = {"account": "myaccount"} response = mlconn.InvokeAPIRequestPost("ListGroups", params) # response: {"success":true,"id":"...","groups":[...]} ``` -------------------------------- ### MapLarge Connector Initialization in C# Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Demonstrates creating a MapLargeConnector instance using either password or an authentication token. Note that NO_WEB_CALLS can be set to true to prevent actual web requests. ```csharp //DEFAULT CREDENTIALS string server = "http://server.maplarge.com/"; string user = "user@ml.com"; string pass = "pw123456"; int token = 123456789; Dictionary paramlist = new Dictionary(); //CREATE MAPLARGE CONNECTION WITH USER / PASSWORD MapLargeConnector mlconnPassword = new MapLargeConnector(server, user, pass); //CREATE MAPLARGE CONNECTION WITH USER / AUTH TOKEN MapLargeConnector mlconnToken = new MapLargeConnector(server, user, token); ``` -------------------------------- ### MapLarge Connector Initialization in PHP Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Create MapLargeConnector instances in PHP using static factory methods CreateFromPassword or CreateFromToken. ```php //DEFAULT CREDENTIALS $server = "http://server.maplarge.com/"; $user = "user@ml.com"; $pass = "pw123456"; $token = 921129417; //CREATE MAPLARGE CONNECTION WITH USER / PASSWORD $mlconnPassword = MapLargeConnector::CreateFromPassword($server, $user, $pass); //CREATE MAPLARGE CONNECTION WITH USER / AUTH TOKEN $mlconnToken = MapLargeConnector::CreateFromToken($server, $user, $token); ``` -------------------------------- ### Python: MapLarge SDK Authentication and API Calls Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Shows how to establish MapLarge connections using credentials or an auth token, and perform operations like creating tables synchronously and listing groups. The NO_WEB_CALLS flag can be utilized to simulate requests without actual network calls. ```python server = "http://server.maplarge.com/" user = "user@ml.com" pw = "pw123456" #CREATE MAPLARGE CONNECTION WITH USER / PASSWORD mlconnPassword = MapLargeConnector(server, user, pw) #CREATE MAPLARGE CONNECTION WITH USER / AUTH TOKEN mlconnToken = MapLargeConnector(server, user, token) #CREATE TABLE SYNCHRONOUS (NO WEB CALL) params = {"account": "aidsvualpha", "tablename": "testPythonSdkTable", "fileurl": "http://localhost/testfile.csv"} mlconnToken.NO_WEB_CALLS = True response = mlconnToken.InvokeAPIRequest("CreateTableSynchronous", params) print response mlconnPassword.NO_WEB_CALLS = False #RETRIEVE REMOTE USER AUTH TOKEN response = mlconnPassword.GetRemoteAuthToken(user, pw, "255.255.255.255") print response #List Groups params = {"account": "aidsvualpha"} response = mlconnPassword.InvokeAPIRequestPost("ListGroups", params) print response #CREATE TABLE WITH FILES SYNCHRONOUS params = {"account": "aidsvualpha", "tablename": "testTable"} fileList = ["c:\\temp\\usa.csv"] print mlconnPassword.InvokeAPIRequestPost("CreateTableWithFilesSynchronous", params, fileList) ``` -------------------------------- ### Java: MapLarge SDK Authentication and API Calls Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Demonstrates creating MapLarge connectors using password or auth token, invoking synchronous table creation, and retrieving remote auth tokens. Note that NO_WEB_CALLS can be set to true to prevent actual web requests during testing. ```java //DEFAULT CREDENTIALS String server = "http://server.maplarge.com/"; String user = "user@ml.com"; String pass = "pw123456"; int token = 123456789; Map params = new HashMap(); //CREATE MAPLARGE CONNECTION WITH USER / PASSWORD MapLargeConnector mlconnPassword = new MapLargeConnector(server, user, pass); //CREATE MAPLARGE CONNECTION WITH USER / AUTH TOKEN MapLargeConnector mlconnToken = new MapLargeConnector(server, user, token); //CREATE TABLE SYNCHRONOUS (NO WEB CALL) params.put("account", "test"); params.put("tablename", "testJavaSdkTable"); params.put("fileurl", "http://localhost/testfile.csv"); MapLargeConnector.NO_WEB_CALLS = true; String response = mlconnPassword.InvokeAPIRequest("CreateTableSynchronous", params); System.out.println(response); MapLargeConnector.NO_WEB_CALLS = false; //RETRIEVE REMOTE USER AUTH TOKEN response = mlconnPassword.GetRemoteAuthToken(user, pass, "255.255.255.255"); System.out.println(response); //LIST GROUPS params.clear(); params.put("account", "test"); response = mlconnToken.InvokeAPIRequestPost("ListGroups", params); System.out.println(response); //CREATE TABLE WITH FILES SYNCHRONOUS params.clear(); params.put("account", "test"); params.put("tablename", "PostedTableImport"); response = mlconnToken.InvokeAPIRequestPost("CreateTableWithFilesSynchronous", params, new String[] { "C:\\temp\\usa.csv" }); System.out.println(response); ``` -------------------------------- ### Create Table Synchronously in C# Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Instantiate MapLargeConnector with server, user, and password. Then, invoke the CreateTableSynchronous API with account, tablename, and fileurl parameters. ```csharp //Authentication inforamtion string server = "http://server.maplarge.com/"; string user = "user@ml.com"; string pass = "pw123456"; //HTTP Parameters Dictionary paramlist = new Dictionary(); //CREATE MAPLARGE CONNECTION WITH USER / PASSWORD MapLargeConnector mlconnPassword = new MapLargeConnector(server, user, pass); //CREATE TABLE SYNCHRONOUSLY //Set parameters: account, tablename & file URL paramlist.Add("account", "test"); paramlist.Add("tablename", "testJavaSdkTable"); paramlist.Add("fileurl", "http://www.domain.com/testfile.csv"); string response = mlconnPassword.InvokeAPIRequest("CreateTableSynchronous", paramlist); ``` -------------------------------- ### Connect with Password or Token (C#) Source: https://context7.com/maplarge/maplargesdk/llms.txt Instantiate MapLargeConnector using server URL and either username/password or username/token. Password authentication is automatically exchanged for a session token. ```csharp MapLargeConnector mlconn = new MapLargeConnector("http://server.maplarge.com/", "user@ml.com", "pw123456"); ``` ```csharp MapLargeConnector mlconnToken = new MapLargeConnector("http://server.maplarge.com/", "user@ml.com", 123456789); ``` -------------------------------- ### Bash: Create User via REST API Source: https://context7.com/maplarge/maplargesdk/llms.txt Add a new user to the system using the `CreateUser` endpoint. Specify username, password, email, and optionally assign to groups. ```bash # Create a user and add to groups curl "http://alphaapi.maplarge.com/Remote/CreateUser?mluser=user@ml.com&mltoken=921129417&username=jdoe&password=secret&email=jdoe@example.com&groups=1,2" # Response: {"success":true,"id":"...","userid":42} ``` -------------------------------- ### Create Table with Files Synchronous in PHP Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Create a table synchronously with files using InvokeAPIRequestPostWithFiles, providing account, tablename, and an array of file paths. ```php //CREATE TABLE WITH FILES SYNCHRONOUS $paramlist = array( 'account' => 'test', 'tablename' => 'PostedTableImportPHP', ); $response = $mlconnToken->InvokeAPIRequestPostWithFiles("CreateTableWithFilesSynchronous", $paramlist, array("N:\\MergedPhoenix.csv")); echo $response . PHP_EOL; echo 'DONE' . PHP_EOL; ``` -------------------------------- ### Create Table with Files Synchronous in C# Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Use InvokeAPIRequestPost to create a table synchronously, providing account, tablename, and an array of file paths. ```csharp //CREATE TABLE WITH FILES SYNCHRONOUS paramlist.Clear(); paramlist.Add("account", "test"); paramlist.Add("tablename", "PostedTableImport"); response = mlconnToken.InvokeAPIRequestPost("CreateTableWithFilesSynchronous", paramlist, new string[] { "C:\\Data\\TestFile.csv" }); Console.WriteLine(response); ``` -------------------------------- ### Connect with Password or Token (Python) Source: https://context7.com/maplarge/maplargesdk/llms.txt Instantiate MapLargeConnector using server URL and either username/password or username/token. Password authentication is automatically exchanged for a session token. ```python mlconn = MapLargeConnector("http://server.maplarge.com/", "user@ml.com", "pw123456") ``` ```python mlconnToken = MapLargeConnector("http://server.maplarge.com/", "user@ml.com", 123456789) ``` -------------------------------- ### Connect with Password or Token (PHP) Source: https://context7.com/maplarge/maplargesdk/llms.txt Instantiate MapLargeConnector using server URL and either username/password or username/token via static factory methods. Password authentication is automatically exchanged for a session token. ```php $mlconn = MapLargeConnector::CreateFromPassword("http://server.maplarge.com/", "user@ml.com", "pw123456"); ``` ```php $mlconnToken = MapLargeConnector::CreateFromToken("http://server.maplarge.com/", "user@ml.com", 921129417); ``` -------------------------------- ### CreateTableWithFilesSynchronous Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Creates a new table synchronously, supporting zipped packages. The request remains open until the table datafiles are downloaded and imported. ```APIDOC ## CreateTableWithFilesSynchronous ### Description Creates a new table synchronously, supporting zipped packages. The request remains open until the table datafiles are downloaded and imported. ### Method POST ### Endpoint /table/create/sync/files ### Parameters #### Request Body - **account** (string) - Required - The account code for the Account that will own this table. - **tablename** (string) - Required - Name to use for table, without account code prefix. Must be alpha-numeric. ### Response #### Success Response (200) - **table** (string) - The full table name (ID) of the newly created table. ### Response Example { "table": "account/table/version" } ``` -------------------------------- ### Bash: Create Automated Import via REST API Source: https://context7.com/maplarge/maplargesdk/llms.txt Set up a recurring data import task using `CreateAutoImport`. Configure the import name, table, update frequency, source URL, and versions to retain. ```bash # Create an automated import (runs every 60 minutes) curl "http://alphaapi.maplarge.com/Remote/CreateAutoImport?mluser=user@ml.com&mltoken=921129417&account=myaccount&importname=HourlySales&tablename=dailysales&updatefrequency=60&remoteurl=http://data.example.com/daily.csv&versionstokeep=7" # Response: {"success":true,"id":"...","autoimportid":99} ``` -------------------------------- ### CreateAccount Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Creates a new account with specified details and limits. ```APIDOC ## CreateAccount ### Description Creates a new account with the provided name, description, code, and optional table and group limits. ### Parameters #### Request Body - **name** (string) - Required - The name of the account to be created. - **description** (string) - Required - A short description to use for the new account. - **code** (string) - Required - The account code for the new account. - **limitNumTables** (long) - Optional - The maximum number of tables this account may have. Defaults to 25. - **limitNumGroups** (long) - Optional - The maximum number of groups this account may have. Defaults to 25. ``` -------------------------------- ### CreateUser Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Creates a new user with the specified username, password, email, tags, and group memberships. ```APIDOC ## CreateUser ### Description Creates a new user with the specified username, password, email, tags, and group memberships. ### Parameters #### Request Body - **username** (string) - Required - User name for this user. - **password** (string) - Required - Password for this user. - **email** (string) - Required - Email address for this user. - **tags** (string) - Optional - A comma-delimited list of tags for this user. - **groups** (string) - Optional - A comma-delimited list of group IDs to add the given user to. ``` -------------------------------- ### REST API - Create User Source: https://context7.com/maplarge/maplargesdk/llms.txt Creates a new user account and optionally assigns them to specified groups. Requires username, password, email, and group IDs. ```APIDOC ## REST API — Direct HTTP Requests All SDK methods map to the `http[s]:///Remote/` endpoint. Every request must include `mluser` and `mltoken` (or `mlpass`) as query parameters. Responses are JSON with fields `success`, `id`, `errors`, `timestamp`, and action-specific data. ```bash # Create a user and add to groups curl "http://alphaapi.maplarge.com/Remote/CreateUser?mluser=user@ml.com&mltoken=921129417&username=jdoe&password=secret&email=jdoe@example.com&groups=1,2" # Response: {"success":true,"id":"...","userid":42} ``` ``` -------------------------------- ### MapLargeConnector Constructor (C#) Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Constructors for MapLargeConnector. Use username/password or username/authtoken for authentication. Ensure the URL begins with a valid protocol (http/https). ```csharp MapLargeConnector(string urlApiServer, string username, int token) MapLargeConnector(string urlApiServer, string username, string password) ``` -------------------------------- ### REST API - Create Auto Import Source: https://context7.com/maplarge/maplargesdk/llms.txt Sets up an automated data import task that runs at a specified frequency from a remote URL. ```APIDOC ## REST API — Direct HTTP Requests All SDK methods map to the `http[s]:///Remote/` endpoint. Every request must include `mluser` and `mltoken` (or `mlpass`) as query parameters. Responses are JSON with fields `success`, `id`, `errors`, `timestamp`, and action-specific data. ```bash # Create an automated import (runs every 60 minutes) curl "http://alphaapi.maplarge.com/Remote/CreateAutoImport?mluser=user@ml.com&mltoken=921129417&account=myaccount&importname=HourlySales&tablename=dailysales&updatefrequency=60&remoteurl=http://data.example.com/daily.csv&versionstokeep=7" # Response: {"success":true,"id":"...","autoimportid":99} ``` ``` -------------------------------- ### CreateTable Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Creates a new table asynchronously. A notification will be sent to the 'replyto' address upon completion if provided. ```APIDOC ## CreateTable ### Description Creates a new table asynchronously. A notification will be sent to the 'replyto' address upon completion if provided. ### Method POST ### Endpoint /table/create ### Parameters #### Request Body - **account** (string) - Required - The account code for the Account that will own this table. - **tablename** (string) - Required - Name to use for table, without account code prefix. Must be alpha-numeric. - **fileurl** (string[]) - Required - A comma separated list of file URIs to download. - **replyto** (string) - Optional - If present, server will reply to this address when import completes. - **authurl** (string) - Optional - For use when authentication is needed before files are downloaded. - **authpostdata** (string) - Optional - For use when authentication is needed before files are downloaded. ### Response #### Success Response (200) - **table** (string) - The full table name (ID) of the newly created table. ### Response Example { "table": "account/table/version" } ``` -------------------------------- ### List Groups using POST in PHP Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Use InvokeAPIRequestPost to list groups, passing the account parameter. ```php //LIST GROUPS $paramlist = array( 'account' => 'test', ); $response = $mlconnToken->InvokeAPIRequestPost("ListGroups", $paramlist); echo $response . PHP_EOL; ``` -------------------------------- ### Bash: Create Group via REST API Source: https://context7.com/maplarge/maplargesdk/llms.txt Create a new group with a specified name, description, and permission level using the `CreateGroup` endpoint. ```bash # Create a group curl "http://alphaapi.maplarge.com/Remote/CreateGroup?mluser=user@ml.com&mltoken=921129417&account=myaccount&groupname=Editors&description=Editor+group&permissionlevel=editor" # Response: {"success":true,"id":"...","groupid":7} ``` -------------------------------- ### MapLargeConnector Constructor Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Initializes a MapLargeConnector instance to establish a session with the MapLarge API server. Supports authentication via username/password or username/authtoken. ```APIDOC ## Constructor ### Description Initializes a MapLargeConnector instance to establish a session with the MapLarge API server. Supports authentication via username/password or username/authtoken. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Method Signatures ```csharp MapLargeConnector(string urlApiServer, string username, int token) MapLargeConnector(string urlApiServer, string username, string password) ``` ### Parameters - **urlApiServer** (string) - Required - URL of the API server. Must begin with a valid protocol (http/https). - **username** (string) - Required - Username for connection credentials. - **token** (int) - Required - Authentication token for connection credentials. - **password** (string) - Required - Password for connection credentials. ``` -------------------------------- ### REST API - Create Table Synchronous Source: https://context7.com/maplarge/maplargesdk/llms.txt Creates a table synchronously, waiting for the data import to complete before returning. Requires authentication credentials and table details. ```APIDOC ## REST API — Direct HTTP Requests All SDK methods map to the `http[s]:///Remote/` endpoint. Every request must include `mluser` and `mltoken` (or `mlpass`) as query parameters. Responses are JSON with fields `success`, `id`, `errors`, `timestamp`, and action-specific data. ```bash # Create a table synchronously (waits for import to complete) curl "http://alphaapi.maplarge.com/Remote/CreateTableSynchronous?mluser=user@ml.com&mltoken=921129417&account=myaccount&tablename=salesdata&fileurl=http://data.example.com/sales.csv" # Response: {"success":true,"id":"...","table":"myaccount/salesdata/1","errors":[],"timestamp":1398000000} ``` ``` -------------------------------- ### Bash: Create Table Synchronously via REST API Source: https://context7.com/maplarge/maplargesdk/llms.txt Execute a synchronous table creation request using `curl`. This method waits for the import process to finish before returning. ```bash # Create a table synchronously (waits for import to complete) curl "http://alphaapi.maplarge.com/Remote/CreateTableSynchronous?mluser=user@ml.com&mltoken=921129417&account=myaccount&tablename=salesdata&fileurl=http://data.example.com/sales.csv" # Response: {"success":true,"id":"...","table":"myaccount/salesdata/1","errors":[],"timestamp":1398000000} ``` -------------------------------- ### Bash: Create Table Asynchronously via REST API Source: https://context7.com/maplarge/maplargesdk/llms.txt Use `curl` to make a direct REST API call to create a table from a remote URL asynchronously. Ensure `mluser` and `mltoken` are included. ```bash # Create a table from a remote URL (asynchronous) curl "http://alphaapi.maplarge.com/Remote/CreateTable?mluser=user@ml.com&mltoken=921129417&account=myaccount&tablename=salesdata&fileurl=http://data.example.com/sales.csv" # Response: {"success":true,"id":"a1b2c3d4e5f6...","errors":[],"timestamp":1398000000} ``` -------------------------------- ### REST API - List All Tables Source: https://context7.com/maplarge/maplargesdk/llms.txt Retrieves a list of all tables associated with the account, with an option for verbose output. ```APIDOC ## REST API — Direct HTTP Requests All SDK methods map to the `http[s]:///Remote/` endpoint. Every request must include `mluser` and `mltoken` (or `mlpass`) as query parameters. Responses are JSON with fields `success`, `id`, `errors`, `timestamp`, and action-specific data. ```bash # List all tables (verbose mode) curl "http://alphaapi.maplarge.com/Remote/GetAllTables?mluser=user@ml.com&mltoken=921129417&account=myaccount&verbose=true" # Response: {"success":true,"tables":[{"id":"myaccount/salesdata/1","acctcode":"myaccount","name":"salesdata","version":1,"created":1398000000,"isactive":true,"inram":false,"columns":[...]}]} ``` ``` -------------------------------- ### Bash: List All Tables Verbose via REST API Source: https://context7.com/maplarge/maplargesdk/llms.txt Retrieve a detailed list of all tables using the `GetAllTables` endpoint with the `verbose` parameter set to `true`. Requires authentication credentials. ```bash # List all tables (verbose mode) curl "http://alphaapi.maplarge.com/Remote/GetAllTables?mluser=user@ml.com&mltoken=921129417&account=myaccount&verbose=true" # Response: {"success":true,"tables":[{"id":"myaccount/salesdata/1","acctcode":"myaccount","name":"salesdata","version":1,"created":1398000000,"isactive":true,"inram":false,"columns":[...]}]} ``` -------------------------------- ### REST API - JSONP Callback Source: https://context7.com/maplarge/maplargesdk/llms.txt Demonstrates how to wrap JSON responses in a JavaScript callback function for cross-domain requests. ```APIDOC ## REST API — Direct HTTP Requests All SDK methods map to the `http[s]:///Remote/` endpoint. Every request must include `mluser` and `mltoken` (or `mlpass`) as query parameters. Responses are JSON with fields `success`, `id`, `errors`, `timestamp`, and action-specific data. ```bash # JSONP callback wrapper curl "http://alphaapi.maplarge.com/Remote/GetAllTables?mluser=user@ml.com&mltoken=921129417&account=myaccount&callback=myHandler" # Response: myHandler({"success":true,"tables":[...]}) ``` ``` -------------------------------- ### REST API - Create Group Source: https://context7.com/maplarge/maplargesdk/llms.txt Creates a new user group with a specified name, description, and permission level. ```APIDOC ## REST API — Direct HTTP Requests All SDK methods map to the `http[s]:///Remote/` endpoint. Every request must include `mluser` and `mltoken` (or `mlpass`) as query parameters. Responses are JSON with fields `success`, `id`, `errors`, `timestamp`, and action-specific data. ```bash # Create a group curl "http://alphaapi.maplarge.com/Remote/CreateGroup?mluser=user@ml.com&mltoken=921129417&account=myaccount&groupname=Editors&description=Editor+group&permissionlevel=editor" # Response: {"success":true,"id":"...","groupid":7} ``` ``` -------------------------------- ### ForceRunImport Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Forces an immediate execution of a specified automated import. ```APIDOC ## ForceRunImport ### Description Forces an immediate execution of a specified automated import. ### Request Parameters - **id** (long) - Required - The ID of the auto import item to force execution for. ### Response #### Success Response (200) *None* ``` -------------------------------- ### C# Dry Run Mode for Inspecting URLs Source: https://context7.com/maplarge/maplargesdk/llms.txt Set `NO_WEB_CALLS` to true to suppress HTTP requests and inspect the generated URL. Remember to set it back to false to re-enable real calls. ```csharp MapLargeConnector.NO_WEB_CALLS = true; var paramlist = new Dictionary { { "account", "myaccount" }, { "tablename", "testTable" }, { "fileurl", "http://data.example.com/test.csv" } }; string debugOutput = mlconn.InvokeAPIRequest("CreateTableSynchronous", paramlist); Console.WriteLine(debugOutput); // Outputs: http://server.maplarge.com/Remote/CreateTableSynchronous?mluser=user@ml.com&mltoken=...&account=myaccount&tablename=testTable&fileurl=http%3A%2F%2F... MapLargeConnector.NO_WEB_CALLS = false; // re-enable real calls ``` -------------------------------- ### Bash: JSONP Callback Wrapper via REST API Source: https://context7.com/maplarge/maplargesdk/llms.txt Make a REST API request and wrap the JSON response in a JavaScript callback function using the `callback` parameter. ```bash # JSONP callback wrapper curl "http://alphaapi.maplarge.com/Remote/GetAllTables?mluser=user@ml.com&mltoken=921129417&account=myaccount&callback=myHandler" # Response: myHandler({"success":true,"tables":[...]}) ``` -------------------------------- ### List Groups using POST in C# Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Invoke the ListGroups API using InvokeAPIRequestPost method with account parameter. ```csharp //LIST GROUPS paramlist.Clear(); paramlist.Add("account", "test"); response = mlconnToken.InvokeAPIRequestPost("ListGroups", paramlist); Console.WriteLine(response); ``` -------------------------------- ### CreateAutoImport Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Creates a new automated import for tables. This action allows you to specify details like the account, import name, table name, update frequency, remote URL, and version history to keep. ```APIDOC ## CreateAutoImport ### Description Creates a new automated import for tables. ### Request Parameters - **account** (string) - Required - The account code for the Account that will own tables created by this import. - **importname** (string) - Required - The name to assign to this automated import listing. Alpha-numeric. - **tablename** (string) - Required - Table name to give to tables imported with this listing. Alpha-numeric. - **updatefrequency** (int) - Required - The frequency to run auto import for this table. Value is in minutes, and must be a minimum of 5. - **remoteurl** (string) - Required - A file URI to download and process. - **description** (string) - Optional - Text description of this automated import listing. - **versionstokeep** (int) - Optional - The number of previous versions of the table to keep. Defaults to keeping all. - **authurl** (string) - Optional - URL to send authentication requests to before downloading files from remoterurl. - **authpostdata** (string) - Optional - Data that will be sent with the authentication request. Data will be sent as a POST request. ### Response #### Success Response (200) - **autoimportid** (long) - The ID of the newly created autoimport item. ``` -------------------------------- ### CreateTableSynchronous Source: https://github.com/maplarge/maplargesdk/blob/master/api.md Creates a new table synchronously. The request remains open until the table datafiles are downloaded and imported. ```APIDOC ## CreateTableSynchronous ### Description Creates a new table synchronously. The request remains open until the table datafiles are downloaded and imported. ### Method POST ### Endpoint /table/create/sync ### Parameters #### Request Body - **account** (string) - Required - The account code for the Account that will own this table. - **tablename** (string) - Required - Name to use for table, without account code prefix. Must be alpha-numeric. - **fileurl** (string[]) - Required - A comma separated list of file URIs to download. - **authurl** (string) - Optional - For use when authentication is needed before files are downloaded. - **authpostdata** (string) - Optional - For use when authentication is needed before files are downloaded. ### Response #### Success Response (200) - **table** (string) - The full table name (ID) of the newly created table. ### Response Example { "table": "account/table/version" } ``` -------------------------------- ### InvokeAPIRequestPost (C#) Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Performs API requests using HTTP POST, suitable for large data transfers and direct binary file uploads. Returns 'ERROR' on exception. ```csharp string InvokeAPIRequestPost(string actionname, Dictionary paramlist) string InvokeAPIRequestPost(string actionname, Dictionary paramlist, string[] filepaths) ``` -------------------------------- ### GetRemoteAuthToken (C#) Source: https://github.com/maplarge/maplargesdk/blob/master/README.md Retrieves an authentication token for a given username, password, and IP address. This is a common use case for many users. ```csharp string GetRemoteAuthToken(string user, string password, string ipAddress) ``` -------------------------------- ### Java Dry Run Mode for Inspecting URLs Source: https://context7.com/maplarge/maplargesdk/llms.txt Use `NO_WEB_CALLS = true` to prevent actual HTTP calls and examine the constructed URL. Reset the flag to `false` to resume normal operation. ```java MapLargeConnector.NO_WEB_CALLS = true; Map params = new HashMap<>(); params.put("account", "myaccount"); params.put("tablename", "testTable"); params.put("fileurl", "http://localhost/testfile.csv"); String debugOutput = mlconn.InvokeAPIRequest("CreateTableSynchronous", params); System.out.println(debugOutput); MapLargeConnector.NO_WEB_CALLS = false; ```