Field Squared API Services

<back to all web services

TaskType

The following routes are available for this service:
GET, POST, DELETE/{Workspace}/TaskType/{Type}
GET/{Workspace}/TaskType
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Field2Office.API.Model.Tasks
Imports Field2Office.DomainObjects.Model

Namespace Global

    Namespace Field2Office.API.Model.Tasks

        Public Partial Class TaskType
            Public Sub New()
                SkillTags = New List(Of String)
                AllowedDocTypes = New List(Of String)
                AutoCreateDocuments = New List(Of String)
                EditTeams = New List(Of String)
                RequiredAssets = New List(Of RequiredAsset)
                RequiredInventoryTypes = New List(Of RequiredInventoryType)
                RequiredUsers = New List(Of RequiredUser)
                ActiveLaborTypes = New Dictionary(Of String, Object)
                AutoCreateDocExpressions = New List(Of AutoCreateDocExpression)
            End Sub

            Public Overridable Property Workspace As String
            Public Overridable Property Type As String
            Public Overridable Property Icon As String
            Public Overridable Property SkillTags As List(Of String)
            Public Overridable Property MinTimeToComplete As Double
            Public Overridable Property AvgTimeToComplete As Double
            Public Overridable Property MaxTimeToComplete As Double
            Public Overridable Property Template As String
            Public Overridable Property DocFilter As Boolean
            Public Overridable Property ShowRelatedDocs As Boolean
            Public Overridable Property AllowedDocTypes As List(Of String)
            Public Overridable Property DefaultPriority As Nullable(Of Integer)
            Public Overridable Property Inactive As Boolean
            Public Overridable Property AutoCreateDocuments As List(Of String)
            Public Overridable Property PercentCompleteType As String
            Public Overridable Property UseJobTimers As Boolean
            Public Overridable Property InheritAssetTeams As Boolean
            Public Overridable Property InheritContactTeams As Boolean
            Public Overridable Property EditTeams As List(Of String)
            Public Overridable Property UseRequired As Boolean
            Public Overridable Property AllowOverride As Boolean
            Public Overridable Property RequiredAssets As List(Of RequiredAsset)
            Public Overridable Property RequiredInventoryTypes As List(Of RequiredInventoryType)
            Public Overridable Property RequiredUsers As List(Of RequiredUser)
            Public Overridable Property ActiveLaborTypes As Dictionary(Of String, Object)
            Public Overridable Property IndividualUserStatuses As Boolean
            Public Overridable Property LockOption As Boolean
            Public Overridable Property AutoCreateDocExpressions As List(Of AutoCreateDocExpression)
            Public Overridable Property PTO As Boolean
        End Class
    End Namespace

    Namespace Field2Office.DomainObjects.Model

        Public Partial Class AutoCreateDocExpression
            Public Overridable Property Document As String
            Public Overridable Property Expression As String
            Public Overridable Property MultipleCopies As Boolean
        End Class

        Public Partial Class RequiredAsset
            Public Overridable Property Number As Integer
            Public Overridable Property Type As String
        End Class

        Public Partial Class RequiredInventoryType
            Public Overridable Property Number As Integer
            Public Overridable Property Type As String
            Public Overridable Property Name As String
            Public Overridable Property IsSerialized As Boolean
            Public Overridable Property Description As String
        End Class

        Public Partial Class RequiredUser
            Public Sub New()
                SkillTags = New List(Of String)
            End Sub

            Public Overridable Property Number As Integer
            Public Overridable Property SkillTags As List(Of String)
        End Class
    End Namespace
End Namespace

VB.NET TaskType 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}/TaskType/{Type} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<TaskType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Tasks">
  <ActiveLaborTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
  </ActiveLaborTypes>
  <AllowOverride>false</AllowOverride>
  <AllowedDocTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AllowedDocTypes>
  <AutoCreateDocExpressions xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:AutoCreateDocExpression>
      <d2p1:Document>String</d2p1:Document>
      <d2p1:Expression>String</d2p1:Expression>
      <d2p1:MultipleCopies>false</d2p1:MultipleCopies>
    </d2p1:AutoCreateDocExpression>
  </AutoCreateDocExpressions>
  <AutoCreateDocuments xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AutoCreateDocuments>
  <AvgTimeToComplete>0</AvgTimeToComplete>
  <DefaultPriority>0</DefaultPriority>
  <DocFilter>false</DocFilter>
  <EditTeams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </EditTeams>
  <Icon>String</Icon>
  <Inactive>false</Inactive>
  <IndividualUserStatuses>false</IndividualUserStatuses>
  <InheritAssetTeams>false</InheritAssetTeams>
  <InheritContactTeams>false</InheritContactTeams>
  <LockOption>false</LockOption>
  <MaxTimeToComplete>0</MaxTimeToComplete>
  <MinTimeToComplete>0</MinTimeToComplete>
  <PTO>false</PTO>
  <PercentCompleteType>String</PercentCompleteType>
  <RequiredAssets xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:RequiredAsset>
      <d2p1:Number>0</d2p1:Number>
      <d2p1:Type>String</d2p1:Type>
    </d2p1:RequiredAsset>
  </RequiredAssets>
  <RequiredInventoryTypes xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:RequiredInventoryType>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:IsSerialized>false</d2p1:IsSerialized>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Number>0</d2p1:Number>
      <d2p1:Type>String</d2p1:Type>
    </d2p1:RequiredInventoryType>
  </RequiredInventoryTypes>
  <RequiredUsers xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:RequiredUser>
      <d2p1:Number>0</d2p1:Number>
      <d2p1:SkillTags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:SkillTags>
    </d2p1:RequiredUser>
  </RequiredUsers>
  <ShowRelatedDocs>false</ShowRelatedDocs>
  <SkillTags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </SkillTags>
  <Template>String</Template>
  <Type>String</Type>
  <UseJobTimers>false</UseJobTimers>
  <UseRequired>false</UseRequired>
  <Workspace>String</Workspace>
</TaskType>