Field Squared API Services

<back to all web services

AssetType

Represents a single asset type
.

The following routes are available for this service:
GET,POST,DELETE/{Workspace}/AssetType/{Type}
GET/{Workspace}/AssetType
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Field2Office.API.Model.Assets
Imports Field2Office.API.Model.Workspaces
Imports Field2Office.DomainObjects

Namespace Global

    Namespace Field2Office.API.Model.Assets

        '''<Summary>
        '''Represents a single asset type.
        '''</Summary>
        Public Partial Class AssetType
            Public Sub New()
                CustomFields = New List(Of CustomField)
                AllowedParentTypes = New List(Of String)
                AllowedChildTypes = New List(Of String)
                Data = New Dictionary(Of String, String)
                AllowedDocTypes = New List(Of String)
                EditTeams = New List(Of String)
                CustomSymbol = New Dictionary(Of String, Object)
                TaskSeriesTemplates = New List(Of String)
            End Sub

            Public Overridable Property Workspace As String
            Public Overridable Property Type As String
            Public Overridable Property IsActive As Boolean
            Public Overridable Property Name As String
            Public Overridable Property Make As String
            Public Overridable Property Model As String
            Public Overridable Property Manuf As String
            Public Overridable Property Barcode As String
            Public Overridable Property Symbol As String
            Public Overridable Property Color As String
            Public Overridable Property LineThickness As Double
            Public Overridable Property Scale As Double
            Public Overridable Property VisibilityMin As Double
            Public Overridable Property VisibilityMax As Double
            Public Overridable Property SyncNode As Boolean
            Public Overridable Property CustomFields As List(Of CustomField)
            Public Overridable Property AllowedParentTypes As List(Of String)
            Public Overridable Property AllowedChildTypes As List(Of String)
            Public Overridable Property UseLocationHistory As Boolean
            Public Overridable Property IsMobileAsset As Boolean
            Public Overridable Property Data As Dictionary(Of String, String)
            Public Overridable Property GeomType As String
            Public Overridable Property DocFilter As Boolean
            Public Overridable Property ShowRelatedDocs As Boolean
            Public Overridable Property AllowedDocTypes As List(Of String)
            Public Overridable Property TLA As String
            Public Overridable Property UseTLAOnMap As Boolean
            Public Overridable Property RoutingLocation As String
            Public Overridable Property Fill As String
            Public Overridable Property FillOpacity As Double
            Public Overridable Property ShowAnno As Boolean
            Public Overridable Property AnnoColor As String
            Public Overridable Property MaxAnnoVisibility As Double
            Public Overridable Property AnnoFont As String
            Public Overridable Property HideTypeLabel As Boolean
            Public Overridable Property UseAddress As Boolean
            Public Overridable Property UseFullScreen As Boolean
            Public Overridable Property TimeSeries As Integer
            Public Overridable Property IsUnselectable As Boolean
            Public Overridable Property EditTeams As List(Of String)
            Public Overridable Property IsWarehouse As Boolean
            Public Overridable Property IsVehicle As Boolean
            Public Overridable Property CustomSymbol As Dictionary(Of String, Object)
            Public Overridable Property TaskSeriesTemplates As List(Of String)
        End Class
    End Namespace

    Namespace Field2Office.API.Model.Workspaces

        Public Partial Class CustomField
            Public Sub New()
                Hidden = New List(Of String)
                ReadOnly = New List(Of String)
                ControlArgs = New Dictionary(Of String, Object)
            End Sub

            Public Overridable Property Key As String
            Public Overridable Property Label As String
            Public Overridable Property IsActive As Boolean
            Public Overridable Property IsReadOnly As Boolean
            Public Overridable Property IsHidden As Boolean
            Public Overridable Property IsMandatory As Boolean
            Public Overridable Property DisplayOnMap As Boolean
            Public Overridable Property CustomFieldDataType As CustomFieldDataType
            Public Overridable Property Values As String
            Public Overridable Property Prompt As String
            Public Overridable Property [Default] As String
            Public Overridable Property DefaultAutoUpdate As Boolean
            Public Overridable Property RequiredIf As String
            Public Overridable Property Hidden As List(Of String)
            Public Overridable Property ReadOnly As List(Of String)
            Public Overridable Property ControlArgs As Dictionary(Of String, Object)
            Public Overridable Property IndexSlot As String
            Public Overridable Property Index As String
        End Class
    End Namespace

    Namespace Field2Office.DomainObjects

        Public Enum CustomFieldDataType
            Text
            Number
            [Decimal]
            Money
            PhoneNumber
            Ssn
            List
            [Date]
            File
            Barcode
            GPS
            Photo
            Spacer
            Separator
            AutoNumber
            TextArea
            Contact
            User
            Asset
            Checkbox
            CoreAssetList
            CoreTaskList
            CoreParentTask
            CoreContactList
            ComboBox
            DateTime
            Time
            Location
            CoreLocation
            Label
            EventLog
            Address
            Catalog
            CoreTeamList
            Segment
            CoreTimeSeries
            TimeSeries
            Command
            AutoNumberNumeric
            CatalogList
            CatalogComboBox
            DateRange
            DocumentGrid
            ReportLink
            Hyperlink
            PercentComplete
            Chart
            Range
            ExternalId
            AssetCatalog
            Inventory
            CoreTaskLaborItemTypes
            CoreTaskLaborItems
            ObjectList
            CoreTimeZone
        End Enum
    End Namespace
End Namespace

VB.NET AssetType 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}/AssetType/{Type} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Workspace: String,
	Type: String,
	IsActive: False,
	Name: String,
	Make: String,
	Model: String,
	Manuf: String,
	Barcode: String,
	Symbol: String,
	Color: String,
	LineThickness: 0,
	Scale: 0,
	VisibilityMin: 0,
	VisibilityMax: 0,
	SyncNode: False,
	CustomFields: 
	[
		{
			Key: String,
			Label: String,
			IsActive: False,
			IsReadOnly: False,
			IsHidden: False,
			IsMandatory: False,
			DisplayOnMap: False,
			CustomFieldDataType: Text,
			Values: String,
			Prompt: String,
			Default: String,
			DefaultAutoUpdate: False,
			RequiredIf: String,
			Hidden: 
			[
				String
			],
			ReadOnly: 
			[
				String
			],
			ControlArgs: 
			{
				String: String
			},
			UseArrayMergeType: Set,
			IndexSlot: String,
			Index: String
		}
	],
	AllowedParentTypes: 
	[
		String
	],
	AllowedChildTypes: 
	[
		String
	],
	UseLocationHistory: False,
	IsMobileAsset: False,
	Data: 
	{
		String: String
	},
	GeomType: String,
	DocFilter: False,
	ShowRelatedDocs: False,
	AllowedDocTypes: 
	[
		String
	],
	TLA: String,
	UseTLAOnMap: False,
	RoutingLocation: String,
	Fill: String,
	FillOpacity: 0,
	ShowAnno: False,
	AnnoColor: String,
	MaxAnnoVisibility: 0,
	AnnoFont: String,
	HideTypeLabel: False,
	UseAddress: False,
	UseFullScreen: False,
	TimeSeries: 0,
	IsUnselectable: False,
	EditTeams: 
	[
		String
	],
	IsWarehouse: False,
	IsVehicle: False,
	CustomSymbol: 
	{
		String: {}
	},
	TaskSeriesTemplates: 
	[
		String
	]
}