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
System.NotSupportedException: Unknown language 'mjs', Supported languages: csharp, typescript, dart, java, kotlin, python, swift, vbnet, fsharp
   at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(MetadataTypes metadataTypes, MetadataTypesConfig typesConfig, String lang, IRequest req, Action`1 configure) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/NativeTypes/ILangGenerator.cs:line 53
   at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(List`1 metadataTypes, String lang, IRequest req, Action`1 configure) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/NativeTypes/ILangGenerator.cs:line 26
   at ServiceStack.Metadata.BaseMetadataHandler.d__12.MoveNext() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/Metadata/BaseMetadataHandler.cs:line 207

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