| GET, POST, DELETE | /{Workspace}/TaskType/{Type} | ||
|---|---|---|---|
| GET | /{Workspace}/TaskType |
export class RequiredAsset
{
public Number: number;
public Type: string;
public constructor(init?: Partial<RequiredAsset>) { (Object as any).assign(this, init); }
}
export class RequiredInventoryType
{
public Number: number;
public Type: string;
public Name: string;
public IsSerialized: boolean;
public Description: string;
public constructor(init?: Partial<RequiredInventoryType>) { (Object as any).assign(this, init); }
}
export class RequiredUser
{
public Number: number;
public SkillTags: string[];
public constructor(init?: Partial<RequiredUser>) { (Object as any).assign(this, init); }
}
export class AutoCreateDocExpression
{
public Document: string;
public Expression: string;
public MultipleCopies: boolean;
public constructor(init?: Partial<AutoCreateDocExpression>) { (Object as any).assign(this, init); }
}
export class TaskType
{
public Workspace: string;
public Type: string;
public Icon: string;
public SkillTags: string[];
public MinTimeToComplete: number;
public AvgTimeToComplete: number;
public MaxTimeToComplete: number;
public Template: string;
public DocFilter: boolean;
public ShowRelatedDocs: boolean;
public AllowedDocTypes: string[];
public DefaultPriority?: number;
public Inactive: boolean;
public AutoCreateDocuments: string[];
public PercentCompleteType: string;
public UseJobTimers: boolean;
public InheritAssetTeams: boolean;
public InheritContactTeams: boolean;
public EditTeams: string[];
public UseRequired: boolean;
public AllowOverride: boolean;
public RequiredAssets: RequiredAsset[];
public RequiredInventoryTypes: RequiredInventoryType[];
public RequiredUsers: RequiredUser[];
public ActiveLaborTypes: { [index: string]: Object; };
public IndividualUserStatuses: boolean;
public LockOption: boolean;
public AutoCreateDocExpressions: AutoCreateDocExpression[];
public PTO: boolean;
public constructor(init?: Partial<TaskType>) { (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>