<back to all web services

ManageScheduleTask

The following routes are available for this service:
PUT/RestApi/sitefinity/scheduling/scheduled-tasks
import 'package:servicestack/servicestack.dart';

enum SchedulingTaskCommand
{
    Restart,
    Stop,
    Resume,
    Delete,
    Start,
}

class ManageScheduleTask implements IConvertible
{
    String? TaskId;
    SchedulingTaskCommand? Operation;
    String? Hash;

    ManageScheduleTask({this.TaskId,this.Operation,this.Hash});
    ManageScheduleTask.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TaskId = json['TaskId'];
        Operation = JsonConverters.fromJson(json['Operation'],'SchedulingTaskCommand',context!);
        Hash = json['Hash'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TaskId': TaskId,
        'Operation': JsonConverters.toJson(Operation,'SchedulingTaskCommand',context!),
        'Hash': Hash
    };

    getTypeName() => "ManageScheduleTask";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'SchedulingTaskCommand': TypeInfo(TypeOf.Enum, enumValues:SchedulingTaskCommand.values),
    'ManageScheduleTask': TypeInfo(TypeOf.Class, create:() => ManageScheduleTask()),
});

Dart ManageScheduleTask 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.

PUT /RestApi/sitefinity/scheduling/scheduled-tasks HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	TaskId: String,
	Operation: Restart,
	Hash: String
}