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
namespace Field2Office.API.Model.Assets

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type CustomFieldDataType =
        | Text = 0
        | Number = 1
        | Decimal = 2
        | Money = 3
        | PhoneNumber = 4
        | Ssn = 5
        | List = 6
        | Date = 7
        | File = 8
        | Barcode = 9
        | GPS = 10
        | Photo = 11
        | Spacer = 12
        | Separator = 13
        | AutoNumber = 14
        | TextArea = 15
        | Contact = 16
        | User = 17
        | Asset = 18
        | Checkbox = 19
        | CoreAssetList = 20
        | CoreTaskList = 21
        | CoreParentTask = 22
        | CoreContactList = 23
        | ComboBox = 24
        | DateTime = 25
        | Time = 26
        | Location = 27
        | CoreLocation = 28
        | Label = 29
        | EventLog = 30
        | Address = 31
        | Catalog = 32
        | CoreTeamList = 33
        | Segment = 34
        | CoreTimeSeries = 35
        | TimeSeries = 36
        | Command = 37
        | AutoNumberNumeric = 38
        | CatalogList = 39
        | CatalogComboBox = 40
        | DateRange = 41
        | DocumentGrid = 42
        | ReportLink = 43
        | Hyperlink = 44
        | PercentComplete = 45
        | Chart = 46
        | Range = 47
        | ExternalId = 48
        | AssetCatalog = 49
        | Inventory = 50
        | CoreTaskLaborItemTypes = 51
        | CoreTaskLaborItems = 52
        | ObjectList = 53
        | CoreTimeZone = 54

    [<AllowNullLiteral>]
    type CustomField() = 
        member val Key:String = null with get,set
        member val Label:String = null with get,set
        member val IsActive:Boolean = new Boolean() with get,set
        member val IsReadOnly:Boolean = new Boolean() with get,set
        member val IsHidden:Boolean = new Boolean() with get,set
        member val IsMandatory:Boolean = new Boolean() with get,set
        member val DisplayOnMap:Boolean = new Boolean() with get,set
        member val CustomFieldDataType:CustomFieldDataType = new CustomFieldDataType() with get,set
        member val Values:String = null with get,set
        member val Prompt:String = null with get,set
        member val Default:String = null with get,set
        member val DefaultAutoUpdate:Boolean = new Boolean() with get,set
        member val RequiredIf:String = null with get,set
        member val Hidden:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val ReadOnly:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val ControlArgs:Dictionary<String, Object> = new Dictionary<String, Object>() with get,set
        member val IndexSlot:String = null with get,set
        member val Index:String = null with get,set

    ///<summary>
    ///Represents a single asset type.
    ///</summary>
    [<AllowNullLiteral>]
    type AssetType() = 
        member val Workspace:String = null with get,set
        member val Type:String = null with get,set
        member val IsActive:Boolean = new Boolean() with get,set
        member val Name:String = null with get,set
        member val Make:String = null with get,set
        member val Model:String = null with get,set
        member val Manuf:String = null with get,set
        member val Barcode:String = null with get,set
        member val Symbol:String = null with get,set
        member val Color:String = null with get,set
        member val LineThickness:Double = new Double() with get,set
        member val Scale:Double = new Double() with get,set
        member val VisibilityMin:Double = new Double() with get,set
        member val VisibilityMax:Double = new Double() with get,set
        member val SyncNode:Boolean = new Boolean() with get,set
        member val CustomFields:ResizeArray<CustomField> = new ResizeArray<CustomField>() with get,set
        member val AllowedParentTypes:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val AllowedChildTypes:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val UseLocationHistory:Boolean = new Boolean() with get,set
        member val IsMobileAsset:Boolean = new Boolean() with get,set
        member val Data:Dictionary<String, String> = new Dictionary<String, String>() with get,set
        member val GeomType:String = null with get,set
        member val DocFilter:Boolean = new Boolean() with get,set
        member val ShowRelatedDocs:Boolean = new Boolean() with get,set
        member val AllowedDocTypes:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val TLA:String = null with get,set
        member val UseTLAOnMap:Boolean = new Boolean() with get,set
        member val RoutingLocation:String = null with get,set
        member val Fill:String = null with get,set
        member val FillOpacity:Double = new Double() with get,set
        member val ShowAnno:Boolean = new Boolean() with get,set
        member val AnnoColor:String = null with get,set
        member val MaxAnnoVisibility:Double = new Double() with get,set
        member val AnnoFont:String = null with get,set
        member val HideTypeLabel:Boolean = new Boolean() with get,set
        member val UseAddress:Boolean = new Boolean() with get,set
        member val UseFullScreen:Boolean = new Boolean() with get,set
        member val TimeSeries:Int32 = new Int32() with get,set
        member val IsUnselectable:Boolean = new Boolean() with get,set
        member val EditTeams:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val IsWarehouse:Boolean = new Boolean() with get,set
        member val IsVehicle:Boolean = new Boolean() with get,set
        member val CustomSymbol:Dictionary<String, Object> = new Dictionary<String, Object>() with get,set
        member val TaskSeriesTemplates:ResizeArray<String> = new ResizeArray<String>() with get,set

F# 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>