GET | /RestApi/sitefinity/scheduling/scheduled-tasks |
---|
"use strict";
/** @typedef {'ScheduledFor'|'LastExecutionDate'|'Status'|'NameAsc'|'NameDesc'} */
export var OrderByType;
(function (OrderByType) {
OrderByType["ScheduledFor"] = "ScheduledFor"
OrderByType["LastExecutionDate"] = "LastExecutionDate"
OrderByType["Status"] = "Status"
OrderByType["NameAsc"] = "NameAsc"
OrderByType["NameDesc"] = "NameDesc"
})(OrderByType || (OrderByType = {}));
/** @typedef {'All'|'Pending'|'Started'|'Stopped'|'Failed'|'Recurring'} */
export var FilterByType;
(function (FilterByType) {
FilterByType["All"] = "All"
FilterByType["Pending"] = "Pending"
FilterByType["Started"] = "Started"
FilterByType["Stopped"] = "Stopped"
FilterByType["Failed"] = "Failed"
FilterByType["Recurring"] = "Recurring"
})(FilterByType || (FilterByType = {}));
export class GetScheduledTasks {
/** @param {{Skip?:number,Take?:number,SearchTerm?:string,OrderBy?:OrderByType,FilterBy?:FilterByType}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Skip;
/** @type {number} */
Take;
/** @type {string} */
SearchTerm;
/** @type {OrderByType} */
OrderBy;
/** @type {FilterByType} */
FilterBy;
}
export class ScheduledTaskViewModel {
/** @param {{TaskId?:string,Name?:string,Title?:string,Status?:string,ErrorMessage?:string,RecurringInterval?:string,ScheduledForDate?:string,LastExecutionTime?:string,Hash?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
TaskId;
/** @type {string} */
Name;
/** @type {string} */
Title;
/** @type {string} */
Status;
/** @type {string} */
ErrorMessage;
/** @type {string} */
RecurringInterval;
/** @type {string} */
ScheduledForDate;
/** @type {?string} */
LastExecutionTime;
/** @type {string} */
Hash;
}
export class GetScheduledTasksResponse {
/** @param {{Items?:ScheduledTaskViewModel[],TotalCount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ScheduledTaskViewModel[]} */
Items;
/** @type {number} */
TotalCount;
}
JavaScript 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
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}