-
Notifications
You must be signed in to change notification settings - Fork 6
Public Doc -> GA Release of New Secops rest apis #665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
abharti1111
wants to merge
13
commits into
master
Choose a base branch
from
feature/SPOTSEC-4343/public-docs-secops-rest-api
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fe92f09
added: changes for spot security public rest api's
bavinash-netapp 1d8779e
added: fix for breaking PR validations
bavinash-netapp 28543cd
Merge branch 'master' into feature/SPOTSEC-4343/public-docs-secops-re…
abharti1111 8ee92ce
updated: docs as per feedback
bavinash-netapp 515f99a
fix: updated schema to match with finops standards
bavinash-netapp bb63c6c
Merge branch 'master' into feature/SPOTSEC-4343/public-docs-secops-re…
abharti1111 c4f7ccb
updated: removed some of the unused files
bavinash-netapp 06b9a61
fix
bavinash-netapp 825d592
Merge branch 'master' into feature/SPOTSEC-4343/public-docs-secops-re…
abharti1111 2a42d66
updated: schema for null removal
bavinash-netapp 7d5a88d
fix
bavinash-netapp 93ed263
added venv to gitignore
bavinash-netapp b22b9cd
Merge branch 'master' of https://github.com/spotinst/openapi into fea…
bavinash-netapp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 resource for the service. | ||
| in: query | ||
| name: assetType | ||
| required: false | ||
| schema: | ||
| description: A comma-separated list of cloud resource for the service. | ||
| title: Assettype | ||
| type: string |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 resource for the service to exclude. | ||
| in: query | ||
| name: notAssetType | ||
| required: false | ||
| schema: | ||
| description: A comma-separated list of cloud resource for the service to exclude. | ||
| title: Notassettype | ||
| type: string |
This file contains hidden or 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 hidden or 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 hidden or 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need for the title
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is also generated by FastAPI library not in our control |
||
| type: string | ||
11 changes: 11 additions & 0 deletions
11
api/services/security/v1/parameters/paginationSize_query.yaml
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.