| GET,POST,DELETE | /{Workspace}/AssetType/{Type} | ||
|---|---|---|---|
| GET | /{Workspace}/AssetType |
export enum CustomFieldDataType
{
Text = 'Text',
Number = 'Number',
Decimal = 'Decimal',
Money = 'Money',
PhoneNumber = 'PhoneNumber',
Ssn = 'Ssn',
List = 'List',
Date = 'Date',
File = 'File',
Barcode = 'Barcode',
GPS = 'GPS',
Photo = 'Photo',
Spacer = 'Spacer',
Separator = 'Separator',
AutoNumber = 'AutoNumber',
TextArea = 'TextArea',
Contact = 'Contact',
User = 'User',
Asset = 'Asset',
Checkbox = 'Checkbox',
CoreAssetList = 'CoreAssetList',
CoreTaskList = 'CoreTaskList',
CoreParentTask = 'CoreParentTask',
CoreContactList = 'CoreContactList',
ComboBox = 'ComboBox',
DateTime = 'DateTime',
Time = 'Time',
Location = 'Location',
CoreLocation = 'CoreLocation',
Label = 'Label',
EventLog = 'EventLog',
Address = 'Address',
Catalog = 'Catalog',
CoreTeamList = 'CoreTeamList',
Segment = 'Segment',
CoreTimeSeries = 'CoreTimeSeries',
TimeSeries = 'TimeSeries',
Command = 'Command',
AutoNumberNumeric = 'AutoNumberNumeric',
CatalogList = 'CatalogList',
CatalogComboBox = 'CatalogComboBox',
DateRange = 'DateRange',
DocumentGrid = 'DocumentGrid',
ReportLink = 'ReportLink',
Hyperlink = 'Hyperlink',
PercentComplete = 'PercentComplete',
Chart = 'Chart',
Range = 'Range',
ExternalId = 'ExternalId',
AssetCatalog = 'AssetCatalog',
Inventory = 'Inventory',
CoreTaskLaborItemTypes = 'CoreTaskLaborItemTypes',
CoreTaskLaborItems = 'CoreTaskLaborItems',
ObjectList = 'ObjectList',
CoreTimeZone = 'CoreTimeZone',
}
export class CustomField
{
public Key: string;
public Label: string;
public IsActive: boolean;
public IsReadOnly: boolean;
public IsHidden: boolean;
public IsMandatory: boolean;
public DisplayOnMap: boolean;
public CustomFieldDataType: CustomFieldDataType;
public Values: string;
public Prompt: string;
public Default: string;
public DefaultAutoUpdate: boolean;
public RequiredIf: string;
public Hidden: string[];
public ReadOnly: string[];
public ControlArgs: { [index: string]: Object; };
public IndexSlot: string;
public Index: string;
public constructor(init?: Partial<CustomField>) { (Object as any).assign(this, init); }
}
/** @description Represents a single asset type. */
export class AssetType
{
public Workspace: string;
public Type: string;
public IsActive: boolean;
public Name: string;
public Make: string;
public Model: string;
public Manuf: string;
public Barcode: string;
public Symbol: string;
public Color: string;
public LineThickness: number;
public Scale: number;
public VisibilityMin: number;
public VisibilityMax: number;
public SyncNode: boolean;
public CustomFields: CustomField[];
public AllowedParentTypes: string[];
public AllowedChildTypes: string[];
public UseLocationHistory: boolean;
public IsMobileAsset: boolean;
public Data: { [index: string]: string; };
public GeomType: string;
public DocFilter: boolean;
public ShowRelatedDocs: boolean;
public AllowedDocTypes: string[];
public TLA: string;
public UseTLAOnMap: boolean;
public RoutingLocation: string;
public Fill: string;
public FillOpacity: number;
public ShowAnno: boolean;
public AnnoColor: string;
public MaxAnnoVisibility: number;
public AnnoFont: string;
public HideTypeLabel: boolean;
public UseAddress: boolean;
public UseFullScreen: boolean;
public TimeSeries: number;
public IsUnselectable: boolean;
public EditTeams: string[];
public IsWarehouse: boolean;
public IsVehicle: boolean;
public CustomSymbol: { [index: string]: Object; };
public TaskSeriesTemplates: string[];
public constructor(init?: Partial<AssetType>) { (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
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"]}