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
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Field2Office.API.Model.Integration
Imports Field2Office.DomainObjects.Model

Namespace Global

    Namespace Field2Office.API.Model.Integration

        '''<Summary>
        '''Generates the database DDL for a given integration data table.  Database types supported: SQLServer
        '''</Summary>
        Public Partial Class IntegrationDataTableDDL
            Public Overridable Property Workspace As String
            Public Overridable Property DatabaseType As String
            Public Overridable Property DataTable As IntegrationDataTable
            Public Overridable Property DDL As String
        End Class

        Public Partial Class MetadataItem
            Public Overridable Property Name As String
            Public Overridable Property Datatype As String
            Public Overridable Property Length As String
            Public Overridable Property Label As String
        End Class
    End Namespace

    Namespace Field2Office.DomainObjects.Model

        Public Partial Class IntegrationDataTable
            Public Sub New()
                Columns = New List(Of MetadataItem)
                Rows = New List(Of List(Of String))
            End Sub

            Public Overridable Property Name As String
            Public Overridable Property Columns As List(Of MetadataItem)
            Public Overridable Property Rows As List(Of List(Of String))
        End Class
    End Namespace
End Namespace

VB.NET 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
}