Skip to content

Commit

Permalink
Automated commit 'ISCCOMPLI-306: Beta to v3 API doc migration for set…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
tyler-mairose-sp committed Oct 2, 2023
1 parent ee5e101 commit 00f838f
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 15 deletions.
14 changes: 14 additions & 0 deletions idn/beta/paths/campaign-template-schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ 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
schema:
type: string
required: true
description: The ID of the campaign template whose schedule is being fetched.
example: "04bedce387bd47b2ae1f86eb0bb36dee"
responses:
'200':
description: >-
Expand All @@ -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':
Expand All @@ -39,13 +44,17 @@ 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
schema:
type: string
required: true
description: The ID of the campaign template being scheduled.
example: 04bedce387bd47b2ae1f86eb0bb36dee
requestBody:
content:
application/json:
Expand Down Expand Up @@ -140,16 +149,21 @@ 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
schema:
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':
Expand Down
52 changes: 37 additions & 15 deletions idn/beta/schemas/Schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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...)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions idn/sailpoint-api.v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}:
Expand Down
105 changes: 105 additions & 0 deletions idn/v3/paths/campaign-template-schedule.yaml
Original file line number Diff line number Diff line change
@@ -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'
Loading

0 comments on commit 00f838f

Please sign in to comment.