Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
/rest/{version}/defectTrackers/scheduledUpdate/addUpdate
Descriptor | Value |
---|---|
HTTP Method | POST |
Description | Adds scheduled update job for defect tracker. |
Required Permission | Can Manage Defect Trackers |
Version Introduced | 2.7.9 |
Changes in 2.8 | Added "checkDeletedDefects" parameter. |
Changes in 2.8.3 | Added "scheduledTimezone" parameter. |
Request Header Parameters
Parameter | Value | Required | Description |
---|---|---|---|
Accept | String | Yes | A value of ‘application/json’ must be provided. |
Request POST Data Parameters
Parameter | Value | Required | Description |
---|---|---|---|
scheduleType | String | Yes | Scheduling method being used. Accepted values are "select" or "cron". |
frequency | String | Yes* | Frequency of when scheduled job will run. Required if scheduleType is set to "select". |
hour | Number | Yes* | Hour (1-12) for scheduled job start. Required if scheduleType is set to "select". |
minute | Number | Yes* | Minute (00, 15, 30, 45) for scheduled job start. Required if scheduleType is set to "select". |
period | Strong | Yes* | Accepted values are "AM" or "PM". Required if scheduleType is set to "select". |
cronExpression | String | Yes* | Valid cron value (e.g. "0 6 * * ?"). Required if scheduleType is set to "cron". |
checkDeletedDefects | Boolean | No | Looks for deleted defects in the defect tracker and updates their status in ThreadFix to "Issue Not Found". |
scheduledTimezone | String | No | Optional, if one is not provided it will default the to the server's timezone. Can be provided for both CRON and SELECT schedulingMethod. |
Sample Calls:
Daily Select Scheduling Sample Call
Code Block |
---|
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apikey}" -X POST --data "scheduleType=select&frequency=daily&hour=9&minute=30&period=AM" http://localhost:8080/threadfix/rest/latest/defectTrackers/scheduledUpdate/addUpdate |
Weekly Select Scheduling Sample Call
Code Block |
---|
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apikey}" -X POST --data "scheduleType=select&frequency=weekly&hour=9&minute=30&period=AM&day=sunday" http://localhost:8080/threadfix/rest/latest/defectTrackers/scheduledUpdate/addUpdate |
Cron Expression Scheduling Sample Call
Code Block |
---|
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apikey}" -X POST --data "scheduleType=cron&cronExpression=45 13 * * ?" http://localhost:8080/threadfix/rest/latest/defectTrackers/scheduledUpdate/addUpdate |
Sample Output:
Values for modifiedDate are returned as Epoch time in milliseconds.
Code Block |
---|
{ "message": "", "success": true, "responseCode": -1, "object": [ { "id": 2, "modifiedDate": 1572888046000, "active": true, "hour": 6, "minute": 0, "period": "AM", "day": null, "frequency": "Daily", "dateError": null, "scheduleType": "SELECT", "cronExpression": null, "scheduledDate": "Daily at 6:00AM", "cronTranslation": null } ] } |
Table of content
tocPage Tree | |
---|---|
|
https://threadfix.it/ | www.denimgroup.com
© Copyright 2020 Denim Group, LTD. All Rights Reserved.
|