Creating a New Table using Synchronous

Tables can be created from a server to server API call based on the file URL. The file location must be accessible by an HTTP request. Using synchronous will keep the request to the API open while the table datafiles are downloaded and imported. The response will be returned when the table has finished uploading.

Tables and table columns can be appended to an existing table. If a table is uploaded with the same name as an existing table in the account, a new version of the table will be created and be set as the default table.

GET/Remote/CreateTableSynchronous

REQUEST PARAMETERS

ParameterDescriptionTypeRequired
mluser string Username - always in email form.
mltoken -or- mlpass string MapLarge generated auth token -or- the password for the mluser account.
account string Account that will have ownership of the table. See “ListAccounts” to find account details.
tableName alpha-numeric
string
Name of the new table. If a table with the same name already exists, a new table version will be created. At a minimum, MapLarge will keep the three most recent versions of the table.
fileUrl string[] A comma separated list of file URLs to be downloaded. Must be accessible by an HTTP request.
authUrl string For use when authentication is needed before files are downloaded.
authPostData string Data that will be sent with the authentication request.
append boolean Data will be appended to the specified table.
primaryKeyColumn string A column name used when performing appends to identify unique records.
visibility string Public, Private, or PublicUnlisted. Visibility values are case-sensitive. See Table Visibility for more details

EXAMPLE REQUEST

https://my.maplarge.com/Remote/CreateTableSynchronous?mluser=user@domain.com&mltoken=token&account=test&tablename=testtableA5345&fileurl=http://domain.com/somedata.csv&authurl=https://yourdomain.com?yourparams&authpostdata=your_encoded_params&append=true

*Either a token or password can be used in any request where authentication is required.

RETURNS

{
    "id": "65325aca704a4aef833eb15f5a75e83a",
    "hash": null,
    "success": true,
    "isCached": false,
    "authorized": true,
    "errors": [],
    "timestamp": 1420568662,
    "data": null,
    "tables": [
        {
            "id": "test/testtableA5345/635561654609964665",
            "acctcode": "test",
            "name": "testtableA5345",
            "version": 635561654609964700,
            "longTableId": "test/testtableA5345/635561654609964665",
            "description": null,
            "created": "1/6/2015 6:24:20 PM",
            "visibility": "Private",
            "isactive": true,
            "inram": false,
            "columns": [
                {
                    "id": "test/testtableA5345/635561654609964665/testtableA5345",
                    "type": "Poly",
                    "created": "1/6/2015 6:24:21 PM"
                },
                {
                    "id": "test/testtableA5345/635561654609964665/CENTROIDLAT",
                    "type": "Double",
                    "created": "1/6/2015 6:24:21 PM"
                },
                {
                    "id": "test/testtableA5345/635561654609964665/CENTROIDLNG",
                    "type": "Double",
                    "created": "1/6/2015 6:24:21 PM"
                },
                {
                    "id": "test/testtableA5345/635561654609964665/year",
                    "type": "Int32",
                    "created": "1/6/2015 6:24:21 PM"
                }
            ]
        }
    ]
} 

ACTION SPECIFIC RESPONSE PARAMETERS

ParameterDescriptionType
Tables[].id string Long table name of the newly created table: account/tablename/version
Tables[].acctcode string Account
Tables[].name string Table name
Tables[].version long Table version
Tables[].longTableId string Long table name of the newly created table: account/tablename/version
Tables[].description string Table description
Tables[].created datetime Date and time table was created
Tables[].visibility string Visibility of table. Values: Public, PublicUnlisted, Private
Table[].inram boolean Database currently in RAM: true or false
Table[].Columns[] JSON List of Columns and Meta Data
Columns[].id string Long Column Name: account/tablename/version/columnname
Columns[].type string Data type of column
Columns[].created datetime Date and time column was created
Note: This is a synchronous operation. The request to the API will remain open while the table data files are downloaded and imported.