Skip to main content

Get Campaign Template Schedule

GET 

/campaign-templates/:id/schedule

Use this API to get the schedule for a certification campaign template. The API returns a 404 if there is no schedule set.

Request

Path Parameters

    id stringrequired

    ID of the campaign template whose schedule is being fetched.

    Example: 04bedce387bd47b2ae1f86eb0bb36dee

Responses

Current schedule for the campaign template. See the Set Campaign Template Schedule endpoint documentation for more examples.

Schema

    type stringrequired

    Possible values: [WEEKLY, MONTHLY, ANNUALLY, CALENDAR]

    Determines the overall schedule cadence. In general, all time period fields smaller than the chosen type can be configured. For example, a DAILY schedule can have 'hours' set, but not 'days'; a WEEKLY schedule can have both 'hours' and 'days' set.

    months

    object

    Specifies which months of a schedule are active. Only valid for ANNUALLY schedule types. Examples:

    On February and March:

    • type LIST
    • values "2", "3"

    Every 3 months, starting in January (quarterly):

    • type LIST
    • values "1"
    • interval 3

    Every two months between July and December:

    • type RANGE

    • values "7", "12"

    • interval 2

    type stringrequired

    Possible values: [LIST, RANGE]

    Enum type to specify months value

    values string[]required

    Values of the months based on the enum type mentioned above

    interval int64

    Interval between the cert generations

    days

    object

    Specifies which day(s) a schedule is active for. This is required for all schedule types. The "values" field holds different data depending on the type of schedule:

    • WEEKLY: days of the week (1-7)
    • MONTHLY: days of the month (1-31, L, L-1...)
    • ANNUALLY: if the "months" field is also set: days of the month (1-31, L, L-1...); otherwise: ISO-8601 dates without year ("--12-31")
    • CALENDAR: ISO-8601 dates ("2020-12-31")

    Note that CALENDAR only supports the LIST type, and ANNUALLY does not support the RANGE type when provided with ISO-8601 dates without year.

    Examples:

    On Sundays:

    • type LIST
    • values "1"

    The second to last day of the month:

    • type LIST
    • values "L-1"

    From the 20th to the last day of the month:

    • type RANGE
    • values "20", "L"

    Every March 2nd:

    • type LIST
    • values "--03-02"

    On March 2nd, 2021:

    • type: LIST

    • values "2021-03-02"

    type stringrequired

    Possible values: [LIST, RANGE]

    Enum type to specify days value

    values string[]required

    Values of the days based on the enum type mentioned above

    interval int64

    Interval between the cert generations

    hours

    object

    required

    Specifies which hour(s) a schedule is active for. Examples:

    Every three hours starting from 8AM, inclusive:

    • type LIST
    • values "8"
    • interval 3

    During business hours:

    • type RANGE
    • values "9", "5"

    At 5AM, noon, and 5PM:

    • type LIST

    • values "5", "12", "17"

    type stringrequired

    Possible values: [LIST, RANGE]

    Enum type to specify hours value

    values string[]required

    Values of the days based on the enum type mentioned above

    interval int64

    Interval between the cert generations

    expiration date-time

    Specifies the time after which this schedule will no longer occur.

    timeZoneId string

    The time zone to use when running the schedule. For instance, if the schedule is scheduled to run at 1AM, and this field is set to "CST", the schedule will run at 1AM CST.

Loading...