-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docs For secops rest apis (#687)
* added: changes for spot security public rest api's * added: fix for breaking PR validations * updated: docs as per feedback * fix: updated schema to match with finops standards * updated: removed some of the unused files * fix * updated: schema for null removal * fix * added venv to gitignore * added: fix --------- Co-authored-by: Avinash Bharti <bavinash@netapp.com>
- Loading branch information
1 parent
0f3ec14
commit bc7d950
Showing
59 changed files
with
1,008 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ test-results.xml | |
*.log* | ||
npm-debug.log | ||
package-lock.json | ||
.venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
description: A comma-separated list of cloud account IDs. For AWS this is the account | ||
ID. For Azure, this is the subscription ID. | ||
in: query | ||
name: accountId | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud account IDs. For AWS this is the account | ||
ID. For Azure, this is the subscription ID. | ||
title: Accountid | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: A comma-separated list of cloud account names. | ||
in: query | ||
name: accountName | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud account names. | ||
title: Accountname | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: The asset's ID (a cloud resource). | ||
in: query | ||
name: assetId | ||
required: false | ||
schema: | ||
description: The asset's ID (a cloud resource). | ||
title: Assetid | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: A comma-separated list of cloud resources for the service. | ||
in: query | ||
name: assetType | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud resources for the service. | ||
title: Assettype | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
in: query | ||
name: cloud | ||
required: true | ||
schema: | ||
$ref: "../schemas/cloud__constant__base__CloudProvider.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: The name of the cyber security compliance. | ||
example: SOC_2 | ||
in: path | ||
name: complianceName | ||
required: true | ||
schema: | ||
description: The name of the cyber security compliance. | ||
title: Compliancename | ||
type: string |
9 changes: 9 additions & 0 deletions
9
api/services/security/v1/parameters/complianceName_query.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: The name of the cyber security compliance. | ||
example: SOC_2 | ||
in: query | ||
name: complianceName | ||
required: false | ||
schema: | ||
description: The name of the cyber security compliance. | ||
title: Compliancename | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: The ID of the control defined in the compliance. | ||
example: A1.2 | ||
in: query | ||
name: controlId | ||
required: false | ||
schema: | ||
description: The ID of the control defined in the compliance. | ||
title: Controlid | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
description: The date the finding was most recently found (YYYY-MM-DD). | ||
example: '1997-11-11' | ||
in: query | ||
name: date | ||
required: false | ||
schema: | ||
description: The date the finding was most recently found (YYYY-MM-DD). | ||
format: date | ||
title: Date | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: If this is not a manual control, the value is True. | ||
in: query | ||
name: isAutomated | ||
required: false | ||
schema: | ||
description: If this is not a manual control, the value is True. | ||
title: Isautomated | ||
type: boolean |
10 changes: 10 additions & 0 deletions
10
api/services/security/v1/parameters/notAccountId_query.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
description: A comma-separated list of cloud account IDs to exclude. For AWS this | ||
is the account ID. For Azure, this is the subscription ID. | ||
in: query | ||
name: notAccountId | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud account IDs to exclude. For AWS this | ||
is the account ID. For Azure, this is the subscription ID. | ||
title: Notaccountid | ||
type: string |
8 changes: 8 additions & 0 deletions
8
api/services/security/v1/parameters/notAccountName_query.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: A comma-separated list of cloud account names to exclude | ||
in: query | ||
name: notAccountName | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud account names to exclude | ||
title: Notaccountname | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: A comma-separated list of cloud resources for the service to exclude. | ||
in: query | ||
name: notAssetType | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud resources for the service to exclude. | ||
title: Notassettype | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: A comma-separated list of cloud regions to exclude. | ||
example: us-east-1 | ||
in: query | ||
name: notRegion | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud regions to exclude. | ||
title: Notregion | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: A comma-separated list of cloud services to exclude. | ||
in: query | ||
name: notService | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud services to exclude. | ||
title: Notservice | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: Token of the page to return. | ||
in: query | ||
name: paginationKey | ||
required: false | ||
schema: | ||
description: Token of the page to return. | ||
title: Paginationkey | ||
type: string |
11 changes: 11 additions & 0 deletions
11
api/services/security/v1/parameters/paginationSize_query.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
description: Number of items to return per page. | ||
in: query | ||
name: paginationSize | ||
required: false | ||
schema: | ||
default: 100 | ||
description: Number of items to return per page. | ||
maximum: 100 | ||
minimum: 1 | ||
title: Paginationsize | ||
type: integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: A comma-separated list of cloud regions. | ||
example: us-east-1 | ||
in: query | ||
name: region | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud regions. | ||
title: Region | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: The unique name of the rule. | ||
in: query | ||
name: ruleName | ||
required: false | ||
schema: | ||
description: The unique name of the rule. | ||
title: Rulename | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: A comma-separated list of cloud services. | ||
in: query | ||
name: service | ||
required: false | ||
schema: | ||
description: A comma-separated list of cloud services. | ||
title: Service | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
get: | ||
description: 'A cyber security compliance determines how compliant an asset is. | ||
It checks against specific security standards. | ||
This API returns list of all compliances supported in Spot. | ||
A compliance consists of one or more controls.' | ||
operationId: get_compliances_v1_compliances_get | ||
parameters: | ||
- $ref: "../parameters/paginationKey_query.yaml" | ||
- $ref: "../parameters/paginationSize_query.yaml" | ||
responses: | ||
'200': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml" | ||
description: Successful Response | ||
'400': | ||
content: {} | ||
description: Bad Request | ||
'404': | ||
description: Not Found | ||
'422': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/HTTPValidationError.yaml" | ||
description: Validation Error | ||
summary: Get Compliances | ||
tags: | ||
- Compliance | ||
parameters: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
get: | ||
description: 'A control is countermeasures to avoid, detect, counteract, or minimize | ||
security risks of cloud assets. | ||
A control may be part of one or more compliances. A control is verified in one | ||
or more rules. | ||
This API returns the list of controls mapped to a specific compliance.' | ||
operationId: get_compliance_controls_v1_compliances__complianceName__controls_get | ||
parameters: | ||
- $ref: "../parameters/complianceName_path.yaml" | ||
- $ref: "../parameters/isAutomated_query.yaml" | ||
- $ref: "../parameters/paginationKey_query.yaml" | ||
- $ref: "../parameters/paginationSize_query.yaml" | ||
responses: | ||
'200': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml" | ||
description: Successful Response | ||
'400': | ||
content: {} | ||
description: Bad Request | ||
'404': | ||
description: Not Found | ||
'422': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/HTTPValidationError.yaml" | ||
description: Validation Error | ||
summary: Get Compliance Controls | ||
tags: | ||
- Compliance | ||
parameters: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
get: | ||
description: Get the total number of controls for the selected compliance. | ||
operationId: get_compliance_controls_count_v1_compliances__complianceName__controls_count_get | ||
parameters: | ||
- $ref: "../parameters/complianceName_path.yaml" | ||
- $ref: "../parameters/isAutomated_query.yaml" | ||
responses: | ||
'200': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/SpotResponse_BaseResponse_CountModel__.yaml" | ||
description: Successful Response | ||
'400': | ||
content: {} | ||
description: Bad Request | ||
'404': | ||
description: Not Found | ||
'422': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/HTTPValidationError.yaml" | ||
description: Validation Error | ||
summary: Get Compliance Controls Count | ||
tags: | ||
- Compliance | ||
parameters: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
get: | ||
description: Get the total number of compliances. | ||
operationId: get_compliance_count_v1_compliances_count_get | ||
parameters: [] | ||
responses: | ||
'200': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/SpotResponse_BaseResponse_CountModel__.yaml" | ||
description: Successful Response | ||
'400': | ||
content: {} | ||
description: Bad Request | ||
'404': | ||
description: Not Found | ||
summary: Get Compliance Count | ||
tags: | ||
- Compliance | ||
parameters: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
get: | ||
description: This API returns the list of assets that have misconfigurations. | ||
operationId: get_misconfigurations_v1_misconfigurations_get | ||
parameters: | ||
- $ref: "../parameters/cloud_query.yaml" | ||
- $ref: "../parameters/accountId_query.yaml" | ||
- $ref: "../parameters/notAccountId_query.yaml" | ||
- $ref: "../parameters/accountName_query.yaml" | ||
- $ref: "../parameters/notAccountName_query.yaml" | ||
- $ref: "../parameters/region_query.yaml" | ||
- $ref: "../parameters/notRegion_query.yaml" | ||
- $ref: "../parameters/date_query.yaml" | ||
- $ref: "../parameters/service_query.yaml" | ||
- $ref: "../parameters/notService_query.yaml" | ||
- $ref: "../parameters/assetType_query.yaml" | ||
- $ref: "../parameters/notAssetType_query.yaml" | ||
- $ref: "../parameters/ruleName_query.yaml" | ||
- $ref: "../parameters/assetId_query.yaml" | ||
- $ref: "../parameters/paginationKey_query.yaml" | ||
- $ref: "../parameters/paginationSize_query.yaml" | ||
responses: | ||
'200': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml" | ||
description: Successful Response | ||
'400': | ||
content: {} | ||
description: Bad Request | ||
'404': | ||
description: Not Found | ||
'422': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/HTTPValidationError.yaml" | ||
description: Validation Error | ||
summary: Get Misconfigurations | ||
tags: | ||
- Misconfiguration | ||
parameters: [] |
Oops, something went wrong.