Skip to main content

Set Campaign Template Schedule

PUT 

/campaign-templates/:id/schedule

deprecated

This endpoint has been deprecated and may be replaced or removed in future versions of the API.

Use this API to set the schedule for a certification campaign template. If a schedule already exists, the API overwrites it with the new one. Though this Beta endpoint has been deprecated, you can find its V3 equivalent here.

Request

Path Parameters

    id stringrequired

    ID of the campaign template being scheduled.

    Example: 04bedce387bd47b2ae1f86eb0bb36dee

Body

    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 objectrequired

    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.

Responses

No content - indicates the request was successful but there is no content to be returned in the response.

Loading...