GET | /RestApi/sitefinity/scheduling/scheduled-tasks |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetScheduledTasks
{
public Integer Skip = null;
public Integer Take = null;
public String SearchTerm = null;
public OrderByType OrderBy = null;
public FilterByType FilterBy = null;
public Integer getSkip() { return Skip; }
public GetScheduledTasks setSkip(Integer value) { this.Skip = value; return this; }
public Integer getTake() { return Take; }
public GetScheduledTasks setTake(Integer value) { this.Take = value; return this; }
public String getSearchTerm() { return SearchTerm; }
public GetScheduledTasks setSearchTerm(String value) { this.SearchTerm = value; return this; }
public OrderByType getOrderBy() { return OrderBy; }
public GetScheduledTasks setOrderBy(OrderByType value) { this.OrderBy = value; return this; }
public FilterByType getFilterBy() { return FilterBy; }
public GetScheduledTasks setFilterBy(FilterByType value) { this.FilterBy = value; return this; }
}
public static enum OrderByType
{
ScheduledFor,
LastExecutionDate,
Status,
NameAsc,
NameDesc;
}
public static enum FilterByType
{
All,
Pending,
Started,
Stopped,
Failed,
Recurring;
}
public static class GetScheduledTasksResponse
{
public ArrayList<ScheduledTaskViewModel> Items = null;
public Integer TotalCount = null;
public ArrayList<ScheduledTaskViewModel> getItems() { return Items; }
public GetScheduledTasksResponse setItems(ArrayList<ScheduledTaskViewModel> value) { this.Items = value; return this; }
public Integer getTotalCount() { return TotalCount; }
public GetScheduledTasksResponse setTotalCount(Integer value) { this.TotalCount = value; return this; }
}
public static class ScheduledTaskViewModel
{
public UUID TaskId = null;
public String Name = null;
public String Title = null;
public String Status = null;
public String ErrorMessage = null;
public String RecurringInterval = null;
public Date ScheduledForDate = null;
public Date LastExecutionTime = null;
public String Hash = null;
public UUID getTaskId() { return TaskId; }
public ScheduledTaskViewModel setTaskId(UUID value) { this.TaskId = value; return this; }
public String getName() { return Name; }
public ScheduledTaskViewModel setName(String value) { this.Name = value; return this; }
public String getTitle() { return Title; }
public ScheduledTaskViewModel setTitle(String value) { this.Title = value; return this; }
public String getStatus() { return Status; }
public ScheduledTaskViewModel setStatus(String value) { this.Status = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public ScheduledTaskViewModel setErrorMessage(String value) { this.ErrorMessage = value; return this; }
public String getRecurringInterval() { return RecurringInterval; }
public ScheduledTaskViewModel setRecurringInterval(String value) { this.RecurringInterval = value; return this; }
public Date getScheduledForDate() { return ScheduledForDate; }
public ScheduledTaskViewModel setScheduledForDate(Date value) { this.ScheduledForDate = value; return this; }
public Date getLastExecutionTime() { return LastExecutionTime; }
public ScheduledTaskViewModel setLastExecutionTime(Date value) { this.LastExecutionTime = value; return this; }
public String getHash() { return Hash; }
public ScheduledTaskViewModel setHash(String value) { this.Hash = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"TotalCount":0}