As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.

Schedule Defect Status Updates - API

/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".
Accepted values are "daily" and "weekly".

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.

Available Server Timezone Options.

 

Sample Calls:

Daily Select Scheduling Sample Call

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

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

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.

www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.

This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.