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

export class MetadataItem
{
    public Name: string;
    public Datatype: string;
    public Length: string;
    public Label: string;

    public constructor(init?: Partial<MetadataItem>) { (Object as any).assign(this, init); }
}

export class IntegrationDataTable
{
    public Name: string;
    public Columns: MetadataItem[];
    public Rows: string[][];

    public constructor(init?: Partial<IntegrationDataTable>) { (Object as any).assign(this, init); }
}

/** @description Generates the database DDL for a given integration data table.  Database types supported: SQLServer */
export class IntegrationDataTableDDL
{
    public Workspace: string;
    public DatabaseType: string;
    public DataTable: IntegrationDataTable;
    public DDL: string;

    public constructor(init?: Partial<IntegrationDataTableDDL>) { (Object as any).assign(this, init); }
}

TypeScript IntegrationDataTableDDL DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

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