| POST | /{Workspace}/ScheduleRequestList |
|---|
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 Schedule:
workspace: Optional[str] = None
object_id: Optional[str] = None
version_id: Optional[str] = None
based_on: Optional[str] = None
start: Optional[str] = None
end: Optional[str] = None
time_zone: Optional[str] = None
users: Optional[List[str]] = None
teams: Optional[List[str]] = None
data: Optional[Dict[str, Object]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduleRequest:
workspace: Optional[str] = None
object_id: Optional[str] = None
version_id: Optional[str] = None
users: Optional[List[str]] = None
teams: Optional[List[str]] = None
unassign_users: bool = False
unassign_teams: bool = False
unschedule: bool = False
delete_task: bool = False
status: Optional[str] = None
type: Optional[str] = None
task_type: Optional[str] = None
due_date: Optional[str] = None
set_priority: bool = False
priority: int = 0
schedules: Optional[List[Schedule]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduleRequestList:
"""
Set schedules for multiple tasks in a single operation.
"""
workspace: Optional[str] = None
schedule_requests: Optional[List[ScheduleRequest]] = None
Python ScheduleRequestList DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/ScheduleRequestList HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Workspace: String,
ScheduleRequests:
[
{
Workspace: String,
ObjectId: String,
VersionId: String,
Users:
[
String
],
Teams:
[
String
],
UnassignUsers: False,
UnassignTeams: False,
Unschedule: False,
DeleteTask: False,
Status: String,
Type: String,
TaskType: String,
DueDate: String,
SetPriority: False,
Priority: 0,
Schedules:
[
{
Workspace: String,
ObjectId: String,
VersionId: String,
BasedOn: String,
Start: String,
End: String,
TimeZone: String,
Users:
[
String
],
Teams:
[
String
],
Data:
{
String: {}
}
}
]
}
]
}