Field Squared API Services

<back to all web services

TaskSeries

Contains the data for a task series object

The following routes are available for this service:
GET,PUT,POST,DELETE/{Workspace}/TaskSeries/{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 TaskSeries:
    """
    Contains the data for a task series 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
    task_name: Optional[str] = None
    task_type: Optional[str] = None
    users: Optional[List[str]] = None
    teams: Optional[List[str]] = None
    series_start_date: Optional[str] = None
    series_end_date: Optional[str] = None
    last_task_end_date: Optional[str] = None
    parent_asset: Optional[str] = None
    repeat_frequency: Optional[str] = None
    repeat_interval: int = 0
    schedule_defs: Optional[List[SeriesSchedule]] = None
    template_id: Optional[str] = None

Python TaskSeries DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Workspace}/TaskSeries/{ObjectId} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Workspace: String,
	AssignedWorkspace: String,
	ObjectId: String,
	VersionId: String,
	ExternalId: String,
	BasedOn: String,
	Created: String,
	CreatedBy: String,
	LastUpdated: String,
	LastUpdatedLocal: String,
	TaskName: String,
	TaskType: String,
	Users: 
	[
		String
	],
	Teams: 
	[
		String
	],
	SeriesStartDate: String,
	SeriesEndDate: String,
	LastTaskEndDate: String,
	ParentAsset: String,
	RepeatFrequency: String,
	RepeatInterval: 0,
	ScheduleDefs: 
	[
		{
			Day: 0,
			Start: 0,
			End: 0,
			AllDay: False,
			Duration: 0
		}
	],
	TemplateId: String
}