Automated commit 'ISCCOMPLI-306: Beta to v3 API doc migration for set schedule campaign template API (#1427)

* ISCCOMPLI-306: Beta to v3 API doc migration for set schedule campaign template API

* ISCCOMPLI-306: Removed DAILY option from beta schedule

* ISCCOMPLI-306: Fix for linter errors

* ISCCOMPLI-306: Fix for linter errors

* ISCCOMPLI-306: Added more descriptions in beta files

* ISCCOMPLI-306: Fixed more linter errors

* ISCCOMPLI-306: Fixed more linter errors

* ISCCOMPLI-306: Added the main v3 path' by github action: 6381139723
This commit is contained in:
GitHub Action Bot
2023-10-02 14:01:58 +00:00
parent ee5e10160a
commit 00f838f4e1
5 changed files with 331 additions and 15 deletions

View File

@@ -5,6 +5,8 @@ get:
summary: Gets a Campaign Template's Schedule
description: >-
Gets the schedule for a campaign template. Returns a 404 if there is no schedule set.
security:
- UserContextAuth: [ idn:campaign-template:read ]
parameters:
- in: path
name: id
@@ -12,6 +14,7 @@ get:
type: string
required: true
description: The ID of the campaign template whose schedule is being fetched.
example: "04bedce387bd47b2ae1f86eb0bb36dee"
responses:
'200':
description: >-
@@ -21,6 +24,8 @@ get:
application/json:
schema:
$ref: '../schemas/Schedule.yaml'
'400':
$ref: '../../v3/responses/400.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':
@@ -39,6 +44,9 @@ put:
description: >-
Sets the schedule for a campaign template. If a schedule already exists, it will be overwritten with
the new one.
security:
- UserContextAuth: [ idn:campaign-template:run ]
deprecated: true
parameters:
- in: path
name: id
@@ -46,6 +54,7 @@ put:
type: string
required: true
description: The ID of the campaign template being scheduled.
example: 04bedce387bd47b2ae1f86eb0bb36dee
requestBody:
content:
application/json:
@@ -140,6 +149,8 @@ delete:
summary: Deletes a Campaign Template's Schedule
description: >-
Deletes the schedule for a campaign template. Returns a 404 if there is no schedule set.
security:
- UserContextAuth: [ idn:campaign-template:run ]
parameters:
- in: path
name: id
@@ -147,9 +158,12 @@ delete:
type: string
required: true
description: The ID of the campaign template whose schedule is being deleted.
example: "04bedce387bd47b2ae1f86eb0bb36dee"
responses:
'204':
$ref: '../../v3/responses/204.yaml'
'400':
$ref: '../../v3/responses/400.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':

View File

@@ -7,11 +7,12 @@ properties:
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.
enum:
- DAILY
- WEEKLY
- MONTHLY
- ANNUALLY
- CALENDAR
example:
WEEKLY
months:
type: object
description: |
@@ -33,22 +34,32 @@ properties:
properties:
type:
type: string
description: Enum type to specify months value
enum:
- LIST
- RANGE
example:
LIST
values:
type: array
description:
Values of the months based on the enum type mentioned above
items:
type: string
example:
- "1"
interval:
type: integer
example: 2
format: int64
description: Interval between the cert generations
required:
- type
- values
days:
type: object
description: |
Specifies which day(s) a schedule is active for. This is required for all schedule types except DAILY.
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...)
@@ -82,15 +93,24 @@ properties:
properties:
type:
type: string
description: Enum type to specify days value
enum:
- LIST
- RANGE
example: LIST
values:
type: array
description:
Values of the days based on the enum type mentioned above
items:
type: string
example:
- "1"
interval:
type: integer
example: 2
format: int64
description: Interval between the cert generations
required:
- type
- values
@@ -114,15 +134,25 @@ properties:
properties:
type:
type: string
description: Enum type to specify hours value
enum:
- LIST
- RANGE
example:
LIST
values:
type: array
description:
Values of the days based on the enum type mentioned above
items:
type: string
example:
- "1"
interval:
type: integer
format: int64
example: 2
description: Interval between the cert generations
required:
- type
- values
@@ -131,21 +161,13 @@ properties:
format: date-time
description: >-
Specifies the time after which this schedule will no longer occur.
example: "2022-09-19 13:55:26"
timeZoneId:
type: string
description: >-
The time zone to use when running the schedule. For instance, if the schedule is a DAILY schedule
that runs at 1AM, and this field is set to "CST", the schedule will run at 1AM CST.
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.
example: "CST"
required:
- type
- hours
example:
type: MONTHLY
hours:
type: LIST
values:
- "0"
days:
type: LIST
values:
- "1"
- hours

View File

@@ -874,6 +874,8 @@ paths:
$ref: './v3/paths/campaign-templates.yaml'
/campaign-templates/{id}:
$ref: './v3/paths/campaign-template.yaml'
/campaign-templates/{id}/schedule:
$ref: './v3/paths/campaign-template-schedule.yaml'
/certifications:
$ref: "./v3/paths/identity-certifications.yaml"
/certifications/{id}:

View File

@@ -0,0 +1,105 @@
put:
operationId: setCampaignTemplateSchedule
tags:
- Certification Campaigns
summary: Sets a Campaign Template's Schedule
description: >-
Sets the schedule for a campaign template. If a schedule already exists, it will be overwritten with
the new one.
security:
- UserContextAuth: [ idn:campaign-template:run ]
parameters:
- in: path
name: id
schema:
type: string
required: true
description: The ID of the campaign template being scheduled.
example: "04bedce387bd47b2ae1f86eb0bb36dee"
requestBody:
content:
application/json:
schema:
$ref: '../schemas/Schedule.yaml'
examples:
'Monthly':
description: Runs on the 15th and last day of the month, at 5PM.
value:
type: MONTHLY
hours:
type: LIST
values:
- "17"
days:
type: LIST
values:
- "15"
'Once a year':
description: Runs every January 1st at midnight.
value:
type: ANNUALLY
hours:
type: LIST
values:
- "0"
days:
type: LIST
values:
- "--01-01"
'Quarterly':
description: Runs once a quarter (every 3 months) on the first of the month at 1AM.
value:
type: ANNUALLY
hours:
type: LIST
values:
- "1"
days:
type: LIST
values:
- "1"
months:
type: LIST
values:
- "1"
interval: 3
'Yearly on Specific Days':
description: Runs on March 12 and December 5 at 1AM, every year.
value:
type: ANNUALLY
hours:
type: LIST
values:
- "1"
days:
type: LIST
values:
- "--03-12"
- "--12-05"
'On a Specific Date':
description: Runs at 1AM on February 18th, 2020
value:
type: CALENDAR
hours:
type: LIST
values:
- "1"
days:
type: LIST
values:
- "2020-02-18"
responses:
'204':
$ref: '../responses/204.yaml'
'401':
$ref: '../responses/401.yaml'
'403':
$ref: '../responses/403.yaml'
'400':
$ref: '../responses/400.yaml'
'404':
$ref: '../responses/404.yaml'
'429':
$ref: '../responses/429.yaml'
'500':
$ref: '../responses/500.yaml'

View File

@@ -0,0 +1,173 @@
type : object
properties:
type:
type: string
description: >-
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.
enum:
- WEEKLY
- MONTHLY
- ANNUALLY
- CALENDAR
example:
WEEKLY
months:
type: object
description: |
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
properties:
type:
type: string
description: Enum type to specify months value
enum:
- LIST
- RANGE
example:
LIST
values:
type: array
description:
Values of the months based on the enum type mentioned above
items:
type: string
example:
- "1"
interval:
type: integer
example: 2
format: int64
description: Interval between the cert generations
required:
- type
- values
days:
type: object
description: |
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"
properties:
type:
type: string
description: Enum type to specify days value
enum:
- LIST
- RANGE
example: LIST
values:
type: array
description:
Values of the days based on the enum type mentioned above
items:
type: string
example:
- "1"
interval:
type: integer
example: 2
format: int64
description: Interval between the cert generations
required:
- type
- values
hours:
type: object
description: |
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"
properties:
type:
type: string
description: Enum type to specify hours value
enum:
- LIST
- RANGE
example:
LIST
values:
type: array
description:
Values of the days based on the enum type mentioned above
items:
type: string
example:
- "1"
interval:
type: integer
format: int64
example: 2
description: Interval between the cert generations
required:
- type
- values
expiration:
type: string
format: date-time
description: >-
Specifies the time after which this schedule will no longer occur.
example: "2022-09-19 13:55:26"
timeZoneId:
type: string
description: >-
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.
example: "CST"
required:
- type
- hours