Field Squared API Services

<back to all web services

TaskSeriesTemplate

Contains the data for a task series template object

The following routes are available for this service:
GET,PUT,POST/{Workspace}/TaskSeriesTemplate
GET,PUT,POST,DELETE/{Workspace}/TaskSeriesTemplate/{ObjectId}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SeriesSchedule:
    day: int = 0
    start: int = 0
    end: int = 0
    all_day: bool = False
    duration: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TaskSeriesTemplate:
    """
    Contains the data for a task series template object
    """

    workspace: Optional[str] = None
    assigned_workspace: Optional[str] = None
    object_id: Optional[str] = None
    version_id: Optional[str] = None
    external_id: Optional[str] = None
    based_on: Optional[str] = None
    created: Optional[str] = None
    created_by: Optional[str] = None
    last_updated: Optional[str] = None
    last_updated_local: Optional[str] = None
    template_name: Optional[str] = None
    task_name: Optional[str] = None
    task_type: Optional[str] = None
    parent_asset: Optional[str] = None
    parent_template: Optional[str] = None
    series_start_date: Optional[str] = None
    series_end_date: Optional[str] = None
    due_date: Optional[str] = None
    create_frequency: Optional[str] = None
    repeat_frequency: Optional[str] = None
    repeat_interval: int = 0
    schedule_defs: Optional[List[SeriesSchedule]] = None
    create_on_asset: bool = False
    create_on_children: bool = False
    batch_create: bool = False
    future_batch: int = 0
    create_schedule: bool = False
    set_due_date: bool = False
    is_root_template: bool = False
    users: Optional[List[str]] = None
    teams: Optional[List[str]] = None
    data: Optional[str] = None
    data_tree: Optional[Dict[str, Object]] = None

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

<TaskSeriesTemplate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Tasks">
  <AssignedWorkspace>String</AssignedWorkspace>
  <BasedOn>String</BasedOn>
  <BatchCreate>false</BatchCreate>
  <CreateFrequency>String</CreateFrequency>
  <CreateOnAsset>false</CreateOnAsset>
  <CreateOnChildren>false</CreateOnChildren>
  <CreateSchedule>false</CreateSchedule>
  <Created>String</Created>
  <CreatedBy>String</CreatedBy>
  <Data>String</Data>
  <DataTree xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
  </DataTree>
  <DueDate>String</DueDate>
  <ExternalId>String</ExternalId>
  <FutureBatch>0</FutureBatch>
  <IsRootTemplate>false</IsRootTemplate>
  <LastUpdated>String</LastUpdated>
  <LastUpdatedLocal>String</LastUpdatedLocal>
  <ObjectId>String</ObjectId>
  <ParentAsset>String</ParentAsset>
  <ParentTemplate>String</ParentTemplate>
  <RepeatFrequency>String</RepeatFrequency>
  <RepeatInterval>0</RepeatInterval>
  <ScheduleDefs xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
    <d2p1:SeriesSchedule>
      <d2p1:AllDay>false</d2p1:AllDay>
      <d2p1:Day>0</d2p1:Day>
      <d2p1:Duration>0</d2p1:Duration>
      <d2p1:End>0</d2p1:End>
      <d2p1:Start>0</d2p1:Start>
    </d2p1:SeriesSchedule>
  </ScheduleDefs>
  <SeriesEndDate>String</SeriesEndDate>
  <SeriesStartDate>String</SeriesStartDate>
  <SetDueDate>false</SetDueDate>
  <TaskName>String</TaskName>
  <TaskType>String</TaskType>
  <Teams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Teams>
  <TemplateName>String</TemplateName>
  <Users xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Users>
  <VersionId>String</VersionId>
  <Workspace>String</Workspace>
</TaskSeriesTemplate>