Skip to content

Query Scheduled Task List

API Address:/v2/cep/enduserapi/v2/getCronJobList

Request Method:GET

Request Data Type:application/x-www-form-urlencoded

Response Data Type:*/*

API Description:Query scheduled task list

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
dkDevice KEYquerytruestring
pkProduct KEYquerytruestring
Authorizationheaderfalsestring
pageCurrent page numberqueryfalseinteger(int32)
pageSizeNumber of items per pagequeryfalseinteger(int32)
typeScheduled task type, once: execute once, day-repeat: repeat daily, custom-repeat: repeat weekly, multi-section: multi-stage execution, delay: countdownqueryfalsestring

Response Status:

Status CodeDescriptionSchema
200OKApiResult«PageInfo«Scheduled Task List»»
401Unauthorized
403Forbidden
404Not Found
5041No permission
5066Please enter Product Key
5067Please enter Device Key
5588Scheduled task type parameter value out of range
5594Failed to query scheduled task

Response Parameters:

Parameter NameParameter DescriptionTypeSchema
codeinteger(int32)integer(int32)
dataPageInfo«Scheduled Task List»PageInfo«Scheduled Task List»
  endRowinteger(int64)
  hasNextPageboolean
  hasPreviousPageboolean
  isFirstPageboolean
  isLastPageboolean
  listarrayScheduled Task List
    cacheTimeDownstream cache time, in seconds, value range: 0-7776000integer
    createTimeCreation timeinteger
    dayOfWeekRepeat cycle, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday, multiple separated by comma, when type = custom-repeatmulti-section
    deviceKeyDevice KEYstring
    enabledScheduled task status, true: enabled, false: disabledboolean
    productKeyProduct KEYstring
    ruleIdScheduled task rule IDstring
    timeZoneTimezone, format: +-HH:mmstring
    timersScheduled task list, when type = multi-section, scheduled task quantity is limited to 2-5arrayScheduled Task Res
      actionCommand executed by scheduled task, format: Thing model JSON stringstring
      cacheTimeDownstream cache time, in seconds, value range: 0-7776000integer
      delayDelayed execution time, in seconds, required when type = delayinteger
      taskLogoTask iconstring
      taskNameTask namestring
      timeExecution time, format: HH:mm:ss, when type = onceday-repeat
      timerIdScheduled task IDstring
    typeScheduled task type, once: execute once, day-repeat: repeat daily, custom-repeat: repeat weekly, multi-section: multi-stage execution, random: random execution, delay: countdownstring
  navigateFirstPageinteger(int32)
  navigateLastPageinteger(int32)
  navigatePagesinteger(int32)
  navigatepageNumsarrayinteger
  nextPageinteger(int32)
  pageNuminteger(int32)
  pageSizeinteger(int32)
  pagesinteger(int32)
  prePageinteger(int32)
  sizeinteger(int32)
  startRowinteger(int64)
  totalinteger(int64)
extMsgstring
msgstring

Response Example:

javascript
{
	"code": 0,
	"data": {
		"endRow": 0,
		"hasNextPage": true,
		"hasPreviousPage": true,
		"isFirstPage": true,
		"isLastPage": true,
		"list": [
			{
				"cacheTime": 0,
				"createTime": 0,
				"dayOfWeek": "",
				"deviceKey": "",
				"enabled": true,
				"productKey": "",
				"ruleId": "",
				"timeZone": "",
				"timers": [
					{
						"action": "",
						"cacheTime": 0,
						"delay": 0,
						"taskLogo": "",
						"taskName": "",
						"time": "",
						"timerId": ""
					}
				],
				"type": ""
			}
		],
		"navigateFirstPage": 0,
		"navigateLastPage": 0,
		"navigatePages": 0,
		"navigatepageNums": [],
		"nextPage": 0,
		"pageNum": 0,
		"pageSize": 0,
		"pages": 0,
		"prePage": 0,
		"size": 0,
		"startRow": 0,
		"total": 0
	},
	"extMsg": "",
	"msg": ""
}