<back to all web services

GetScheduledTasks

The following routes are available for this service:
GET/RestApi/sitefinity/scheduling/scheduled-tasks
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Telerik.Sitefinity.Scheduling.Web.Services.ServiceStack.Dto;

namespace Telerik.Sitefinity.Scheduling.Web.Services.ServiceStack.Dto
{
    public enum FilterByType
    {
        All,
        Pending,
        Started,
        Stopped,
        Failed,
        Recurring,
    }

    public partial class GetScheduledTasks
    {
        public virtual int Skip { get; set; }
        public virtual int Take { get; set; }
        public virtual string SearchTerm { get; set; }
        public virtual OrderByType OrderBy { get; set; }
        public virtual FilterByType FilterBy { get; set; }
    }

    public partial class GetScheduledTasksResponse
    {
        public virtual IEnumerable<ScheduledTaskViewModel> Items { get; set; }
        public virtual int TotalCount { get; set; }
    }

    public enum OrderByType
    {
        ScheduledFor,
        LastExecutionDate,
        Status,
        NameAsc,
        NameDesc,
    }

    public partial class ScheduledTaskViewModel
    {
        public virtual Guid TaskId { get; set; }
        public virtual string Name { get; set; }
        public virtual string Title { get; set; }
        public virtual string Status { get; set; }
        public virtual string ErrorMessage { get; set; }
        public virtual string RecurringInterval { get; set; }
        public virtual DateTime ScheduledForDate { get; set; }
        public virtual DateTime? LastExecutionTime { get; set; }
        public virtual string Hash { get; set; }
    }

}

C# GetScheduledTasks DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /RestApi/sitefinity/scheduling/scheduled-tasks HTTP/1.1 
Host: www.asg.com.au 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"TotalCount":0}