vividime Community

title: Schedule Task [Print this page]

author: vividime-Club    time: 2024-12-18 13:46
title: Schedule Task
The Key to Disable Schedule Task
author: vividime-Club    time: 2024-12-18 13:46
Supported versions: 10.0 and later
Request URL
http://ip:port/bi/api?action=disableJobs&token=xxxx
Request Message
Request Parameter
Request parameter: xmlData (required)
<?xml version="1.0" encoding="UTF-8"?>
<info>                        
<path>test</path>                        
<isFolder>true</isFolder>                        
<onlyCurrent>false</onlyCurrent>                        
</info>
Request Parameter Description
•path (optional): path of the job. If this parameter is not filled in or is not present and isFolder is true, then the root directory is considered to be disabled for the job.
•isFolder (optional): true if path is a folder, false if it is a single job, false if not filled or empty.
•onlyCurrent (optional): true if path is a folder and you only want to disable jobs in the first directory under the folder, false if you want to disable all jobs under the folder, default is false.
Request Example
function disableJobs() {
  var xml = getXml();
  $.post("http://" + ip + ":" + port + "/" + project + "/api?action=disableJobs&token=xxxx",
     {xmlData : xml},
     function(result) {
     writeXml(result);
  });
}
Response Message
Response Result
•Operation successful
<?xml version="1.0" encoding="UTF-8"?>
<results>
  <result>
      <level>1</level>
      <message>Tasks have disabled '1'.</message>
  </result>
</results>
•The operation failed and the entered path could not be found.
<?xml version="1.0" encoding="UTF-8"?>
<results>
<result><level>6</level>
    <message>Can't find "test".</message>
</result>
</results>
•The operation failed and the user is not authorised to disable it.
<?xml version="1.0" encoding="UTF-8"?>
<results>
<result><level>6</level>
    <message>The user is not authorised to disable "test".</message>
</result>
</results>
Result Description
Response result information is xml, can parse direcly.
•level return type, different values represent different return status, see Appendix.
•message is the result of api operation.






Welcome vividime Community (https://club.vividime.com/) Powered by Discuz! X3.4