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
import java.math.*
import java.util.*
import net.servicestack.client.*


/**
* Represents a single asset type.
*/
open class AssetType
{
    var Workspace:String? = null
    var Type:String? = null
    var IsActive:Boolean? = null
    var Name:String? = null
    var Make:String? = null
    var Model:String? = null
    var Manuf:String? = null
    var Barcode:String? = null
    var Symbol:String? = null
    var Color:String? = null
    var LineThickness:Double? = null
    var Scale:Double? = null
    var VisibilityMin:Double? = null
    var VisibilityMax:Double? = null
    var SyncNode:Boolean? = null
    var CustomFields:ArrayList<CustomField> = ArrayList<CustomField>()
    var AllowedParentTypes:ArrayList<String> = ArrayList<String>()
    var AllowedChildTypes:ArrayList<String> = ArrayList<String>()
    var UseLocationHistory:Boolean? = null
    var IsMobileAsset:Boolean? = null
    var Data:HashMap<String,String> = HashMap<String,String>()
    var GeomType:String? = null
    var DocFilter:Boolean? = null
    var ShowRelatedDocs:Boolean? = null
    var AllowedDocTypes:ArrayList<String> = ArrayList<String>()
    var TLA:String? = null
    var UseTLAOnMap:Boolean? = null
    var RoutingLocation:String? = null
    var Fill:String? = null
    var FillOpacity:Double? = null
    var ShowAnno:Boolean? = null
    var AnnoColor:String? = null
    var MaxAnnoVisibility:Double? = null
    var AnnoFont:String? = null
    var HideTypeLabel:Boolean? = null
    var UseAddress:Boolean? = null
    var UseFullScreen:Boolean? = null
    var TimeSeries:Int? = null
    var IsUnselectable:Boolean? = null
    var EditTeams:ArrayList<String> = ArrayList<String>()
    var IsWarehouse:Boolean? = null
    var IsVehicle:Boolean? = null
    var CustomSymbol:HashMap<String,Object> = HashMap<String,Object>()
    var TaskSeriesTemplates:ArrayList<String> = ArrayList<String>()
}

open class CustomField
{
    var Key:String? = null
    var Label:String? = null
    var IsActive:Boolean? = null
    var IsReadOnly:Boolean? = null
    var IsHidden:Boolean? = null
    var IsMandatory:Boolean? = null
    var DisplayOnMap:Boolean? = null
    var CustomFieldDataType:CustomFieldDataType? = null
    var Values:String? = null
    var Prompt:String? = null
    var Default:String? = null
    var DefaultAutoUpdate:Boolean? = null
    var RequiredIf:String? = null
    var Hidden:ArrayList<String> = ArrayList<String>()
    var ReadOnly:ArrayList<String> = ArrayList<String>()
    var ControlArgs:HashMap<String,Object> = HashMap<String,Object>()
    var IndexSlot:String? = null
    var Index:String? = null
}

enum class 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,
}

Kotlin 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
	]
}