Skip to main content

Uniphore Customer Portal

Schedules

Use Schedules to determine when your Storage Policies are applied, multiple Schedules and Storage Policies can be configured to provide fine control of your data storage - this is achieved by setting which conversations to move/archive/purge using Storage Policies and then when to apply those policies using Schedules. Schedules can be configured to apply policies on specified frequencies, at specified times and time zones. These frequencies include by minutes, hourly, daily, weekly, monthly and yearly.

This topic details how to get, add, update, and delete Schedules using API requests, but new Schedules can also be configured during the Create Storage Policy requests, See either Add Move Media Storage Policy, Add an Archive Metadata Policy, or Add a Purge Policy for details.

Also see Get Policies for Schedules for a list of all policies that use specified schedules.

Get all Schedules

Use the get all schedules request to get information on all of the schedules in your U-Capture system.

Endpoint

Method: GET

URL: /policy/schedules

Request Parameter

Unlike other requests the get all schedules request does not require a request body.

Response and Error Code

Response Code

Condition

200

OK

Response Parameter

Parameter Name

Data Type

Description

Schedule

Array

The list of Schedules in your U-Capture system, each with a combination of the following parameters in this table

id

Number

The unique ID for the Schedule.

Type, either minutes, hourly, daily, weekly, monthly, or yearly.

Array

Determines the frequency type of the Schedule, used in combination with the Schedule interval (see below) to determine how often the Schedule repeats, for example setting the type minutes combined with interval set to 15 would repeat the Schedule (and therefore apply affected policies) every 15 minutes.

Each type has different sub-parameters, these are detailed in Add a Schedule.

interval

Number

Determines the frequency value of the Schedule, used in combination with the Schedule Type (see above) to determine how often the Schedule repeats, for example setting interval to 15 combined with the type minutes would repeat the Schedule (and therefore apply affected policies) every 15 minutes.

name

String

The useful name for the Schedule.

description

String

The useful description of the Schedule if configured.

Sample Response
{
    "schedule": [
        {
            "id": "35",
            "weekly": {
                "daysOfWeek": [
                    "MON",
                    "TUE"
                ],
                "executionTime": "00:00",
                "timezone": "UTC"
            },
            "interval": "3",
            "name": "3 week schedule",
            "description": "weekly schedule to trigger every 3 weeks on Monday and Tuesday"
        },
        {
            "id": "217",
            "hourly": {
                "executionTime": "17:00",
                "timezone": "UTC"
            },
            "interval": "12",
            "name": "12 hours schedule",
            "description": "hourly schedule to trigger twice a day"
        }
    ]
}
Get a Schedule

Use the get a schedule request to get the information for a specific Schedule in your U-Capture system.

Endpoint

Method: GET

URL: /policy/Schedule/:scheduleId

Path Parameter

Parameter Name

Data Type

Description

Required/Optional

scheduleId

Number

The unique ID of the Schedule.

Required

Response and Error Code

Response Code

Condition

200

OK

Response Parameter

Parameter Name

Data Type

Description

schedule

Array

The details of the Schedule specified in the request path parameter, detailed using a combination of the following parameters in this table.

id

Number

The unique ID of the Schedule, this will match the sceduleId specified in the path parameter.

Type, either minutes, hourly, daily, weekly, monthly, or yearly.

Array

Determines the frequency type of the Schedule, used in combination with the Schedule interval (see below) to determine how often the Schedule repeats, for example setting the type minutes combined with interval set to 15 would repeat the Schedule (and therefore apply affected policies) every 15 minutes.

Each type has different sub-parameters, these are detailed in Add a Schedule.

interval

Number

Determines the frequency value of the Schedule, used in combination with the Schedule Type (see above) to determine how often the Schedule repeats, for example setting interval to 15 combined with the type minutes would repeat the Schedule (and therefore apply affected policies) every 15 minutes.

name

String

The useful name for the Schedule.

description

String

The useful description of the Schedule if configured.

Sample Response
{
    "schedule": {
        "id": "35",
        "weekly": {
            "daysOfWeek": [
                "MON",
                "TUE"
            ],
            "executionTime": "00:00",
            "timezone": "UTC"
        },
        "interval": "3",
        "name": "3 week schedule",
        "description": "weekly schedule to trigger every 3 weeks on Monday and Tuesday"
    }
}
Add a Schedule

Use the add a schedule request to create a new Schedule in your U-Capture system, as mentioned previously Schedules are used to determine the frequency and time that Storage Policies are applied.

Endpoint

Method: POST

URL: /policy/schedule

Request Parameter

Parameter Name

Data Type

Description

Required/Optional

schedule

Array

Set the details for the schedule using the following parameters in this table.

Required

interval

Number

Determine the frequency value of the Schedule, used in combination with the Schedule Type (see below) to determine how often the Schedule repeats, for example setting interval to 15 combined with the type minutes would repeat the Schedule (and therefore apply affected policies) every 15 minutes.

Valid values depend on the frequency type:

  • If the frequency type is minutes valid values are 5, 15, 30, and 45.

  • If the frequency type is hourly valid values are 1 to 23.

  • If the frequency type is daily valid values are 1 to 30.

  • If the frequency type is weekly valid values are 1 to 52.

  • If the frequency type is monthly valid values are 1 to 12.

  • If the frequency type is yearly valid values are 1 to 10.

Required

Type: either minute, hourly, daily, weekly, monthly, or yearly.

Array

Determine the frequency type of the Schedule, used in combination with the Schedule interval (see above) to determine how often the Schedule repeats, for example setting the type minutes combined with interval set to 15 would repeat the Schedule (and therefore apply affected policies) every 15 minutes. For more information on the Types available and their sub-parameters see Types below.

Required

name

String

Set a useful name for the Schedule.

Required

description

String

Set a useful description for the Schedule.

Optional

For example Requests, see Sample Requests.

Types

As mentioned above there are different types of Schedule that can be used to specify the frequency that affected policies are applied, and the type of Schedule works with the interval parameter. In order to provide fine control of your captured data the following types and their sub parameters are available. For example create schedule requests for each type, see Sample Requests.

Minutes

Use minutes to apply affected policies every set amount of minutes.

There are no sub-parameters for the minutes frequency type.

If minutes is used, then valid interval values are 1 to 59.

Note

For minutes the affected policies will be applied from the first hour mark using the specified interval. For example if a Schedule was created at 5:12 with the interval value of 15 then the policy would be applied at 5:15, 5:30, 5:45 and so on.

Hourly

Use hourly to apply affected policies every set amount of hours.

  1. Use sub-parameter executionTime to determine when to first apply the Schedule, the value is a 24 hour time value, for example 17:00.

  2. Use sub-parameter timezone to set the timezone to base the Schedule on.

If hourly is used, then valid interval values are 1 to 99.

Daily

Use daily to apply affected policies every set amount of days.

  • Use sub-parameter executionTime to determine when to first apply the Schedule, the value is a 24 hour time value, for example 17:00.

  • Use sub-parameter timezone to set the timezone to base the Schedule on (values need to be in all caps).

If daily is used, then valid interval values are 1 to 99.

Weekly

Use weekly to apply affected policies every set amount of weeks.

  1. Use sub-parameter executionTime to determine when to first apply the Schedule, the value is a 24 hour time value, for example 17:00.

  2. Use sub-parameter timezone to set the timezone to base the Schedule on.

  3. Use sub-parameter daysOfWeek to determine which days of the week to apply the affected policies on, you can use a comma separated list to specify multiple days, for example you could set daysOfWeek to mon, tue and interval to 12 to apply policies every 12 weeks on Monday and Tuesday.

If weekly is used, then valid interval values are 1 to 99.

Monthly

Use monthly to apply affected policies every specific day of the month, either by date (for example the 15th day) or specific day of a specific week of the month (for example the Tuesday of the last week of the month).

  1. Use sub-parameter executionTime to determine when to first apply the Schedule, the value is a 24 hour time value, for example 17:00.

  2. Use sub-parameter timezone to set the timezone to base the Schedule on.

  3. To determine the specific day of the month to apply the affected policies, use either of the below sub-parameter arrays:

    • To apply affected policies on a specific date of the month (for example the 15th day), use the schedule_by_day array, and sub-parameter dayOfMonth with a value of 1 to 31.

      Caution

      If dayOfMonth is set to a value that not every month has (29, 30, or 31) the Schedule will not be triggered on that month, for example a Schedule set to trigger on the 30th of every month will not be triggered in February.

    • To apply affected policies on a specific day of a specific week of the month (for example the Tuesday of the last week of the month), use the scheduleByOccurance array, with sub-parameters nth_occurence and nth_occurance_day.

      Valid values for nthOccurence include first, second, third, forth, and last.

      Valid values for nthOccurence_day include monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

If monthly is used, then valid interval values are 1 to 99.

Yearly

Use yearly to apply affected policies every specific day of the year, either by date (for example the 15th or July) or specific day of a specific week of a specific month (for example the Tuesday of the last week of the July).

  1. Use sub-parameter executionTime to determine when to first apply the Schedule, the value is a 24 hour time value, for example 17:00.

  2. Use sub-parameter timezone to set the timezone to base the Schedule on.

  3. Use sub-parameter month to determine the month of the year to apply affected policies (use a capital letter for the first letter of the month here for example July).

  4. To determine the specific day of the month to apply the affected policies, use either of the below sub-parameter arrays:

    • To apply affected policies on a specific date of the month (for example the 15th day), use the scheduleByDay array, and sub-parameter dayOfMonth with a value of 1 to 31.

      Caution

      If dayOfMonth is set to a value that not every month has (29, 30, or 31) the Schedule will not be triggered on that month, for example a Schedule set to trigger on the 30th of every month will not be triggered in February.

    • To apply affected policies on a specific day of a specific week of the month (for example the Tuesday of the last week of the month), use the scheduleByOccurance array, with sub-parameters nthOccurence and nthOccuranceDay.

      Valid values for nthOccurence include first, second, third, forth, and last.

      Valid values for nthOccurence_day include monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

If yearly is used, then valid interval values are 1 to 99.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

scheduleId

Integer

The automatically generated ID of the new Schedule.

For an example response, see Sample Response.

Sample Requests

Add a Schedule with minutes frequency:

{"schedule":{
    "interval": 15,
    "minute": {
    },
    "name":"15 minute schedule",
    "description":"minute schedule to trigger every 15 minutes"
}}

Add a Schedule with hourly frequency:

{"schedule":{
    "interval": 12,
    "hourly": {
        "executionTime": "17:00",
        "timezone": "UTC"
    },
    "name":"12 hours schedule",
    "description":"hourly schedule to trigger twice a day"
}}

Add a Schedule with daily frequency:

{"schedule":{
    "interval": 10,
    "daily": {
        "executionTime": "17:00",
        "timezone": "UTC"
     },
    "name":"10 days schedule",
    "description":"schedule to trigger every 10 days"
}}

Add a Schedule with weekly frequency:

{"schedule":{
    "interval": 3,
    "weekly": {
        "executionTime": "00:00",
        "timezone": "UTC",
        "daysOfWeek":["mon","tue"]
    },
    "name":"3 week schedule",
    "description":"weekly schedule to trigger every 3 weeks on Monday and Tuesday"
}}

Add a Schedule with monthly frequency (specific date of the month):

{"schedule": {
    "interval": 1,
    "monthly": {
        "executionTime": "17:00",
        "timezone": "UTC",
        "scheduleByDay": {
            "dayOfMonth": "15"
        }
    },
    "name":"monthly schedule",
    "description":"monthly schedule to trigger every 15th day of the month"
}}

Add a Schedule with monthly frequency (nth day of the nth week of a month):

{"schedule": {
    "interval": 2,
    "monthly": {
        "executionTime": "17:00",
        "timezone": "UTC",
        "scheduleByOccurrence": {
            "nthOccurrence": "last",
            "nthOccurrence_day": "tuesday"
        }
    },
    "name":"monthly schedule",
    "description":"monthly schedule to trigger on the last Tuesday of every other month"
}}

Add a Schedule with yearly frequency (specific day of a specific month):

{"schedule": {
    "interval": 2,
    "yearly": {
        "executionTime": "17:00",
        "timezone": "UTC",
        "month": "July",
        "scheduleByDay": {
            "day_of_month": "19"
        }
    },
    "name":"yearly schedule",
    "description":"yearly schedule to trigger on the 19 of July every other year"
}}

Add a Schedule with yearly frequency (nth day of the nth week of a specific month):

{"schedule": {
    "interval": 3,
    "yearly": {
        "executionTime": "17:00",
        "timezone": "UTC",
        "month": "July",
        "scheduleByOccurrence": {
            "nthOccurrence": "first",
            "nthOccurrenceDay": "monday"
        }
    },
    "name":"yearly schedule",
    "description":"yearly schedule to trigger on the first Monday of July every 3 years"
}}

Sample Response
{
    "scheduleId": "407"
}
Update a Schedule

Use the update schedule request to update one or more of a Schedule's parameters.

Endpoint

Method: PUT

URL: /policy/schedule/:scheduleId

Path Parameter

Parameter Name

Data Type

Description

Required/Optional

scheduleId

Number

The ID of the Schedule to update.

Required

Request Parameter

Parameter Name

Data Type

Description

Required/Optional

schedule

Array

A list of the Schedule's parameters to update.

If any of the following parameters in this table are specified in the request then their associated values will be used to update the matching parameter values in the existing Schedule specified in the path parameter.

Required

interval

Number

Update the frequency value of the Schedule, used in combination with the Schedule Type (see below) to determine how often the Schedule repeats, for example setting interval to 15 combined with the type minutes would repeat the Schedule (and therefore apply affected policies) every 15 minutes.

Valid values depend on the frequency type:

  • If the frequency type is minutes valid values are 5, 15, 30, and 45.

  • If the frequency type is hourly valid values are 1 to 23.

  • If the frequency type is daily valid values are 1 to 30.

  • If the frequency type is weekly valid values are 1 to 52.

  • If the frequency type is monthly valid values are 1 to 12.

  • If the frequency type is yearly valid values are 1 to 10.

Optional

Type, either minutes, hourly, daily, weekly, monthly, or yearly.

Array

Update the frequency type of the Schedule, used in combination with the Schedule interval (see above) to determine how often the Schedule repeats, for example setting the type minutes combined with interval set to 15 would repeat the Schedule (and therefore apply affected policies) every 15 minutes.

When updating the frequency type, all of the the type's sub-parameters must be included in the request, even if only one of the sub-parameters is to be updated (see Types below for a list of the required sub-parameters for each type).

A Schedule can be updated to use a different frequency type, for example a Schedule currently operating using minutes can be updated to use hours instead.

Optional

name

String

Update the name of the Schedule.

Optional

description

String

Update the description of the Schedule.

Optional

For an example Request, see Sample Request.

Types

for an extensive understanding on the frequency types available see the add a schedule topic, this topic covers the sub-parameters required when updating frequency type.

Minutes

Required no sub-parameters.

Hourly

Requires the following sub-parameters:

  • executionTime

  • timezone

Daily

Requires the following sub-parameters:

  • executionTime

  • timezone

Weekly

Requires the following sub-parameters:

  • executionTime

  • timezone

  • daysOfWeek

Monthly

Requires the following sub-parameters:

  • executionTime

  • timezone

  • dayOfMonth OR scheduledByOccurance (scheduledByOccurance includes the sub-parameters nth_occurence and nth_occurance_day).

Yearly

Required the following sub-paramters:

  • executionTime

  • timezone

  • month

  • dayOfMonth OR scheduledByOccurance (scheduledByOccurance includes the sub-parameters nth_occurence and nth_occurance_day).

Response and Error Code

Response Code

Condition

Description

202

Accepted

The update has been completed, use the get a schedule request to view the updated Schedule.

400

Bad Request

The update has not been completed, the response body will indicate why the request has failed, as mentioned above the type parameter requires all of its sub-paramters to be listed in the request even if only one of the sub-paramters is to be updated.

The above 202 Accepted response i

Response Parameter

Parameter Name

Data Type

Description

scheduleId

Number

The ID of the Schedule that has been updated.

For an example response, see Sample Response.

Sample Request

The sample request below would update the Schedule name, description, and the sub-parameters for the weekly type. As mentioned above for the type sub-parameters all sub-parameters must be listed for a valid request, even if only one of the sub-parameters is to be updated.

{
"schedule":{
    "name": "Updated Weekly",
    "description": "Updated Mon Tue Wed weekly schedule 15-09-24",
    "weekly": {
        "daysOfWeek": [
            "MON",
            "TUE",
            "WED"
        ],
        "executionTime": "00:00",
        "timezone": "UTC"
    }
}}

Sample Response
{
    "scheduleId": "412"
}
Delete Schedules

Use the delete schedules request to remove schedules from your U-Capture system, Schedules that are used by policies can not be deleted.

Caution

Deleting a Schedule can not be undone, a new schedule would need to be created in the event that a Schedule was mistakenly deleted.

Endpoint

Method: DELETE

URL: /policy/schedule

Request Parameter

Parameter Name

Data Type

Description

scedule_ids

Array

A comma separated list of schedule IDs to remove from the U-Capture system.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

Description

204

No Content

The Schedule/s specified in the request body have been deleted from the system, the get all schedules request cna be used to double check that they are removed if needed.

404

Not Found

One or more of the specified Schedules does not exist in the system.

412

Precondition Failed

One or more of the specified Schedules is used by a policy, and can therefore not be deleted.

Sample Request
{
    "schedule_ids": [
        412,
        425
    ]
}