Field Squared API Services

<back to all web services

IntegrationDataTableDDL

Generates the database DDL for a given integration data table. Database types supported: SQLServer

The following routes are available for this service:
POST/{Workspace}/IntegrationDataTableDDL
import java.math.*
import java.util.*
import net.servicestack.client.*


/**
* Generates the database DDL for a given integration data table.  Database types supported: SQLServer
*/
open class IntegrationDataTableDDL
{
    var Workspace:String? = null
    var DatabaseType:String? = null
    var DataTable:IntegrationDataTable? = null
    var DDL:String? = null
}

open class IntegrationDataTable
{
    var Name:String? = null
    var Columns:ArrayList<MetadataItem> = ArrayList<MetadataItem>()
    var Rows:ArrayList<ArrayList<String>> = ArrayList<ArrayList<String>>()
}

open class MetadataItem
{
    var Name:String? = null
    var Datatype:String? = null
    var Length:String? = null
    var Label:String? = null
}

Kotlin IntegrationDataTableDDL DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Workspace}/IntegrationDataTableDDL HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Workspace":"String","DatabaseType":"String","DataTable":{"Name":"String","Columns":[{"Name":"String","Datatype":"String","Length":"String"}],"Rows":[["String"]]},"DDL":"String"}