Automated commit 'IDNWAIMEA-10164: add API docs for sod-violation-report endpoints (#1286)

* IDNWAIMEA-10164: add API docs for sod-violation-report endpoints

* IDNWAIMEA-10164: add descriptions and examples' by github action: 4984341099
This commit is contained in:
GitHub Action Bot
2023-05-15 19:26:30 +00:00
parent c40c2cc129
commit 12c0ca080d
6 changed files with 177 additions and 0 deletions

View File

@@ -874,6 +874,14 @@ paths:
$ref: "./v3/paths/sod-violations-check.yaml"
/sod-violations/config:
$ref: "./v3/paths/sod-violations-config.yaml"
/sod-violation-report/run:
$ref: './v3/paths/sod-all-report-run.yaml'
/sod-violation-report:
$ref: './v3/paths/sod-all-report-status.yaml'
/sod-violation-report/{reportResultId}/download:
$ref: './v3/paths/sod-download-default-report.yaml'
/sod-violation-report/{reportResultId}/download/{fileName}:
$ref: './v3/paths/sod-download-custom-report.yaml'
/sources:
$ref: "./v3/paths/sources.yaml"
/sources/{id}:

View File

@@ -0,0 +1,45 @@
post:
security:
- oauth2: [idn:sod-violation:write]
operationId: startSodAllPoliciesForOrg
tags:
- SOD Policy
summary: Runs all policies for org
description: >-
Runs multi-policy report for the org. If a policy reports more than 5000 violations, the report mentions that the violation limit was exceeded for that policy.
If the request is empty, the report runs for all policies. Otherwise, the report runs for only the filtered policy list provided.
requestBody:
required: false
content:
application/json:
schema:
$ref: '../schemas/MultiPolicyRequest.yaml'
example: {
"filteredPolicyList": [
"b868cd40-ffa4-4337-9c07-1a51846cfa94",
"63a07a7b-39a4-48aa-956d-50c827deba2a"
]
}
responses:
'200':
description: Reference to the violation report run task.
content:
application/json:
schema:
$ref: '../schemas/ReportResultReference.yaml'
example: {
"status": "PENDING",
"type": "REPORT_RESULT",
"id": "37b3b32a-f394-46f8-acad-b5223969fa68",
"name": "Multi Query Report"
}
'400':
$ref: '../responses/400.yaml'
'401':
$ref: '../responses/401.yaml'
'403':
$ref: '../responses/403.yaml'
'429':
$ref: '../responses/429.yaml'
'500':
$ref: '../responses/500.yaml'

View File

@@ -0,0 +1,32 @@
get:
security:
- oauth2: [idn:sod-violation:read]
operationId: getSodAllReportRunStatus
tags:
- SOD Policy
summary: Get multi-report run task status
description: >-
This endpoint gets the status for a violation report for all policy run.
responses:
'200':
description: Status of the violation report run task for all policy run.
content:
application/json:
schema:
$ref: '../schemas/ReportResultReference.yaml'
example: {
"status": "SUCCESS",
"type": "REPORT_RESULT",
"id": "37b3b32a-f394-46f8-acad-b5223969fa68",
"name": "Multi Query Report"
}
'400':
$ref: '../responses/400.yaml'
'401':
$ref: '../responses/401.yaml'
'403':
$ref: '../responses/403.yaml'
'429':
$ref: '../responses/429.yaml'
'500':
$ref: '../responses/500.yaml'

View File

@@ -0,0 +1,44 @@
get:
security:
- oauth2: [idn:sod-violation:read]
operationId: getCustomViolationReport
tags:
- SOD Policy
summary: Download custom violation report
description: >-
This allows to download a specified named violation report for a given report reference.
parameters:
- in: path
name: reportResultId
schema:
type: string
required: true
description: The ID of the report reference to download.
example: ef38f94347e94562b5bb8424a56397d8
- in: path
name: fileName
schema:
type: string
required: true
description: Custom Name for the file.
example: custom-name
responses:
'200':
description: Returns the zip file with given custom name that contains the violation report file.
content:
application/zip:
schema:
type: string
format: binary
'400':
$ref: '../responses/400.yaml'
'401':
$ref: '../responses/401.yaml'
'403':
$ref: '../responses/403.yaml'
'404':
$ref: '../responses/404.yaml'
'429':
$ref: '../responses/429.yaml'
'500':
$ref: '../responses/500.yaml'

View File

@@ -0,0 +1,37 @@
get:
security:
- oauth2: [idn:sod-violation:read]
operationId: getDefaultViolationReport
tags:
- SOD Policy
summary: Download violation report
description: >-
This allows to download a violation report for a given report reference.
parameters:
- in: path
name: reportResultId
schema:
type: string
required: true
description: The ID of the report reference to download.
example: ef38f94347e94562b5bb8424a56397d8
responses:
'200':
description: Returns the PolicyReport.zip that contains the violation report file.
content:
application/zip:
schema:
type: string
format: binary
'400':
$ref: '../responses/400.yaml'
'401':
$ref: '../responses/401.yaml'
'403':
$ref: '../responses/403.yaml'
'404':
$ref: '../responses/404.yaml'
'429':
$ref: '../responses/429.yaml'
'500':
$ref: '../responses/500.yaml'

View File

@@ -0,0 +1,11 @@
type: object
properties:
filteredPolicyList:
type: array
description: Multi-policy report will be run for this list of ids
items:
type: string
example: [
"b868cd40-ffa4-4337-9c07-1a51846cfa94",
"63a07a7b-39a4-48aa-956d-50c827deba2a"
]