Schedules Endpoints

Version:
2022.2 FIPS
Last modified: October 04, 2022

Schedules Endpoints and Parameters 

Create a New Schedule

Get Information about All Schedules 

Search for a Specific Schedule 

Update an Existing Schedule 

Delete a Schedule

To learn more about the objects relations and how to use them in the API, go to the Object Relations section.

For more information about schedules, visit the Schedules help page.

 

Create a New Schedule 

To create a new schedule, use the POST {baseURL}/v3/schedules endpoint.  

All Date Time fields need to be submitted as UTC-0. 

Parameters 

  • contract (body): To create a new schedule, the contract parameter is required. Specify the following parameters: 
    • workflowId (string): Enter a workflow ID you want to schedule.  
    • iteration (body):   
      • iterationType (string): Specify whether the workflow will be scheduled ‘Once’, 'Hourly', 'Weekly', 'Monthly', ‘Custom’, or 'Daily'. For more information, visit the Schedule a Workflow help page. If you choose the iterationType Recurring, you can specify the hourly (hourlyContract), daily (dailyContract), weekly (weeklyContract), or monthly (monthlyContract) frequency. 
      • startTime (string): Required. Enter a specific date and time to run the workflow. The start date must be in the future.  
      • endTime (string): Optional. Enter the specific date and time when the workflow run should end. 
      • hourlyContract (body): Optional. If you specify the iterationType as ‘Recurring’.  
        • hours (string): Enter the hour.  
        • minutes (string): Enter the minutes.  
      • dailyContract (body): Optional. If you specify the iterationType as ‘Recurring’. 
        • runOnlyWorkWeek (boolean): Optional. If not specified, the default is false. 
      • weeklyContract (body): 
        • daysOfWeek (string): Specify the day of the week when the workflow should run. For example, ‘Sunday’.  
      • monthlyContract (body): 
        • simpleDayOfMonth (boolean): Enter ‘true’ if you want to specify a specific day of the month when the workflow should run. 
        • dayOfMonth (string): Enter the number of the day of the month you want the workflow to run. For example, enter ‘1’ for the first day of the month.  
        • occurrence (string): Enter one of the following options if you want the workflow to run for example, the first Sunday of the month. The acceptable values are: ‘First’, ‘Second’, ‘Third’, ‘Fourth’, and ‘Last. 
        • dayNumber (string): Specify the day of the week when the workflow should run. For example, for Sunday enter ‘1’.  
      • customContract (body):  
        • daysOfMonth (array): Specify the days of the month when the workflow should run. For example, [1, 15, 28].  
        • months (array): Specify the month when the workflow should run. For example, [1, 5, 7, 9, 12].   
  • name (string): Optional. Enter a name of the schedule. 
  • comment (string): Optional. Enter a comment if needed.  
  • priority (string): Optional. Specify the priority for running schedule. Choose from the following options: ‘Low’, ‘Medium’, ‘High’, and ‘Critical’. If not specified, the default value will be ‘Low’. 
  • workerTag (string): Optional. Specify the assigned worker. If not specified, the value will be ‘none’. 
  • credentialId (string): Optional.  

Request Example: JSON

Example of a request to create a schedule with the following occurrence - once, with a start and end time specified:

Example of a request when you want to create a schedule with the following occurrence: Once, with a start and end time specified.

 

Example of a request to create a schedule with hourly occurrence:

Example of a request for a schedule with hourly occurrence. 

 

Example of a request to create a schedule with weekly occurrence: 

Example of a request for a schedule with weekly occurrence. 

 

Example of a request to create a schedule with monthly occurrence - 2nd Sunday of every month: 

Example of a request for a schedule with monthly occurrence - 2nd Sunday of every month. 

 

Example of a request to create a schedule with monthly occurrence - every 15th day of the month:

Example of a request for a schedule with monthly occurrence - every 15th day of the month.

 

Example of a request to create a custom schedule:

Example of a request for a custom schedule in JSON.

 

Get Information about All Schedules 

To get information about all schedules, use the GET {baseURL}/v3/schedules endpoint. Use various parameters to filter the schedules you want to display. 

When you filter schedules using runsAfter and runsBefore, you are limited to 45 days apart from each other.  

Parameters 

  • view (string): Optional. Can be left without a value. You can choose from the following values: ‘Default’ and ‘Full’. If this parameter is set to 'Default’, then a reduced view object will be returned. When not specified, the ‘Default’ value is used. 
  • ownerId (string): Optional. Enter the owner ID by which you want to filter the schedule. 
  • workflowId (string): Optional. Enter the workflow ID by which you want to filter the schedule. 
  • runsAfter (date-time): Optional. Enter the date and time after which the schedule runs. Enter the date and time in ISO8601 format. 
  • runsBefore (date-time): Optional. Enter the date and time before which the schedule runs. Enter the date and time in ISO8601 format. 

Request Example: cURL

curl --location --request GET 'http://localhost/webapi/v3/schedules' \
--header 'Authorization: Bearer BearerTokenGoesHere'

 

Search for a Specific Schedule 

To search for a specific schedule, use the GET {baseURL}/v3/schedules/{id} endpoint. 

Parameters 

  • id (string): Required. Enter a schedule ID to retrieve information about this schedule. 

Request Example: cURL

curl --location --request GET 'http://localhost/webapi/v3/schedules/61dc1a461b140000d60062c2' \
--header 'Authorization: Bearer BearerTokenGoesHere'

 

Update an Existing Schedule 

To update an existing schedule, use the PUT {baseURL}/v3/schedules/{id} endpoint.  

Parameters 

  • id (string): Required. Enter a schedule ID to get this schedule updated. 
  • contract (body): Required. To update a schedule, the Contract parameter is required. Specify the following: 
  • id (string): Required. Enter a schedule ID to get this user updated. 
  • ownerId (string): Required. Enter a user’s first name.  
  • iteration (body):   
    • iterationType (string): Specify whether the workflow will be scheduled ‘Once’, ‘Recurring’, and ‘Custom’. For more information, visit the Schedule a Workflow help page. If you choose the iterationType Recurring, you can specify the hourly (hourlyContract), daily (dailyContract), weekly (weeklyContract), or monthly (monthlyContract) frequency. 
    • startTime (string): Required. Enter a specific date and time to run the workflow. The start date must be in the future.  
    • endTime (string): Required. Enter the specific date and time when the workflow run should end. 
    • hourlyContract (body): Optional. If you specify the iterationType as ‘Recurring’.  
      • hours (string): Enter the hour.  
      • minutes (string): Enter the minutes.  
    • dailyContract (body): Optional. If you specify the iterationType as ‘Recurring’. 
      • runOnlyWorkWeek (boolean): Optional. If not specified, the default is false. 
    • weeklyContract (body): 
      • daysOfWeek (string): Specify the day of the week when the workflow should run. For example, ‘Sunday’.  
    • monthlyContract (body): 
      • simpleDayOfMonth (boolean): Enter ‘true’ if you want to specify a specific day of the month when the workflow should run. 
      • dayOfMonth (string): Enter the number of the day of the month you want the workflow to run. For example, enter ‘1’ for the first day of the month.  
      • occurrence (string): Enter one of the following options if you want the workflow to run for example, the first Sunday of the month. The acceptable values are: ‘First’, ‘Second’, ‘Third’, ‘Fourth’, and ‘Last. 
      • dayNumber (string): Specify the day of the week when the workflow should run. For example, for Sunday enter ‘1’.  
    • customContract (body):  
      • daysOfMonth (array): Specify the days of the month when the workflow should run. For example, [1, 15, 28].  
      • months (array): Specify the month when the workflow should run. For example, [1, 5, 7, 9, 12].  
  • name (string): Required. Enter a name of the schedule.  
  • comment (string): Required. Enter a comment if needed.  
  • priority (string): Optional. Specify the priority for running schedule. Choose from the following options: ‘Low’, ‘Medium’, ‘High’, and ‘Critical’. If not specified, the default value is ‘Low’. 
  • workerTag (string): Required. Specify the assigned worker. If not specified, the value will be ‘none’. 
  • enabled (boolean): Optional. Specify whether the schedule should be enabled or disabled.  
  • credentialId (string): Required. 

Request Example: JSON

Example of a request to update a schedule – change of the start and end time, name, and comment (body):  

Updating a schedule – changing the start and end time, name, and comment.

 

Delete a Schedule 

To delete a specific schedule from the system, use the DELETE {baseURL}/v3/schedules/{id} endpoint.  

Parameters 

id (string): Required. Enter the schedule ID you want to delete. 

Request Example: cURL

curl --location --request DELETE 'http://localhost/webapi/v3/schedules/61dc1a461b140000d60062c2' \
--header 'Authorization: Bearer BearerTokenGoesHere'

 

Objects Relations 

If you are creating a schedule, you can use created objects as follows: 

Object created: "id" (for example, "id": "619158e57e607d0011ac3009") 

You can use it as: 

 

Postman Request Examples

GET /v3/schedules/

Use GET /v3/schedules/ endpoint.

To know more about Postman requests, visit the How to Use Postman help page. 

Was This Page Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support. Can't submit this form? Email us.