Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
/rest/{version}/remoteprovider/scheduledImports/add
Descriptor | Value |
---|---|
Description | Schedules a remote provider import by either cron expression or date. |
HTTP Method | POST |
Required Permission | Manage Remote Providers |
Version Introduced | 2.7.7 |
Changes in 2.8.3 | Added "scheduledTimezone" parameter. |
Request Header Parameters
Parameter | Value | Required | Description |
---|---|---|---|
schedulingMethod | String | Yes | SELECT or CRON |
frequency | String | No* | DAILY or WEEKLY. *Required if using SELECT scheduling method. |
hour | Integer | No* | Hour to schedule import. Valid values are 1 to 12. *Required if using SELECT scheduling method. |
minute | Integer | No* | Minute to schedule import. Valid values are 00 to 59. *Required if using SELECT scheduling method. |
period | String | No* | AM or PM. *Required if using SELECT scheduling method. |
day | String | No* | Day of the week (e.g. "Sunday"). *Required if using SELECT scheduling method and WEEKLY frequency. |
cronExpression | String | No* | Cron expression string. For example, "20 6 * * ?". *Required if using CRON scheduling method. |
remoteProviderId | Integer | No | The entity ID of the remote provider to be imported. Leave blank to import all remote providers. |
applicationId | Integer | No | ID for the ThreadFix application to map to the Remote Provider application. Leave blank to import for all applications. |
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 Call:
Code Block |
---|
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apikey}" -X POST --data "applicationId=1&remoteProviderId=1&schedulingMethod=select&frequency=daily&hour=9&minute=30&period=AM" http://localhost:8080/threadfix/rest/latest/remoteprovider/scheduledImports/add |
Sample Output:
Code Block |
---|
{ "message": "", "success": true, "responseCode": -1, "object": [ { "id": 1, "hour": 9, "minute": 30, "period": "AM", "day": null, "frequency": "Daily", "scheduleType": "SELECT", "cronExpression": null, "scheduledDate": "Daily at 9:30AM", "remoteProviderEntity": { "name": "Team Checkmarx", "id": 1 }, "application": null, "cronTranslation": null } ] } |
Page Tree |
---|
Table of Contents
|