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

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); }
}

TypeScript AssetType DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<AssetType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Assets">
  <AllowedChildTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AllowedChildTypes>
  <AllowedDocTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AllowedDocTypes>
  <AllowedParentTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AllowedParentTypes>
  <AnnoColor>String</AnnoColor>
  <AnnoFont>String</AnnoFont>
  <Barcode>String</Barcode>
  <Color>String</Color>
  <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:CustomField>
      <d2p1:ControlArgs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d2p1:ControlArgs>
      <d2p1:CustomFieldDataType>Text</d2p1:CustomFieldDataType>
      <d2p1:Default>String</d2p1:Default>
      <d2p1:DefaultAutoUpdate>false</d2p1:DefaultAutoUpdate>
      <d2p1:DisplayOnMap>false</d2p1:DisplayOnMap>
      <d2p1:Hidden xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:Hidden>
      <d2p1:Index>String</d2p1:Index>
      <d2p1:IndexSlot>String</d2p1:IndexSlot>
      <d2p1:IsActive>false</d2p1:IsActive>
      <d2p1:IsHidden>false</d2p1:IsHidden>
      <d2p1:IsMandatory>false</d2p1:IsMandatory>
      <d2p1:IsReadOnly>false</d2p1:IsReadOnly>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Label>String</d2p1:Label>
      <d2p1:Prompt>String</d2p1:Prompt>
      <d2p1:ReadOnly xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:ReadOnly>
      <d2p1:RequiredIf>String</d2p1:RequiredIf>
      <d2p1:Values>String</d2p1:Values>
    </d2p1:CustomField>
  </CustomFields>
  <CustomSymbol xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
  </CustomSymbol>
  <Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Data>
  <DocFilter>false</DocFilter>
  <EditTeams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </EditTeams>
  <Fill>String</Fill>
  <FillOpacity>0</FillOpacity>
  <GeomType>String</GeomType>
  <HideTypeLabel>false</HideTypeLabel>
  <IsActive>false</IsActive>
  <IsMobileAsset>false</IsMobileAsset>
  <IsUnselectable>false</IsUnselectable>
  <IsVehicle>false</IsVehicle>
  <IsWarehouse>false</IsWarehouse>
  <LineThickness>0</LineThickness>
  <Make>String</Make>
  <Manuf>String</Manuf>
  <MaxAnnoVisibility>0</MaxAnnoVisibility>
  <Model>String</Model>
  <Name>String</Name>
  <RoutingLocation>String</RoutingLocation>
  <Scale>0</Scale>
  <ShowAnno>false</ShowAnno>
  <ShowRelatedDocs>false</ShowRelatedDocs>
  <Symbol>String</Symbol>
  <SyncNode>false</SyncNode>
  <TLA>String</TLA>
  <TaskSeriesTemplates xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </TaskSeriesTemplates>
  <TimeSeries>0</TimeSeries>
  <Type>String</Type>
  <UseAddress>false</UseAddress>
  <UseFullScreen>false</UseFullScreen>
  <UseLocationHistory>false</UseLocationHistory>
  <UseTLAOnMap>false</UseTLAOnMap>
  <VisibilityMax>0</VisibilityMax>
  <VisibilityMin>0</VisibilityMin>
  <Workspace>String</Workspace>
</AssetType>